/* ────────────────────────────────────────────────────────────────
   BJAK Aura — Case Study (Portfolio)
   Tokens lifted from the Aura design system.
   ──────────────────────────────────────────────────────────────── */
:root {
  /* Brand · teal */
  --aura-50:  #F2F8F7;
  --aura-100: #E0F0ED;
  --aura-200: #C1E0DA;
  --aura-300: #94C9BF;
  --aura-400: #6BB0A4;
  --aura-500: #4A9A8E;
  --aura-600: #388078;
  --aura-700: #0F766E;

  /* Surface · cream / sand */
  --surface:        #FDFBF7;
  --surface-warm:   #F7F3ED;
  --surface-deep:   #EDE8E0;
  --border-soft:    #D9D3C9;
  --border-warm:    #E0E0E0;

  /* Accent · coral */
  --coral:        #E87D5F;
  --coral-soft:   #F2C5B7;
  --coral-deep:   #C75A3D;

  /* Ink / stone */
  --ink:           #1A1715;
  --ink-2:         #292520;
  --stone-700:     #403C3C;
  --stone-500:     #787168;
  --stone-400:     #A89F92;
  --stone-300:     #A8A198;

  /* Focus / signal */
  --green-deep:   #163300;
  --green-pale:   #E0FFD4;
  --red:          #F0263C;
  --yellow:       #FFD400;

  /* Type system */
  --serif: "DM Serif Display", "Newsreader", Georgia, serif;
  --serif-italic: "Newsreader", "DM Serif Display", Georgia, serif;
  --sans:  "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max-w: 1440px;
  --gutter: clamp(20px, 4vw, 80px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Selection */
::selection { background: var(--aura-200); color: var(--ink); }

/* Page-level grain (very subtle) */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(193,224,218,.35), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(232,125,95,.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ─────────  Site chrome  ───────── */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border-soft) 50%, transparent);
}
.site-nav .left {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone-500);
}
.site-nav .left strong { color: var(--ink); font-weight: 600; }
.site-nav .nav-links {
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--stone-500);
}
.site-nav .nav-links a { transition: color .2s ease; }
.site-nav .nav-links a:hover { color: var(--ink); }

/* Generic section frame */
.case-section {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 9vw, 160px) var(--gutter);
}
.case-section .inner { max-width: var(--max-w); margin: 0 auto; }

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--stone-500);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--aura-500);
}
.eyebrow .num {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 7px;
  border-radius: 4px;
  background: var(--aura-100);
  color: var(--aura-700);
  font-weight: 700;
  font-size: 11px; letter-spacing: -.01em;
}

/* Big section heading */
h1, h2, h3, h4 { margin: 0; }
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.display em {
  font-family: var(--serif-italic);
  font-style: italic;
  font-weight: 400;
}

/* ─────────  Reveal animations  ───────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.6,.2,1),
              transform .9s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 480ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 560ms; }

/* ─────────  HERO  ───────── */
.hero {
  position: relative;
  padding: clamp(110px, 14vh, 180px) var(--gutter) clamp(60px, 8vw, 120px);
  min-height: 92vh;
  overflow: hidden;
  isolation: isolate;
}
/* When embedded in an iframe, vh = iframe height — disable to prevent feedback loop */
.is-embedded .hero {
  min-height: 0;
  padding: clamp(80px, 8vw, 140px) var(--gutter) clamp(48px, 6vw, 96px);
}
.is-embedded .hero .scroll-cue {
  display: none;
}
.hero .meta-row {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--stone-500); text-transform: uppercase;
}
.hero .meta-row span strong { color: var(--ink); font-weight: 600; }
.hero .scroll-cue {
  position: absolute; left: var(--gutter); bottom: 32px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--stone-500);
}
.hero .scroll-cue .line {
  width: 60px; height: 1px; background: var(--stone-400); position: relative; overflow: hidden;
}
.hero .scroll-cue .line::after {
  content: ""; position: absolute; left: -30px; top: 0; width: 30px; height: 1px;
  background: var(--ink);
  animation: cueSlide 2.4s cubic-bezier(.6,.1,.4,.9) infinite;
}
@keyframes cueSlide {
  0%   { left: -30px; }
  60%  { left: 60px; }
  100% { left: 60px; }
}

