/* ============================================================
   Innoveev — Design tokens & global styles
   ============================================================ */

:root {
  /* Type */
  --font-sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;

  /* Light theme — the default; warm-leaning ink, subtly warm paper */
  --ink:           oklch(0.16 0.015 270);
  --ink-soft:      oklch(0.32 0.018 270);
  --ink-mute:      oklch(0.52 0.015 270);
  --ink-fade:      oklch(0.68 0.012 270);
  --paper:         oklch(0.985 0.004 85);
  --paper-2:       #ffffff;
  --paper-sunk:    oklch(0.965 0.005 85);
  --line:          oklch(0.91 0.008 270);
  --line-strong:   oklch(0.82 0.012 270);

  /* Single restrained accent — Tweaks can swap hue */
  --accent-hue: 285;
  --accent:   oklch(0.62 0.18 var(--accent-hue));
  --accent-2: oklch(0.62 0.18 calc(var(--accent-hue) - 80));
  --accent-3: oklch(0.62 0.18 calc(var(--accent-hue) + 40));
  --accent-soft: oklch(0.94 0.04 var(--accent-hue));

  /* Surfaces for dark sections (Tech Surface, Footer) — independent of theme */
  --dark-ink:     oklch(0.13 0.014 270);
  --dark-ink-2:   oklch(0.17 0.015 270);
  --dark-line:    rgba(255, 255, 255, 0.08);
  --dark-line-2:  rgba(255, 255, 255, 0.14);
  --dark-mute:    rgba(244, 244, 248, 0.6);
  --dark-fade:    rgba(244, 244, 248, 0.4);

  /* Geometry */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 40px);

  /* Spacing scale */
  --space-section: clamp(80px, 12vw, 144px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ----- Dark theme override (tweakable) ----- */
[data-theme="dark"] {
  --ink:           oklch(0.97 0.005 85);
  --ink-soft:      oklch(0.85 0.008 85);
  --ink-mute:      oklch(0.62 0.012 270);
  --ink-fade:      oklch(0.42 0.012 270);
  --paper:         oklch(0.12 0.013 270);
  --paper-2:       oklch(0.16 0.014 270);
  --paper-sunk:    oklch(0.10 0.013 270);
  --line:          rgba(255,255,255,0.08);
  --line-strong:   rgba(255,255,255,0.16);
  --accent-soft:   oklch(0.28 0.08 var(--accent-hue));
  color-scheme: dark;
}

/* ============================================================
   Reset / base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: "ss01", "ss03", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  transition: background 360ms var(--ease), color 360ms var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-section);
  position: relative;
}

.section--tight { padding-block: clamp(56px, 8vw, 88px); }

.hairline {
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   Typography
   ============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-fade);
}

.eyebrow--no-rule::before { display: none; }

.display {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-size: clamp(48px, 8vw, 112px);
  color: var(--ink);
  text-wrap: balance;
}

.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.h2 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.02;
  font-size: clamp(36px, 5vw, 64px);
  color: var(--ink);
  text-wrap: balance;
}

.h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  color: var(--ink);
}

.lede {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss02";
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* ============================================================
   Buttons & chips
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -14px oklch(0.16 0.015 270 / 0.45);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--secondary:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  padding: 0 4px;
  height: auto;
}
.btn--ghost:hover { color: var(--accent); }

.btn--small { height: 36px; font-size: 13px; padding: 0 14px; }

.arrow {
  display: inline-block;
  transition: transform 250ms var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.62 0.18 var(--accent-hue) / 0.18);
  animation: dot-pulse 2.6s var(--ease) infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(0.62 0.18 var(--accent-hue) / 0.18); }
  50%      { box-shadow: 0 0 0 6px oklch(0.62 0.18 var(--accent-hue) / 0.05); }
}

/* ============================================================
   Logo mark
   ============================================================ */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* Over dark page heroes (home), the un-scrolled fixed nav floats on a dark
   background — flip the wordmark to white until the glass nav kicks in. */
body:has(.home-hero) .nav:not(.nav--scrolled) .brand {
  color: #f5f5f7;
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  overflow: hidden;
  background:
    conic-gradient(
      from 220deg,
      oklch(0.62 0.18 var(--accent-hue)),
      oklch(0.62 0.18 calc(var(--accent-hue) - 90)),
      oklch(0.62 0.18 calc(var(--accent-hue) + 60)),
      oklch(0.62 0.18 var(--accent-hue))
    );
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background: var(--paper);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 2px;
  z-index: 1;
  background: linear-gradient(135deg,
    oklch(0.62 0.18 var(--accent-hue)),
    oklch(0.62 0.18 calc(var(--accent-hue) - 80)) 60%,
    oklch(0.62 0.18 calc(var(--accent-hue) + 40))
  );
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 14px 0;
  transition: background 240ms var(--ease), border-color 240ms var(--ease), backdrop-filter 240ms var(--ease);
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-color: var(--line);
}

/* While the mobile drawer is open, drop the nav's backdrop-filter: that
   filter would otherwise make .nav the containing block for the
   position:fixed drawer, shrinking it to the nav-bar height. */
.nav--menu-open,
.nav--menu-open.nav--scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border-color: transparent;
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ----- Tab-style nav links (iOS-style liquid-glass pill) ----- */
.nav__tabs {
  position: relative;
  display: none;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  /* Container has a slight cool-grey tint so the pure-white pill reads against it */
  background: color-mix(in oklab, var(--ink) 5%, var(--paper-2));
  border-radius: 999px;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

@media (min-width: 920px) {
  .nav__tabs { display: inline-flex; }
}

.nav__tabs-pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.92);
  transform-origin: center;
  z-index: 0;
  pointer-events: none;
  /* Bright glass plate on the cool-grey field */
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    0 1px 2px oklch(0.16 0.015 270 / 0.08),
    0 6px 16px -6px oklch(0.16 0.015 270 / 0.18);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  transition:
    left 460ms cubic-bezier(0.22, 1, 0.36, 1),
    width 460ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms var(--ease),
    transform 280ms var(--ease);
}
.nav__tabs-pill.is-visible {
  opacity: 1;
  transform: scale(1);
}

.nav__tab {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 240ms var(--ease);
}
.nav__tab:hover { color: var(--ink); }
.nav__tab.is-focus { color: var(--ink); font-weight: 600; }
.nav__tab.is-focus:hover { color: var(--ink); }

/* Dark theme — flip the glass: subtle white tint over the dark backdrop */
[data-theme="dark"] .nav__tabs {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .nav__tabs-pill {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 8px 22px -10px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .nav__tab.is-focus {
  color: #ffffff;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ----- Mobile hamburger + drawer ----- */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 280ms var(--ease), opacity 200ms var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
}
.nav-mobile.is-open { visibility: visible; pointer-events: auto; }
.nav-mobile__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: oklch(0.16 0.015 270 / 0.4);
  opacity: 0;
  transition: opacity 300ms var(--ease);
  cursor: pointer;
}
.nav-mobile.is-open .nav-mobile__backdrop { opacity: 1; }
.nav-mobile__sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 86vw);
  display: flex;
  flex-direction: column;
  padding: 88px 24px 32px;
  gap: 18px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px -30px oklch(0.16 0.015 270 / 0.5);
  transform: translateX(100%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}
.nav-mobile.is-open .nav-mobile__sheet { transform: none; }
[dir="rtl"] .nav-mobile__sheet {
  right: auto;
  left: 0;
  border-left: 0;
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
}
.nav-mobile__links { display: flex; flex-direction: column; }
.nav-mobile__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav-mobile__link svg { color: var(--ink-mute); }
.nav-mobile__link.is-current { color: var(--accent); }
.nav-mobile__link.is-current svg { color: var(--accent); }
.nav-mobile.is-open .nav-mobile__link {
  animation: nav-link-in 420ms var(--ease) both;
  animation-delay: calc(120ms + var(--i) * 45ms);
}
@keyframes nav-link-in {
  from { opacity: 0; transform: translateX(16px); }
}
[dir="rtl"] .nav-mobile.is-open .nav-mobile__link { animation-name: nav-link-in-rtl; }
@keyframes nav-link-in-rtl {
  from { opacity: 0; transform: translateX(-16px); }
}
.nav-mobile__cta { margin-top: 12px; justify-content: center; padding: 14px 22px; }

