/* Layout: a white gallery of real screens shown near true size. One motif, the logo's offset
   shadow, marks everything you can touch and presses down like a key. Each project owns one colour. */
:root {
  --bg: #f0f1fc;          /* periwinkle paper, a tint of plai blue */
  --paper: #ffffff;
  --ink: #1a1b3f;         /* deep indigo */
  --ink-72: #57597d;
  --ink-10: rgba(26, 27, 63, .10);
  --ink-04: rgba(26, 27, 63, .05);
  --night: #1a1b3f;
  --yellow: #ffb000;
  --pink: #ff589c;
  --cyan: #00d3cf;
  --blue: #2a63ff;
  --display: "National Park", "Segoe UI", system-ui, sans-serif;
  --body: "National Park", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gl: max(20px, env(safe-area-inset-left, 0px));
  --gr: max(20px, env(safe-area-inset-right, 0px));
  --sec: clamp(88px, 11vw, 160px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --press: 6px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
body.locked { overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
video, img { display: block; width: 100%; height: 100%; object-fit: cover; }
svg { display: block; }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.meta { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-72); }
.h2 { font: 500 clamp(28px, 3.3vw, 46px)/1.08 var(--display); letter-spacing: -.035em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The press motif */
.press { transition: transform .18s var(--ease), box-shadow .18s var(--ease); box-shadow: 0 0 0 var(--c, var(--pink)); }
@media (hover: hover) { .press:hover { transform: translate(calc(var(--press) * -1), calc(var(--press) * -1)); box-shadow: var(--press) var(--press) 0 var(--c, var(--pink)); } }
.press:active { transform: none; box-shadow: 0 0 0 var(--c, var(--pink)); transition-duration: .06s; }

.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--body); text-decoration: none; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.btn-ink { background: var(--ink); color: #ffffff; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--mono); border: 1px solid var(--ink-10); border-radius: 999px; padding: 9px 14px; background: var(--paper); color: var(--ink); cursor: pointer; }

/* Nav */
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.nav img { width: 92px; height: auto; }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Phones keep every section link; the logo shrinks, and on the narrowest screens the email chip steps aside
   (the email is still one tap away in the contact section) */
@media (max-width: 640px) { .nav .wrap { height: 64px; gap: 12px; } .nav img { width: 64px; } .nav nav { gap: 14px; font-size: 14px; } }
@media (max-width: 480px) { .nav nav .chip-btn { display: none; } }
@media (max-width: 350px) { .nav img { width: 54px; } .nav nav { gap: 11px; font-size: 13px; } }

/* Hero */
.hero { padding-top: clamp(16px, 2.6vw, 36px); overflow-x: clip; }
.hero h1 { font: 500 clamp(46px, 6.6vw, 96px)/1.02 var(--display); letter-spacing: -.035em; max-width: 14ch; }
.h-logo { display: inline-block; width: 2.05em; height: auto; vertical-align: -.24em; margin-right: .06em; }
.nav .home img { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.nav.hide-logo .home img { opacity: 0; transform: translateY(-6px); }
.key { display: inline-block; white-space: nowrap; }
.key span { display: inline-block; text-shadow: .045em .045em 0 var(--pink), .09em .09em 0 var(--cyan); transition: transform .35s var(--spring), text-shadow .35s var(--spring); }
.key span.down { transform: translate(.045em, .045em); text-shadow: .045em .045em 0 var(--cyan); transition-duration: .12s; }

.deck { position: relative; height: 470px; margin-top: clamp(36px, 5vw, 72px); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.deck .card { position: absolute; left: 50%; top: 24px; width: 224px; aspect-ratio: 9 / 16; margin-left: -112px; border-radius: 26px; overflow: hidden; border: 0; padding: 0; cursor: grab; background: var(--ph, var(--ink-04)); box-shadow: 0 30px 60px -30px rgba(26, 27, 63, .45), 0 2px 6px rgba(26, 27, 63, .08); will-change: transform; transform-origin: 50% 90%; }
.deck .card:active { cursor: grabbing; }
.deck .card video { pointer-events: none; }
.deck .card .tag { position: absolute; left: 10px; right: 10px; bottom: 10px; font: 600 12px/1.2 var(--body); background: rgba(255, 255, 255, .94); color: var(--ink); border-radius: 999px; padding: 7px 10px; text-align: center; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .3s var(--ease); }
.deck .card.front .tag { opacity: 1; transform: none; }
@media (min-width: 681px) { .deck .card .tag { display: none; } }
.deck-now { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 4px auto 14px; width: max-content; max-width: 100%; text-decoration: none; font: 500 clamp(18px, 2vw, 24px)/1.2 var(--display); letter-spacing: -.01em; padding: 10px 18px; border-radius: 999px; }
.deck-now i { width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--pink)); flex: none; transition: transform .4s var(--spring); }
.deck-now em { font: 600 14px var(--body); font-style: normal; color: var(--ink-72); }
.deck-now:hover em { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.deck-now.swap i { transform: rotate(45deg) scale(1.3); }
@media (max-width: 680px) { .deck-now { display: none; } }
.live { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 13px var(--mono); color: var(--ink-72); }
.live b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #18a957; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.deck-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; }
.hint { display: inline-flex; align-items: center; gap: 8px; }
.hint svg { width: 16px; height: 16px; }
.deck-btns { display: flex; gap: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(40px, 5vw, 64px); }
.stat { display: grid; gap: 8px; align-content: start; }
.stat > b { font: 500 clamp(40px, 5vw, 72px)/1 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stat > b::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c); transition: transform .5s var(--spring); }
.stat:hover > b::before { transform: rotate(45deg) scale(1.3); }
.stat > span { color: var(--ink-72); font-size: 16px; }
.stats.armed .stat > b, .stats.armed .stat > span, .stats.armed .stat > small { opacity: 0; transform: translateY(16px); }
.stat > b, .stat > span, .stat > small { transition: opacity .5s var(--ease), transform .6s var(--spring); }
.stat.on > span { transition-delay: .12s; } .stat.on > small { transition-delay: .24s; }
.stats.armed .stat.on > b, .stats.armed .stat.on > span, .stats.armed .stat.on > small { opacity: 1; transform: none; }
.stat > b > span.flip { display: inline-block; animation: flip .28s var(--spring); }
@keyframes flip { from { transform: translateY(.3em) scale(.9); opacity: .2; } }
.stat > small { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-72); }
.stat > small b { color: #c2185b; font-weight: 500; }
.yours { font: 600 13px/1 var(--body); letter-spacing: 0; background: var(--ink); color: #ffffff; padding: 8px 12px; border-radius: 999px; box-shadow: 3px 3px 0 var(--pink); transform: scale(0); transition: transform .4s var(--spring); }
.yours.on { transform: scale(1); }
.yours.bump { animation: bump .3s var(--spring); }
@keyframes bump { 50% { transform: scale(1.15); } }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .stat:first-child { grid-column: 1 / -1; }
  .stat:not(:first-child) > b { font-size: 30px; }
}

/* Marquee */
.marquee { margin-top: clamp(56px, 7vw, 96px); border-block: 1px solid var(--ink-10); position: relative; }
.marquee .view + .view { border-top: 1px solid var(--ink-10); }
.marquee .view { overflow: hidden; height: 104px; display: flex; align-items: center; cursor: grab; touch-action: pan-y; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee .view:active { cursor: grabbing; }
.track { display: flex; align-items: center; gap: 72px; width: max-content; will-change: transform; }
.track img { width: auto; flex: none; filter: brightness(0); opacity: .86; transition: filter .2s; -webkit-user-drag: none; pointer-events: none; }
.track .lbl { display: inline-flex; align-items: center; gap: 10px; flex: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.track .lbl i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.marquee .pause { position: absolute; right: var(--gr); bottom: -18px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ink-10); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.marquee .pause svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .marquee .view { height: 84px; } .track { gap: 48px; } }

/* Why plai */
.why { padding-block: var(--sec); }
.why .lines { display: grid; gap: .5em; font: 500 clamp(26px, 3.4vw, 50px)/1.22 var(--body); letter-spacing: -.025em; max-width: 26ch; margin-top: 20px; }
.why .lines .why-h { font: 500 1em/1.15 var(--display); letter-spacing: -.035em; }
.vchip { display: inline-block; width: 2.3em; height: 1.2em; border-radius: .3em; overflow: hidden; vertical-align: -.16em; background: var(--ph, var(--ink-04)); z-index: 1; transform-origin: 50% 50%; transition: transform .5s var(--spring), box-shadow .35s var(--ease), border-radius .35s var(--ease), opacity .15s linear; position: relative; text-decoration: none; }
.vchip video, .vchip img { position: absolute; inset: 0; }
/* Rolled over, a thumb grows 3x in place without moving the words around it */
@media (hover: hover) { .vchip:hover, .vchip:focus-visible { z-index: 6; transform: scale(3); border-radius: .16em; box-shadow: 0 .12em .3em rgba(26, 27, 63, .28); } }
/* Why plai types itself on as you scroll. Each project appears large, then flies into its slot in the sentence */
.why .lines.armed .ch { opacity: 0; }
.why .lines.armed .ch.on { opacity: 1; }
.why .lines.armed .vchip { opacity: 0; }
.why .lines.armed .vchip.on { opacity: 1; }
.why .hl { font-style: normal; background: linear-gradient(var(--c, var(--pink)), var(--c, var(--pink))) 0 88% / 0 .16em no-repeat; transition: background-size .7s var(--ease) .1s; }
.why .lines > p.done .hl, .why .lines:not(.armed) .hl { background-size: 100% .16em; }
.caret { display: inline-block; width: .07em; height: .95em; margin-left: .03em; background: var(--ink); vertical-align: -.1em; border-radius: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bigprev { position: fixed; z-index: 15; border-radius: 24px; overflow: hidden; background: var(--ph, var(--ink-04)); box-shadow: 0 40px 80px -30px rgba(26, 27, 63, .55), 0 2px 8px rgba(26, 27, 63, .1); cursor: pointer; border: 0; padding: 0; }
.bigprev video, .bigprev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bigprev .bp-cap { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); font: 600 13px/1.2 var(--body); background: rgba(255, 255, 255, .95); color: var(--ink); padding: 8px 12px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s; }
.bigprev.fly .bp-cap { opacity: 0; }
dialog.case.flip[open], dialog.case.reveal[open] { animation: none; }
dialog.case.flip .case-top, dialog.case.flip .case-info, dialog.case.flip .gal > :not(:first-child), dialog.case.flip .case-end { animation: fadeup .5s .18s both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } }
@media (hover: none) { .vchip { width: 2.6em; } }

/* Work */
.work { padding-bottom: var(--sec); }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; margin-bottom: 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; font-weight: 500; }
.filters a { text-decoration: none; color: var(--ink-72); padding-block: 11px 9px; border-bottom: 2px solid transparent; }
.index { margin-top: 64px; border-top: 1px solid var(--ink-10); padding-top: 20px; }
.index summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.index summary::-webkit-details-marker { display: none; }
.index summary::after { content: "+"; font-size: 22px; line-height: 1; transition: transform .3s var(--ease); }
.index[open] summary::after { transform: rotate(45deg); }
.index ol { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 48px; }
.index li { display: grid; gap: 4px; font-size: 15px; color: var(--ink-72); }
.index li a { font-weight: 600; color: var(--ink); font-size: 17px; }
@media (max-width: 760px) { .index ol { grid-template-columns: 1fr; } }
.filters a[aria-current="true"] { color: var(--ink); border-color: var(--ink); }
.work-t { display: grid; gap: 12px; max-width: 640px; }
.work-t p { color: var(--ink-72); font-size: 17px; }
.setbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: -24px 0 40px; padding: 14px 18px; border-radius: 16px; background: var(--ink-04); }
.setbar b { font-weight: 600; }
.setbar .sp { flex: 1; }
/* Work shelf: justified rows. Each tile's width follows its shape (--g), so every tile in a row is the same height. */
.shelf { display: flex; flex-direction: column; gap: 64px; }
.shelf-row { display: flex; gap: 24px; align-items: start; }
.shelf-row .tile { flex: var(--g, 1) 1 0; }
.tile { grid-column: span var(--span, 4); text-decoration: none; display: grid; gap: 14px; min-width: 0; }
.tile .frame { position: relative; border-radius: var(--r, 14px); overflow: visible; }
.tile .media { position: relative; border-radius: var(--r, 14px); overflow: hidden; aspect-ratio: var(--ar); background: var(--ph, var(--ink-04)); max-width: 100%; }
.tile .media > video, .tile .media > img { transition: transform .6s var(--ease); }
@media (hover: hover) { .tile:hover .media > video, .tile:hover .media > img { transform: scale(1.03); } }
.tile .inset { position: absolute; right: -18px; bottom: -24px; width: clamp(104px, 13vw, 180px); aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 40px -18px rgba(26, 27, 63, .55); background: var(--ink); }
.tile .badge { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--body); background: var(--ink); color: #ffffff; padding: 8px 13px; border-radius: 999px; }
.tile .badge svg { width: 12px; height: 12px; }
.tile .cap { display: grid; gap: 3px; }
.tile .t { font-weight: 600; font-size: 19px; line-height: 1.2; }
.tile .s { font-size: 14px; color: var(--ink-72); }
.tile .s b { font: 500 15px var(--display); color: var(--ink); margin-right: 6px; letter-spacing: -.035em; }
.tile .s b i { font-style: normal; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 8px; vertical-align: 1px; }
.shelf.small-row .tile.sm { --span: 3; }
.shelf.set .tile { --span: 4 !important; }
.shelf.set .shelf-row .tile { flex: 0 0 calc((100% - 48px) / 3); }
.shelf.set .tile .media { aspect-ratio: 4 / 3 !important; }
.shelf.set .tile .inset { display: none; }
@media (max-width: 860px) {
  .shelf { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 44px; grid-auto-flow: dense; }
  .shelf-row { display: contents; }
  .tile { grid-column: span var(--mspan, 1) !important; }
  .tile .t { font-size: 17px; }
  .tile .inset { width: 96px; right: 10px; bottom: -18px; }
  .shelf.set .tile { grid-column: span 1 !important; }
}

/* How we work */
.how { padding-block: var(--sec); border-top: 1px solid var(--ink-10); }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.way { border-top: 1px solid var(--ink-10); padding-top: 28px; display: grid; gap: 12px; align-content: start; }
.way .sq { width: 48px; height: 48px; border-radius: 8px; background: var(--c); }
.way:hover .sq { transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--ink); }
.way h3 { font: 500 28px/1.1 var(--display); letter-spacing: -.035em; margin-top: 8px; }
.way p { font-size: 18px; color: var(--ink-72); transition: transform .3s var(--ease); }
.way:hover p { transform: translateX(4px); }
.way a { font-weight: 600; font-size: 15px; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 56px; font: 600 clamp(18px, 2vw, 24px)/1.3 var(--body); letter-spacing: -.01em; }
.steps span { display: inline-flex; align-items: center; gap: 10px; }
.steps span i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.steps svg { width: 18px; height: 18px; color: var(--ink-72); }
details.all { margin-top: 32px; }
details.all summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
details.all summary::-webkit-details-marker { display: none; }
details.all summary::after { content: "+"; font-size: 22px; line-height: 1; transition: transform .3s var(--ease); }
details.all[open] summary::after { transform: rotate(45deg); }
details.all p { margin-top: 14px; color: var(--ink-72); font-size: 17px; max-width: 70ch; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr; } .way .sq { width: 36px; height: 36px; } .way h3 { font-size: 24px; } }