/* HERO V1 — Editorial */
.hero-v1 .h1 {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 148px);
  line-height: .94;
  letter-spacing: -.025em;
  margin: 28px 0 0;
  max-width: 1200px;
}
.hero-v1 .h1 em {
  font-style: italic; font-family: var(--serif-italic); font-weight: 400;
  color: var(--aura-700);
}
.hero-v1 .sub {
  margin-top: 36px;
  max-width: 580px;
  font-size: 19px; line-height: 1.55;
  color: var(--stone-700);
}
.hero-v1 .meta-row { margin-top: 56px; }

/* HERO V2 — Marquee with floating component cards */
.hero-v2 .h1 {
  font-family: var(--serif);
  font-size: clamp(70px, 11vw, 180px);
  line-height: .9;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.hero-v2 .h1 em {
  font-style: italic; font-family: var(--serif-italic); color: var(--coral);
}
.marquee {
  margin: 0 calc(var(--gutter) * -1);
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex; gap: 64px;
  width: max-content;
  animation: scroll 38s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-row { display: flex; align-items: center; gap: 64px; padding-left: 64px; }
.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--surface-deep);
  border-radius: 14px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.18), 0 4px 14px -8px rgba(0,0,0,.08);
  padding: 14px 18px;
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  animation: floatBob 6s ease-in-out infinite;
}
@keyframes floatBob {
  0%,100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%     { transform: translateY(-8px) rotate(var(--r, 0deg)); }
}

/* HERO V3 — Side by side */
.hero-v3 .grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.hero-v3 .h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 5.6vw, 86px);
  line-height: .98;
  letter-spacing: -.02em;
}
.hero-v3 .h1 em {
  font-style: italic; font-family: var(--serif-italic); color: var(--aura-700);
}
.hero-v3 .meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 14px 28px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
}
.hero-v3 .meta-list dt {
  text-transform: uppercase; letter-spacing: .14em; color: var(--stone-500); font-size: 11px;
}
.hero-v3 .meta-list dd { margin: 0; color: var(--ink); }
.hero-v3 .stage {
  position: relative;
  aspect-ratio: 4 / 3;
  perspective: 1800px;
}

/* ─────────  Tilted Browser  ───────── */
.tilt-browser {
  position: relative;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow:
    0 80px 120px -60px rgba(20, 35, 30, .35),
    0 30px 60px -30px rgba(20, 35, 30, .25),
    0 0 0 1px rgba(255,255,255,.7) inset;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.2,.6,.2,1);
}
.tilt-browser .chrome {
  height: 38px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  background: linear-gradient(to bottom, #fff, var(--surface-warm));
  border-bottom: 1px solid var(--border-soft);
}
.tilt-browser .lights { display: flex; gap: 7px; }
.tilt-browser .lights span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface-deep);
}
.tilt-browser .lights span:nth-child(1) { background: #FF5F57; }
.tilt-browser .lights span:nth-child(2) { background: #FEBB2E; }
.tilt-browser .lights span:nth-child(3) { background: #28C840; }
.tilt-browser .url {
  flex: 1;
  height: 22px; border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--stone-500);
}
.tilt-browser .frame-content {
  height: 100%;
  background: var(--surface);
}

/* ─────────  Section: Overview / chapter intro  ───────── */
.chapter {
  padding: clamp(80px, 8vw, 140px) var(--gutter);
  position: relative;
}
.chapter .inner { max-width: var(--max-w); margin: 0 auto; }
.chapter .title {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 96px);
  line-height: .98;
  letter-spacing: -.02em;
  margin: 18px 0 0;
}
.chapter .title em { font-style: italic; font-family: var(--serif-italic); color: var(--aura-700); }
.chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  margin-top: 60px;
}
.chapter-grid .lede {
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: clamp(22px, 1.9vw, 30px);
  line-height: 1.35;
  color: var(--ink);
  font-weight: 400;
}
.chapter-grid .body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--stone-700);
  max-width: 56ch;
}
.chapter-grid .body p + p { margin-top: 18px; }

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 80px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.stat-row .stat {
  padding: 32px 28px;
  border-right: 1px solid var(--border-soft);
  text-align: left;
}
.stat-row .stat:first-child { padding-left: 0; }
.stat-row .stat:last-child { border-right: 0; padding-right: 0; }
.stat-row .stat .num {
  font-family: var(--serif);
  font-size: clamp(40px, 4.2vw, 64px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.stat-row .stat .num em { font-style: italic; font-family: var(--serif-italic); color: var(--aura-700); }
.stat-row .stat .label {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone-500);
}

/* ─────────  Editorial DS Collage  ───────── */
.ds-collage {
  background: var(--surface);
  position: relative;
}
.collage-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(0, auto);
  gap: 18px;
  margin-top: 60px;
}
.tile {
  background: #fff;
  border: 1px solid var(--surface-deep);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  transition: transform .6s cubic-bezier(.2,.6,.2,1), box-shadow .6s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -28px rgba(0,0,0,.18); }