@media (max-width: 919px) {
  .nav-burger { display: flex; }
  .nav__cta-btn { display: none; }
  .nav__row { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-mobile__sheet { transition: none; }
  .nav-mobile.is-open .nav-mobile__link { animation: none; }
}

/* Legacy flat link styling — still used by BlogNav */
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.nav__link:hover {
  color: var(--ink);
  background: color-mix(in oklab, var(--ink) 5%, transparent);
}
.nav__link[aria-current="page"] { color: var(--ink); }

/* ----- Social icon cluster (no longer used in header; kept for compat) ----- */
.nav__socials { display: none; }

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color 220ms var(--ease), background 220ms var(--ease), transform 220ms var(--ease);
}
.social-btn:hover {
  color: var(--ink);
  background: color-mix(in oklab, var(--ink) 6%, transparent);
}
.social-btn:active { transform: scale(0.94); }

.hover-card.is-open .social-btn {
  color: var(--ink);
  background: color-mix(in oklab, var(--ink) 6%, transparent);
}

/* ----- Language switcher button (header) ----- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--paper-2) 60%, transparent);
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  transition: border-color 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.lang-switcher:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.lang-switcher[data-state="open"] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper-2);
}
.lang-switcher__flag {
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
}
.lang-switcher__code {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 11.5px;
}

[data-theme="dark"] .lang-switcher {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: clamp(80px, 10vw, 120px);
  overflow: hidden;
  isolation: isolate;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero__title {
  margin: 24px 0 0;
}

.hero__lede {
  margin: 28px 0 0;
  max-width: 60ch;
}

.hero__ctas {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Animated gradient mesh — restrained, anchored top-right */
.mesh {
  position: absolute;
  inset: -10% -10% auto auto;
  width: 95%;
  height: 110%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--mesh-opacity, 0.85);
  filter: saturate(1.05);
}

.mesh__blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  mix-blend-mode: normal;
  will-change: transform;
}

[data-theme="dark"] .mesh__blob { filter: blur(90px); opacity: 0.7; }

.mesh__blob--1 {
  top: -5%;
  right: 5%;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle at 40% 40%, oklch(0.78 0.16 calc(var(--accent-hue) + 35)) 0%, transparent 65%);
  animation: blob-drift-1 28s var(--ease) infinite;
}
.mesh__blob--2 {
  top: 12%;
  right: 28%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 50% 50%, oklch(0.66 0.18 var(--accent-hue)) 0%, transparent 65%);
  animation: blob-drift-2 32s var(--ease) infinite;
}
.mesh__blob--3 {
  top: 30%;
  right: 0;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle at 60% 50%, oklch(0.72 0.14 calc(var(--accent-hue) - 80)) 0%, transparent 60%);
  animation: blob-drift-3 36s var(--ease) infinite;
}
.mesh__blob--4 {
  top: -10%;
  right: 35%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 50% 50%, oklch(0.78 0.12 calc(var(--accent-hue) + 80)) 0%, transparent 60%);
  animation: blob-drift-4 26s var(--ease) infinite;
}

@keyframes blob-drift-1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(-4%, 6%) scale(1.1); }
  66%      { transform: translate(6%, -3%) scale(0.95); }
}
@keyframes blob-drift-2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  40%      { transform: translate(6%, -5%) scale(1.15); }
  75%      { transform: translate(-5%, 4%) scale(0.92); }
}
@keyframes blob-drift-3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  30%      { transform: translate(-6%, -6%) scale(1.2); }
  70%      { transform: translate(5%, 3%) scale(0.9); }
}
@keyframes blob-drift-4 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(5%, 5%) scale(1.1); }
}

/* Mesh fade to background */
.mesh__fade-left {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: linear-gradient(to right, var(--paper) 0%, transparent 100%);
}
.mesh__fade-bottom {
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to top, var(--paper) 0%, transparent 100%);
}
.mesh__fade-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 25%;
  background: linear-gradient(to bottom, var(--paper) 0%, transparent 100%);
}

/* Hero meta cluster (ticker) */
.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--paper-2) 80%, transparent);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.hero__meta strong {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Hero side card (status / live shipping log) */
.hero__side {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: end;
  }
  .hero__side { margin-top: 0; }
}

/* Live ship-log card */
.log-card {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--paper-2) 88%, transparent);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 1px 0 var(--paper-2) inset, 0 18px 40px -28px oklch(0.16 0.015 270 / 0.18);
}

.log-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-card__head .dots {
  display: inline-flex;
  gap: 5px;
}
.log-card__head .dots span {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--line-strong);
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-list li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 12px;
  color: var(--ink-soft);
}
.log-list li time {
  color: var(--ink-fade);
  font-size: 11px;
}
.log-list .ok { color: var(--accent); font-size: 11px; }

/* Partner strip */
.trust {
  padding-top: 0;
  padding-bottom: clamp(40px, 6vw, 64px);
}
.trust__label {
  text-align: center;
}
.trust__row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
  align-items: center;
  justify-items: center;
}
@media (min-width: 720px) { .trust__row { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px) { .trust__row { grid-template-columns: repeat(8, 1fr); } }
.trust__logo {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 19px;
  color: var(--ink-fade);
  transition: color 220ms var(--ease);
}
.trust__logo:hover { color: var(--ink); }

/* ============================================================
   Backbone Stats — hero section with globe + time-of-day sky
   ============================================================ */

.backbone {
  position: relative;
  color: var(--paper);
  padding-block: clamp(96px, 12vw, 144px);
  overflow: hidden;
  isolation: isolate;
}

.backbone--day { color: var(--ink); }

.backbone__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.backbone__sky-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.backbone__sky-layer.is-active { opacity: 1; }

.backbone__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .backbone__container {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
  }
}

.backbone__copy { max-width: 720px; }

.backbone__title {
  margin: 18px 0 0;
  color: currentColor;
  font-size: clamp(40px, 5.4vw, 72px);
}

.backbone__title em {
  color: rgba(255,255,255,0.6);
}
.backbone--day .backbone__title em { color: var(--ink-mute); }

/* Stats list with an animated active indicator */
.backbone__stats {
  --active-index: 0;
  margin-top: 48px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.backbone--day .backbone__stats { border-color: var(--line); }

@media (min-width: 720px) {
  .backbone__stats { grid-template-columns: repeat(4, 1fr); }
}

.backbone__indicator {
  position: absolute;
  top: -1px;
  height: 2px;
  width: calc(100% / 4);
  background: var(--accent);
  box-shadow: 0 0 18px oklch(0.62 0.18 var(--accent-hue) / 0.6);
  transform: translateX(calc(var(--active-index) * 100%));
  transition: transform 600ms var(--ease);
  pointer-events: none;
}
@media (max-width: 719px) {
  .backbone__indicator { display: none; }
}

.backbone__stat {
  text-align: left;
  padding: 24px 20px 24px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 280ms var(--ease);
  opacity: 0.55;
}
.backbone__stat:hover { opacity: 0.9; }
.backbone__stat.is-active { opacity: 1; }

.backbone__stat-value {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: currentColor;
}

.backbone__stat-desc {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.65);
  max-width: 20ch;
}
.backbone--day .backbone__stat-desc { color: var(--ink-soft); }

