/* Fresh Digital portfolio
   Radius rule: interactive controls are full pills, surfaces are 20px, small media 12px.
   Colour rule: teal is the brand accent; amber is reserved for the primary call to action. */
:root {
  --bg: #07271f;
  --bg-deep: #051d17;
  --surface: #0c3a2c;
  --surface-2: #0f4435;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f4faf8;
  --ink-soft: #a9bdb7;
  --ink-mute: #7a9a92;
  --teal: #5bc3ba;
  --teal-2: #8bdbd0;
  --amber: #f2b460;
  --wrap: 1240px;
  --display: 'Bricolage Grotesque', 'IBM Plex Sans Thai', sans-serif;
  --body: 'Inter', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --out: cubic-bezier(.23, 1, .32, 1);
  --inout: cubic-bezier(.77, 0, .175, 1);
  --top: 68px;
  color-scheme: dark;
}
html[lang='th'] { --body: 'IBM Plex Sans Thai', 'Inter', system-ui, sans-serif; --display: 'IBM Plex Sans Thai', 'Bricolage Grotesque', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.lock { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--amber); color: #2a1a04; padding: 8px 16px; border-radius: 999px; z-index: 90; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- type ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin: 0 0 24px; }
.h1, .h2, .mega { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.h1 { font-size: clamp(46px, 6.2vw, 88px); line-height: .98; }
.h2 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.02; margin-bottom: 20px; }
.mega { font-size: clamp(52px, 9vw, 136px); line-height: .95; }
html[lang='th'] .h1, html[lang='th'] .h2, html[lang='th'] .mega { font-weight: 700; letter-spacing: -.01em; line-height: 1.18; }
html[lang='th'] .h1 { font-size: clamp(40px, 5.2vw, 72px); }
html[lang='th'] .mega { font-size: clamp(44px, 7vw, 104px); }
.t { color: var(--teal-2); }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 52ch; margin: 0; text-wrap: pretty; }
@media (max-width: 640px) { .lede { font-size: 16px; } }

/* word-by-word headline reveal */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); animation: wordUp .9s var(--out) forwards; animation-delay: calc(120ms + var(--i) * 70ms); }
@keyframes wordUp { to { transform: none; } }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--out), transform .8s var(--out); transition-delay: calc(var(--d, 0) * 80ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-family: var(--display); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; transition: transform .16s var(--out), background-color .25s ease, border-color .25s ease, color .25s ease; }
.btn:active { transform: scale(.97); }
.btn-amber { background: var(--amber); color: #2a1a04; border-color: var(--amber); }
.btn-ghost { background: rgba(255, 255, 255, .02); }
@media (hover: hover) and (pointer: fine) {
  .btn-amber:hover { background: #f6c47e; }
  .btn-ghost:hover { border-color: var(--teal); background: rgba(91, 195, 186, .08); }
}
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); cursor: pointer; transition: transform .16s var(--out), border-color .2s ease; }
.icon-btn:active { transform: scale(.94); }
@media (hover: hover) { .icon-btn:hover { border-color: var(--teal); } }

