/* ============================================================
   SKYLEX — Premium immigration law firm homepage
   Design tokens + base styles
   ============================================================ */

:root {
  /* Brand */
  --ink: #0A0F1E;          /* deep navy bg */
  --ink-2: #0E1426;        /* card bg */
  --ink-3: #141B33;        /* elevated */
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);

  --paper: #FAF7F0;
  --paper-2: #FFFFFF;
  --paper-3: #F2EEE3;
  --paper-hairline: rgba(10, 15, 30, 0.10);
  --paper-hairline-strong: rgba(10, 15, 30, 0.18);

  /* Surfaces — flipped per theme */
  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --bg-3: var(--ink-3);
  --line: var(--hairline);
  --line-strong: var(--hairline-strong);

  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.66);
  --text-mute: rgba(255, 255, 255, 0.44);

  /* Accent (tweakable) */
  --gold: #C9A84C;
  --gold-deep: #A48634;
  --gold-soft: rgba(201, 168, 76, 0.14);
  --blue: #4A9EFF;
  --blue-soft: rgba(74, 158, 255, 0.14);

  /* Type (tweakable) */
  --font-serif: "Fraunces", "GT Sectra", "Recoleta", Georgia, serif;
  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Spacing (density-aware) */
  --section-y: clamp(80px, 9vw, 140px);
  --gutter: clamp(20px, 4vw, 48px);
  --max-w: 1240px;

  /* Background pattern */
  --bg-pattern: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0);
  --bg-pattern-size: 28px 28px;
}

/* Theme: light */
:root[data-theme="light"] {
  --bg: var(--paper);
  --bg-2: var(--paper-2);
  --bg-3: var(--paper-3);
  --line: var(--paper-hairline);
  --line-strong: var(--paper-hairline-strong);
  --text: #0A0F1E;
  --text-dim: rgba(10, 15, 30, 0.66);
  --text-mute: rgba(10, 15, 30, 0.44);
  --bg-pattern: radial-gradient(circle at 1px 1px, rgba(10, 15, 30, 0.10) 1px, transparent 0);
}

/* Density */
:root[data-density="compact"] {
  --section-y: clamp(56px, 6vw, 92px);
  --gutter: clamp(16px, 3vw, 32px);
}
:root[data-density="comfy"] {
  --section-y: clamp(100px, 11vw, 180px);
}

/* Background patterns */
:root[data-pattern="dots"] {
  --bg-pattern: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  --bg-pattern-size: 28px 28px;
}
:root[data-pattern="grid"] {
  --bg-pattern:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  --bg-pattern-size: 56px 56px;
}
:root[data-pattern="topo"] {
  --bg-pattern: none; /* uses .bg-topo SVG instead */
}
:root[data-pattern="glow"] {
  --bg-pattern: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  --bg-pattern-size: 28px 28px;
}
:root[data-pattern="none"] {
  --bg-pattern: none;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* overflow-x hidden on body blocks the browser compositor on mobile;
     use clip on html+body pair instead so the main scroll container
     stays compositor-friendly */
  overflow-x: clip;
  transition: background-color 280ms ease, color 280ms ease;
}
/* Companion rule: prevent horizontal overflow at html level */
html { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
* {
  -webkit-tap-highlight-color: transparent;
}
a, button, .btn, .nav-link, .svc, .feat, .quick-btn, .app-badge, .lang-btn, .lang-item,
.nav-mobile-toggle, .stat, .tstm, .svc-link, .office-item, .cta-card, .iphone,
.hero-phone-stage, .appsec-phone-wrap, .marquee-item, .hero-ctas, .hero-trust {
  -webkit-user-select: none;
  user-select: none;
}

/* Global background layer */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.08);
  background-image: var(--bg-pattern);
  background-size: var(--bg-pattern-size);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 100%);
}
:root[data-theme="light"] .bg-layer { color: rgba(10, 15, 30, 0.12); }

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
  background:
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(201, 168, 76, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(74, 158, 255, 0.08), transparent 60%);
}
:root[data-pattern="glow"] .bg-glow { opacity: 1; }
:root[data-theme="light"] .bg-glow {
  background:
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(201, 168, 76, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(74, 158, 255, 0.12), transparent 60%);
}

