/* Tokens measured from the reference at 1440px; see replica/recon.md */
:root {
  --canvas: #EFEEEB;
  --night: #0D0D0B;
  --deep: #1C1C19;
  --ink: #0A0A0A;
  --muted: #6B6862;
  --muted-2: #9E9991;
  --line: #B8B5B0;
  --rule: #D3D0CA;
  --unread: #87827B;
  --red: #D12424;
  --g: clamp(20px, 4.444vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fade: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-wipe: cubic-bezier(0.76, 0, 0.24, 1);
  --fd: "Funnel Display", "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.5 var(--fd);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html.is-intro body { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skills :focus-visible, .contact :focus-visible, .footer :focus-visible { outline-color: var(--canvas); }

.skip { position: absolute; left: var(--g); top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.label { font-size: 12px; line-height: 1.4; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.h2 { font-size: clamp(52px, 7.222vw, 104px); line-height: 1; letter-spacing: -0.02em; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 9px 15px;
  font-size: 16px; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em;
  border: 1px solid;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--solid:hover { background: var(--canvas); color: var(--ink); }
.btn--outline { color: var(--ink); border-color: var(--line); }
.btn--outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--light { background: #fff; color: var(--night); border-color: #fff; }
.btn--light:hover { background: var(--night); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Line mask reveal */
.line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.line > span { display: block; }
.js .hero [data-line] > span { transform: translateY(110%); opacity: 0; }
.is-ready .hero [data-line] > span {
  transform: none; opacity: 1;
  transition: transform .95s var(--ease-out) var(--d, 0s), opacity .7s var(--ease-fade) var(--d, 0s);
}
.reveal { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.reveal > span { display: block; }
.js .reveal > span { transform: translateY(105%); }
.js .reveal.is-in > span { transform: none; transition: transform .95s var(--ease-out); }

/* S01 intro */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: var(--canvas);
  transition: transform .9s var(--ease-wipe);
}
.intro.is-done { transform: translateY(-100%); }
.intro__word {
  display: flex; align-items: center;
  font-size: clamp(40px, 5.6vw, 80px); font-weight: 500; letter-spacing: 0.04em; line-height: 1;
  animation: introIn .6s var(--ease-fade) both;
}
.intro__door {
  position: relative; display: block;
  width: 0; height: 1.32em; margin: 0 0;
  background: var(--ink); overflow: hidden;
  transition: width .7s var(--ease-out), margin .7s var(--ease-out);
}
.intro.is-open .intro__door { width: .98em; margin: 0 .2em; }
.intro__frame { position: absolute; inset: .06em; opacity: 0; }
.intro__frame.is-on { opacity: 1; }
.intro__frame svg { width: 100%; height: 100%; }
@keyframes introIn { from { opacity: 0; } }

/* Header + menu */
.header {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  height: 74px; padding: 0 var(--g);
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; }
.tm { font-size: .55em; vertical-align: super; line-height: 0; margin-left: .08em; }
.burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; margin-right: -8px; }
.burger span { display: block; width: 28px; height: 1.5px; background: currentColor; }
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--canvas); padding: 0 var(--g);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .7s var(--ease-wipe), visibility 0s .7s;
}
.menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path .7s var(--ease-wipe); }
.menu__bar { height: 74px; display: flex; align-items: center; justify-content: space-between; }
.menu__close { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -11px; }
.menu__links { margin-top: clamp(24px, 5vh, 56px); }
.menu__links a {
  display: inline-block; font-size: clamp(40px, 3.9vw, 56px); line-height: 1.12; font-weight: 500; letter-spacing: -0.02em;
  transition: color .3s var(--ease);
}
.menu__links a:hover { color: var(--red); }
.menu__mail { display: inline-block; margin-top: 32px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* S02 hero */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, max(526px, 100% - 787px)) minmax(0, 1fr); column-gap: 0; /* text column grows on wide screens so the photo keeps its 787px */
  padding: 74px var(--g) 12px;
}
.hero__text { align-self: center; padding-top: 34px; }
.hero__name { font-size: clamp(64px, 8.2vw, 150px); line-height: .88; letter-spacing: -0.03em; font-weight: 500; margin-left: -.06em; }
/* h1 lines flip up in 3D, 140ms apart */
.hero__name .line { overflow: visible; perspective: 900px; }
.js .hero__name [data-line] > span { transform: rotateX(-88deg) translateY(.2em); transform-origin: 50% 100%; opacity: 0; }
.is-ready .hero__name [data-line] > span { transform: none; opacity: 1; transition: transform 1.1s var(--ease-out) var(--d, 0s), opacity .6s var(--ease-fade) var(--d, 0s); }
/* Atray -> Array: the t flips over like a sign panel; on load once, then on hover */
.swap { display: inline-grid; vertical-align: top; perspective: 400px; }
.swap > span { grid-area: 1 / 1; backface-visibility: hidden; transform-origin: 50% 55%; transition: transform .7s var(--ease-out), color .3s var(--ease); }
.swap > span:last-child { transform: rotateX(-180deg); color: var(--red); }
.swap.is-swapped > span:first-child, .hero__name:hover .swap > span:first-child { transform: rotateX(180deg); }
.swap.is-swapped > span:last-child, .hero__name:hover .swap > span:last-child { transform: none; }
.hero__tagline { margin-top: clamp(24px, 2vw, 34px); font-size: 18px; line-height: 1.5; letter-spacing: -0.01em; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; max-width: 400px; margin-top: 35px; }
.tags li {
  padding: 9px 16px; border: 1px solid var(--line);
  font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.06em;
}
.js .tags li { opacity: 0; transform: translateY(12px); }
.is-ready .tags li { opacity: 1; transform: none; transition: opacity .7s var(--ease-fade) var(--d), transform .95s var(--ease-out) var(--d); }
.hero__photo { justify-self: end; width: 100%; max-width: 787px; height: calc(100svh - 86px); min-height: 520px; overflow: hidden; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.hero__photo { position: relative; }
.trail { position: absolute; inset: 0; pointer-events: none; }
.trail__item { position: absolute; width: 96px; height: 96px; opacity: 0; filter: drop-shadow(0 6px 10px rgba(10,10,10,.18)); }
.trail__item svg { display: block; width: 100%; height: 100%; }
.js .hero__photo { clip-path: inset(100% 0 0 0); }
.is-ready .hero__photo { clip-path: inset(0); transition: clip-path 1.2s var(--ease-out) .15s; }
.js .hero__photo img { transform: scale(1.12); }
.is-ready .hero__photo img { transform: none; transition: transform 1.6s var(--ease-out) .15s; }

/* S03 about */
.about { position: relative; height: 235vh; }
.about__pin {
  position: sticky; top: 0; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(40px, 7vh, 72px);
  padding: 0 var(--g);
}
.about__top { display: grid; grid-template-columns: minmax(0, 920px) 1fr; gap: 48px; align-items: start; }
.about__text { font-size: clamp(26px, 2.778vw, 40px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
.about__text .w { transition: color .25s linear; }
.js .about__text .w { color: var(--unread); }
.js .about__text .w.is-hot { color: var(--red); }
.js .about__text .w.is-read { color: var(--ink); }
.about__polaroid {
  justify-self: center; width: clamp(140px, 15vw, 216px); aspect-ratio: 1; object-fit: cover; object-position: 50% 8%;
  border: 6px solid #fff; transform: rotate(8deg); filter: grayscale(1);
}
.about__row { display: grid; grid-template-columns: minmax(0, 306px) minmax(0, 1fr); gap: 44px; padding-top: 32px; border-top: 1px solid var(--rule); align-items: center; }
.about__img { aspect-ratio: 306 / 180; overflow: hidden; }
.about__clients { min-width: 0; }
.marquee { overflow: hidden; margin-top: 18px; mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee__track span { padding-right: 56px; font-size: clamp(18px, 1.7vw, 24px); font-weight: 500; letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* S04 projects */
.projects { padding: 128px var(--g) 164px; }
.projects .h2 { margin-bottom: 34px; }
.proj {
  position: relative; border-top: 1px solid var(--rule);
  padding: 42px 0; transition: padding .6s var(--ease-out);
}
.proj:last-child { border-bottom: 1px solid var(--rule); }
.proj__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding-right: calc(330px + 48px); }
.proj__title {
  font-size: clamp(36px, 4.167vw, 60px); line-height: 1.05; letter-spacing: -0.015em; font-weight: 500;
  color: #87827B; transition: color .4s var(--ease);
}
.proj__btn { color: var(--muted); }
.proj__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
.proj__more-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-right: calc(330px + 48px); }
.proj__one { font-size: 16px; color: var(--muted); margin-top: 8px; }
.proj__meta { display: flex; flex-wrap: wrap; gap: 16px 48px; margin-top: 44px; }
.proj__meta dd { font-size: 16px; line-height: 1.55; }
.proj__thumb {
  position: absolute; right: 0; top: 24px; width: 330px; aspect-ratio: 330 / 215; overflow: hidden;
  clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease-out), transform .5s var(--ease-out);
}
.proj.is-active { padding: 24px 0; }
.proj.is-active .proj__title { color: var(--red); }
.proj.is-active .proj__btn { color: var(--ink); }
.proj.is-active .proj__btn:hover { color: #fff; }
.proj.is-active .proj__more { grid-template-rows: 1fr; }
.proj.is-active .proj__more-in { min-height: 157px; }
.proj.is-active .proj__thumb { clip-path: inset(0); }

/* S05 behind the build */
.behind { padding: 128px var(--g); }
.behind .h2 { margin-bottom: 34px; }
.behind__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.behind__img { aspect-ratio: 644 / 340; overflow: hidden; }
.behind__grid p { margin-top: 24px; max-width: 62ch; color: #4A4843; }

/* S06 skillset */
/* S05b what I do: the pin sticks for the whole section; main.js draws the frame for the scroll position,
   then shrinks it into the .wid__card slot while the services list (S06) scrolls up beside it */
.wid { position: relative; background: var(--night); --card-w: min(30vw, 440px, 57svh); }
.wid__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--night); }
.wid__poster, .wid__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wid__poster { object-fit: cover; object-position: 70% 50%; }
.wid.is-live .wid__poster { visibility: hidden; }
/* film grain over the frame: SVG noise rasterised once, jittered with steps() */
.wid__grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: wid-grain .9s steps(6) infinite;
}
@keyframes wid-grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6%, 4%); } 33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 8%); } 67% { transform: translate(7%, 2%); } 83% { transform: translate(-8%, -4%); }
}
.wid__card { position: absolute; right: var(--g); top: 50%; width: var(--card-w); aspect-ratio: 3 / 4; translate: 0 -50%; visibility: hidden; }
.wid__room { height: 200vh; }
.wid__list { z-index: 1; }
.wid__label { margin-bottom: 24px; color: var(--muted-2); }
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .js .wid__room { height: 260vh; }
  .js .wid__list { background: none; margin-top: -55vh; padding-top: 0; padding-right: calc(var(--card-w) + var(--g) * 2); padding-bottom: 22vh; }
  .js .wid__list .skills__list li { grid-template-columns: 72px minmax(0, 1fr); padding: 40px 0; }
  .js .wid__list .skills__list p { grid-column: 2; max-width: 520px; }
}
@media (max-width: 860px) { .wid__card { display: none; } }
html:not(.js) .wid__room { display: none; }
html:not(.js) .wid__pin { position: relative; }
.skills { background: var(--night); color: var(--canvas); padding: 128px var(--g); }
.skills .h2 { margin-bottom: 34px; }
.skills__list li {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 500px); align-items: start;
  position: relative; padding: 56px 0;
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1);
}
/* scroll-scrubbed entrance, as in the reference: content slides in from the right, the rule draws right to left */
.skills__list li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: rgba(239, 238, 235, .18); transform: scaleX(var(--p, 1)); transform-origin: right; }
.skills__list li > * { translate: calc((1 - var(--e, 1)) * min(367px, 30vw)) 0; opacity: var(--p, 1); }
.skills__list:hover li:not(:hover) { opacity: .35; }
.skills__list li:last-child { border-bottom: 1px solid rgba(239, 238, 235, .18); }
.skills__num { padding-top: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.skills__list h3 { font-size: clamp(26px, 2.778vw, 40px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; }
.skills__list p { padding-top: 10px; color: var(--muted-2); line-height: 1.55; }

/* S07 play: the head of the game section (the game itself is .sgame, at the end) */
.play { padding: 128px var(--g); }
.play__head { display: grid; grid-template-columns: minmax(0, 525fr) minmax(0, 787fr); align-items: end; gap: 12px 0; }
.play__head .label { grid-column: 1 / -1; }
.play__sub { max-width: 52ch; color: var(--muted); line-height: 1.55; }

/* S08 contact */
.contact { position: relative; min-height: 100svh; padding: 63px var(--g); display: grid; place-items: center; overflow: hidden; }
.contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; background: #3E5568; }
.contact__card { position: relative; width: min(786px, 100%); background: var(--night); color: var(--canvas); padding: clamp(28px, 3.5vw, 51px); }
.contact__title { margin-top: 14px; font-size: clamp(40px, 4.444vw, 64px); line-height: 1; letter-spacing: -0.02em; font-weight: 500; text-transform: uppercase; }
.contact__alt { margin-top: 14px; color: var(--muted-2); }
.contact__alt a { color: var(--canvas); }
.contact__alt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 40px; }
.field { display: grid; gap: 6px; }
.field--wide, .form__foot, .form__status { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 0 10px; font: inherit; color: var(--canvas);
  background: transparent; border: 0; border-bottom: 1px solid rgba(239, 238, 235, .25); border-radius: 0;
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 44px; }
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23EFEEEB' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field select option { color: var(--ink); }
.field ::placeholder { color: #8A857E; }
.contact .label { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--canvas); }
.field :user-invalid { border-bottom-color: var(--red); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.form__note, .form__status { font-size: 12px; color: var(--muted-2); }
.form__status:empty { display: none; }
.form__privacy { grid-column: 1 / -1; font-size: 12px; color: var(--muted-2); }

/* S09 footer */
.footer { background: var(--night); color: var(--canvas); padding: clamp(48px, 7vw, 96px) var(--g) 40px; }
.footer__mark { font-size: 10.6vw; line-height: .9; letter-spacing: -0.035em; font-weight: 500; white-space: nowrap; margin-left: -.05em; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-top: clamp(40px, 5vw, 72px); }
.footer__statement { font-size: clamp(24px, 2.778vw, 40px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; text-transform: uppercase; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer__links a { display: inline-block; padding: 12px 0; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__copy { margin-top: 48px; font-size: 12px; color: var(--muted-2); }

/* Illustrations */
.illo svg { display: block; width: 100%; height: 100%; font-family: var(--fd); }
.illo svg * { transform-box: view-box; }
.illo.is-paused * { animation-play-state: paused !important; }
.tnum { font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes clCard { 0% { transform: translateY(-110px); opacity: 0; } 8% { opacity: 1; } 14%, 30% { transform: none; opacity: 1; } 34%, 100% { transform: translateX(40px); opacity: 0; } }
@keyframes clFill { 0%, 16% { fill: var(--red); } 22%, 100% { fill: var(--night); } }
@keyframes pwBubble { 0% { transform: translateX(-30px); opacity: 0; } 10%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes pwBar { 0% { transform: scaleX(0); } 55%, 100% { transform: scaleX(1); } }
@keyframes dashFlow { to { stroke-dashoffset: -20; } }
@keyframes pwOwner { 0%, 55% { fill: var(--night); } 62%, 92% { fill: var(--red); } 100% { fill: var(--night); } }
@keyframes ajList { 0%, 12% { transform: none; } 88%, 100% { transform: translateY(-184px); } }
@keyframes ajTap { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ajA { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ajB { 0%, 45% { opacity: 0; } 50%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes psTurn { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.12); } }
@keyframes draw { 0% { stroke-dashoffset: 1; } 35%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes oraSheet { 0%, 55% { transform: translateY(80px); } 65%, 90% { transform: none; } 100% { transform: translateY(80px); } }
@keyframes plDrop { 0% { transform: translateY(-200px); opacity: 0; } 12%, 80% { transform: none; opacity: 1; } 92%, 100% { transform: none; opacity: 0; } }
@keyframes plPin { 0%, 20% { transform: translateY(-60px); opacity: 0; } 28% { transform: none; opacity: 1; } 33% { transform: translateY(-10px); } 38%, 80% { transform: none; opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes luSq { 0%, 10% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } 40%, 85% { transform: none; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
@keyframes luLine { 0%, 40% { stroke-dashoffset: 1; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes luRcpt { 0%, 55% { opacity: 0; transform: translateY(16px); } 65%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes efStrip { to { transform: translateX(-400px); } }
@keyframes efBar { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
@keyframes bh1 { 0%, 15% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } 45%, 85% { transform: none; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
@keyframes fadeHold { 0%, 42% { opacity: 0; } 50%, 85% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes bh2 { 0%, 10% { opacity: 0; } 25%, 80% { opacity: 1; } 95%, 100% { opacity: 0; } }

/* Case study pages (measured from the reference case page at 1440) */
.header--fixed { position: fixed; background: var(--canvas); }
.js .case-head [data-line] > span { transform: translateY(110%); opacity: 0; }
.is-ready .case-head [data-line] > span { transform: none; opacity: 1; transition: transform .95s var(--ease-out), opacity .7s var(--ease-fade); }
.case-head { padding: 140px var(--g) 0; }
.case-title { margin-top: 24px; font-size: clamp(56px, 9.722vw, 140px); line-height: .9; letter-spacing: -0.03em; font-weight: 500; text-transform: uppercase; margin-left: -.05em; }
.case-head .tags { max-width: none; margin-top: 44px; }
.case-hero { margin-top: 32px; aspect-ratio: 1312 / 750; overflow: hidden; background: var(--rule); }
.case-hero img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-hero--phone { background: var(--accent); display: grid; place-items: center; padding: 40px 0; }
.case-hero--phone img { width: auto; height: 100%; object-fit: contain; }
.js .case-hero { clip-path: inset(100% 0 0 0); }
.is-ready .case-hero { clip-path: inset(0); transition: clip-path 1.2s var(--ease-out) .2s; }
.case-intro { margin-top: 46px; max-width: 776px; }
.case-intro__lead { font-size: 18px; line-height: 1.5; }
.case-intro__note { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 65ch; }
.case-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 0; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rule); }
.case-meta > div { padding-right: 24px; }
.case-meta dd { margin-top: 8px; line-height: 1.55; }
.case-brief { padding: 112px var(--g) 0; }
.case-row { display: grid; grid-template-columns: minmax(0, 525fr) minmax(0, 787fr); padding: 32px 0; border-top: 1px solid var(--rule); }
.case-row:first-child { border-top: 0; padding-top: 0; }
.case-row__body { max-width: 747px; color: var(--muted); line-height: 1.55; }
.case-list li { position: relative; padding-left: 20px; }
.case-list li + li { margin-top: 10px; }
.case-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: currentColor; }
.case-h2 { font-size: clamp(30px, 2.778vw, 40px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; }
.process { padding: 140px var(--g) 0; }
.process__list { margin-top: 8px; }
.process__list li { display: grid; grid-template-columns: 100px minmax(0, 1fr) minmax(0, 495px); gap: 0 48px; padding: 44px 0; border-top: 1px solid var(--rule); align-items: start; }
.process__n { padding-top: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.process__list h3 { font-size: clamp(26px, 2.778vw, 40px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; }
.process__list p { color: var(--muted); line-height: 1.55; padding-top: 8px; }
.case-split { display: grid; grid-template-columns: minmax(0, 525fr) minmax(0, 787fr); align-items: start; }
.case-split > p, .case-split > ul { max-width: 747px; color: var(--muted); line-height: 1.55; }
.screens { padding: 160px var(--g) 0; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 32px; margin-top: 72px; }
.shot--wide { grid-column: 1 / -1; }
.shot__frame { aspect-ratio: 640 / 430; overflow: hidden; background: #fff; }
.shot--wide .shot__frame { aspect-ratio: 1312 / 760; }
.shot__frame img, .shot__frame video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot--phone .shot__frame { background: var(--accent); padding: 32px 0; }
.shot--phone .shot__frame img { object-fit: contain; }
.shot figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 60ch; }
.shot__n { color: var(--ink); margin-right: 8px; font-variant-numeric: tabular-nums; }
.js .shot[data-reveal] .shot__frame { clip-path: inset(12% 0 0 0); opacity: 0; }
.js .shot[data-reveal].is-in .shot__frame { clip-path: inset(0); opacity: 1; transition: clip-path 1s var(--ease-out), opacity .6s var(--ease-fade); }
.shipped { padding: 160px var(--g) 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule); }
.facts dd { margin-top: 8px; line-height: 1.55; }
.next { padding: 140px var(--g) 120px; }
.next .label { padding-top: 24px; border-top: 1px solid var(--rule); }
.next__link { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 24px; }
.next__name { font-size: clamp(56px, 9.722vw, 140px); line-height: .9; letter-spacing: -0.03em; font-weight: 500; text-transform: uppercase; margin-left: -.05em; transition: color .4s var(--ease); }
.next__icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; transition: transform .4s var(--ease-out); }
.next__link:hover .next__name { color: var(--red); }
.next__link:hover .next__icon { transform: translate(4px, -4px); }

/* Page transitions between home and case pages (native cross-document view transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .45s var(--ease-wipe) both; }
::view-transition-new(root) { animation: vtIn .9s var(--ease-out) both; }
::view-transition-group(*) { animation-duration: .8s; animation-timing-function: var(--ease-out); }
@keyframes vtOut { to { opacity: 0; transform: translateY(-48px); } }
@keyframes vtIn { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
.vt .case-head [data-line] > span { transform: none !important; opacity: 1 !important; transition: none !important; }
.no-intro .intro { display: none !important; }

/* Hero name: letters near the pointer get heavier (Funnel Display is variable, 300-800) */
.hero__name .ch, .hero__name .swap { transition: font-weight .5s var(--ease-out); }

/* Skillset: an illustration card follows the pointer over the rows */
.skills { position: relative; overflow-x: clip; } /* rows slide in from the right; keep them from widening the page */
.skills__preview { position: absolute; left: 0; top: 0; z-index: 2; width: clamp(200px, 20vw, 300px); aspect-ratio: 400 / 260; pointer-events: none; will-change: transform; }
.skills__preview .illo { position: absolute; inset: 0; opacity: 0; transform: scale(.7); transition: opacity .3s var(--ease), transform .5s var(--ease-out); }
.skills__preview .illo.is-active { opacity: 1; transform: none; }

/* Footer wordmark: letters rise in, then hop on hover */
.footer__mark { overflow: hidden; padding-bottom: .04em; }
.footer__mark .ch { display: inline-block; transition: transform .7s var(--ease-out), color .3s var(--ease); }
.js .footer__mark .ch { transform: translateY(105%); }
.js .footer__mark.is-in .ch { transform: none; transition-delay: calc(var(--i) * 45ms); }
.footer__mark.is-done .ch { transition-delay: 0s; }
@media (hover: hover) { .footer__mark.is-done .ch:hover { transform: translateY(-.08em); color: var(--red); } }
.footer__copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.local-time { font-variant-numeric: tabular-nums; }

/* Text roll on hover: the label slides up and an identical copy follows it in */
.roll { display: inline-block; height: 1lh; overflow: hidden; vertical-align: top; }
.roll > span { display: block; transition: transform .5s var(--ease-out); }
.roll > span > span { display: block; }
@media (hover: hover) { a:hover > .roll > span, button:hover > .roll > span { transform: translateY(-50%); } }

/* Contact fields: focus draws the underline from the left */
.field { position: relative; }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--canvas); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.field:focus-within::after { transform: scaleX(1); }


/* Case gallery: click a screen to see it large */
.shot__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.shot__open img { transition: transform .8s var(--ease-out); }
@media (hover: hover) { .shot__open:hover img { transform: scale(1.025); } }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--night); color: var(--canvas); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: lbIn .4s var(--ease-out); }
.lightbox::backdrop { background: rgba(13, 13, 11, .9); }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; height: 74px; padding: 0 var(--g); }
.lightbox__count { font-size: 12px; letter-spacing: .06em; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.lightbox__stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 0 calc(var(--g) + 56px); }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__cap { padding: 20px var(--g) 28px; font-size: 14px; color: var(--muted-2); max-width: 70ch; }
.lightbox__nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(239, 238, 235, .3); transition: background-color .3s var(--ease), color .3s var(--ease); }
.lightbox__nav:hover, .lightbox__close:hover { background: var(--canvas); color: var(--night); }
.lightbox__nav--prev { left: var(--g); }
.lightbox__nav--next { right: var(--g); }
.lightbox__close { width: 44px; height: 44px; display: grid; place-items: center; transition: background-color .3s var(--ease), color .3s var(--ease); }
@keyframes lbIn { from { opacity: 0; } }

/* 404 */
.lost { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px var(--g) 80px; }
.lost__title { margin-top: 20px; font-size: clamp(56px, 9.722vw, 140px); line-height: .9; letter-spacing: -0.03em; font-weight: 500; }
.lost__text { margin-top: 28px; font-size: 18px; max-width: 46ch; color: var(--muted); }

/* Case pages: reading progress (scroll-driven, no JS) and the way back */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; animation: readGrow linear both; animation-timeline: scroll(root); }
@keyframes readGrow { to { transform: scaleX(1); } }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 12px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); transition: color .3s var(--ease); }
.back svg { transition: transform .4s var(--ease-out); }
.back:hover { color: var(--ink); }
.back:hover svg { transform: translateX(-4px); }

/* Persuasion bits: availability, contact pitch, case page call to action */
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.js .status { opacity: 0; }
.is-ready .status { opacity: 1; transition: opacity .7s var(--ease-fade) .85s; }
.behind__grid strong { color: var(--ink); font-weight: 500; }
.why { margin-top: 96px; }
.why .process__list { margin-top: 16px; }
.contact__pitch { margin-top: 18px; max-width: 52ch; line-height: 1.55; color: var(--canvas); }
.case-cta { padding: 160px var(--g) 0; }
.case-cta .case-split { padding-top: 40px; border-top: 1px solid var(--rule); }
.case-cta p { color: var(--muted); line-height: 1.55; max-width: 52ch; }
.case-cta .btn-row { margin-top: 28px; }

/* Tablet / mobile */
@media (max-width: 1100px) {
  .proj__top, .proj__more-in { padding-right: 0; }
  .proj__thumb { position: static; width: 100%; max-width: 520px; margin-top: 0; clip-path: none; display: none; }
  .proj.is-active .proj__thumb { display: block; margin-top: 24px; }
}
@media (max-width: 860px) {
  .play { padding-top: 96px; padding-bottom: 96px; }
  .play__head { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: 104px; row-gap: 40px; }
  .hero__text { padding-top: 0; }
  .hero__name { font-size: min(21vw, 104px); }
  .hero__photo { height: auto; min-height: 0; aspect-ratio: 1; max-width: none; }
  .about { height: auto; }
  .about__pin { position: static; height: auto; padding-top: 96px; padding-bottom: 96px; }
  .about__top { grid-template-columns: 1fr; }
  .about__polaroid { justify-self: end; margin-top: -8px; }
  .about__row { grid-template-columns: 1fr; gap: 24px; }
  .projects, .behind, .skills { padding-top: 96px; padding-bottom: 96px; }
  .proj__top { grid-template-columns: 1fr; gap: 16px; justify-items: start; }
  .proj__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-top: 28px; }
  .behind__grid { grid-template-columns: 1fr; gap: 48px; }
  .skills__list li { grid-template-columns: 48px 1fr; padding: 32px 0; }
  .skills__list p { grid-column: 2; }
  .form { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .lightbox__stage { padding: 0 var(--g); }
  .lightbox__nav { display: none; }
  .case-head { padding-top: 112px; }
  .case-hero { aspect-ratio: 4 / 3; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-brief, .process, .screens, .shipped { padding-top: 96px; }
  .case-row, .case-split { grid-template-columns: 1fr; gap: 12px; }
  .process__list li { grid-template-columns: 40px 1fr; padding: 32px 0; }
  .process__list p { grid-column: 2; }
  .gallery { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
  .shot--wide .shot__frame, .shot__frame { aspect-ratio: 4 / 3; }
  .next { padding: 96px var(--g) 80px; }
  .next__name { font-size: min(56px, 12vw); } /* "EchoFrame" must fit beside the arrow on a 390px phone */
}

@media (hover: none), (max-width: 860px) { .skills__preview { display: none; } }
@media (hover: none) {
  .proj { padding: 24px 0; }
  .proj .proj__title { color: var(--ink); }
  .proj .proj__btn { color: var(--ink); }
  .proj .proj__btn:hover { color: #fff; }
  .proj .proj__more { grid-template-rows: 1fr; }
  .proj .proj__thumb { display: block; clip-path: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wid__room { display: none; }
  .wid__pin { position: relative; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .js .intro { display: none; }
}

/* ===== Case-study story (Clinora first): process artifacts. Every selector is .st-scoped; only pages with a story use them. ===== */
.st { padding: 120px var(--g) 0; --grid: rgba(10, 10, 10, .055); --paper: #F7F6F2; }
.st-head { display: grid; gap: 10px; max-width: 900px; }
.st-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; }
.st-prose { max-width: 747px; color: var(--muted); line-height: 1.55; }
.st-prose > * + * { margin-top: 16px; }
.st-prose strong, .st-prose em { color: var(--ink); font-style: normal; font-weight: 500; }
.st-foot { margin-top: 16px; font-size: 13px; color: var(--muted); }
.st-paper { margin-top: 56px; padding: clamp(20px, 3vw, 40px); border: 1px solid var(--rule); background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }

/* problem map */
.st-map__sources { display: flex; flex-wrap: wrap; gap: 8px; }
.st-map__sources li { padding: 6px 12px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.st-map__stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 40px; position: relative; }
.st-map__stages li { display: grid; gap: 14px; align-content: start; position: relative; }
.st-map__stage { display: block; padding: 14px 12px; border: 1.5px solid var(--ink); background: #fff; font-weight: 500; }
.st-map__stages li:not(:last-child)::after { content: "→"; position: absolute; top: 14px; right: -14px; color: var(--ink); }
.st-break { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.35; color: var(--red); }
.st-break::before { content: "✕"; position: absolute; left: 0; top: 0; font-size: 12px; }

/* what I looked at */
.st-q { margin-top: 8px; }
.st-q > div { padding: 14px 0; border-top: 1px solid var(--rule); }
.st-q dt { color: var(--ink); font-weight: 500; }
.st-q dd { margin-top: 4px; }
.st-scroll { margin-top: 56px; overflow-x: auto; }
.st-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.st-table caption { text-align: left; padding-bottom: 14px; }
.st-table th, .st-table td { padding: 16px 16px 16px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
.st-table thead th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; border-top: 1px solid var(--ink); }
.st-table tbody th { font-weight: 500; }
.st-table td:last-child { color: var(--muted); }
.st-table sup { color: var(--red); }

/* observation → decision → screen */
.st-obs__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.st-obs__list li { display: grid; gap: 16px; align-content: start; padding-top: 20px; border-top: 1.5px solid var(--ink); }
.st-obs__list p::before { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.st-obs__o { font-size: 18px; line-height: 1.35; }
.st-obs__o::before { content: "Noticed"; }
.st-obs__d { color: var(--muted); line-height: 1.5; }
.st-obs__d::before { content: "Decided"; }
.st-obs__d em { color: var(--ink); font-style: normal; }
.st-obs__r { color: var(--red); font-weight: 500; }
.st-obs__r::before { content: "On screen"; }

/* information architecture */
.st-ia__root { font-size: 20px; font-weight: 500; }
.st-tree { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 20px; font-size: 15px; }
.st-tree > li > span { display: inline-block; padding: 6px 12px; border: 1.5px solid var(--ink); background: #fff; font-weight: 500; }
.st-tree ul { margin: 10px 0 0 10px; padding-left: 16px; border-left: 1px solid var(--line); display: grid; gap: 8px; }
.st-tree ul ul { margin-top: 6px; font-size: 13px; color: var(--muted); }
.st-doors { margin-top: 40px; padding-top: 20px; border-top: 1px dashed var(--line); }
.st-doors ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.st-doors li { color: var(--muted); font-size: 14px; line-height: 1.45; }
.st-doors b { display: block; color: var(--ink); font-weight: 500; }

/* flows */
.st-flows__list { display: grid; gap: 28px; margin-top: 56px; }
.st-flow { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 18px; border-top: 1px solid var(--rule); }
.st-flow__n { font-weight: 500; }
.st-flow ol { display: flex; flex-wrap: wrap; gap: 10px 0; }
.st-flow li { display: inline-flex; align-items: center; font-size: 14px; }
.st-flow li > * , .st-flow li { white-space: normal; }
.st-flow li::before { content: none; }
.st-flow li { padding: 7px 12px; border: 1px solid var(--line); background: #fff; }
.st-flow li + li { margin-left: 26px; position: relative; }
.st-flow li + li::after { content: "→"; position: absolute; left: -20px; color: var(--muted); }
.st-flow li.is-alt { border-color: var(--red); color: var(--red); }

/* scope */
.st-scope__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.st-scope__cols > div { padding-top: 18px; border-top: 1.5px solid var(--ink); }
.st-scope__k { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.st-scope__cols li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.st-scope__cols .is-out { border-top-color: var(--red); }
.st-scope__cols .is-out li { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--red); }

/* low-fi sketches */
.st-sketches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 56px; }
.st-sketch svg { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; }
.st-sketch figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.st-sketch .shot__n { color: var(--red); margin-right: 6px; }
.sk-ink { fill: none; stroke: #2B2A27; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sk-red { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.sk-note { fill: var(--red); font: italic 500 15px var(--fd); }

/* values */
.st-values__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; margin-top: 56px; }
.st-values__list li { padding-top: 18px; border-top: 1px solid var(--rule); }
.st-values__list h3 { font-size: 18px; font-weight: 500; }
.st-values__list p { margin-top: 8px; color: var(--muted); line-height: 1.5; }

/* mood board */
.st-mood__board { margin-top: 56px; display: grid; gap: 24px; }
.st-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.st-swatches li { height: 132px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 12px; background: var(--c); border: 1px solid var(--rule); font-size: 13px; }
.st-swatches li.is-dark { color: #F6F5F1; border-color: transparent; }
.st-swatches code { font: 11px var(--fd); opacity: .75; }
.st-frags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.st-frag { padding: 16px; background: #fff; border: 1px solid var(--rule); }
.st-frag--wide { grid-column: span 2; }
.st-frag img { width: 100%; height: auto; }
.st-frag figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.st-words { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.015em; }
.st-words li + li::before { content: "/"; margin-right: 22px; color: var(--red); }

/* what I built */
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chips li { padding: 6px 12px; border: 1px solid var(--line); color: var(--ink); font-size: 14px; }

/* annotated screens */
.st-annot__grid { display: grid; gap: 64px; margin-top: 56px; }
.st-annot__fig { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.st-annot__img { position: relative; border: 1px solid var(--rule); background: #fff; }
.st-annot__img img { width: 100%; height: auto; }
.st-pin { position: absolute; display: grid; place-items: center; width: 28px; height: 28px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
.st-legend { counter-reset: pin; display: grid; gap: 12px; }
.st-legend li { counter-increment: pin; position: relative; padding-left: 36px; line-height: 1.4; }
.st-legend li::before { content: counter(pin); position: absolute; left: 0; top: -2px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; }

/* system + data model */
.st-arch__flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; }
.st-arch__flow li { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px 12px; border: 1.5px solid var(--ink); background: #fff; font-size: 13px; line-height: 1.4; color: var(--muted); }
.st-arch__flow b { color: var(--ink); font-weight: 500; font-size: 15px; }
.st-arch__flow li:not(:last-child)::after { content: "→"; position: absolute; right: -15px; top: 14px; color: var(--ink); }
.st-arch__infra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.st-arch__infra li { padding: 6px 12px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.st-model { margin-top: 24px; }
.st-tree--model { display: block; margin-top: 16px; }
.st-tree--model > li > ul { margin-left: 10px; }
.st-tree--model li > span { padding: 4px 10px; border: 1.5px solid var(--ink); background: #fff; font-weight: 500; }
.st-tree--model ul li { color: var(--ink); font-size: 14px; }
.st-tree--model ul ul li { color: var(--muted); }

/* states */
.st-edges__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; margin-top: 56px; }
.st-edges__list li { padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; line-height: 1.5; }
.st-edges__list b { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 500; font-size: 15px; }

/* testing, learning, sources */
.st-facts { margin-top: 56px; }
.st-learn__h { margin-top: 18px; max-width: 30ch; font-size: clamp(28px, 3.4vw, 52px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; }
.st-sources { padding-top: 96px; }
.st-sources__list { margin-top: 14px; display: grid; gap: 8px; font-size: 13px; color: var(--muted); counter-reset: src; }
.st-sources__list li { counter-increment: src; }
.st-sources__list li::before { content: counter(src) ". "; color: var(--red); }
.st-sources__list a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .st-obs__list, .st-edges__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-tree, .st-doors ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-arch__flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-arch__flow li:nth-child(4)::after { content: none; }
  .st-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-sketches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-annot__fig { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .st { padding-top: 88px; }
  .st-paper, .st-scroll, .st-obs__list, .st-flows__list, .st-scope__cols, .st-sketches, .st-values__list, .st-mood__board, .st-annot__grid, .st-edges__list, .st-facts { margin-top: 36px; }
  .st-map__stages { grid-template-columns: 1fr; gap: 26px; }
  .st-map__stages li { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); align-items: center; }
  .st-map__stages li:not(:last-child)::after { content: "↓"; right: auto; left: 60px; top: auto; bottom: -24px; }
  .st-obs__list, .st-edges__list, .st-scope__cols, .st-values__list, .st-sketches, .st-tree, .st-doors ul { grid-template-columns: 1fr; }
  .st-flow { grid-template-columns: 1fr; gap: 12px; }
  .st-arch__flow { grid-template-columns: 1fr; gap: 26px; }
  .st-arch__flow li:not(:last-child)::after { content: "↓"; right: auto; left: 16px; top: auto; bottom: -24px; }
  .st-arch__flow li:nth-child(4)::after { content: "↓"; }
  .st-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-swatches li { height: 88px; }
  .st-table { min-width: 0; }
  .st-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .st-table tr { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--rule); }
  .st-table th, .st-table td { display: block; padding: 0; border: 0; }
  .st-table td::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .st-frags { grid-template-columns: 1fr; }
  .st-frag--wide { grid-column: auto; }
}
/* story grids follow each project's own item counts (defaults keep Clinora's layout) */
.st-obs__list { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.st-scope__cols { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.st-sketches { grid-template-columns: repeat(min(var(--n, 3), 3), minmax(0, 1fr)); }
.st-tree { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.st-arch__flow { grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); }
.st-swatches { grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); }
.st-sketch--img img { width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
.st-annot__fig--phone { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
@media (max-width: 1100px) {
  .st-obs__list, .st-edges__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-tree { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-arch__flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-sketches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .st-obs__list, .st-scope__cols, .st-sketches, .st-tree, .st-arch__flow { grid-template-columns: 1fr; }
  .st-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-annot__fig--phone { grid-template-columns: 1fr; }
  .st-annot__fig--phone .st-annot__img { max-width: 320px; }
}
.st-map__stages { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
@media (max-width: 860px) { .st-map__stages { grid-template-columns: 1fr; } }
/* story pacing: thinking sections stay compact so the product leads */
.st { padding-top: 96px; }
.st-paper, .st-scroll, .st-obs__list, .st-flows__list, .st-scope__cols, .st-sketches, .st-values__list, .st-mood__board, .st-annot__grid, .st-edges__list, .st-facts { margin-top: 40px; }
.st-values__list { gap: 28px 32px; }
.st-flows__list { gap: 18px; }
.st-annot__grid { gap: 48px; }
.st-annot__grid:has(.st-annot__fig--phone) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-annot__grid .st-annot__fig--phone { grid-template-columns: 1fr; }
@media (max-width: 860px) { .st { padding-top: 72px; } .st-annot__grid:has(.st-annot__fig--phone) { grid-template-columns: 1fr; } }

/* the play section: a Spline scene (assets/spline/scene.splinecode), shown as made */
.sgame { position: relative; margin-top: 56px; height: clamp(480px, 64vh, 620px); overflow: hidden;
  background: #d66c00 url("assets/spline/poster.webp") center / cover no-repeat; }
.sgame__view { display: block; width: 100%; height: 100%; border: 0; }
.play__full { color: inherit; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.sgame__fallback { position: absolute; inset: auto 0 24px; text-align: center; color: #fff; }
@media (max-width: 860px) { .sgame { margin-top: 32px; height: min(76svh, 620px); } }
/* the site-wide record, in the game's own HUD style; bottom left, clear of the "Built with Spline" badge */