.backbone__detail {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.backbone--day .backbone__detail { color: var(--ink-soft); }
.backbone__detail .mono-meta { color: rgba(255,255,255,0.4); }
.backbone--day .backbone__detail .mono-meta { color: var(--ink-mute); }

/* Globe */
.backbone__viz {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.globe3d {
  width: 100%;
  aspect-ratio: 1;
  max-width: 520px;
  position: relative;
}
.globe3d canvas { width: 100%; height: 100%; display: block; }

/* Controls cluster */
.backbone__controls {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.backbone__ctrl {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  transition: background 220ms var(--ease), border-color 220ms var(--ease);
}
.backbone__ctrl:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
}
.backbone--day .backbone__ctrl {
  background: rgba(0,0,0,0.05);
  border-color: var(--line-strong);
  color: var(--ink);
}
.backbone--day .backbone__ctrl:hover {
  background: rgba(0,0,0,0.1);
}

.backbone__time { position: relative; }
.backbone__time-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  margin: 0;
  padding: 6px;
  background: rgba(15, 17, 30, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  min-width: 132px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 3;
}
.backbone--day .backbone__time-menu {
  background: var(--paper-2);
  border-color: var(--line-strong);
}

.backbone__time-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  width: 100%;
  text-align: left;
}
.backbone--day .backbone__time-opt { color: var(--ink); }
.backbone__time-opt:hover { background: rgba(255,255,255,0.06); }
.backbone--day .backbone__time-opt:hover { background: var(--paper-sunk); }
.backbone__time-opt.is-active { background: oklch(0.62 0.18 var(--accent-hue) / 0.22); color: #fff; }
.backbone--day .backbone__time-opt.is-active { background: var(--accent-soft); color: var(--ink); }
.backbone__time-opt .dot {
  width: 8px; height: 8px; border-radius: 999px;
}

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 800px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }

.stat {
  padding: 36px 0;
  position: relative;
}
.stat + .stat { border-left: 0; }
@media (min-width: 800px) {
  .stat + .stat::before {
    content: "";
    position: absolute;
    top: 36px; bottom: 36px;
    left: 0;
    width: 1px;
    background: var(--line);
  }
  .stat { padding: 48px 28px; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child  { padding-right: 0; }
}

.stat__value {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__value .suffix {
  color: var(--accent);
  margin-left: 2px;
}
.stat__label {
  margin-top: 14px;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.4;
  max-width: 18ch;
}

/* ============================================================
   Section heading block
   ============================================================ */

.section-head {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 56px;
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 5fr 7fr; align-items: end; gap: 64px; }
}

.section-head__title { margin: 16px 0 0; }
.section-head__lede { margin: 0; max-width: 56ch; }

/* ============================================================
   Services
   ============================================================ */

.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (min-width: 900px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
}

.service {
  background: var(--paper-2);
  padding: 32px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 380px;
  position: relative;
  transition: background 280ms var(--ease);
}
.service:hover { background: color-mix(in oklab, var(--paper-2) 96%, var(--accent) 4%); }

.service__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}

.service__title { margin-top: auto; }

.service__body { color: var(--ink-soft); font-size: 15px; max-width: 38ch; }

.service__bullets {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service__bullets li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 10px;
}
.service__bullets li::before {
  content: "";
  width: 14px; height: 1px; background: var(--line-strong);
}

.service__visual {
  height: 120px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-sunk);
  position: relative;
  overflow: hidden;
}

/* Tiny visual primitives in each service card */
.viz-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: -1px -1px;
  opacity: 0.6;
}

.viz-phone {
  position: absolute;
  left: 50%; top: 12px; bottom: 12px;
  transform: translateX(-50%);
  width: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 8px 6px;
}
.viz-phone::before {
  content: "";
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}
.viz-phone__bar {
  height: 4px; border-radius: 2px;
  background: var(--line);
  margin-top: 6px;
}
.viz-phone__bar:nth-child(2) { width: 80%; background: var(--accent); }
.viz-phone__bar:nth-child(3) { width: 60%; }
.viz-phone__bar:nth-child(4) { width: 90%; }

.viz-window {
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
}
.viz-window__bar {
  height: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}
.viz-window__bar span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
.viz-window__body {
  flex: 1;
  display: grid;
  grid-template-columns: 32px 1fr;
}
.viz-window__nav {
  border-right: 1px solid var(--line);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.viz-window__nav span {
  height: 4px; border-radius: 2px;
  background: var(--line);
}
.viz-window__nav span:first-child { background: var(--accent); width: 80%; }
.viz-window__main {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.viz-window__main span {
  height: 4px; border-radius: 2px;
  background: var(--line);
}
.viz-window__main span:nth-child(1) { width: 50%; }
.viz-window__main span:nth-child(2) { width: 80%; }
.viz-window__main span:nth-child(3) { width: 70%; }

.viz-ai {
  position: absolute;
  inset: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
}
.viz-ai__msg {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 70%;
}
.viz-ai__msg--me { align-self: flex-end; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.viz-ai__caret {
  display: inline-block;
  width: 6px; height: 10px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: caret 1.1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ============================================================
   Tech Surface (dark editorial break)
   ============================================================ */

.tech {
  background: var(--dark-ink);
  color: #f5f5f7;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Gravity-stars canvas — sits behind everything inside .tech */
.gravity-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.gravity-stars canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.tech::before {
  content: "";
  position: absolute;
  inset: -20% 30% auto auto;
  width: 60%;
  height: 80%;
  background:
    radial-gradient(40% 50% at 60% 30%, oklch(0.5 0.18 var(--accent-hue) / 0.55), transparent 60%),
    radial-gradient(35% 40% at 80% 60%, oklch(0.6 0.16 calc(var(--accent-hue) - 80) / 0.4), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.tech .container { position: relative; z-index: 1; }

.tech__head { text-align: center; max-width: 720px; margin-inline: auto; }
.tech__head .h2 { color: #f5f5f7; }
.tech__head .h2 em { color: rgba(245,245,247,0.65); }
.tech__head .lede { color: var(--dark-mute); margin-top: 18px; }
.tech__head .eyebrow { color: rgba(245,245,247,0.55); }
.tech__head .eyebrow::before { background: rgba(245,245,247,0.3); }

.tabs {
  display: inline-flex;
  margin: 28px auto 0;
  border: 1px solid var(--dark-line-2);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(8px);
}
.tabs__wrap { display: flex; justify-content: center; margin-top: 36px; }

.tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark-mute);
  transition: background 220ms var(--ease), color 220ms var(--ease);
}
.tab[aria-selected="true"] {
  background: #f5f5f7;
  color: var(--dark-ink);
}

.tech__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
@media (min-width: 1000px) {
  .tech__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; }
}

/* Diagram */
.diagram {
  position: relative;
  padding: 36px 28px 32px;
  border: 1px solid var(--dark-line-2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.025) 0%, transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  min-height: 480px;
  overflow: hidden;
}

.diagram.is-scrubbing {
  border-color: oklch(0.62 0.18 var(--accent-hue) / 0.55);
  box-shadow:
    inset 0 0 0 1px oklch(0.62 0.18 var(--accent-hue) / 0.25),
    0 30px 60px -28px oklch(0.62 0.18 var(--accent-hue) / 0.35);
}

.diagram__scrub-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: oklch(0.62 0.18 var(--accent-hue));
  box-shadow: 0 0 16px oklch(0.62 0.18 var(--accent-hue) / 0.7);
  z-index: 5;
  pointer-events: none;
  transform: translateX(-1px);
}

.diagram__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  z-index: 2;
}

.diagram__center {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 68px 0;
  z-index: 2;
}

.diagram__hub {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, oklch(0.62 0.18 var(--accent-hue) / 0.38), oklch(0.62 0.18 var(--accent-hue) / 0.14));
  border: 1px solid oklch(0.62 0.18 var(--accent-hue) / 0.55);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 18px 40px -20px oklch(0.62 0.18 var(--accent-hue) / 0.55);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

/* ----- Node boxes (rectangular, replacing the old pill chips) ----- */
.node {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: rgba(245,245,247,0.78);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition:
    border-color 280ms var(--ease),
    background 280ms var(--ease),
    color 280ms var(--ease),
    box-shadow 280ms var(--ease),
    opacity 280ms var(--ease),
    transform 280ms var(--ease);
  cursor: default;
}
.node:hover {
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.node--small { font-size: 12px; padding: 7px 11px; font-family: var(--font-mono); }

.node--active {
  border-color: oklch(0.62 0.18 var(--accent-hue));
  background: linear-gradient(180deg,
    oklch(0.62 0.18 var(--accent-hue)),
    oklch(0.55 0.20 var(--accent-hue))
  );
  color: #fff;
  box-shadow:
    0 0 0 1px oklch(0.62 0.18 var(--accent-hue) / 0.4),
    0 0 24px -2px oklch(0.62 0.18 var(--accent-hue) / 0.7);
  transform: translateY(-1px);
}

.node--dim { opacity: 0.4; }

.diagram__svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* Inactive connection paths — dotted, low contrast */
.diagram__svg .path--idle {
  stroke: rgba(255,255,255,0.18);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  fill: none;
}
.diagram__svg .path--dim {
  stroke: rgba(255,255,255,0.06);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  fill: none;
}

/* Active path: solid violet line with flowing dashes on top */
.diagram__svg .path--active {
  stroke: oklch(0.62 0.18 var(--accent-hue));
  stroke-width: 1.6;
  fill: none;
  filter: drop-shadow(0 0 6px oklch(0.62 0.18 var(--accent-hue) / 0.55));
}
.diagram__svg .path--flow {
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-dasharray: 6 12;
  stroke-linecap: round;
  fill: none;
  opacity: 0.95;
  animation: dashFlow 1.4s linear infinite;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -18; }
}

/* Code editor card */
.code {
  border: 1px solid var(--dark-line-2);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.code__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dark-line-2);
  background: rgba(0,0,0,0.2);
}
.code__head .dots { display: inline-flex; gap: 6px; }
.code__head .dots span {
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.18);
}
.code__file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-mute);
}

