/* ============================================================
   NEXMOVE — Design Tokens & Global Styles
   Graphite engineering surface + dual accent (Signal Cyan / Pulse Amber)
   Typography: Cabinet Grotesk (display) + General Sans (body) — Fontshare
   ============================================================ */

:root {
  /* ---------- Type scale (fluid clamp) ---------- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6vw, 6.5rem);

  /* ---------- Spacing (4px system) ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---------- Radius ---------- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ---------- Transitions ---------- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ---------- Content widths ---------- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1280px;
  --content-full: 100%;

  /* ---------- Fonts ---------- */
  --font-display: 'Cabinet Grotesk', 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'General Sans', 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ============================================================
   LIGHT MODE (default) — "Lab White" — used for optional light sections
   ============================================================ */
:root,
[data-theme='light'] {
  --color-bg: #f4f3f0;
  --color-surface: #ffffff;
  --color-surface-2: #fafaf8;
  --color-surface-offset: #ebe9e4;
  --color-surface-offset-2: #e2e0da;
  --color-divider: #d8d5cd;
  --color-border: #cbc8bf;

  --color-text: #17181a;
  --color-text-muted: #55575c;
  --color-text-faint: #93938f;
  --color-text-inverse: #f4f3f0;

  --color-primary: #0a7d84; /* Signal Cyan, deepened for AA on light */
  --color-primary-hover: #076066;
  --color-primary-active: #054850;
  --color-primary-highlight: #d3e6e5;

  --color-amber: #a35c00; /* Pulse Amber, deepened for AA on light */
  --color-amber-hover: #7d4700;
  --color-amber-highlight: #ecdcc2;

  --color-warning: #a3520d;
  --color-warning-highlight: #ecdac2;
  --color-error: #a4264a;
  --color-error-highlight: #eed0da;
  --color-success: #34733a;
  --color-success-highlight: #d3e3d1;

  --radius-sm: 0.25rem;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 250 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 250 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 250 / 0.14);

  --grid-line: oklch(0.15 0.01 250 / 0.07);
}

/* ============================================================
   DARK MODE (primary brand mode) — "Graphite" surface, not navy
   ============================================================ */
[data-theme='dark'] {
  --color-bg: #0d0e0f;
  --color-surface: #141517;
  --color-surface-2: #191a1c;
  --color-surface-offset: #1d1f21;
  --color-surface-offset-2: #24262a;
  --color-divider: #2a2c2f;
  --color-border: #33353a;

  --color-text: #eceeef;
  --color-text-muted: #a2a5aa;
  --color-text-faint: #6c6f75;
  --color-text-inverse: #0d0e0f;

  --color-primary: #4fd3d9; /* Signal Cyan */
  --color-primary-hover: #7ce0e4;
  --color-primary-active: #35a8ad;
  --color-primary-highlight: #1c3436;

  --color-amber: #e8a13a; /* Pulse Amber */
  --color-amber-hover: #f0b665;
  --color-amber-highlight: #3a2e18;

  --color-warning: #e2954a;
  --color-warning-highlight: #3a2e1c;
  --color-error: #e5738f;
  --color-error-highlight: #3a2028;
  --color-success: #7cc274;
  --color-success-highlight: #1e3320;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.5);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.6);

  --grid-line: oklch(1 0 0 / 0.05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0d0e0f;
    --color-surface: #141517;
    --color-surface-2: #191a1c;
    --color-surface-offset: #1d1f21;
    --color-surface-offset-2: #24262a;
    --color-divider: #2a2c2f;
    --color-border: #33353a;
    --color-text: #eceeef;
    --color-text-muted: #a2a5aa;
    --color-text-faint: #6c6f75;
    --color-text-inverse: #0d0e0f;
    --color-primary: #4fd3d9;
    --color-primary-hover: #7ce0e4;
    --color-primary-active: #35a8ad;
    --color-primary-highlight: #1c3436;
    --color-amber: #e8a13a;
    --color-amber-hover: #f0b665;
    --color-amber-highlight: #3a2e18;
    --color-warning: #e2954a;
    --color-warning-highlight: #3a2e1c;
    --color-error: #e5738f;
    --color-error-highlight: #3a2028;
    --color-success: #7cc274;
    --color-success-highlight: #1e3320;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
    --shadow-md: 0 8px 24px oklch(0 0 0 / 0.5);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.6);
    --grid-line: oklch(1 0 0 / 0.05);
  }
}