.bg-topo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
}
:root[data-pattern="topo"] .bg-topo { opacity: 0.5; }


/* ============================================================
   Layout primitives
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { position: relative; z-index: 1; }
.section { padding-block: var(--section-y); }

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* Headings */
.h-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}
.h-serif em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.005em;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold);
  color: #1A1408;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 30px -10px rgba(201, 168, 76, 0.45);
}
.btn-primary:hover {
  background: #D6B658;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 16px 38px -8px rgba(201, 168, 76, 0.55);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: var(--bg-2);
  transform: translateY(-1px);
}
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-arrow { font-size: 18px; line-height: 1; transition: transform 160ms ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
}
@media (max-width: 768px) {
  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
  }
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  height: 72px;
}
.nav-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.nav-mobile-toggle:hover { border-color: var(--line-strong); background: var(--bg-2); }
.nav-mobile-toggle svg { width: 18px; height: 18px; }
.nav-mobile-toggle .ic-close { display: none; }
.nav.is-mobile-open .nav-mobile-toggle .ic-open { display: none; }
.nav.is-mobile-open .nav-mobile-toggle .ic-close { display: block; }
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.18em;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.nav-logo::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--gold);
  transform: rotate(45deg);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  margin-left: 12px;
}
.nav-link {
  font-size: 14px;
  color: var(--text-dim);
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 220ms ease, background-color 220ms ease, transform 220ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hover style A — "halo" (default): soft pill background slides in, text lifts */
:root[data-nav-hover="halo"] .nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 240ms ease, transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1.4);
  z-index: -1;
}
:root[data-nav-hover="halo"] .nav-link:hover { color: var(--text); transform: translateY(-1px); }
:root[data-nav-hover="halo"] .nav-link:hover::before { opacity: 1; transform: scale(1); }

/* Hover style B — "crosshair": pair of corner brackets fades in */
:root[data-nav-hover="crosshair"] .nav-link::before,
:root[data-nav-hover="crosshair"] .nav-link::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border: 1.5px solid var(--gold);
  opacity: 0;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-nav-hover="crosshair"] .nav-link::before {
  top: 2px; left: 2px;
  border-right: 0; border-bottom: 0;
  transform: translate(5px, 5px);
}
:root[data-nav-hover="crosshair"] .nav-link::after {
  bottom: 2px; right: 2px;
  border-left: 0; border-top: 0;
  transform: translate(-5px, -5px);
}
:root[data-nav-hover="crosshair"] .nav-link:hover { color: var(--text); }
:root[data-nav-hover="crosshair"] .nav-link:hover::before,
:root[data-nav-hover="crosshair"] .nav-link:hover::after { opacity: 1; transform: translate(0, 0); }

/* Hover style C — "dot": small accent dot fades in to the left */
:root[data-nav-hover="dot"] .nav-link::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  margin-right: -5px;
  transition: opacity 200ms ease, margin-right 240ms cubic-bezier(0.2, 0.7, 0.2, 1.4);
}
:root[data-nav-hover="dot"] .nav-link:hover { color: var(--text); }
:root[data-nav-hover="dot"] .nav-link:hover::before { opacity: 1; margin-right: 0; }

/* Hover style D — "underline" (original, refined) */
:root[data-nav-hover="underline"] .nav-link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
:root[data-nav-hover="underline"] .nav-link:hover { color: var(--text); }
:root[data-nav-hover="underline"] .nav-link:hover::after { transform: scaleX(1); }