/* What's next */
.labs { padding-bottom: var(--sec); }
.lab-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; margin-top: 48px; }
.lab { margin: 0; display: grid; gap: 14px; }
.lab .media { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--ph, var(--ink-04)); transition: outline-color .2s; outline: 3px solid transparent; outline-offset: 4px; }
.lab:hover .media { outline-color: var(--ink); }
.lab figcaption { display: grid; gap: 4px; }
.lab h3 { font-size: 19px; font-weight: 600; }
.lab p { font-size: 15px; color: var(--ink-72); }
.lab a.media { display: block; }
@media (max-width: 760px) {
  .lab-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-left: calc(var(--gl) * -1); margin-right: calc(var(--gr) * -1); padding-left: var(--gl); padding-right: var(--gr); align-items: start; }
  .lab-row::-webkit-scrollbar { display: none; }
  .lab { flex: 0 0 72vw; scroll-snap-align: start; }
}

/* Contact + brief */
/* Contact: "Let us plai", the brief builder card, the live draft, then the big address */
.contact { padding-block: var(--sec); }
.big { font: 500 clamp(42px, 7vw, 104px)/1 var(--display); letter-spacing: -.04em; text-align: center; }
.ilogo { display: inline-block; height: .9em; width: auto; vertical-align: -.15em; margin: 0 .04em; object-fit: contain; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-top: 64px; }
.brief, .draft { border-radius: 32px; padding: clamp(24px, 3vw, 40px); }
.brief { background: var(--paper); }
.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.brief-head b { font: 500 22px/1.2 var(--display); letter-spacing: -.02em; }
.meter { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-72); font-variant-numeric: tabular-nums; }
.meter .bar { width: 84px; height: 6px; border-radius: 6px; background: var(--ink-10); overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--ink); border-radius: 6px; transition: width .6s var(--spring); }
.brief fieldset { border: 0; margin: 0 0 24px; padding: 0; }
.brief legend { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.brief legend .pip { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--ink-10); transition: background-color .3s, box-shadow .3s, transform .5s var(--spring); }
.brief fieldset.done .pip { background: var(--c); box-shadow: none; transform: rotate(45deg); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opts span { display: inline-block; padding: 11px 17px; border-radius: 999px; background: var(--bg); font-size: 15px; transition: background-color .2s, color .2s, transform .4s var(--spring); }
.opts label:hover span { transform: translateY(-2px); }
.opts input:checked + span { background: var(--ink); color: #ffffff; transform: translateY(-2px) scale(1.04); }
.opts input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.brief .more-in { width: 100%; font: 15px var(--body); padding: 12px 17px; border: 0; border-radius: 999px; color: var(--ink); background: var(--bg); }
.brief .more-in:focus { outline: 3px solid var(--blue); outline-offset: 3px; }
.draft { background: #d8e1ff; display: grid; gap: 18px; align-content: start; transition: background-color .5s var(--ease); }
.draft.ready { background: #ffeab4; animation: ding .7s var(--spring); }
@keyframes ding { 40% { transform: scale(1.02) rotate(-.6deg); } }
.draft pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 500 14px/1.7 var(--mono); color: var(--ink); min-height: 11em; transition: opacity .4s; }
.draft:not(.ready) pre { opacity: .55; }
.draft .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.big-mail { margin-top: clamp(72px, 9vw, 128px); display: grid; gap: 8px; justify-items: center; text-align: center; }
.big-mail button { font: 500 clamp(42px, 7vw, 104px)/1 var(--display); letter-spacing: -.04em; background: none; border: 0; padding: 0 .05em; cursor: copy; white-space: nowrap; color: var(--ink); }
.big-mail button .l { display: inline-block; transition: transform .4s var(--spring), color .3s; }
.big-mail button:hover .l { animation: wave .7s var(--spring); animation-delay: calc(var(--i) * 40ms); }
.big-mail button:active .l { transform: translateY(.04em); }
@keyframes wave { 40% { transform: translateY(-.12em); color: var(--blue); } }
@media (prefers-reduced-motion: reduce) { .draft.ready, .big-mail button:hover .l { animation: none; } }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

footer { border-top: 1px solid var(--ink-10); }
footer .wrap { padding-block: 40px calc(48px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 28px; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; font-size: 14px; color: var(--ink-72); }
footer img { width: 72px; height: auto; }
footer .links { display: flex; gap: 20px; }
footer .links a:hover { text-underline-offset: 3px; }
footer .about { font-size: 14px; color: var(--ink-72); max-width: 90ch; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq dl { margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; font-size: 14px; }
.faq dt { font-weight: 600; }
.faq dd { margin: 4px 0 0; color: var(--ink-72); }
@media (max-width: 760px) { .faq dl { grid-template-columns: 1fr; } }
.fallback { position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 55; width: min(520px, calc(100% - 40px)); background: var(--paper); border: 1px solid var(--ink-10); border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(26, 27, 63, .4); padding: 14px; display: grid; gap: 10px; }
.fallback input { width: 100%; font: 14px var(--mono); padding: 10px 12px; border: 1px solid var(--ink-10); border-radius: 10px; color: var(--ink); background: var(--paper); }
.fallback .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-72); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #ffffff; font: 500 13px var(--mono); padding: 10px 16px; border-radius: 999px; z-index: 50; pointer-events: none; transition: opacity .25s, transform .35s var(--spring); max-width: calc(100% - 40px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* Case sheet */
dialog.case { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
dialog.case[open] { animation: sheet .45s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(40px); } }
dialog.case::backdrop { background: rgba(26, 27, 63, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (min-width: 861px) { dialog.case { height: calc(100% - 32px); margin-top: 32px; border-radius: 28px 28px 0 0; } }
.case-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.case-top { position: sticky; top: 0; z-index: 3; height: calc(64px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--gr) 0 var(--gl); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--ink-10); }
.case-top .right { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink-10); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; --c: var(--ink-10); }
.icon-btn svg { width: 18px; height: 18px; }
.case-body { max-width: 1320px; margin: 0 auto; padding: 40px var(--gr) 0 var(--gl); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px 56px; align-items: start; }
/* The side column stretches to the gallery's row, so the sticky info stays in that row and never slides over the next-project panel */
.case-side { align-self: stretch; min-width: 0; }
.case-info { position: sticky; top: 96px; display: grid; gap: 22px; }
.case-info h2 { font: 500 clamp(32px, 3.6vw, 52px)/1.02 var(--display); letter-spacing: -.035em; outline: none; }
.case-info .hook { font-size: 18px; color: var(--ink-72); }
.case-stats { display: grid; gap: 18px; }
.case-stats div { display: grid; gap: 2px; }
.case-stats b { font: 500 clamp(28px, 3vw, 40px)/1 var(--display); letter-spacing: -.035em; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.case-stats b::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; }
.case-stats span { font-size: 14px; color: var(--ink-72); }
.award { display: flex; gap: 10px; font-size: 15px; font-weight: 500; }
.award svg { width: 18px; height: 18px; color: var(--yellow); flex: none; margin-top: 2px; }
.did { display: grid; gap: 6px; }
.did p { font-size: 15px; color: var(--ink-72); }
@media (max-width: 420px) { #case-link .lt { display: none; } #case-count { display: none; } }
.gal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; grid-auto-flow: dense; }
.gal > * { border-radius: 14px; overflow: hidden; background: var(--ph, var(--ink-04)); aspect-ratio: var(--ar); grid-column: span var(--gs, 3); max-width: 100%; }
.gal .phone { --gs: 2; border-radius: 20px; }
.gal .big { --gs: 6; }
.gal .film video { object-fit: contain; background: #000; }
.case-end { grid-column: 1 / -1; display: grid; gap: 28px; padding-block: 56px calc(64px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ink-10); margin-top: 24px; }
.next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; text-decoration: none; border-radius: 20px; padding: 16px; background: var(--ink-04); cursor: pointer; border: 0; text-align: left; font: inherit; color: inherit; }
.next .nm { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--ph, var(--ink-10)); }
.next small { display: block; margin-bottom: 8px; }
.next b { font: 500 clamp(24px, 3vw, 40px)/1.05 var(--display); letter-spacing: -.035em; }
.cta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font-size: 18px; font-weight: 500; }
@media (max-width: 860px) {
  .case-body { grid-template-columns: 1fr; padding-top: 28px; gap: 28px; }
  .case-info { position: static; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .gal { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gal > * { grid-column: span 1; }
  .gal .big, .gal .land { grid-column: span 2; }
  .next { grid-template-columns: 1fr; }
}

/* Motion: the logo bobs in the headline, headlines rise word by word, cards slide up as they arrive */
.bob { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
.bob:hover { animation: wiggle .6s var(--spring); }
@keyframes bob { 50% { transform: translateY(-.05em) rotate(-2deg); } }
@keyframes wiggle { 25% { transform: rotate(-9deg) scale(1.08); } 60% { transform: rotate(7deg) scale(1.04); } }
.w { display: inline-block; overflow: clip; overflow-clip-margin: .2em; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.w > span { display: inline-block; transition: transform 1s var(--ease), opacity .6s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.split.pre .w > span { transform: translateY(105%); opacity: 0; }
.rv { transition: transform 1s var(--ease), opacity .8s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.rv.pre { opacity: 0; transform: translateY(36px); }

/* What's next: a night panel with the 3D logo */
.next-panel { margin: 0 max(12px, env(safe-area-inset-right, 0px)) var(--sec) max(12px, env(safe-area-inset-left, 0px)); border-radius: 44px; background: var(--night); color: #fff; padding-block: clamp(56px, 7vw, 96px) var(--sec); }
.next-panel .h2 { color: #fff; }
.next-panel .meta, .next-panel .lab p { color: rgba(255, 255, 255, .72); }
.next-panel .lab a { color: #fff; }
.next-panel .lab .media { background: var(--ph, #2b2c55); }
.next-panel .lab:hover .media { outline-color: #fff; }
.logo3d { position: relative; height: clamp(210px, 30vw, 400px); max-width: 1000px; margin: 0 auto 24px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.logo3d:active { cursor: grabbing; }
.logo3d canvas { display: block; width: 100%; height: 100%; }
.logo3d .logo3d-fallback { position: absolute; inset: 0; margin: auto; width: auto; height: 62%; object-fit: contain; }
.logo3d.live .logo3d-fallback { display: none; }
@media (max-width: 860px) { .next-panel { border-radius: 32px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .split.pre .w > span, .rv.pre { transform: none; opacity: 1; }
}