.tile .tile-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px dashed var(--surface-deep);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone-500);
}
.tile .tile-head .label { color: var(--ink); }
.tile .tile-body { padding: 24px; }

/* Desktop browser frame for gallery */
.desktop-frame {
  border-radius: 14px;
  overflow: hidden;
  background: #1f1d1b;
  border: 1px solid var(--surface-deep);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.35), 0 12px 24px -16px rgba(0,0,0,.18);
}
.desktop-chrome {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2a2724 0%, #221f1c 100%);
  color: rgba(255,255,255,.78);
}
.desktop-chrome .lights { display: flex; gap: 7px; }
.desktop-chrome .lights span {
  width: 11px; height: 11px; border-radius: 50%;
  display: inline-block;
}
.desktop-chrome .lights span:nth-child(1) { background: #ff5f57; }
.desktop-chrome .lights span:nth-child(2) { background: #febc2e; }
.desktop-chrome .lights span:nth-child(3) { background: #28c840; }
.desktop-chrome .d-tabs { display: flex; gap: 2px; }
.desktop-chrome .d-tab {
  padding: 6px 14px; border-radius: 8px 8px 0 0;
  font-family: var(--sans); font-size: 12px;
  color: rgba(255,255,255,.55);
  background: transparent;
}
.desktop-chrome .d-tab.active {
  background: var(--surface);
  color: var(--ink);
}
.desktop-chrome .d-url {
  flex: 1;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--mono); font-size: 11px;
  color: rgba(255,255,255,.7);
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
}
.desktop-chrome .d-actions { display: flex; gap: 7px; }
.desktop-chrome .d-actions span {
  width: 14px; height: 14px; border-radius: 4px;
  background: rgba(255,255,255,.18);
}
.desktop-shell {
  height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--stone-400) transparent;
}
.desktop-shell::-webkit-scrollbar { width: 8px; }
.desktop-shell::-webkit-scrollbar-thumb { background: var(--stone-400); border-radius: 999px; }
.desktop-shell img { display: block; width: 100%; height: auto; }
.swatch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* Gallery tab toggle */
.gallery-toggle .gallery-tab {
  display: inline-flex; align-items: baseline; gap: 12px;
  background: transparent; border: none; padding: 10px 0;
  font-family: var(--sans); font-size: 17px; color: var(--ink-soft);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.gallery-toggle .gallery-tab .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.gallery-toggle .gallery-tab .lbl { font-weight: 500; }
.gallery-toggle .gallery-tab:hover { color: var(--ink); }
.gallery-toggle .gallery-tab.is-active {
  color: var(--ink); border-bottom-color: var(--brand);
}
.gallery-toggle .gallery-tab.is-active .num { color: var(--brand); }
.swatch {
  aspect-ratio: 1; border-radius: 10px;
  position: relative; overflow: hidden;
  border: 1px solid color-mix(in oklab, currentColor 18%, transparent);
}
.swatch .label {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .03em;
  color: rgba(255,255,255,.92);
}
.swatch.dark .label { color: rgba(255,255,255,.95); }
.swatch.light .label { color: rgba(0,0,0,.6); }

/* Type specimen */
.specimen {
  font-family: var(--serif);
  font-size: clamp(64px, 8vw, 132px);
  line-height: .9;
  letter-spacing: -.025em;
  color: var(--ink);
}
.specimen em { font-style: italic; font-family: var(--serif-italic); color: var(--aura-700); }
.specimen-row {
  display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--stone-500);
  margin-top: 28px;
}
.specimen-row dt { text-transform: uppercase; letter-spacing: .14em; }
.specimen-row dd { margin: 0; color: var(--ink); }

/* Component snapshots */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 25px;
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: var(--aura-700); color: #fff;
}
.btn-primary:hover { background: var(--aura-600); transform: translateY(-1px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-secondary {
  background: transparent; border-color: var(--aura-700); color: var(--aura-700);
}
.btn-ghost { background: var(--aura-100); color: var(--aura-700); }
.btn-lg { padding: 14px 28px; border-radius: 64px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 20px; }

/* Tabs snapshot */
.tab-bar {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border-soft);
}
.tab {
  padding: 12px 18px;
  font-family: var(--sans); font-size: 13px;
  color: var(--stone-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.tab.active { color: var(--aura-700); border-color: var(--aura-700); font-weight: 600; }

/* Input snapshot */
.input-mock {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #fff;
  display: flex; align-items: center;
  padding: 0 14px;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-mock.focused {
  border-color: var(--aura-500);
  box-shadow: 0 0 0 3px var(--aura-100);
}
.input-mock .ph { color: var(--stone-400); }

/* Switch */
.switch {
  width: 38px; height: 22px;
  background: var(--surface-deep); border-radius: 999px;
  position: relative; transition: background .25s ease;
}
.switch::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .25s ease;
}
.switch.on { background: var(--aura-700); }
.switch.on::after { transform: translateX(16px); }

/* Tag */
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .02em;
}
.tag-teal { background: var(--aura-100); color: var(--aura-700); }
.tag-coral { background: #FCE7DE; color: var(--coral-deep); }
.tag-stone { background: var(--surface-warm); color: var(--stone-700); }
.tag-green { background: var(--green-pale); color: var(--green-deep); }
.tag-dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 999px; background: currentColor; margin-right: 6px;
}
.tag-dismiss { gap: 6px; padding-right: 6px; }
.tag-dismiss .x {
  width: 14px; height: 14px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.08); color: currentColor; font-size: 9px; line-height: 1;
}
.tag-counter { gap: 6px; padding-right: 4px; }
.tag-counter .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--ink); color: #fff; font-family: var(--mono); font-size: 10px;
}
.tag-inverse { background: var(--ink); color: var(--surface); }