/* Hover style E — "shift": text translates up + accent ink-bleed below */
:root[data-nav-hover="shift"] .nav-link { overflow: hidden; padding-bottom: 6px; }
:root[data-nav-hover="shift"] .nav-link::before {
  content: attr(data-hover-text);
  position: absolute;
  left: 14px; right: 14px;
  top: 100%;
  color: var(--gold);
  font-weight: 500;
  transition: top 280ms cubic-bezier(0.5, 0.05, 0.2, 1);
}
:root[data-nav-hover="shift"] .nav-link span {
  display: inline-block;
  transition: transform 280ms cubic-bezier(0.5, 0.05, 0.2, 1);
}
:root[data-nav-hover="shift"] .nav-link:hover span { transform: translateY(-160%); }
:root[data-nav-hover="shift"] .nav-link:hover::before { top: 8px; }
.nav-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* Language switcher */
.lang {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: border-color 160ms ease, color 160ms ease;
}
.lang-btn:hover { border-color: var(--line-strong); color: var(--text); }
.lang-btn .lang-chev { transition: transform 200ms ease; }
.lang.is-open .lang-chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
}
.lang.is-open .lang-menu { display: flex; }
.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  transition: background-color 120ms ease, color 120ms ease;
  text-align: left;
  width: 100%;
}
.lang-item:hover { background: var(--bg-3); color: var(--text); }
.lang-item.is-active { color: var(--text); }
.lang-item.is-active::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(40px, 6vw, 80px);
  text-align: center;
}
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 36px;
}
.hero-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Pill indicator variants — :root[data-pill] switches the glyph */
.pill-indicator { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* A — "orbit": ring rotating around a static dot */
:root[data-pill="orbit"] .pill-indicator { position: relative; }
:root[data-pill="orbit"] .pill-indicator::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  border-right-color: transparent;
  border-bottom-color: transparent;
  animation: orbit 1.8s linear infinite;
}
:root[data-pill="orbit"] .pill-indicator::after {
  content: ""; position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
}
@keyframes orbit { to { transform: rotate(360deg); } }

/* B — "breathe": square that fades and scales (more brand-y than circle) */
:root[data-pill="breathe"] .pill-indicator::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  animation: breathe 1.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: rotate(45deg) scale(0.7); }
  50%      { opacity: 1;   transform: rotate(45deg) scale(1.1); }
}

/* C — "tick" (default): small typographic chevron with subtle slide */
:root[data-pill="tick"] .pill-indicator::before {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg) translate(1px, -1px);
  animation: tick 2.4s ease-in-out infinite;
}
@keyframes tick {
  0%, 100% { transform: rotate(-45deg) translate(0, 0); opacity: 1; }
  50%      { transform: rotate(-45deg) translate(2px, -2px); opacity: 0.5; }
}