.code__body {
  flex: 1;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: #e8e8ec;
  overflow: hidden;
}
.code__line {
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 0 16px;
  position: relative;
}
.code__line .ln {
  color: rgba(255,255,255,0.22);
  user-select: none;
  text-align: right;
  padding-right: 14px;
}

.tok-key   { color: oklch(0.78 0.16 var(--accent-hue)); }
.tok-str   { color: oklch(0.82 0.14 145); }
.tok-fn    { color: oklch(0.78 0.12 220); }
.tok-com   { color: rgba(255,255,255,0.35); font-style: italic; }
.tok-cls   { color: oklch(0.85 0.12 60); }
.tok-mute  { color: rgba(255,255,255,0.55); }

.autocomplete {
  position: relative;
  display: inline-block;
}
.autocomplete__pop {
  position: absolute;
  left: 0;
  top: calc(100% + 2px);
  min-width: 200px;
  border-radius: 8px;
  border: 1px solid var(--dark-line-2);
  background: rgba(20, 22, 32, 0.96);
  backdrop-filter: blur(8px);
  padding: 4px;
  z-index: 10;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.6);
  font-size: 12px;
}
.autocomplete__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--dark-mute);
  font-family: var(--font-mono);
}
.autocomplete__item[aria-selected="true"] {
  background: oklch(0.62 0.18 var(--accent-hue) / 0.22);
  color: #fff;
}
.autocomplete__kind {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  margin-left: auto;
}

.terminal {
  border-top: 1px solid var(--dark-line-2);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(0,0,0,0.25);
  color: var(--dark-mute);
}
.terminal .prompt { color: oklch(0.78 0.16 var(--accent-hue)); margin-right: 6px; }
.terminal .out    { color: #f5f5f7; }
.terminal .ok     { color: oklch(0.78 0.14 145); }

/* Stat row */
.tech__stats {
  margin-top: 56px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 900px) { .tech__stats { grid-template-columns: repeat(4, 1fr); } }

.tech-stat {
  border: 1px solid var(--dark-line-2);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(8px);
}
.tech-stat__value {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #f5f5f7;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tech-stat__value .suffix { color: oklch(0.72 0.16 var(--accent-hue)); }
.tech-stat__label { margin-top: 10px; font-size: 13px; color: var(--dark-mute); }

/* ============================================================
   Featured work
   ============================================================ */

.work__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 700px) { .work__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .work__grid { grid-template-columns: repeat(3, 1fr); } }

.proj {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  transition: transform 280ms var(--ease), border-color 280ms var(--ease), box-shadow 280ms var(--ease);
  position: relative;
  overflow: hidden;
}
.proj:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 24px 50px -28px oklch(0.16 0.015 270 / 0.25);
}

.proj__visual {
  height: 160px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.proj__visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.proj__icon {
  position: absolute;
  inset: auto auto 14px 14px;
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.18) inset;
}

.proj__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.proj__name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.proj__sector {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proj__blurb { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }

.proj__metric {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   Global presence — dotted world map
   ============================================================ */

.global {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.globe {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 500;
  background: transparent;
  overflow: visible;
}

.globe__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Dotted continents — rendered as <use> of a single + symbol. */
.globe__dots {
  color: var(--ink-fade);
}

/* Office pin marker rendered as part of the SVG */
.globe__pin-marker {
  fill: var(--accent);
}
.globe__pin-marker--glow {
  fill: var(--accent);
  opacity: 0.18;
  transform-box: fill-box;
  transform-origin: center;
  animation: pinGlow 3.4s var(--ease) infinite;
}
@keyframes pinGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.25; }
  50%      { transform: scale(1.4); opacity: 0.08; }
}

/* Floating HTML labels positioned over the SVG by % coords */
.globe__label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.15);
  z-index: 2;
}

.globe__label-flag {
  font-size: 14px;
  line-height: 1;
}

.globe__label-code {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.globe__label-time {
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* Connecting line from office dot to label (small leader) */
.globe__leader {
  position: absolute;
  height: 1px;
  background: var(--line-strong);
  z-index: 1;
}

.global__list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
@media (min-width: 700px) { .global__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .global__list { grid-template-columns: repeat(4, 1fr); } }
.global__office {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.global__office .city {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.global__office .country { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.05em; }
.global__office .role { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ============================================================
   Philosophy
   ============================================================ */

.philo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 900px) {
  .philo__grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
}

.philo__body {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.philo__body em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
}

.philo__list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.philo__list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 18px;
}
.philo__list li .num {
  font-family: var(--font-mono);
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.philo__list li .text {
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Founder quote inside Philosophy */
.philo__quote {
  margin: 36px 0 0;
  padding: 24px 26px 22px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--paper-2), transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.philo__quote-mark {
  color: var(--accent);
  opacity: 0.7;
}
.philo__quote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.philo__quote blockquote em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
}
.philo__quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
}
.philo__quote figcaption strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.philo__quote figcaption span span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.philo__quote-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, oklch(0.68 0.18 var(--accent-hue)), oklch(0.45 0.20 calc(var(--accent-hue) - 40)));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============================================================
   CTA closer
   ============================================================ */

.cta {
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.cta__mesh {
  position: absolute;
  inset: -20% -20%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--mesh-opacity, 0.6);
}
.cta__mesh .mesh__blob--1 { left: 10%; top: 10%; right: auto; }
.cta__mesh .mesh__blob--2 { left: 40%; top: 30%; right: auto; }
.cta__mesh .mesh__blob--3 { left: 65%; top: 0;   right: auto; }

.cta__title { font-size: clamp(48px, 7vw, 96px); }

.cta__lede { margin: 24px auto 0; max-width: 50ch; }

.cta__ctas { margin-top: 40px; display: inline-flex; gap: 12px; }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--dark-ink);
  color: #f5f5f7;
  padding-block: 80px 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; }
}

.footer__brand .brand { color: #f5f5f7; }
.footer__brand .brand-mark::after { background: var(--dark-ink); }
.footer__tagline { color: var(--dark-mute); margin-top: 18px; max-width: 32ch; font-size: 15px; line-height: 1.5; }

.footer__col h4 {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dark-fade);
  font-weight: 500;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__col a { color: var(--dark-mute); font-size: 14px; transition: color 200ms var(--ease); }
.footer__col a:hover { color: #fff; }

.footer__bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark-fade);
  letter-spacing: 0.04em;
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal--in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   <HoverCard /> — pop-over preview on hover/focus.
   ============================================================ */

.hover-card {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.hover-card__content {
  position: absolute;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  /* Default — side=bottom, align=center */
  top: calc(100% + var(--hc-offset, 12px));
  left: 50%;
  transform: translate3d(-50%, -8px, 0) scale(0.94);
  transform-origin: top center;
  transition:
    opacity 220ms var(--ease),
    transform 320ms cubic-bezier(0.34, 1.3, 0.64, 1);
}

.hover-card__content.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.hover-card__content[data-side="top"] {
  top: auto;
  bottom: calc(100% + var(--hc-offset, 12px));
  transform-origin: bottom center;
  transform: translate3d(-50%, 8px, 0) scale(0.94);
}
.hover-card__content[data-side="top"].is-open {
  transform: translate3d(-50%, 0, 0) scale(1);
}

.hover-card__content[data-align="start"]  { left: 0;  transform: translate3d(0, -8px, 0) scale(0.94); transform-origin: top left; }
.hover-card__content[data-align="start"].is-open { transform: translate3d(0, 0, 0) scale(1); }
.hover-card__content[data-align="end"]    { left: auto; right: 0; transform: translate3d(0, -8px, 0) scale(0.94); transform-origin: top right; }
.hover-card__content[data-align="end"].is-open { transform: translate3d(0, 0, 0) scale(1); }

.hover-card__inner {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow:
    0 24px 48px -18px oklch(0.16 0.015 270 / 0.32),
    0 1px 0 var(--paper-2) inset;
  min-width: 220px;
  color: var(--ink);
}

.hover-card__arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transform: rotate(45deg);
  z-index: 0;
}
.hover-card__arrow[data-side="bottom"] {
  top: -7px;
  left: 50%;
  margin-left: -6px;
  border-right: 0;
  border-bottom: 0;
}
.hover-card__arrow[data-side="top"] {
  bottom: -7px;
  left: 50%;
  margin-left: -6px;
  border-left: 0;
  border-top: 0;
}

/* ----- Social card (used inside HoverCardContent in the nav) ----- */
.social-card {
  width: 260px;
}

.social-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow:
    0 6px 14px -6px rgba(0,0,0,0.25),
    inset 0 0 0 1px rgba(255,255,255,0.18);
}

