/* Shared site chrome — tokens, header, footer, buttons.
   Link before page-specific CSS on every public surface. */

:root {
  --bg: #07090e;
  --bg-elevated: #0c1018;
  --bg-deep: #05070b;
  --ink: #eef1f7;
  --ink-soft: #b4bccf;
  --ink-mute: #7a849c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #4f8cff;
  --accent-strong: #3b7af0;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --accent-muted: #c5d4f5;
  --ok: #8ad4a8;
  --surface: rgba(16, 20, 30, 0.82);
  --surface-solid: #0c1018;
  --shadow-accent: 0 10px 24px rgba(79, 140, 255, 0.24);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-bg: rgba(7, 9, 14, 0.82);
  --header-h: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-section: clamp(48px, 8vh, 88px);
  --content-max: 920px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 40;
}

.logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.logo-mark {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.logo:hover {
  color: #fff;
}

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
}

.site-header nav a {
  color: var(--ink-mute);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-btn-primary {
  background: var(--accent);
  color: #fff !important;
  box-shadow: var(--shadow-accent);
}

.nav-btn-primary:hover {
  background: var(--accent-strong);
  color: #fff !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
  padding: 12px 14px;
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--ink-soft);
  white-space: nowrap;
}

.chip-accent {
  color: var(--accent-muted);
  border-color: rgba(79, 140, 255, 0.28);
  background: var(--accent-soft);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 12px;
  background: var(--bg-deep);
}

.site-footer p {
  margin: 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.site-footer-links a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer-links a:hover {
  color: var(--ink);
}

.site-footer-label {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--ink-mute);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
}

@media (max-width: 700px) {
  .site-header {
    padding: 10px 14px;
    gap: 10px;
  }

  .logo {
    font-size: 16px;
  }

  .site-header nav {
    gap: 4px 10px;
  }

  .site-header nav a:not(.nav-btn) {
    font-size: 13px;
  }

  .nav-btn-primary {
    padding: 7px 11px;
    font-size: 12px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
  }
}