/* D — "signal": three vertical bars like cell signal, animating up */
:root[data-pill="signal"] .pill-indicator {
  display: inline-flex; align-items: flex-end; gap: 1.5px;
  height: 12px;
}
:root[data-pill="signal"] .pill-indicator span {
  width: 2px; background: var(--gold); border-radius: 1px;
  animation: signal 1.2s ease-in-out infinite;
}
:root[data-pill="signal"] .pill-indicator span:nth-child(1) { height: 30%; animation-delay: 0s; }
:root[data-pill="signal"] .pill-indicator span:nth-child(2) { height: 60%; animation-delay: 0.15s; }
:root[data-pill="signal"] .pill-indicator span:nth-child(3) { height: 100%; animation-delay: 0.30s; }
@keyframes signal {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* E — "badge": static gold star/sparkle, no animation */
:root[data-pill="badge"] .pill-indicator::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L14 10 L24 12 L14 14 L12 24 L10 14 L0 12 L10 10 Z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L14 10 L24 12 L14 14 L12 24 L10 14 L0 12 L10 10 Z'/></svg>") no-repeat center / contain;
  animation: spinSlow 8s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.hero-title {
  font-size: clamp(48px, 8.5vw, 124px);
  margin: 0 0 28px;
  max-width: 16ch;
  margin-inline: auto;
}
.hero-sub {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0 auto 40px;
  text-wrap: pretty;
}
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-ctas {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--text-mute);
  font-size: 13px;
  justify-content: center;
}
.hero-stack {
  display: flex;
  align-items: center;
}
.hero-stack .av {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  font-family: var(--font-mono);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}
.hero-stack .av:first-child { margin-left: 0; }
.hero-stack .av-1 { background: linear-gradient(135deg, #C9A84C, #8a6f23); }
.hero-stack .av-2 { background: linear-gradient(135deg, #4A9EFF, #1f5fbf); }
.hero-stack .av-3 { background: linear-gradient(135deg, #7A5AE0, #4d35a8); }
.hero-stack .av-4 { background: linear-gradient(135deg, #1F8A5B, #0f5c3b); }

/* Phone stage */
.hero-phone-stage {
  position: relative;
  margin-top: clamp(40px, 6vw, 80px);
  display: flex;
  justify-content: center;
  perspective: 1600px;
}
.hero-phone-stage::before,
.hero-phone-stage::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-strong), transparent);
  width: 38%;
  transform: translateY(-50%);
}
.hero-phone-stage::before { left: 0; }
.hero-phone-stage::after { right: 0; background: linear-gradient(to left, transparent, var(--line-strong), transparent); }

/* Hero variant: split */
.hero[data-variant="split"] {
  text-align: left;
}
.hero[data-variant="split"] .hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.hero[data-variant="split"] .hero-title { margin-inline: 0; max-width: 14ch; font-size: clamp(40px, 5.5vw, 80px); }
.hero[data-variant="split"] .hero-sub { margin-inline: 0; }
.hero[data-variant="split"] .hero-ctas { justify-content: flex-start; }
.hero[data-variant="split"] .hero-trust { justify-content: flex-start; }
.hero[data-variant="split"] .hero-phone-stage { margin-top: 0; }
.hero[data-variant="split"] .hero-phone-stage::before,
.hero[data-variant="split"] .hero-phone-stage::after { display: none; }

/* Hero variant: editorial / asymmetric */
.hero[data-variant="editorial"] {
  text-align: left;
  overflow: hidden;
}
.hero[data-variant="editorial"] .hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
}
.hero[data-variant="editorial"] .hero-title {
  font-size: clamp(64px, 12vw, 180px);
  margin-inline: 0;
  max-width: none;
  line-height: 0.92;
}
.hero[data-variant="editorial"] .hero-sub { margin-inline: 0; }
.hero[data-variant="editorial"] .hero-ctas { justify-content: flex-start; }
.hero[data-variant="editorial"] .hero-phone-stage {
  margin-top: 60px;
  transform: translateX(8%) rotate(-6deg);
}
.hero[data-variant="editorial"] .hero-phone-stage::before,
.hero[data-variant="editorial"] .hero-phone-stage::after { display: none; }

/* Default centered: hide split-only inner grid */
.hero .hero-inner > .hero-copy-col > * { }

@media (max-width: 880px) {
  .hero[data-variant="split"] .hero-inner,
  .hero[data-variant="editorial"] .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero[data-variant="editorial"] .hero-phone-stage { transform: none; }
}

/* ============================================================
   iPhone mockup
   ============================================================ */
.iphone {
  width: 330px;
  height: 680px;
  background: linear-gradient(160deg, #1A1F30, #0a0d18);
  border-radius: 50px;
  padding: 12px;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    0 -1px 0 rgba(0, 0, 0, 0.4) inset,
    0 80px 100px -30px rgba(0, 0, 0, 0.6),
    0 30px 60px -20px rgba(74, 158, 255, 0.15);
  position: relative;
  flex-shrink: 0;
}
.iphone::before {
  /* side button + volume rocker silhouettes */
  content: "";
  position: absolute;
  left: -2px;
  top: 110px;
  width: 3px;
  height: 32px;
  background: #2a3043;
  border-radius: 2px 0 0 2px;
  box-shadow:
    0 50px 0 #2a3043, 0 50px 0 0 #2a3043,
    0 50px 0 #2a3043;
}
.iphone::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 150px;
  width: 3px;
  height: 56px;
  background: #2a3043;
  border-radius: 0 2px 2px 0;
}
.iphone-volume-1 {
  position: absolute; left: -2px; top: 168px; width: 3px; height: 56px;
  background: #2a3043; border-radius: 2px 0 0 2px;
}
.iphone-volume-2 {
  position: absolute; left: -2px; top: 232px; width: 3px; height: 56px;
  background: #2a3043; border-radius: 2px 0 0 2px;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background: #0A0F1E;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Dynamic island */
.iphone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 32px;
  background: #000;
  border-radius: 999px;
  z-index: 10;
}

/* Status bar */
.iphone-status {
  height: 54px;
  padding: 22px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}
.iphone-status-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* App content */
.app {
  flex: 1;
  padding: 14px 18px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: white;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-greet { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin: 0 0 2px; }
.app-name { font-family: var(--font-serif); font-size: 19px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.app-bell {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.app-bell::after {
  content: ""; position: absolute; top: 9px; right: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  border: 2px solid #0A0F1E;
}

/* Case card */
.case-card {
  background: linear-gradient(160deg, rgba(201, 168, 76, 0.18), rgba(201, 168, 76, 0.04));
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 18px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.case-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.35), transparent 70%);
  border-radius: 50%;
}
.case-row {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
  margin-bottom: 12px;
}
.case-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--gold); text-transform: uppercase; }
.case-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; padding: 3px 8px;
  background: rgba(31, 138, 91, 0.2);
  color: #5BD49B;
  border-radius: 999px;
  font-weight: 600;
}
.case-status .dot { width: 5px; height: 5px; border-radius: 50%; background: #5BD49B; }
.case-title { font-family: var(--font-serif); font-size: 22px; font-weight: 500; margin: 0 0 4px; letter-spacing: -0.01em; position: relative; z-index: 1; }
.case-sub { font-size: 11px; color: rgba(255, 255, 255, 0.55); margin: 0 0 14px; position: relative; z-index: 1; }
.case-progress {
  height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden;
  position: relative; z-index: 1;
}
.case-progress-bar { height: 100%; width: 62%; background: var(--gold); border-radius: 999px; }
.case-progress-label {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; color: rgba(255, 255, 255, 0.55);
  position: relative; z-index: 1;
}
.case-progress-label strong { color: var(--gold); font-weight: 600; }

/* Timeline */
.timeline-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.timeline-title { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; margin: 0; }
.timeline-link { font-size: 10px; color: var(--blue); }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-step {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px;
  font-size: 11px;
}
.tl-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  position: relative;
}
.tl-step.is-done .tl-dot { background: rgba(31, 138, 91, 0.18); border-color: rgba(91, 212, 155, 0.4); color: #5BD49B; }
.tl-step.is-active .tl-dot {
  background: rgba(201, 168, 76, 0.18);
  border-color: rgba(201, 168, 76, 0.5);
  color: var(--gold);
  box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4);
  animation: tl-pulse 2s ease-out infinite;
}
@keyframes tl-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.tl-dot svg { width: 11px; height: 11px; }
.tl-step.is-pending .tl-dot { opacity: 0.55; }
.tl-label { font-weight: 500; color: white; }
.tl-step.is-pending .tl-label { color: rgba(255, 255, 255, 0.4); }
.tl-meta { font-family: var(--font-mono); font-size: 9px; color: rgba(255, 255, 255, 0.4); }

/* Quick actions */
.quick {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  margin-top: auto;
}
.quick-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 500;
  color: white;
}
.quick-btn .ic {
  width: 28px; height: 28px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.quick-btn .ic svg { width: 14px; height: 14px; }
.quick-btn.is-primary .ic { background: var(--gold-soft); color: var(--gold); }

/* Home indicator */
.iphone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  z-index: 11;
}

/* ============================================================
   Stats
   ============================================================ */
.stats {
  border-block: 1px solid var(--line);
  padding-block: 56px;
  background: color-mix(in srgb, var(--bg-2) 50%, transparent);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  position: relative;
  padding-left: 24px;
}
.stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: var(--line);
}
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.stat-num .suffix {
  color: var(--gold);
  font-size: 0.55em;
}
.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