/* segmented control with a sliding pill */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .18); }
.seg button { position: relative; z-index: 1; border: 0; background: none; min-height: 38px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink-soft); transition: color .25s ease; }
.seg button[aria-pressed='true'] { color: var(--bg); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--teal); transition: transform .35s var(--out), width .35s var(--out); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); background: rgba(7, 39, 31, .72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease; }
.top.scrolled { border-bottom-color: var(--line); background: rgba(7, 39, 31, .9); }
.top-in { display: flex; align-items: center; gap: 28px; height: 100%; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { position: relative; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: color .2s ease, background-color .2s ease; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav a.on { color: var(--ink); }
.nav a.on::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); transform: translateX(-50%); }
.top-actions { display: flex; gap: 12px; align-items: center; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: none; min-height: 34px; min-width: 44px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.lang button[aria-pressed='true'] { background: var(--surface-2); color: var(--ink); }
@media (max-width: 900px) { .nav { display: none; } .top-actions { margin-left: auto; } }
@media (max-width: 640px) { .hide-sm { display: none; } :root { --top: 60px; } .brand img { height: 30px; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -30% -20% auto 30%; height: 120%; background: radial-gradient(closest-side, rgba(91, 195, 186, .16), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; min-height: calc(100dvh - var(--top)); padding-block: 56px 72px; }
.hero-lede { margin-top: 28px; opacity: 0; animation: fadeUp .8s var(--out) .55s forwards; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; opacity: 0; animation: fadeUp .8s var(--out) .7s forwards; }
.hero .eyebrow { opacity: 0; animation: fadeUp .8s var(--out) .05s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* the moving wall of real sites */
.wall { position: relative; height: min(78dvh, 760px); perspective: 1600px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); opacity: 0; animation: fadeIn 1.2s var(--out) .3s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.wall-tilt { position: absolute; inset: -12% -30% -12% -4%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; transform: rotateX(18deg) rotateZ(-10deg) rotateY(-8deg); transform-style: preserve-3d; }
.col { display: flex; flex-direction: column; gap: 18px; animation: drift var(--dur, 60s) linear infinite; will-change: transform; }
.col:nth-child(2) { animation-direction: reverse; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.wall:hover .col { animation-play-state: paused; }
.tile { position: relative; display: block; width: 100%; aspect-ratio: 16 / 12; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .4s var(--out), box-shadow .4s var(--out); }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: hover) and (pointer: fine) { .tile:hover { transform: translateZ(40px) scale(1.04); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 2px var(--teal); } }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-block: 40px 0; gap: 8px; }
  .wall { height: 380px; margin: 0 -32px; }
  .wall-tilt { inset: -20% -10% -20% -10%; }
}
@media (max-width: 640px) { .wall { height: 300px; margin: 0 -16px; } .hero-cta .btn { flex: 1 1 auto; } }

/* ---------- numbers ---------- */
.proof { border-block: 1px solid var(--line); background: var(--bg-deep); }
.proof-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.num { padding: 36px 24px 36px 0; display: flex; flex-direction: column; gap: 6px; }
.num + .num { padding-left: 32px; border-left: 1px solid var(--line); }
.num b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.num span { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 860px) {
  .proof-row { grid-template-columns: 1fr 1fr; }
  .num { padding: 24px 12px 24px 0; }
  .num + .num { padding-left: 0; border-left: 0; }
  .num:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .num:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- live showcase ---------- */
.live { padding: 128px 0; }
.live-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 56px; align-items: start; }
.live-list .lede { margin-bottom: 40px; }
.picks { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.pick { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; width: 100%; text-align: left; padding: 22px 0 22px 24px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; }
.pick::before { content: ''; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 3px; background: var(--teal); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--out); }
.pick[aria-current='true']::before { transform: scaleY(1); }
.pick-name { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; color: var(--ink-mute); transition: color .3s ease; }
.pick-meta { grid-column: 1; font-family: var(--mono); font-size: 12px; color: var(--ink-mute); letter-spacing: .04em; }
.pick-arrow { grid-row: 1 / span 2; grid-column: 2; align-self: center; opacity: 0; transform: translateX(-8px); transition: opacity .3s ease, transform .4s var(--out); color: var(--teal); }
.pick[aria-current='true'] .pick-name, .pick:hover .pick-name { color: var(--ink); }
.pick[aria-current='true'] .pick-arrow { opacity: 1; transform: none; }
.picks li:last-child .pick { border-bottom: 1px solid var(--line); }
.stage-sticky { position: sticky; top: calc(var(--top) + 32px); }
.stage-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.stage { position: relative; }
@media (max-width: 960px) {
  .live { padding: 88px 0; }
  .live-grid { grid-template-columns: 1fr; gap: 32px; }
  .live-stage { order: -1; }
  .live-list { display: contents; }
  .live-list .h2, .live-list .lede { order: -2; }
  .stage-sticky { position: static; }
  .picks { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .picks::-webkit-scrollbar { display: none; }
  .picks li { flex: none; scroll-snap-align: start; }
  .pick, .picks li:last-child .pick { border: 1px solid var(--line-2); border-radius: 20px; padding: 14px 18px; min-width: 220px; }
  .pick::before { display: none; }
  .pick[aria-current='true'] { border-color: var(--teal); background: rgba(91, 195, 186, .08); }
  .pick-name { font-size: 17px; }
  .pick-arrow { display: none; }
}

/* ---------- device frames ---------- */
.laptop { width: 100%; margin: 0 auto; }
.laptop .lid { background: #0a0f12; border-radius: 18px 18px 0 0; padding: 12px 12px 16px; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85); }
.laptop .cam { width: 6px; height: 6px; border-radius: 50%; background: #253039; margin: 0 auto 8px; }
.laptop .screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: #fff; }
.laptop .base { height: 14px; background: linear-gradient(180deg, #d4dae1, #959ea9); border-radius: 0 0 14px 14px; margin: 0 -4%; position: relative; }
.laptop .base::after { content: ''; position: absolute; left: 50%; top: 0; width: 16%; height: 5px; transform: translateX(-50%); background: #868e98; border-radius: 0 0 8px 8px; }
.phone { width: min(340px, 82vw); margin: 0 auto; background: #0a0f12; border-radius: 48px; padding: 11px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85); }
.phone .screen { position: relative; aspect-ratio: 390 / 844; overflow: hidden; border-radius: 38px; background: #fff; }
.phone .notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 26%; height: 22px; background: #0a0f12; border-radius: 14px; z-index: 4; pointer-events: none; }
.screen iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.snap { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #fff; }
.snap img { width: 100%; height: auto; }
.frame-in { animation: frameIn .55s var(--out); }
@keyframes frameIn { from { opacity: 0; transform: translateY(12px) scale(.985); filter: blur(4px); } }
.loading { position: absolute; inset: 0; z-index: 3; overflow: hidden; background: #eef3f1; transition: opacity .45s ease; }
.loading img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: blur(2px) saturate(.9); opacity: .9; }
.loading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.loading.gone { opacity: 0; pointer-events: none; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -90% 0; } }

/* ---------- branding (horizontal pan) ---------- */
.branding { position: relative; border-top: 1px solid var(--line); background: var(--bg-deep); overflow: hidden; }
.pan { height: 100dvh; display: flex; align-items: center; }
.pan-track { display: flex; align-items: center; gap: 28px; padding: 0 max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); will-change: transform; }
.pan-intro { flex: none; width: min(460px, 80vw); padding-right: 32px; }
.pan-hint { margin: 32px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.pan-hint i { display: inline-block; font-style: normal; animation: nudge 1.6s var(--inout) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.books { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.book { flex: none; width: clamp(320px, 40vw, 600px); }
.book-hit { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.cover { position: relative; display: block; aspect-ratio: 16 / 10.5; border-radius: 20px; overflow: hidden; background: #0b0f14; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--out); }
.cover .peek { position: absolute; right: 14px; bottom: 14px; width: 34%; aspect-ratio: 16 / 10.5; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); transform: translateY(12px) rotate(4deg); opacity: 0; transition: transform .5s var(--out), opacity .4s ease; }
.cover .peek img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) {
  .book-hit:hover .cover img:first-child { transform: scale(1.04); }
  .book-hit:hover .peek { opacity: 1; transform: translateY(0) rotate(2deg); }
}
.book-meta { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 18px 4px 0; }
.book-name { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.25; }
.book-sub { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.book-pages { flex: none; font-family: var(--mono); font-size: 12px; color: var(--amber); }
@media (max-width: 960px) {
  .pan { height: auto; display: block; padding: 88px 0; }
  .pan-track { display: block; padding: 0; transform: none !important; }
  .pan-intro { width: auto; padding: 0 32px; margin-bottom: 32px; }
  .pan-hint { display: none; }
  .books { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 32px 8px; gap: 16px; }
  .books::-webkit-scrollbar { display: none; }
  .book { width: min(78vw, 420px); scroll-snap-align: start; }
}
@media (max-width: 640px) { .pan-intro { padding: 0 16px; } .books { padding: 0 16px 8px; } }

/* ---------- all work ---------- */
.work { padding: 128px 0 112px; border-top: 1px solid var(--line); }
.work-head { margin-bottom: 40px; }
.controls { position: sticky; top: var(--top); z-index: 30; background: rgba(7, 39, 31, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-block: 1px solid var(--line); padding: 14px 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink-soft); transition: background-color .25s ease, color .2s ease, border-color .2s ease; }
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { background: var(--ink); color: var(--bg); }
.tab .n { font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: .7; }
.filter-row { display: flex; gap: 10px; align-items: center; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 999px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line-2); color: var(--ink-mute); transition: border-color .2s ease; }
.search:focus-within { border-color: var(--teal); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; color: var(--ink); height: 44px; }
.search input::placeholder { color: var(--ink-mute); }
.selects { display: flex; gap: 8px; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; min-height: 46px; padding: 0 40px 0 18px; border-radius: 999px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line-2); font-size: 15px; cursor: pointer; }
.select select:disabled { opacity: .4; cursor: not-allowed; }
.select::after { content: ''; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border: solid var(--ink-mute); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.btn-share { min-height: 46px; font-family: var(--body); font-weight: 500; }
.btn-share.done { border-color: var(--teal); color: var(--teal-2); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.quick button { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: none; font-size: 13px; color: var(--ink-soft); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .16s var(--out); }
.quick button:active { transform: scale(.96); }
.quick button:hover { color: var(--ink); border-color: var(--teal); }
.quick button[aria-pressed='true'] { background: var(--teal); border-color: var(--teal); color: var(--bg); }
@media (max-width: 860px) {
  .filter-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .selects { display: grid; grid-template-columns: 1fr 1fr auto; }
  .select select { width: 100%; }
}
@media (max-width: 640px) {
  .work { padding: 88px 0; }
  .quick { flex-wrap: nowrap; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick button { flex: none; }
}

.count { margin: 28px 0 20px; font-size: 14px; color: var(--ink-mute); }
.count b { color: var(--ink); font-weight: 600; }
.refs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; grid-auto-flow: dense; }
.ref { min-width: 0; opacity: 0; transform: translateY(18px); animation: cardIn .7s var(--out) forwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.ref.big { grid-column: span 2; grid-row: span 2; display: flex; }
.ref.big .ref-hit { display: flex; flex-direction: column; width: 100%; }
.ref.big .shot { flex: 1; aspect-ratio: auto; min-height: 320px; }
@media (max-width: 1024px) { .refs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .refs { grid-template-columns: 1fr; gap: 32px; } .ref.big { grid-column: auto; grid-row: auto; display: block; } .ref.big .ref-hit { display: block; } .ref.big .shot { aspect-ratio: 16 / 11; min-height: 0; } }
.ref-hit { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 20px; }
.shot { position: relative; display: block; aspect-ratio: 16 / 11; border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .35s ease; }
.shot img { position: absolute; inset: 0; width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: top; transition: transform 1.6s var(--inout); }
.poster { position: absolute; inset: 0; background: linear-gradient(110deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 240% 100%; animation: shimmer 1.6s linear infinite; }
.shot.done .poster { animation: none; }
.poster b { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; text-align: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 26px; color: var(--teal-2); }
@media (hover: hover) and (pointer: fine) {
  .ref-hit:hover .shot { box-shadow: 0 0 0 2px var(--teal), 0 30px 60px -30px rgba(0, 0, 0, .8); }
  .ref-hit:hover .shot img { transform: translateY(calc(-100% + 100cqh)); }
  .ref-hit:hover .ref-go { color: var(--teal-2); }
  .ref-hit:hover .ref-go i { transform: translateX(4px); }
}
.shot { container-type: size; }
.ref-body { display: block; padding: 16px 2px 0; }
.ref-host { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-mute); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-title { display: block; margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.3; }
.ref.big .ref-title { font-size: 24px; }
.ref-sub { display: block; font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-sub:empty { display: none; }
.ref-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.ref-type { font-size: 12px; font-weight: 500; color: var(--teal-2); padding: 3px 10px; border-radius: 999px; background: rgba(91, 195, 186, .1); }
.ref-type:empty { visibility: hidden; }
.ref-go { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink-soft); transition: color .2s ease; }
.ref-go i { display: inline-block; font-style: normal; transition: transform .3s var(--out); }
.more-wrap { display: flex; justify-content: center; padding-top: 48px; }
.empty { text-align: center; padding: 72px 0; }
.empty-t { font-family: var(--display); font-weight: 700; font-size: 26px; margin: 0 0 16px; }

/* ---------- final CTA ---------- */
.final { position: relative; overflow: hidden; padding: 140px 0 120px; border-top: 1px solid var(--line); }
.final::before { content: ''; position: absolute; left: 50%; bottom: -60%; width: 1100px; height: 900px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(91, 195, 186, .18), transparent 70%); pointer-events: none; }
.final-in { position: relative; }
.final-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; margin-top: 48px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) { .final { padding: 96px 0; } .cta-actions .btn { flex: 1 1 100%; } }

.foot { padding: 36px 0; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; font-size: 14px; color: var(--ink-soft); }
.foot-in p { margin: 0; }
.foot-in a:hover { color: var(--ink); }
.foot img { height: 28px; width: auto; margin-right: auto; }
.muted { color: var(--ink-mute); font-size: 13px; }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(3, 18, 14, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fadeIn .25s ease forwards; opacity: 0; }
.v-panel { position: absolute; inset: 0; display: flex; flex-direction: column; animation: panelIn .4s var(--out); }
@keyframes panelIn { from { opacity: 0; transform: scale(.97); } }
.viewer.closing { animation: fadeOut .18s ease forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.v-bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.v-info { min-width: 0; }
.v-ind { margin: 0 0 2px; font-family: var(--mono); font-size: 12px; color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-actions { display: flex; gap: 8px; justify-content: flex-end; }
.v-seg.off { visibility: hidden; }
.v-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 24px; overflow: auto; }
.v-note { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; font-size: 13px; color: var(--ink-soft); background: rgba(7, 39, 31, .92); border: 1px solid var(--line-2); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 860px) {
  .v-bar { grid-template-columns: 1fr auto; padding: 10px 14px; }
  .v-seg { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .v-stage { padding: 12px; }
  .v-note { white-space: normal; text-align: center; width: max-content; max-width: 90%; }
}

/* brand book viewer */
.viewer.is-book .v-stage { display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.v-book { flex: 1; width: 100%; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 16px; padding: 24px; }
.page-wrap { position: relative; min-height: 0; height: 100%; margin: 0 64px; }
.page-wrap img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); background: #fff; }
.page-wrap img.turn { animation: pageIn .4s var(--out); }
@keyframes pageIn { from { opacity: .3; transform: translateX(var(--from, 24px)); filter: blur(3px); } }
.page-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.page-nav.prev { left: -64px; }
.page-nav.next { right: -64px; }
.strip { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; justify-content: safe center; }
.strip button { flex: none; width: 92px; aspect-ratio: 16 / 10.5; padding: 0; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: #0b0f14; cursor: pointer; opacity: .5; transition: opacity .2s ease, border-color .2s ease; }
.strip button img { width: 100%; height: 100%; object-fit: cover; }
.strip button[aria-current='true'] { border-color: var(--teal); opacity: 1; }
.strip button:hover { opacity: 1; }
.page-count { font-family: var(--mono); font-size: 12px; color: var(--ink-mute); text-align: center; margin: 6px 0 0; }
@media (max-width: 640px) { .v-book { padding: 12px; } .page-wrap { margin: 0; } .page-nav.prev { left: 6px; } .page-nav.next { right: 6px; } .strip button { width: 70px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .col { animation: none !important; }
  .rv, .ref, .split .w > span, .hero-lede, .hero-cta, .hero .eyebrow, .wall { opacity: 1 !important; transform: none !important; }
}