/* ============================================================
   GLOBAL ELEMENTS
   ============================================================ */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}
.container--default {
  max-width: var(--content-default);
}
.container--narrow {
  max-width: var(--content-narrow);
}

section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
  position: relative;
}
section.section--tight {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
  box-shadow: 0 0 0 3px oklch(from currentColor l c h / 0.18);
}

p {
  color: var(--color-text-muted);
}
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
  min-height: 44px;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--color-primary);
  color: #06181a;
}
[data-theme='light'] .btn-primary {
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  color: #06181a;
}
[data-theme='light'] .btn-primary:hover {
  color: #ffffff;
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  color: var(--color-primary);
}
.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}
.btn-full {
  width: 100%;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}
.site-header--hidden {
  transform: translateY(-100%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: var(--space-6);
}
.brand {
  display: flex;
  align-items: center;
  color: var(--color-text);
}
.brand:hover {
  color: var(--color-text);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  height: 32px;
  width: auto;
  display: block;
}
.brand-word {
  height: 17px;
  width: auto;
  display: block;
}
.logo-on-light { display: none; }
[data-theme="light"] .logo-on-dark { display: none; }
[data-theme="light"] .logo-on-light { display: block; }
.brand-lockup--sm .brand-mark { height: 26px; }
.brand-lockup--sm .brand-word { height: 14px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.main-nav ul {
  display: flex;
  gap: var(--space-6);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding-block: var(--space-1);
}
.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--color-text);
}
.main-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.icon-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.lang-toggle {
  width: auto;
  height: 40px;
  padding: 0 var(--space-3);
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-toggle span {
  display: inline-block;
}

.mobile-nav-lang {
  display: flex;
  margin-top: var(--space-6);
}
.mobile-nav-lang .lang-toggle--mobile {
  width: auto;
  height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
  padding-block: var(--space-16) var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-10);
}
.footer-brand p {
  max-width: 320px;
  font-size: var(--text-sm);
  margin-top: var(--space-4);
}
.footer-col h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-legal-links {
  display: flex;
  gap: var(--space-5);
}
.footer-legal-links a {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}
.footer-legal-links a:hover {
  color: var(--color-primary);
}
.disclaimer-strip {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  margin-top: var(--space-6);
  max-width: 100%;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #06181a;
  padding: var(--space-2) var(--space-4);
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* ---------- Utility ---------- */
.text-muted {
  color: var(--color-text-muted);
}
.text-faint {
  color: var(--color-text-faint);
}
.text-primary {
  color: var(--color-primary);
}
.text-amber {
  color: var(--color-amber);
}
.mono {
  font-family: var(--font-mono);
}
.center {
  text-align: center;
}
.stack {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.wrap {
  flex-wrap: wrap;
}

.grid-overlay-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent);
  pointer-events: none;
}

/* ---------- Scroll reveal (opacity/clip only — no CLS) ---------- */
.reveal {
  opacity: 1;
}
@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}
@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ---------- Page header (interior pages) ---------- */
.page-hero {
  padding-block: clamp(var(--space-20), 12vw, var(--space-32)) clamp(var(--space-12), 6vw, var(--space-16));
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  font-size: var(--text-2xl);
  max-width: 22ch;
}
.page-hero .lede {
  font-size: var(--text-lg);
  max-width: 60ch;
  margin-top: var(--space-5);
}

/* ---------- Breadcrumb-like crumbs ---------- */
.crumbs {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
}
.crumbs a {
  color: var(--color-text-faint);
}
.crumbs a:hover {
  color: var(--color-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 860px) {
  .main-nav ul {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-inner {
    height: 68px;
  }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--color-bg);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
}
.mobile-nav.is-open {
  transform: translateX(0);
}
.mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-10);
  list-style: none;
  padding-left: 0;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}
.mobile-nav-cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ============ SHARED: SECTION HEADING (reused across all interior pages) ============ */
.section-heading {
  max-width: 640px;
  margin-bottom: var(--space-12);
}
.section-heading h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-4);
}

/* ============ SHARED: SECTION SPACING ============ */
.section--tight {
  padding-block: clamp(var(--space-10), 6vw, var(--space-16));
}