@media (max-width: 780px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .stat:not(:last-child)::after { display: none; }
}

/* ============================================================
   Section header
   ============================================================ */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(36px, 4.4vw, 60px);
  margin: 16px 0 0;
  max-width: 16ch;
}
.section-head p {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0;
  max-width: 42ch;
  justify-self: end;
  text-wrap: pretty;
}
@media (max-width: 780px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
}

/* ============================================================
   Services grid
   ============================================================ */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}
.svc {
  background: var(--bg);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background-color 240ms ease;
  cursor: pointer;
  min-height: 280px;
  /* Isolate hover transitions so they don't bubble reflow to parent */
  contain: layout style;
}
.svc:hover { background: var(--bg-2); }
.svc-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: transform 240ms ease;
}
.svc:hover .svc-icon { transform: translateY(-3px) rotate(-3deg); }
.svc-icon svg { width: 26px; height: 26px; }
.svc-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.svc-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: -8px 0 0;
  line-height: 1.1;
}
.svc-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}
.svc-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
  padding-top: 8px;
}
.svc-link .arr { transition: transform 200ms ease; display: inline-block; }
.svc:hover .svc-link .arr { transform: translateX(4px); }

@media (max-width: 880px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   App feature section
   ============================================================ */
.appsec {
  position: relative;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--blue) 6%, transparent), transparent);
}
.appsec-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.appsec-eyebrow { color: var(--blue); }
.appsec-eyebrow::before { background: var(--blue); }
.appsec h2 { font-size: clamp(40px, 5vw, 72px); margin: 16px 0 24px; max-width: 14ch; }
.appsec-lead { font-size: 18px; color: var(--text-dim); margin: 0 0 40px; max-width: 44ch; }
.feat-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.feat {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
  cursor: default;
}
.feat:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.feat-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.feat-ic svg { width: 22px; height: 22px; }
.feat-title { font-size: 16px; font-weight: 600; margin: 4px 0 4px; }
.feat-desc { font-size: 14px; color: var(--text-dim); margin: 0; line-height: 1.5; }

