:root {
  --bg: #0a0a0a;
  --bg-raised: #131313;
  --bg-card: #161616;
  --ink: #f1efe9;
  --ink-soft: #8a857d;
  --ink-mute: #4a4742;
  --hairline: #232220;
  --hairline-strong: #2e2c29;
  --accent: #fc4116;
  --accent-warm: #fc4116;
  --grain: 0.02;

  /* Theme-aware chrome (top bar). Inverts in light mode. */
  --chrome-bg: #0a0a0a;
  --chrome-bd: #2a2a28;
  --chrome-brand: #f1efe9;
  --chrome-text: #cfcabd;
  --chrome-soft: #8a857d;
  --chrome-mute: #4a4742;
  --chrome-on-acc: #0a0a0a; /* fg color when hover fills with accent */

  /* Theme-aware hero. Orange bg = dark, cream bg = light. */
  --hero-bg: #fc4116;
  --hero-ink: #0a0a0a;
}
[data-theme="light"] {
  --bg: #f1efe9;
  --bg-raised: #e7e4dc;
  --bg-card: #ebe8e1;
  --ink: #0a0a0a;
  --ink-soft: #5a574f;
  --ink-mute: #a8a39a;
  --hairline: #d4d0c4;
  --hairline-strong: #b8b3a4;
  --accent: #c2410c;
  --accent-warm: #c2410c;

  /* chrome */
  --chrome-bg: #e7e4dc;
  --chrome-bd: #d4d0c4;
  --chrome-brand: #0a0a0a;
  --chrome-text: #4a4742;
  --chrome-soft: #6a675f;
  --chrome-mute: #b8b3a4;
  --chrome-on-acc: #f1efe9;

  /* hero */
  --hero-bg: #f1efe9;
  --hero-ink: #0a0a0a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ---------- intro overlay ("IS NOT LOADING / BUT I LIKE IT") ----------
   Multi-phase reveal inspired by sebastian-martinez.com. Phase 1: black
   bg, big orange words appear sequentially around a centered portrait
   ("IS NOT LOADING"). Phase 2: bg flips to orange, tan/beige words spell
   "BUT → I LIKE IT". Phase 3: overlay fades out, the real hero is
   revealed. JS in main.js drives the timing by adding classes. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200; /* above chrome (90) */
  background: #0a0a0a;
  overflow: hidden;
  pointer-events: none;
  transition: background-color 0.45s ease, opacity 0.5s ease;
}
.intro.phase2  { background: #fc4116; }
/* bg-fade: overlay bg goes transparent so the hero underneath becomes
   visible while the intro portrait keeps morphing on top. The colors
   match (intro #fc4116 == hero bg), so visually no flash. */
.intro.bg-fade { background: transparent; }
.intro.exit    { opacity: 0; }

.intro-portrait {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(220px, 24vw, 380px);
  height: clamp(280px, 30vw, 460px);
  background: #0a0a0a url('portrait.png') center 35% / cover no-repeat;
  border: 1px solid #0a0a0a;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  /* All position/size props transition so JS can morph it to the hero
     portrait's bounding rect at the end of the intro. */
  transition:
    opacity 0.45s ease,
    transform 0.75s cubic-bezier(0.65, 0, 0.2, 1),
    left 0.75s cubic-bezier(0.65, 0, 0.2, 1),
    top 0.75s cubic-bezier(0.65, 0, 0.2, 1),
    width 0.75s cubic-bezier(0.65, 0, 0.2, 1),
    height 0.75s cubic-bezier(0.65, 0, 0.2, 1);
}
.intro.show-portrait .intro-portrait {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.intro-word {
  position: absolute;
  font-family: 'Geist', sans-serif;
  font-weight: 900;
  font-size: clamp(50px, 11vw, 200px);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 0.84;
  opacity: 0;
  transition:
    opacity 0.5s ease,
    transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
  white-space: nowrap;
}
.intro-word.show { opacity: 1; }
.intro-word.p1 { color: #fc4116; }
.intro-word.p2 { color: #f1efe9; }
.intro-word .arr {
  display: inline-block;
  margin-right: 0.05em;
}

/* Corner positions — each slides in FROM its outside edge so the
   movement feels intentional, not a single canned drop. */
.intro .pos-tl {
  top: 28px; left: 30px;
  transform: translateX(-60px) scale(0.96);
}
.intro .pos-tl.show { transform: translateX(0) scale(1); }

.intro .pos-tr {
  top: 28px; right: 30px;
  text-align: right;
  transform: translateX(60px) scale(0.96);
}
.intro .pos-tr.show { transform: translateX(0) scale(1); }

.intro .pos-bm {
  bottom: 30px;
  left: 50%;
  text-align: center;
  transform: translate(-50%, 60px) scale(0.96);
}
.intro .pos-bm.show { transform: translate(-50%, 0) scale(1); }

.intro .pos-bl {
  bottom: 30px; left: 30px;
  transform: translateX(-60px) scale(0.96);
}
.intro .pos-bl.show { transform: translateX(0) scale(1); }

.intro .pos-br {
  bottom: 30px; right: 30px;
  text-align: right;
  transform: translateX(60px) scale(0.96);
}
.intro .pos-br.show { transform: translateX(0) scale(1); }

body.intro-active { overflow: hidden; }
body.intro-active main { overflow: hidden; pointer-events: none; }

/* Hero "reveal units" — pieces hidden while intro is up. Each h2-greet
   gets split into per-word spans (.w) by JS so the headline can drop in
   word by word, like the reference site. */
body.intro-active .hero .h2-greet .w,
body.intro-active .hero .h2-disc .d,
body.intro-active .hero .anno,
body.intro-active .hero .anno-end,
body.intro-active .hero .h2-mark,
body.intro-active .hero .h2-foot,
body.intro-active .hero .h2-portrait {
  opacity: 0;
}

/* word-mask: each .w is inline-block with overflow:hidden so the inner
   slides into view from above. We use a single span (no inner) and rely
   on transform translateY to give a small drop-in. */
.hero .h2-greet .w {
  display: inline-block;
}

@keyframes heroPiece {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroPieceScale {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

/* On hero-revealed, every reveal unit animates. Per-element animation-
   delay is set inline by JS (splitHeroWords) so the cascade reads:
   Hi, ▸ welcome ▸ home ▸ • ▸ It's ▸ me ▸ — ▸ Matheus ▸ ® ▸ disc lines ▸
   annotations ▸ wordmark ▸ footer columns. */
body.hero-revealed .hero .h2-greet .w,
body.hero-revealed .hero .h2-disc .d,
body.hero-revealed .hero .anno,
body.hero-revealed .hero .anno-end,
body.hero-revealed .hero .h2-foot {
  animation: heroPiece 0.42s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
body.hero-revealed .hero .h2-mark {
  animation: heroPieceScale 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  transform-origin: left bottom;
}

/* Final swap: hero portrait flips to opacity 1 instantly (no transition)
   on the same frame the intro overlay is removed. Both portraits are at
   the exact same bounding box → the user sees one continuous image. */
body.intro-done .hero .h2-portrait { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  body.intro-active,
  body.intro-active main {
    overflow: auto;
    pointer-events: auto;
  }
  body.intro-active .hero .h2-greet,
  body.intro-active .hero .h2-disc .d,
  body.intro-active .hero .anno,
  body.intro-active .hero .anno-end,
  body.intro-active .hero .h2-mark,
  body.intro-active .hero .h2-foot,
  body.intro-active .hero .h2-portrait {
    opacity: 1;
    animation: none;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  font-weight: 400;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.28s ease, color 0.28s ease;
}

/* subtle grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
  opacity: var(--grain);
  mix-blend-mode: overlay;
}

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

/* Visually hidden but available to screen readers and crawlers. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
  font-weight: 400;
  font-feature-settings: "ss01", "ss02";
}

/* ---------- top bar (from design) ----------
   Verbatim from Portfolio.html bundle. Transparent, color-driven,
   `on-dark` class toggled by main.js when over non-hero sections. */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 42px;
  z-index: 90;
  display: flex;
  align-items: center;
  background: transparent;
  pointer-events: none;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  transition: color 0.4s ease;
}
.topbar.on-dark { color: var(--ink); }
.topbar > * { pointer-events: auto; }
.topbar .tb-brand {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: inherit;
  white-space: nowrap;
  flex: 0 0 auto;
}
.topbar .tb-right {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  flex: 0 0 auto;
  color: inherit;
  margin-left: auto;
}
.topbar .tb-theme {
  appearance: none;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 4px 11px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  transition: opacity 0.2s ease;
}
.topbar .tb-theme:hover { opacity: 0.55; }

/* tb-lang — our addition, same convention (currentColor + opacity) */
.topbar .tb-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
}
.topbar .tb-lang-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.topbar .tb-lang-btn:hover { opacity: 0.8; }
.topbar .tb-lang-btn.active {
  opacity: 1;
  cursor: default;
}
.topbar .tb-lang-sep { opacity: 0.3; }

/* ---------- scroll container ---------- */
main {
  height: 100vh;
  height: 100dvh; /* dvh tracks the dynamic viewport (mobile/desktop chrome) so sections never get cut at the bottom */
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
@media (prefers-reduced-motion: reduce) {
  main { scroll-behavior: auto; }
}
main::-webkit-scrollbar { display: none; }

section {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  padding: 56px 48px 28px;
  display: flex;
  flex-direction: column;
}

/* ---------- shared: section header ---------- */
.sec-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-tag::before {
  content: '';
  width: 18px; height: 1px; background: var(--ink-soft);
}

/* ---------- 1. HERO (maximalist type) ----------
   Full-bleed warm-orange panel, black ink. Two stacked all-caps greeting
   headlines, then a lower grid (portrait left, big "PRODUCT, DESIGN &
   MANAGER" stack right) with annotation labels floating around it. Below:
   liquid-distorted "spagiari" wordmark + year mark, then a 3-col footer.
   The wordmark distortion is animated via SVG <feTurbulence> baseFrequency
   in main.js. */
.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  justify-content: flex-start;
  padding: 54px 30px 22px;
  overflow: hidden;
  transition: background-color 0.28s ease, color 0.28s ease;
}
.hero .h2 {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hero .h2-greet {
  font-weight: 900;
  font-size: clamp(36px, 7.9vw, 136px);
  line-height: 0.84;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 0;
  padding-right: clamp(8px, 1.4vw, 24px);
  white-space: normal;
  display: block;
  text-align: right;
  color: var(--hero-ink);
}
.hero .h2-greet sup {
  font-size: 0.4em;
  vertical-align: super;
  font-weight: 800;
}
.hero .h2-greet [data-i18n] { display: inline; }

.hero .h2-lower {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(240px, 34%) 1fr;
  gap: 26px;
  align-items: end;
  margin-top: clamp(10px, 2vh, 26px);
  min-height: 0;
}
.hero .h2-portrait {
  width: 100%;
  height: clamp(220px, 48vh, 540px);
  align-self: end;
  border: 1px solid var(--hero-ink);
  background: #0a0a0a url('portrait.png') center 35% / cover no-repeat;
}
.hero .h2-discwrap { position: relative; align-self: end; }
.hero .h2-disc {
  text-align: right;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.046em;
  color: var(--hero-ink);
}
.hero .h2-disc .d {
  font-size: clamp(36px, 7.9vw, 136px);
  margin: 0;
  display: block;
}
.hero .anno {
  position: absolute;
  font-weight: 700;
  font-size: clamp(10px, 0.85vw, 13px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.18;
  z-index: 3;
  color: var(--hero-ink);
}
.hero .anno.an1 { left: 0; top: 26%; text-align: left; }
.hero .anno.an2 { right: 0; top: -10%; text-align: right; }
.hero .anno-end {
  display: block;
  text-align: right;
  font-weight: 700;
  font-size: clamp(10px, 0.85vw, 13px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 10px;
  color: var(--hero-ink);
}

.hero .h2-mark {
  display: flex;
  align-items: flex-end;
  gap: 0.1em;
  margin-top: clamp(6px, 1.4vh, 20px);
  overflow: visible;
  flex: 0 0 auto;
}
.hero .h2-mark svg {
  height: clamp(74px, 14vh, 172px);
  width: auto;
  max-width: 78vw;
  overflow: visible;
  display: block;
}
.hero .h2-mark svg text {
  font-family: 'Geist', sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  fill: var(--hero-ink);
}
.hero .h2-mark .yr {
  font-weight: 900;
  font-size: clamp(30px, 5.4vw, 92px);
  letter-spacing: -0.04em;
  line-height: 0.82;
  padding-bottom: 0.18em;
  color: var(--hero-ink);
}

.hero .h2-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: clamp(8px, 1.4vh, 18px);
  flex: 0 0 auto;
  gap: 16px;
}
.hero .h2-foot {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--hero-ink);
}
.hero .h2-foot.fc { text-align: center; }
.hero .h2-foot.fr { text-align: right; }
.hero .h2-foot a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.hero .h2-foot a:hover { border-color: var(--hero-ink); }
.hero .h2-foot.fr a { font-weight: 700; }

/* ---------- 2. ABOUT ---------- */
.about { justify-content: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.about .stmt {
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 16px 0 40px;
}
.about .stmt .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.about .stmt .strike {
  text-decoration: line-through;
  text-decoration-thickness: 4px;
  text-decoration-color: var(--accent-warm);
  color: var(--ink-mute);
}
.about .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}
.about .grid .cell.cell-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.about .grid .cell.cell-center .k {
  letter-spacing: 0.22em;
}

/* Companies marquee — running ticker of company names */
.about .companies {
  margin: 40px -48px 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.about .companies-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: companies-scroll 40s linear infinite;
  will-change: transform;
}
.about .companies-track:hover { animation-play-state: paused; }
.about .company {
  display: inline-flex;
  align-items: center;
  height: clamp(36px, 4vw, 52px);
  margin-right: 72px;
  flex-shrink: 0;
  transition: opacity 0.24s ease;
  opacity: 0.8;
}
.about .company:hover { opacity: 1; }
.about .company-logo {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  /* Force monochrome white on dark theme — kills all brand colors,
     keeps transparent areas transparent. */
  filter: brightness(0) invert(1);
}
/* Light theme: white logos would disappear, so render them black instead. */
[data-theme="light"] .about .company-logo {
  filter: brightness(0);
}
@keyframes companies-scroll {
  /* -33.333% matches one set out of three identical copies → seamless loop. */
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}
@media (prefers-reduced-motion: reduce) {
  .about .companies-track { animation: none; }
}
.about .grid .cell .k {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.about .grid .cell .v,
.about .grid .cell .v.small {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---------- 3. INDEX ---------- */
.index { justify-content: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.index .heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 40px;
}
.index h2 {
  font-weight: 600;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 16px 0 0;
}
.index .count {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.index ol { list-style: none; }
.index .row {
  display: grid;
  grid-template-columns: 64px 1.2fr 1fr 1fr 32px;
  gap: 24px;
  align-items: center;
  padding: 22px 8px;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: padding-left 0.4s cubic-bezier(.2,.7,.3,1), color 0.2s ease;
}
.index .row:last-child { border-bottom: 1px solid var(--hairline); }
.index .row::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(.2,.7,.3,1);
}
.index .row:hover { padding-left: 24px; }
.index .row:hover::after { transform: scaleX(1); }
.index .row:hover .arrow { color: var(--accent); transform: translateX(6px); }
.index .row:hover .title { color: var(--accent); }
.index .row .n {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.index .row .title {
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.025em;
  line-height: 1;
  transition: color 0.3s ease;
}
.index .row .meta-l {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.index .row .tag {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--hairline-strong);
  padding: 4px 10px;
  border-radius: 999px;
  justify-self: start;
}
.index .row .arrow {
  font-size: 22px;
  color: var(--ink-soft);
  transition: color 0.3s ease, transform 0.3s ease;
}

/* ---------- 4. CASE SLIDES ---------- */
.case {
  padding: 80px 40px 40px;
}
.case .case-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.case .case-head .num {
  font-weight: 700;
  font-size: clamp(52px, 6.5vw, 104px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.case .case-head .num .acc { color: var(--accent); }
.case .case-head .title-block .label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.case .case-head .title-block h3 {
  font-weight: 500;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.case .case-head .meta {
  text-align: right;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.8;
}
.case .case-head .meta strong { color: var(--ink); font-weight: 500; }

.case .body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin-top: 12px;
  flex: 1;
  min-height: 0;
}
.case .frame {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.case .frame .corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--ink-soft);
  z-index: 4;
}
.case .frame .corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.case .frame .corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.case .frame .corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.case .frame .corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.case .frame iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
  background: var(--bg-raised);
}

/* Click-to-load launcher — fills the frame until the visitor opts in. */
.case .frame-launch {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background:
    radial-gradient(120% 120% at 50% 40%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    var(--bg-raised);
}
.case .frame-launch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  padding: 8px;
  transition: transform 0.2s ease;
}
.case .frame-launch-btn:hover { transform: translateY(-2px); }
.case .frame-launch-btn .play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.case .frame-launch-btn:hover .play {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent);
}
.case .frame-launch-btn .play::after {
  content: '';
  position: absolute;
  top: 50%; left: 53%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--accent);
}
.case .frame-launch-btn .label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.case .frame-launch-btn .hint {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.case .frame-launch-open {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.case .frame-launch-open:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Inline slide deck — image carousel navigated in place inside the frame. */
.case .deck {
  position: absolute;
  inset: 0;
}
.case .deck .deck-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0d0d0c;
}
.case .deck .deck-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.case .deck .deck-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.case .deck .deck-prev { left: 14px; }
.case .deck .deck-next { right: 14px; }
.case .deck .deck-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 6;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--hairline);
  padding: 7px 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.case .deck .deck-open {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.case .deck .deck-open:hover {
  color: var(--accent);
  border-color: var(--accent);
}
@media (max-width: 640px) {
  .case .deck .deck-nav { width: 38px; height: 38px; }
  .case .deck .deck-prev { left: 8px; }
  .case .deck .deck-next { right: 8px; }
}
.case .frame .frame-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--bg);
  padding: 0 8px;
  z-index: 5;
}

.case .sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0;
}
.case .sidebar .lead {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.case .sidebar .lead em { color: var(--accent); font-style: italic; }
.case .sidebar .specs {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case .sidebar .specs .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  align-items: baseline;
}
.case .sidebar .specs .row .k { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.16em; font-size: 10px; }
.case .sidebar .specs .row .v { color: var(--ink); font-size: 12px; line-height: 1.5; }
.case .sidebar .outcomes {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case .sidebar .outcomes .label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.case .sidebar .outcomes .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.case .sidebar .outcomes .stat .big {
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
}
.case .sidebar .outcomes .stat .small {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 6px;
  line-height: 1.4;
}
.case .sidebar .open-link {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  align-self: flex-start;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.case .sidebar .open-link:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---------- 5. CONTACT ---------- */
.contact { justify-content: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.contact .big {
  font-weight: 600;
  font-size: clamp(60px, 11vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-top: 20px;
}
.contact .big .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.contact .body {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: end;
  border-top: 1px solid var(--hairline);
  padding-top: 40px;
}
.contact .body .copy {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.4;
  max-width: 32ch;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.contact .body .links { display: flex; flex-direction: column; gap: 12px; }
.contact .body .links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease, padding-left 0.3s ease;
}
.contact .body .links a:last-child { border-bottom: 1px solid var(--hairline); }
.contact .body .links a:hover { color: var(--accent); padding-left: 12px; }
.contact .body .links a .arr { font-size: 16px; }
.contact .footer {
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .about .grid { grid-template-columns: 1fr; row-gap: 24px; }
  .about .companies { margin-left: -24px; margin-right: -24px; }
  .about .company { margin-right: 56px; }
  .case .body { grid-template-columns: 1fr; }
  .case .sidebar { order: 2; }
  .case .frame { aspect-ratio: 16/10; min-height: 0; }
  .index .row { grid-template-columns: 48px 1fr auto 20px; }
  .index .row .meta-l, .index .row .tag { display: none; }
  section { padding: 80px 24px 40px; }
  .hero { padding: 54px 22px 22px; }
  .hero .h2-lower { grid-template-columns: minmax(140px, 30%) 1fr; gap: 18px; }
}
@media (max-width: 640px) {
  .about .grid { grid-template-columns: 1fr; }
  .case .case-head { grid-template-columns: auto 1fr; }
  .case .case-head .meta { grid-column: 1 / -1; text-align: left; margin-top: 8px; }
  .contact .body { grid-template-columns: 1fr; }
}