.social-card__id {
  min-width: 0;
}

.social-card__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}

.social-card__handle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.social-card__blurb {
  margin: 12px 0 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.social-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 200ms var(--ease);
}
.social-card__cta:hover { transform: translateY(-1px); }

/* ============================================================
   DropdownMenu — used by the language switcher (and reusable).
   ============================================================ */

.dropdown-menu {
  position: relative;
  display: inline-flex;
}

.dropdown-menu__content {
  position: absolute;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  top: calc(100% + var(--dm-offset, 10px));
  transform: scale(0.94) translateY(-6px);
  transform-origin: top right;
  transition:
    opacity 200ms var(--ease),
    transform 280ms cubic-bezier(0.34, 1.3, 0.64, 1);
}
.dropdown-menu__content[data-align="end"]   { right: 0; transform-origin: top right; }
.dropdown-menu__content[data-align="start"] { left: 0; transform-origin: top left; }
.dropdown-menu__content[data-align="center"] {
  left: 50%;
  transform: scale(0.94) translate(-50%, -6px);
  transform-origin: top center;
}
.dropdown-menu__content.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}
.dropdown-menu__content[data-align="center"].is-open {
  transform: scale(1) translate(-50%, 0);
}

.dropdown-menu__panel {
  min-width: 260px;
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow:
    0 24px 48px -16px oklch(0.16 0.015 270 / 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.dropdown-menu__panel::-webkit-scrollbar { width: 6px; }
.dropdown-menu__panel::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}
.dropdown-menu__panel::-webkit-scrollbar-track { background: transparent; }
[data-theme="dark"] .dropdown-menu__panel {
  background: oklch(0.18 0.014 270);
  border-color: rgba(255,255,255,0.1);
  box-shadow:
    0 24px 48px -16px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.dropdown-menu__label {
  padding: 8px 10px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.dropdown-menu__sep {
  margin: 4px 6px;
  height: 1px;
  background: var(--line);
}

.dropdown-menu__group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dropdown-menu__item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  letter-spacing: -0.005em;
  transition: background 160ms var(--ease), color 160ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  cursor: pointer;
  width: 100%;
}
.dropdown-menu__item:hover,
.dropdown-menu__item:focus-visible {
  background: color-mix(in oklab, var(--ink) 5%, transparent);
  outline: none;
}

/* Selected language row — glass pill style, matches the active nav tab. */
.dropdown-menu__item.is-selected,
.dropdown-menu__item.is-selected:hover {
  background: var(--paper-2);
  border-color: var(--line-strong);
  font-weight: 600;
  margin: 4px 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35),
    0 1px 2px oklch(0.16 0.015 270 / 0.06),
    0 6px 14px -6px oklch(0.16 0.015 270 / 0.18);
}
[data-theme="dark"] .dropdown-menu__item.is-selected,
[data-theme="dark"] .dropdown-menu__item.is-selected:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 6px 14px -6px rgba(0, 0, 0, 0.5);
}
.dropdown-menu__item.is-disabled,
.dropdown-menu__item[disabled] {
  color: var(--ink-fade);
  cursor: default;
}
.dropdown-menu__item.is-disabled:hover,
.dropdown-menu__item[disabled]:hover { background: transparent; }

.dropdown-menu__item--destructive { color: oklch(0.55 0.18 25); }
.dropdown-menu__item--destructive:hover { background: oklch(0.95 0.06 25); }

.dropdown-menu__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  width: 18px;
  height: 18px;
}

.dropdown-menu__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
}

.dropdown-menu__shortcut {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-align: right;
}

/* ============================================================
   Footer socials (icon row under brand)
   ============================================================ */
.footer__socials {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: inline-flex;
  gap: 6px;
}
.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--dark-mute);
  transition: color 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease);
}
.footer__social:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}
.footer__social svg { display: block; }

/* ============================================================
   <ShareButton /> — animated expandable share pill
   ============================================================ */
.share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  vertical-align: middle;
}

.share-btn__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 0;
  cursor: pointer;
  transition: background 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
  position: relative;
  z-index: 2;
}
.share-btn__trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -12px oklch(0.16 0.015 270 / 0.5);
}

.share-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  transition: transform 320ms cubic-bezier(0.34, 1.3, 0.64, 1);
}
.share-btn__icon svg { width: 16px; height: 16px; display: block; }
.share-btn.is-open .share-btn__icon { transform: rotate(90deg); }

.share-btn__platforms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: -12px;            /* tuck the platforms behind the trigger */
  padding-left: 18px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms var(--ease),
    padding-left 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
.share-btn.is-open .share-btn__platforms {
  max-width: 220px;
  opacity: 1;
  padding-left: 20px;
}

.share-btn__platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  /* Staggered entrance — each icon offsets ~60ms later */
  transform: translateX(-8px) scale(0.6);
  opacity: 0;
  transition:
    background 220ms var(--ease),
    color 220ms var(--ease),
    border-color 220ms var(--ease),
    transform 360ms cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 280ms var(--ease);
  transition-delay: calc(var(--idx, 0) * 0ms);
}
.share-btn.is-open .share-btn__platform {
  transform: translateX(0) scale(1);
  opacity: 1;
  transition-delay: calc(var(--idx, 0) * 60ms + 80ms);
}

.share-btn__platform svg {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform 220ms var(--ease);
}
.share-btn__platform:hover svg { transform: scale(1.12); }

.share-btn__platform:hover {
  border-color: var(--ink);
}

/* Per-platform hover tints (animate-ui flavour) */
.share-btn__platform--x:hover        { background: #000;       color: #fff;    border-color: #000; }
.share-btn__platform--linkedin:hover { background: #0a66c2;    color: #fff;    border-color: #0a66c2; }
.share-btn__platform--facebook:hover { background: #1877f2;    color: #fff;    border-color: #1877f2; }
.share-btn__platform--copy:hover     { background: var(--accent); color: #fff; border-color: var(--accent); }

.share-btn__platform--copy.is-copied {
  background: oklch(0.62 0.18 145);
  color: #fff;
  border-color: oklch(0.62 0.18 145);
}

[data-theme="dark"] .share-btn__platform {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.share-btn--sm .share-btn__trigger { height: 34px; padding: 0 13px; font-size: 12px; }
.share-btn--sm .share-btn__platform { width: 30px; height: 30px; }
.share-btn--sm .share-btn__platform svg { width: 14px; height: 14px; }

.share-btn--lg .share-btn__trigger { height: 48px; padding: 0 20px; font-size: 14px; }
.share-btn--lg .share-btn__platform { width: 40px; height: 40px; }

/* ============================================================
   <AIAssistant /> — floating chat bubble + panel
   ============================================================ */
.ai-bubble {
  position: fixed;
  z-index: 70;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  box-shadow:
    0 16px 32px -10px oklch(0.16 0.015 270 / 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 220ms var(--ease), padding 240ms var(--ease), box-shadow 220ms var(--ease);
}
.ai-bubble:hover { transform: translateY(-2px); }
.ai-bubble.is-open {
  padding: 0;
  width: 44px;
  height: 44px;
  justify-content: center;
}

.ai-bubble__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}
.ai-bubble.is-open .ai-bubble__icon {
  background: transparent;
  width: 20px;
  height: 20px;
}

.ai-bubble__label { white-space: nowrap; }

.ai-bubble__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: oklch(0.72 0.16 145);
  box-shadow: 0 0 0 3px oklch(0.72 0.16 145 / 0.35);
  animation: ai-dot-pulse 2.4s var(--ease) infinite;
}
@keyframes ai-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(0.72 0.16 145 / 0.35); }
  50%      { box-shadow: 0 0 0 6px oklch(0.72 0.16 145 / 0.10); }
}

.ai-panel {
  position: fixed;
  z-index: 72;
  right: 24px;
  bottom: 88px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: min(620px, calc(100vh - 130px));
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow:
    0 30px 60px -20px oklch(0.16 0.015 270 / 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition:
    opacity 220ms var(--ease),
    transform 320ms cubic-bezier(0.34, 1.3, 0.64, 1);
  overflow: hidden;
}
.ai-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.ai-panel__avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, oklch(0.68 0.18 var(--accent-hue)), oklch(0.45 0.20 calc(var(--accent-hue) - 40)));
}
.ai-panel__id { flex: 1; }
.ai-panel__name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ai-panel__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}
.ai-panel__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: oklch(0.72 0.16 145);
  box-shadow: 0 0 0 3px oklch(0.72 0.16 145 / 0.18);
}
.ai-panel__close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.ai-panel__close:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  color: var(--ink);
}