.appsec-actions { display: flex; gap: 12px; align-items: center; }
.app-badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease;
}
.app-badge:hover { border-color: var(--text); transform: translateY(-1px); }
.app-badge-small { font-size: 10px; color: var(--text-mute); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2; }
.app-badge-big { font-size: 15px; font-weight: 600; line-height: 1.2; }
.app-badge svg { width: 22px; height: 22px; }

.appsec-phone-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}
.appsec-phone-wrap::before {
  content: "";
  position: absolute;
  inset: -40px -40px;
  background: radial-gradient(ellipse at center, rgba(74, 158, 255, 0.18), transparent 60%);
  z-index: 0;
  filter: blur(40px);
}
.appsec .iphone { position: relative; z-index: 1; }

@media (max-width: 880px) {
  .appsec-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Testimonials
   ============================================================ */
.tstm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tstm {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: transform 240ms ease, border-color 240ms ease;
}
.tstm:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.tstm-quote {
  font-family: var(--font-serif);
  font-size: 80px;
  line-height: 0.4;
  color: var(--gold);
  font-weight: 400;
  height: 30px;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.tstm-body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
  flex: 1;
  text-wrap: pretty;
}
.tstm-foot {
  display: flex; align-items: center; gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.tstm-initials {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold);
}
.tstm-name { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.tstm-meta { font-size: 12px; color: var(--text-mute); display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.tstm-flag {
  width: 18px; height: 13px;
  border-radius: 2px;
  display: inline-block;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

@media (max-width: 880px) {
  .tstm-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Offices map
   ============================================================ */
.offices {
  background: color-mix(in srgb, var(--bg-2) 40%, transparent);
  border-block: 1px solid var(--line);
}
.offices-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.offices-grid h2 { font-size: clamp(36px, 4.4vw, 60px); margin: 16px 0 16px; max-width: 12ch; }
.offices-grid p { color: var(--text-dim); margin: 0 0 28px; max-width: 36ch; }
.offices-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.office-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  transition: padding 200ms ease;
  cursor: pointer;
}
.office-item:hover { padding-left: 8px; }
.office-item:hover .office-name { color: var(--gold); }
.office-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.office-name { font-family: var(--font-serif); font-size: 22px; font-weight: 400; transition: color 200ms ease; }
.office-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.08em; }

.us-map {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  color: var(--text-mute);
}
.us-map svg { width: 100%; height: 100%; display: block; }

/* Dotted backdrop grid */
.us-map .grid-dot { fill: var(--text-mute); opacity: 0.25; }
.us-map .grid-dot.is-land { opacity: 0.55; fill: var(--text-dim); }

/* Connector lines */
.us-map .connector {
  stroke: var(--gold);
  stroke-width: 1;
  fill: none;
  opacity: 0.35;
  stroke-dasharray: 4 6;
  animation: dashFlow 24s linear infinite;
}
@keyframes dashFlow {
  to { stroke-dashoffset: -200; }
}
.us-map .connector-glow {
  stroke: var(--gold);
  stroke-width: 8;
  fill: none;
  opacity: 0.08;
  filter: blur(4px);
}
.us-map .pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 2;
}
.us-map .pin-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 0 var(--gold),
    0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent),
    0 0 24px 4px color-mix(in srgb, var(--gold) 35%, transparent);
  animation: pin-pulse 2.6s ease-out infinite;
  border: 3px solid var(--bg);
  position: relative;
}
@keyframes pin-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent), 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent), 0 0 24px 4px color-mix(in srgb, var(--gold) 35%, transparent); }
  70%  { box-shadow: 0 0 0 18px transparent, 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent), 0 0 24px 4px color-mix(in srgb, var(--gold) 25%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent), 0 0 24px 4px color-mix(in srgb, var(--gold) 35%, transparent); }
}
.us-map .pin-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--text);
}