/* Form field states */
.form-field {
  display: flex; flex-direction: column; gap: 6px;
}
.form-field .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--stone-500);
}
.form-field .helper { font-size: 12px; color: var(--stone-500); }
.form-field.is-success .input-mock { border-color: var(--green-deep); }
.form-field.is-success .helper { color: var(--green-deep); }
.form-field.is-error .input-mock { border-color: #C24545; background: #FFF5F5; }
.form-field.is-error .helper { color: #C24545; }

/* Tooltip */
.tt {
  position: relative; display: inline-block;
  background: var(--ink); color: #fff;
  font-size: 12px; padding: 8px 12px; border-radius: 8px;
  font-family: var(--sans);
}
.tt::after {
  content: ""; position: absolute;
  width: 10px; height: 10px; background: var(--ink);
  transform: rotate(45deg);
}
.tt.t-top::after { left: 50%; bottom: -4px; margin-left: -5px; }
.tt.t-right::after { left: -4px; top: 50%; margin-top: -5px; }
.tt.t-bottom::after { left: 50%; top: -4px; margin-left: -5px; }
.tt.t-left::after { right: -4px; top: 50%; margin-top: -5px; }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #fff; border: 1px solid var(--surface-deep); border-radius: 10px;
  flex-wrap: wrap;
}
.filter-bar .f-label {
  font-size: 12px; color: var(--stone-500);
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-warm); color: var(--ink);
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--surface-deep);
}
.filter-chip .v { color: var(--aura-700); font-weight: 700; }
.filter-chip .car { color: var(--stone-500); font-size: 9px; }