.ai-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.ai-panel__list::-webkit-scrollbar { width: 6px; }
.ai-panel__list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

.ai-msg { display: flex; }
.ai-msg--user { justify-content: flex-end; }
.ai-msg--assistant { justify-content: flex-start; }

.ai-msg__bubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg--user .ai-msg__bubble {
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 6px;
}
.ai-msg--assistant .ai-msg__bubble {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}

.ai-msg__bubble--typing {
  display: inline-flex;
  gap: 4px;
  padding: 14px 14px;
}
.ai-msg__bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ink-mute);
  animation: ai-typing 1.4s var(--ease) infinite;
}
.ai-msg__bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg__bubble--typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes ai-typing {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1);   opacity: 1; }
}

.ai-panel__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}
.ai-panel__suggestion {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  transition: all 180ms var(--ease);
  cursor: pointer;
}
.ai-panel__suggestion:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.ai-panel__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.ai-panel__input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink);
}
.ai-panel__input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 8%, transparent);
}
.ai-panel__send {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  border: 0;
  cursor: pointer;
}
.ai-panel__send:disabled { opacity: 0.4; cursor: default; }
.ai-panel__send:not(:disabled):hover { transform: scale(1.05); }

.ai-panel__foot {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  padding-bottom: 10px;
}

@media (max-width: 560px) {
  .ai-panel { right: 12px; bottom: 80px; width: calc(100vw - 24px); height: min(560px, calc(100vh - 110px)); }
  .ai-bubble { right: 12px; bottom: 16px; }
}

[data-theme="dark"] .ai-msg--assistant .ai-msg__bubble {
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   <BuildMode /> — Konami code overlay
   ============================================================ */
html.build-mode body {
  background-image:
    linear-gradient(to right, oklch(0.62 0.18 285 / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.62 0.18 285 / 0.06) 1px, transparent 1px);
  background-size: 8px 8px;
}
html.build-mode .container {
  outline: 1px dashed oklch(0.62 0.18 285 / 0.35);
  outline-offset: -1px;
}
html.build-mode section,
html.build-mode header,
html.build-mode footer,
html.build-mode article,
html.build-mode .card,
html.build-mode .app-card,
html.build-mode .perk,
html.build-mode .tier,
html.build-mode .testimonial,
html.build-mode .accordion__item {
  outline: 1px dashed oklch(0.62 0.18 285 / 0.4);
  outline-offset: -1px;
}
html.build-mode *:hover {
  outline: 1px solid oklch(0.62 0.18 var(--accent-hue)) !important;
  outline-offset: 1px;
}

.build-hud {
  position: fixed;
  z-index: 95;
  left: 24px;
  bottom: 24px;
  background: oklch(0.62 0.18 var(--accent-hue));
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 16px 32px -10px oklch(0.62 0.18 var(--accent-hue) / 0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.build-hud__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.build-hud__row + .build-hud__row { margin-top: 4px; }
.build-hud__row--meta { opacity: 0.75; font-size: 10px; }
.build-hud__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  animation: ai-dot-pulse 1.6s var(--ease) infinite;
}

.build-toast {
  position: fixed;
  z-index: 96;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 18px 32px -10px oklch(0.16 0.015 270 / 0.5);
  animation: build-toast 1.7s var(--ease) both;
}
.build-toast__icon { color: oklch(0.78 0.14 145); display: inline-flex; }
@keyframes build-toast {
  0%   { opacity: 0; transform: translate(-50%, -10px); }
  15%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ============================================================
   <ThemeTogglerButton /> — sun/moon swap with View-Transition sweep
   ============================================================ */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--dark-mute);
  cursor: pointer;
  overflow: hidden;
  transition:
    color 220ms var(--ease),
    background 220ms var(--ease),
    border-color 220ms var(--ease),
    transform 220ms var(--ease);
}
.theme-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}
.theme-toggle--sm { width: 34px; height: 34px; }
.theme-toggle--lg { width: 44px; height: 44px; }

.theme-toggle__icons {
  position: relative;
  width: 18px;
  height: 18px;
}
.theme-toggle__sun,
.theme-toggle__moon {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  transition:
    transform 420ms cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 280ms var(--ease);
}
.theme-toggle.is-light .theme-toggle__sun  { transform: rotate(0)    scale(1); opacity: 1; }
.theme-toggle.is-light .theme-toggle__moon { transform: rotate(-90deg) scale(0); opacity: 0; }
.theme-toggle.is-dark  .theme-toggle__sun  { transform: rotate(90deg)  scale(0); opacity: 0; }
.theme-toggle.is-dark  .theme-toggle__moon { transform: rotate(0)    scale(1); opacity: 1; }

/* ===== Legal pages prose ===== */
.legal-prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.legal-prose h2 {
  margin: 40px 0 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.022em;
  color: var(--ink);
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.legal-prose p { margin: 0 0 14px; }
.legal-prose ul {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}
.legal-prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}
.legal-prose ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--accent);
}
.legal-prose strong { color: var(--ink); font-weight: 600; }
.legal-prose em { font-family: var(--font-serif); font-style: italic; color: var(--ink); }
.legal-prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--paper-sunk);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.legal-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  z-index: 100;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 48px -18px oklch(0.16 0.015 270 / 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: cookie-in 360ms cubic-bezier(0.34, 1.3, 0.64, 1) both;
  flex-wrap: wrap;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner__copy { flex: 1; min-width: 260px; }
.cookie-banner__copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cookie-banner__copy p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: grid;
  place-items: center;
  padding: 24px;
}
.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.16 0.015 270 / 0.55);
  backdrop-filter: blur(8px);
}
.cookie-modal__card {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 60px -20px oklch(0.16 0.015 270 / 0.4);
}
.cookie-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.cookie-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cookie-list li:last-child { border-bottom: 0; }
.cookie-list li > div { flex: 1; }
.cookie-list strong { font-size: 14px; font-weight: 500; color: var(--ink); }
.cookie-list p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.cookie-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--paper-sunk);
  color: var(--ink-mute);
  border: 1px solid var(--line);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cookie-switch {
  position: relative;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.cookie-switch span {
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  border-radius: 999px;
  transition: background 220ms var(--ease);
}
.cookie-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform 220ms cubic-bezier(0.34, 1.3, 0.64, 1);
}
.cookie-switch input:checked + span { background: var(--ink); }
.cookie-switch input:checked + span::after { transform: translateX(16px); }

.cookie-modal__actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== Reading progress bar ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 55;
  pointer-events: none;
  background: transparent;
}
.reading-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), oklch(0.62 0.18 calc(var(--accent-hue) + 60)));
  box-shadow: 0 0 12px oklch(0.62 0.18 var(--accent-hue) / 0.6);
  transition: width 80ms linear;
}

/* ===== Cross-document View Transitions ===== */
::view-transition-old(root) { animation: vt-out 280ms cubic-bezier(0.4, 0, 0.6, 1) both; }
::view-transition-new(root) { animation: vt-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* ===== Skeleton ===== */
.skeleton {
  position: relative;
  overflow: hidden;
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  border-radius: 8px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    transparent,
    color-mix(in oklab, var(--paper) 70%, transparent),
    transparent);
  animation: skeleton-shimmer 1.4s linear infinite;
}
@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}