@media (max-width: 880px) {
  .offices-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================================
   CTA banner
   ============================================================ */
.cta {
  padding-block: var(--section-y);
  text-align: center;
  position: relative;
}
.cta-card {
  position: relative;
  border-radius: 28px;
  padding: clamp(60px, 8vw, 100px) 40px;
  background:
    radial-gradient(ellipse at center top, rgba(201, 168, 76, 0.18), transparent 60%),
    color-mix(in srgb, var(--bg-2) 80%, transparent);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--line);
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.cta-card > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(40px, 5.5vw, 76px); margin: 16px 0 24px; max-width: 18ch; margin-inline: auto; }
.cta p { color: var(--text-dim); font-size: 17px; max-width: 50ch; margin: 0 auto 40px; text-wrap: pretty; }
.cta-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cta-fineprint {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cta-fineprint span { display: inline-flex; align-items: center; gap: 6px; }
.cta-fineprint .dot { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 64px 40px;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand { max-width: 28ch; }
.footer-brand p { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 16px 0 24px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-dim); font-size: 14px; transition: color 160ms ease; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-bottom .lang-mini { display: flex; gap: 6px; }
.footer-bottom .lang-mini button {
  font-family: inherit;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-mute);
  transition: color 160ms ease, background-color 160ms ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-bottom .lang-mini button:hover { color: var(--text); }
.footer-bottom .lang-mini button.is-active { color: var(--gold); background: var(--gold-soft); }
.footer-disclaimer { font-size: 11px; color: var(--text-mute); margin-top: 16px; line-height: 1.5; max-width: 90ch; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Mobile nav drawer (<= 960px)
   ============================================================ */
@media (max-width: 960px) {
  .nav-mobile-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
    margin-left: 0;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .nav.is-mobile-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
    justify-content: space-between;
  }
  .nav-link::after, .nav-link::before { display: none !important; }
  .nav-link:hover { background: var(--bg-2); color: var(--text); transform: none; }
  /* hide secondary lang dropdown on mobile (we have footer mini and tweaks) */
  .lang { display: none; }
  .nav-cta .btn-primary { padding: 0 16px; height: 40px; font-size: 13px; }
}

@media (max-width: 480px) {
  .nav-cta .btn-primary .nav-cta-label { display: none; }
  .nav-cta .btn-primary { padding: 0; width: 40px; }
  .nav-cta .btn-primary::after {
    content: "";
    width: 16px; height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") no-repeat center / contain;
  }
  .nav-cta .btn-primary .btn-arrow { display: none; }
  .hero-meta { flex-direction: column; gap: 6px; padding: 10px 14px; text-align: center; }
  .hero-trust { flex-direction: column; gap: 8px; }
  .cta-fineprint { flex-direction: column; gap: 10px; }
  .hero-title {
    font-size: clamp(32px, 9vw, 48px);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.2, 0.6, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger via inline --i */
.reveal[style*="--i"] { transition-delay: calc(var(--i) * 70ms); }

/* ── touch-action: pan-y on interactive non-scrolling elements.
      Tells the browser these elements only pan vertically, so it can
      commit to scrolling immediately without waiting to see if JS
      will call preventDefault() (eliminates ~300 ms touch delay). ── */
.svc,
.feat,
.office-item,
.tstm,
.btn,
.app-badge,
.nav-link,
.quick-btn {
  touch-action: pan-y;
}

/* ============================================================
   content-visibility: auto — skip layout/paint for off-screen sections.
   contain-intrinsic-size gives the browser a size estimate so the
   scrollbar doesn't jump as sections render.  Desktop benefits too.
   ============================================================ */
.stats,
.appsec,
.tstm-grid,
.offices,
.cta,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* ============================================================
   Misc
   ============================================================ */
::selection { background: var(--gold); color: #1A1408; }

/* ============================================================
   Extra scroll motion
   ============================================================ */

/* Hero phone: parallax driven by --parallax (set in JS) */
.hero-phone-stage .iphone { will-change: transform; transform: translate3d(0, var(--parallax, 0px), 0); }
.appsec-phone-wrap .iphone { will-change: transform; transform: translate3d(0, var(--parallax, 0px), 0); }
@media (max-width: 768px) {
  .hero-phone-stage .iphone, .appsec-phone-wrap .iphone {
    will-change: auto;
    transform: none;
  }
}

/* Reveal variants */
.reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity 800ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity 800ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.96); transition: opacity 800ms ease, transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* Word-by-word reveal for big serif headings (line-clip variant) */
.reveal-words { display: inline; }
.reveal-words .word {
  display: inline-block;
  vertical-align: baseline;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  /* Vertical mask only — horizontal must not clip */
  clip-path: inset(-20% 0 0 0);
}
.reveal-words .word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-words.is-visible .word > span { transform: translateY(0); }
.reveal-words.is-visible .word > span { transition-delay: calc(var(--w, 0) * 70ms); }

/* Marquee strip */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 30%, transparent);
  padding-block: 28px;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 50s linear infinite;
  align-items: center;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 26px);
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.marquee-item .flag {
  width: 24px; height: 16px;
  border-radius: 2px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
}
.marquee-sep {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Service card hover: more sophisticated */
.svc { transition: background-color 240ms ease, transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.svc:hover { transform: translateY(-4px); }
.svc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-soft), transparent 60%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.svc:hover::after { opacity: 1; }

/* Stat hover */
.stat-num { transition: color 200ms ease, transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.stat:hover .stat-num { transform: translateY(-2px); }
.stat:hover .stat-num .suffix { color: var(--text); }

/* Section head: progress line that draws in */
.section-rule {
  height: 1px;
  background: var(--line);
  position: relative;
  margin: 0 0 56px;
  overflow: hidden;
}
.section-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--gold), transparent 70%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.section-rule.is-visible::after { transform: scaleX(1); }

/* Cursor-following spotlight inside CTA card */
.cta-card { --mx: 50%; --my: 50%; }
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 320px at var(--mx) var(--my), color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 240ms ease;
}
.cta-card:hover::after { opacity: 1; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile performance: stop continuous infinite CSS animations that run
      even when off-screen (they still consume Composite / GPU resources).
      Pausing means the element stays visible at its current keyframe —
/* Light theme override for phone shadow */
:root[data-theme="light"] .iphone {
  box-shadow:
    0 0 0 1.5px rgba(10, 15, 30, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    0 -1px 0 rgba(0, 0, 0, 0.4) inset,
    0 80px 100px -30px rgba(10, 15, 30, 0.25),
    0 30px 60px -20px rgba(74, 158, 255, 0.20);
}

/* Light theme phone always dark (keep app readable) */
:root[data-theme="light"] .iphone-screen { background: #0A0F1E; }

/* Light theme — make case status look right */
:root[data-theme="light"] .nav-logo::before { background: var(--gold); }

/* Ensure hero phone z order */
.hero-phone-stage .iphone { position: relative; z-index: 2; }