/* Navigation bar mock */
.nav-mock {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--surface-deep); border-radius: 14px;
  padding: 14px 20px;
}
.nav-mock .left, .nav-mock .right { display: flex; align-items: center; gap: 22px; }
.nav-mock .brand {
  font-family: var(--serif); font-size: 18px; letter-spacing: -.01em;
}
.nav-mock .brand em { font-family: var(--serif-italic); color: var(--aura-700); }
.nav-mock a {
  font-size: 13px; color: var(--ink); text-decoration: none;
  position: relative; padding: 6px 0;
}
.nav-mock a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--aura-700); transform: translateX(-50%);
}
.nav-mock .nav-cta {
  background: var(--aura-700); color: #fff;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* Spacing scale tile */
.spacing-row { display: grid; grid-template-columns: 60px 1fr max-content; gap: 14px; align-items: center; padding: 8px 0; font-family: var(--mono); font-size: 11px; color: var(--stone-500); }
.spacing-row .label { letter-spacing: .04em; }
.spacing-row .bar-wrap { height: 8px; background: var(--surface-warm); border-radius: 4px; overflow: hidden; }
.spacing-row .bar { height: 100%; background: var(--aura-300); border-radius: 4px; }

/* Radius tile */
.radius-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.radius { aspect-ratio: 1; background: var(--aura-100); border: 1px solid var(--aura-200); display: flex; align-items: flex-end; justify-content: flex-start; padding: 10px; font-family: var(--mono); font-size: 10px; color: var(--aura-700); letter-spacing: .04em; }

/* Elevation tile */
.elevation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.elev-card {
  background: #fff; border-radius: 12px; padding: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--stone-500);
  border: 1px solid var(--surface-deep);
}
.elev-card .name { color: var(--ink); font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.elev-1 { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.elev-2 { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.elev-3 { box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.elev-4 { box-shadow: 0 24px 50px rgba(0,0,0,.16); }

/* ─────────  Mockup / Browser frames  ───────── */
.landing-stage {
  position: relative;
  margin-top: 80px;
  perspective: 2200px;
  perspective-origin: 50% 30%;
}
.landing-stage .browser-3d {
  width: 100%;
  aspect-ratio: 16/10;
  transform: rotateX(18deg) rotateY(-10deg) rotateZ(2deg);
  transform-origin: center 40%;
  transition: transform 1s cubic-bezier(.2,.6,.2,1);
}
.landing-stage:hover .browser-3d {
  transform: rotateX(8deg) rotateY(-4deg) rotateZ(0.5deg);
}
.landing-stage .browser-3d .frame-content {
  height: calc(100% - 38px);
  overflow: hidden;
  position: relative;
}
.landing-stage .browser-3d .scroll-shell {
  position: absolute; inset: 0;
  overflow: hidden;
}
.landing-stage .browser-3d .scroll-shell-live {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--stone-400) transparent;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.landing-stage .browser-3d .scroll-shell-live::-webkit-scrollbar { width: 8px; }
.landing-stage .browser-3d .scroll-shell-live::-webkit-scrollbar-thumb {
  background: var(--stone-400); border-radius: 999px;
}
.landing-stage .browser-3d .scroll-shell-live::-webkit-scrollbar-track {
  background: transparent;
}
.landing-stage .browser-3d .scroll-pane {
  position: absolute;
  left: 0; right: 0; top: 0;
  width: 100%;
  transition: transform 1.2s cubic-bezier(.2,.6,.2,1);
}

.mockup-pin {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone-500);
  display: flex; align-items: center; gap: 10px;
}
.mockup-pin .line { width: 60px; height: 1px; background: var(--stone-400); }
.mockup-pin .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0;
}

/* ─────────  Mockup gallery  ───────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--surface-deep);
  box-shadow: 0 30px 50px -34px rgba(0,0,0,.22);
  transition: transform .6s cubic-bezier(.2,.6,.2,1), box-shadow .6s ease;
}
.gallery-item:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -34px rgba(0,0,0,.3); }
.gallery-item .preview { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.gallery-item .meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-top: 1px solid var(--surface-deep);
}
.gallery-item .meta .name { font-family: var(--serif); font-size: 22px; }
.gallery-item .meta .name em { font-style: italic; font-family: var(--serif-italic); color: var(--aura-700); }
.gallery-item .meta .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--stone-500);
}

/* ─────────  Footer  ───────── */
.footer {
  background: var(--ink);
  color: var(--surface);
  padding: clamp(80px, 9vw, 140px) var(--gutter) 60px;
  position: relative;
}
.footer .inner { max-width: var(--max-w); margin: 0 auto; }
.footer .lede {
  font-family: var(--serif);
  font-size: clamp(48px, 6.4vw, 110px);
  line-height: 1;
  letter-spacing: -.02em;
}
.footer .lede em { font-style: italic; font-family: var(--serif-italic); color: var(--aura-300); }
.footer .columns {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin-top: 80px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
}
.footer .columns h4 {
  text-transform: uppercase; letter-spacing: .14em; font-size: 10px;
  color: rgba(255,255,255,.5); font-weight: 500;
  margin-bottom: 14px;
}
.footer .columns a, .footer .columns p { color: rgba(255,255,255,.85); display: block; padding: 4px 0; }
.footer .columns a:hover { color: var(--aura-300); }

/* ─────────  Responsive  ───────── */
@media (max-width: 900px) {
  .chapter-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row .stat { border-right: 0; border-bottom: 1px solid var(--border-soft); padding: 24px 0; }
  .stat-row .stat:last-child { border-bottom: 0; }
  .footer .columns { grid-template-columns: repeat(2, 1fr); }
  .hero-v3 .grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}