/* ===== 404 illustration ===== */
.notfound__art {
  display: block;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 30px oklch(0.16 0.015 270 / 0.18));
}
.notfound__planet { transform-origin: 210px 120px; animation: nf-spin 28s linear infinite; }
.notfound__orbit  { transform-origin: 210px 120px; animation: nf-spin 90s linear infinite; }
.notfound__satellite { transform-origin: 349px 55px; animation: nf-drift 9s ease-in-out infinite alternate; }
.notfound__bit { animation: nf-twinkle 3s ease-in-out infinite; }
.notfound__bit--1 { animation-delay: 0s; }
.notfound__bit--2 { animation-delay: 0.7s; }
.notfound__bit--3 { animation-delay: 1.4s; }

@keyframes nf-spin    { to { transform: rotate(360deg); } }
@keyframes nf-drift   { from { transform: translate(0,0) rotate(0); } to { transform: translate(-18px, 14px) rotate(-12deg); } }
@keyframes nf-twinkle { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.3); } }

/* ===== Case study block ===== */
.case-study {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 920px) {
  .case-study { grid-template-columns: repeat(3, 1fr); }
}
.case-study__block {
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 920px) {
  .case-study__block {
    padding: 32px 32px 32px 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .case-study__block:last-child { border-right: 0; padding-right: 0; }
  .case-study__block + .case-study__block { padding-left: 32px; }
}
.case-study__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 500;
}
.case-study__block p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.notfound__title.is-glitch { transform: skewX(-4deg); filter: hue-rotate(20deg); }
.notfound__title { transition: transform 80ms linear, filter 80ms linear; }

@media (prefers-reduced-motion: reduce) {
  .notfound__planet, .notfound__orbit, .notfound__satellite, .notfound__bit { animation: none; }
}

/* View-Transition pseudo elements — let the new state simply reveal under our
   clip-path animation. Disable the default cross-fade. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

.footer__bottom-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.konami-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
}
.konami-modal__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.16 0.015 270 / 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: konami-fade 240ms var(--ease) both;
}

.konami-modal__card {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  padding: 36px 36px 32px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow:
    0 40px 80px -24px oklch(0.16 0.015 270 / 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-align: left;
  animation: konami-pop 480ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
@media (max-width: 540px) {
  .konami-modal__card { padding: 28px 24px 26px; }
}

.konami-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.konami-modal__close:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  color: var(--ink);
}

.konami-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: oklch(0.94 0.04 var(--accent-hue));
  color: oklch(0.45 0.18 var(--accent-hue));
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.konami-modal__pulse {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.62 0.18 var(--accent-hue) / 0.25);
  animation: ai-dot-pulse 2s var(--ease) infinite;
}

.konami-modal__title {
  margin: 18px 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
  text-wrap: balance;
}
.konami-modal__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.konami-modal__lede {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
}

.konami-modal__actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.konami-modal__hint {
  margin-top: 22px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 200ms var(--ease);
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}
.konami-modal__hint:hover { color: var(--ink); }

/* Confetti — falling colored petals */
.konami-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.konami-confetti__bit {
  position: absolute;
  top: -10px;
  left: var(--x);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: oklch(0.68 0.18 var(--hue));
  opacity: 0;
  transform: rotate(0);
  animation: konami-fall var(--dur) cubic-bezier(0.22, 1, 0.36, 1) var(--delay) forwards;
}
@keyframes konami-fall {
  0%   { opacity: 0; transform: translateY(-20px) rotate(0); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(110vh) rotate(var(--rot)); }
}

@keyframes konami-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes konami-pop {
  0%   { opacity: 0; transform: translateY(16px) scale(0.92); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

[data-theme="dark"] .konami-modal__eyebrow {
  background: oklch(0.22 0.06 var(--accent-hue));
  color: oklch(0.85 0.14 var(--accent-hue));
}

/* ============================================================
   <KeyboardEggs /> — cheat sheet modal, spotlight, brand burst
   ============================================================ */
.kbd-modal,
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: grid;
  place-items: start center;
  padding: 12vh 24px 24px;
}
.kbd-modal__backdrop,
.spotlight__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.16 0.015 270 / 0.55);
  backdrop-filter: blur(8px);
  animation: konami-fade 200ms var(--ease) both;
}

.kbd-modal__card,
.spotlight__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow:
    0 40px 80px -24px oklch(0.16 0.015 270 / 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: konami-pop 360ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.kbd-modal__card {
  padding: 32px 32px 0;
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
}
.kbd-modal__card > .spotlight__foot {
  /* Match the spotlight pinned footer: full-bleed strip at the bottom of the card */
  margin: 16px -32px 0;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

.kbd-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.kbd-modal__close:hover {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  color: var(--ink);
}

.kbd-modal__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.kbd-modal__title {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.kbd-modal__lede {
  margin: 8px 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.kbd-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.kbd-list::-webkit-scrollbar { width: 6px; }
.kbd-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.kbd-list::-webkit-scrollbar-track { background: transparent; }

.kbd-list__row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.kbd-list__keys {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.kbd-list__label {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.kbd-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.kbd-key--mini { min-width: 22px; height: 22px; font-size: 10.5px; padding: 0 6px; }
[data-theme="dark"] .kbd-key {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.kbd-then {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kbd-modal__foot {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ----- Spotlight ----- */
.spotlight__card { padding: 0; overflow: hidden; }

.spotlight__input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-mute);
}
.spotlight__input {
  flex: 1;
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.spotlight__input:focus { outline: none; }
.spotlight__input::placeholder { color: var(--ink-fade); }

.spotlight__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 50vh;
  overflow-y: auto;
}
.spotlight__row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.4fr) 22px;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
}
.spotlight__row.is-active {
  background: color-mix(in oklab, var(--ink) 6%, transparent);
}
.spotlight__row-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}
.spotlight__row-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.012em;
}
.spotlight__row-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  text-align: right;
}
.spotlight__row-chev {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-fade);
  text-align: right;
}
.spotlight__row.is-active .spotlight__row-chev { color: var(--ink); }

.spotlight__empty {
  padding: 24px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 14px;
}

.spotlight__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  background: var(--paper-sunk);
}
.spotlight__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ----- Toast (theme cycle) ----- */
.kbd-toast {
  position: fixed;
  z-index: 120;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 18px 32px -10px oklch(0.16 0.015 270 / 0.5);
  opacity: 0;
  animation: kbd-toast 1.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes kbd-toast {
  0%   { opacity: 0; transform: translate(-50%, 8px); }
  15%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 8px); }
}

/* ----- INNOVEEV brand burst ----- */
.inno-burst {
  position: fixed;
  inset: 0;
  z-index: 125;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.inno-burst__brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 28px 40px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  box-shadow: 0 40px 80px -20px oklch(0.16 0.015 270 / 0.55);
  animation: inno-pop 3.0s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}
.inno-burst__brand .brand-mark { width: 40px; height: 40px; }
.inno-burst__word {
  font-family: var(--font-sans);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: 0.08em;
}
@keyframes inno-pop {
  0%   { opacity: 0; transform: scale(0.4) rotate(-6deg); }
  10%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
  20%  { transform: scale(1) rotate(-1deg); }
  30%  { transform: scale(1.02) rotate(1deg); }
  80%  { opacity: 1; transform: scale(1) rotate(0); }
  100% { opacity: 0; transform: scale(0.94) rotate(0); }
}

.inno-burst__confetti {
  position: absolute;
  inset: 0;
}
.inno-burst__bit {
  position: absolute;
  top: -10px;
  left: var(--x);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: oklch(0.68 0.18 var(--hue));
  opacity: 0;
  animation: konami-fall var(--dur) cubic-bezier(0.22, 1, 0.36, 1) var(--delay) forwards;
}

/* ============================================================
   <PricingEstimator />
   ============================================================ */
.estimator-section {
  padding-top: 0;
}

.estimator {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  border: 1px solid var(--line);
}
@media (min-width: 920px) {
  .estimator { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; padding: 40px; }
}

.estimator__controls {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.estimator__row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.estimator__row--toggle { gap: 0; }

.estimator__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.estimator__label > span:first-child {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.estimator__value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.estimator__hint {
  font-size: 12.5px;
  color: var(--ink-mute);
}

.estimator__slider {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right,
    var(--accent) 0,
    var(--accent) calc(var(--slider-pct, 50%)),
    var(--line-strong) calc(var(--slider-pct, 50%)),
    var(--line-strong) 100%);
}
/* Compute fill via attr-driven CSS is tricky w/o JS — keep the linear track
   visible and let the thumb communicate position. */
.estimator__slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
.estimator__slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
.estimator__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  margin-top: -7px;
  cursor: grab;
  box-shadow: 0 6px 14px -6px oklch(0.16 0.015 270 / 0.35);
  transition: transform 160ms var(--ease);
}
.estimator__slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  cursor: grab;
}
.estimator__slider:active::-webkit-slider-thumb { transform: scale(1.1); cursor: grabbing; }

.estimator__segments {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  gap: 4px;
}
.estimator__segment {
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 200ms var(--ease);
}
.estimator__segment:hover { color: var(--ink); }
.estimator__segment.is-active {
  background: var(--ink);
  color: var(--paper);
}

.estimator__toggle {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.estimator__toggle input { position: absolute; opacity: 0; pointer-events: none; }
.estimator__toggle-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  display: grid;
  place-items: center;
  color: transparent;
  transition: all 200ms var(--ease);
}
.estimator__toggle input:checked + .estimator__toggle-box {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.estimator__result {
  background: var(--ink);
  color: var(--paper);
  padding: 28px 28px 24px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.estimator__result::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, oklch(0.62 0.18 var(--accent-hue) / 0.4), transparent 60%);
  filter: blur(20px);
}
.estimator__result > * { position: relative; }

.estimator__result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.estimator__result-range {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.estimator__result-amount {
  font-family: var(--font-sans);
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.estimator__result-bounds {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
}

.estimator__breakdown {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.estimator__breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}
.estimator__breakdown strong {
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 500;
}

.estimator__disclaimer {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   Custom cursor — multi-mode, mounted by components/cursor.jsx.
     Modes: default, active, preview, reading
     Extras: magnetic pull on .btn--primary / [data-magnetic],
             click ripples, RTL pill mirror.
   ============================================================ */

.cursor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
  transition: opacity 240ms var(--ease);
}
.cursor-layer.is-hidden { opacity: 0; }

.cursor-ripples {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.cursor-ripple {
  position: fixed;
  width: 0; height: 0;
  border: 2px solid oklch(0.62 0.18 var(--accent-hue));
  border-radius: 999px;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  animation: cursor-ripple 700ms var(--ease-out) forwards;
  pointer-events: none;
}

@keyframes cursor-ripple {
  0%   { width: 0;    height: 0;    opacity: 0.55; border-width: 2px; }
  70%  { opacity: 0.25; border-width: 1.5px; }
  100% { width: 90px; height: 90px; opacity: 0;    border-width: 1px; }
}

.cursor-dot,
.cursor-follow {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity 220ms var(--ease);
}

/* ===== Pointer arrow (snaps to mouse) ===== */
.cursor-dot {
  width: 26px;
  height: 26px;
  color: var(--ink);
  display: grid;
  place-items: start start;
  transition: color 220ms var(--ease);
}

.cursor-dot__arrow {
  display: block;
  width: 26px;
  height: 26px;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.cursor-dot__caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5px;
  height: 28px;
  background: var(--ink);
  border-radius: 1px;
  transform: translate(-1px, -2px) scaleY(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
}

.cursor-layer.cursor-mode-active .cursor-dot {
  color: oklch(0.62 0.18 var(--accent-hue));
}
.cursor-layer.cursor-mode-active .cursor-dot__arrow {
  transform: scale(1.15) rotate(-4deg);
}

.cursor-layer.cursor-mode-preview .cursor-dot__arrow {
  /* Arrow stays visible alongside the preview card */
  opacity: 1;
  transform: none;
}

.cursor-layer.cursor-mode-reading .cursor-dot__arrow {
  opacity: 0;
  transform: scale(0.5);
}
.cursor-layer.cursor-mode-reading .cursor-dot__caret {
  opacity: 1;
  transform: translate(-1px, -2px) scaleY(1);
  animation: cursor-caret 1.05s steps(2) infinite;
}
@keyframes cursor-caret {
  50% { opacity: 0.3; }
}

.cursor-layer.is-pressed .cursor-dot__arrow {
  transform: scale(0.82);
}
.cursor-layer.is-pressed .cursor-follow__pill {
  transform: scale(0.94);
}

/* ===== Trailing pill ===== */
.cursor-follow {
  width: 0;
  height: 0;
}

.cursor-follow__pill {
  position: absolute;
  top: 20px;
  left: 14px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 8px 20px -10px oklch(0.16 0.015 270 / 0.55);
  transition:
    background 260ms var(--ease),
    color 260ms var(--ease),
    transform 220ms var(--ease),
    opacity 220ms var(--ease);
}

.cursor-layer.is-rtl .cursor-follow__pill {
  left: auto;
  right: 14px;
}

.cursor-follow__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.cursor-follow__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 9px;
  height: 9px;
}

.cursor-layer.cursor-mode-active .cursor-follow__pill {
  background: oklch(0.62 0.18 var(--accent-hue));
  color: #fff;
}

.cursor-layer.cursor-mode-reading .cursor-follow__pill {
  background: var(--ink);
  color: var(--paper);
}

/* ===== Preview card (replaces pill when mode=preview) ===== */
.cursor-layer.cursor-mode-preview .cursor-follow__pill {
  opacity: 0;
  transform: scale(0.85);
}

.cursor-follow__preview {
  position: absolute;
  top: 20px;
  left: 14px;
  width: 260px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 48px -16px oklch(0.16 0.015 270 / 0.35),
              0 1px 0 var(--paper-2) inset;
  align-items: center;
  /* Entry animation */
  animation: cursor-preview-in 280ms var(--ease) both;
}

.cursor-layer.is-rtl .cursor-follow__preview {
  left: auto;
  right: 14px;
}

@keyframes cursor-preview-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1);     }
}

.cursor-follow__preview-cover {
  width: 64px;
  height: 56px;
  border-radius: 8px;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}
.cursor-follow__preview-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 6px, transparent 6px 12px);
}

.cursor-follow__preview-body {
  min-width: 0;
}

.cursor-follow__preview-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.cursor-follow__preview-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Hide native cursor when ours is active ===== */
html.has-custom-cursor,
html.has-custom-cursor body,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor [role="button"] {
  cursor: none;
}
html.has-custom-cursor input,
html.has-custom-cursor textarea {
  cursor: text;
}

@media (pointer: coarse) {
  .cursor-layer { display: none; }
  html.has-custom-cursor,
  html.has-custom-cursor * { cursor: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-follow__pill,
  .cursor-follow__preview,
  .cursor-dot__arrow,
  .cursor-dot__caret { transition: none; animation: none; }
}

/* ============================================================
   Mobile optimization — spacing rhythm + calmer backgrounds.
   Consolidated overrides; placed last so they win on small screens.
   ============================================================ */
@media (max-width: 600px) {
  :root {
    /* Tighten the vertical rhythm so sections don't feel cavernous on a phone */
    --space-section: clamp(56px, 16vw, 80px);
    --gutter: 18px;
  }

  .section--tight { padding-block: clamp(40px, 12vw, 56px); }

  /* Hero / subpage hero: reclaim the big top gap under the fixed nav */
  .hero { padding-top: 104px; }
  .sub-hero { padding-top: 104px; padding-bottom: clamp(32px, 9vw, 56px); }

  /* Section heading rhythm */
  .section-head { margin-bottom: 32px; }

  /* Dark CTA band + footer breathe less */
  .cta { padding-block: clamp(64px, 16vw, 96px); }
  .footer { padding-block: 56px 28px; }
  .footer__grid { gap: 32px; }

  /* ---- Calmer decorative backgrounds ---- */
  /* The gradient mesh blobs are sized for desktop; shrink + soften them so
     they read as a tint rather than swamping a 390px viewport. */
  .mesh { opacity: var(--mesh-opacity, 0.6); }
  .mesh__blob { filter: blur(56px); }
  .mesh__blob--1 { width: 300px; height: 300px; }
  .mesh__blob--2 { width: 280px; height: 280px; }
  .mesh__blob--3 { width: 260px; height: 260px; }
  .mesh__blob--4 { width: 220px; height: 220px; }
}

/* Very small phones — final squeeze */
@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .sub-hero__title { font-size: clamp(38px, 12vw, 48px); }
}
