/* Daniel Serra · portfolio. Paper hero → pixel dissolve → night-blue reel, kit and contact. */
/* Self-hosted type (General Sans: ITF Free Font License; JetBrains Mono: OFL) */
@font-face { font-family: "General Sans"; src: url(../assets/fonts/general-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url(../assets/fonts/general-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(../assets/fonts/jetbrains-mono-latin.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
:root {
  --paper: #f1efea;
  --ink: #111318;
  --navy: #000111;
  --navy-2: #020527;
  --fg: #eef0f6;
  --muted: #979cc6; /* tinted with the night blue so it never reads as dead grey on it */
  --line: #ffffff1a;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --f-display: "General Sans", system-ui, sans-serif;
  --f-sans: var(--f-display);
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 64px);
  /* Glass, after getlayers.ai: a flat translucent fill, a soft inner glow from below, a 1px rim of light at 140deg */
  --glass: #ffffff1a;
  --glass-hi: #ffffff29;
  --glass-edge: inset 0 1px 1px #ffffff29, inset 0 -21px 46px -16px #ffffff29, 0 14px 34px -18px #00000080;
  --rim: #ffffff9e 0%, #ffffff0f 38%, #ffffff00 60%, #ffffff57 100%;
  --frost: #ffffff8c;
  --frost-hi: #ffffffbf;
  --frost-edge: inset 0 1px 0 #ffffff, inset 0 0 0 1px #1113181a, 0 10px 24px -16px #11131840;
  --rim-paper: #ffffff 0%, #ffffff80 38%, #11131814 60%, #ffffffb3 100%;
  --blur: blur(20px) saturate(1.8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
::selection { background: var(--fg); color: var(--navy); }
/* The night blue breathes: soft abstract shapes of lighter blue behind every transparent section, moved by js/site.js with the scroll */
.bgfield { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bgfield i { position: absolute; display: block; width: 70vmax; height: 52vmax; filter: blur(110px); will-change: transform; }
.bgfield i:nth-child(1) { left: -20vmax; top: -18vmax; background: #060a3a; border-radius: 63% 37% 54% 46% / 45% 62% 38% 55%; }
.bgfield i:nth-child(2) { right: -24vmax; top: 22vh; background: #050834; border-radius: 41% 59% 37% 63% / 58% 33% 67% 42%; }
.bgfield i:nth-child(3) { left: 10vmax; bottom: -30vmax; background: #070b3e; border-radius: 70% 30% 60% 40% / 40% 70% 30% 60%; opacity: .8; }
.bgfield i:nth-child(4) { right: 0; top: -26vmax; width: 44vmax; height: 40vmax; background: #080736; border-radius: 35% 65% 50% 50% / 60% 45% 55% 40%; opacity: .7; }
body { margin: 0; background: var(--navy); color: var(--fg); font: 400 17px/1.55 var(--f-sans); -webkit-font-smoothing: antialiased; font-synthesis: none; }
img, video, canvas, svg { display: block; max-width: 100%; }
html { overflow-x: clip; } /* an edge tile zooming on hover must not add a sideways scroll */
[hidden] { display: none !important; } /* our own display rules must never undo the hidden attribute */
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--fg); color: var(--navy); text-decoration: none; }
.skip:focus { top: 12px; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* Buttons: pill. Label colour is set per context. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: 14px 24px; border: 0; border-radius: 99px; background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--fg); font: 500 15px/1 var(--f-sans); text-decoration: none; cursor: pointer; transition: transform .6s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease); }
/* hover: a highlight follows the pointer across the glass (js/site.js sets --gx/--gy) */
.btn:hover { transform: translateY(-2px); background: var(--glass-hi); box-shadow: inset 0 1px 0 #ffffff8c, inset 0 0 0 1px #ffffff40, 0 18px 40px -16px #000000b3; }
/* on paper the glass turns frosted, with ink text */
:is(.hero, .pack--pick, .plain, .foot) .btn, .btn--ink { background: var(--frost); box-shadow: var(--frost-edge); color: var(--ink); }
:is(.hero, .pack--pick, .plain, .foot) .btn:hover, .btn--ink:hover { background: var(--frost-hi); box-shadow: var(--frost-edge); }

/* Header: no bar. White + difference blend reads in negative over whatever is underneath. */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 84px; display: flex; justify-content: flex-end; align-items: center; gap: clamp(14px, 2.4vw, 30px); padding: 0 clamp(16px, 3vw, 40px); color: #fff; mix-blend-mode: difference; pointer-events: none; }
.hdr a { pointer-events: auto; text-decoration: none; }
.hdr { padding-right: calc(clamp(16px, 3vw, 40px) + var(--talk-w, 140px) + clamp(14px, 2.4vw, 30px)); }
.talk { position: fixed; z-index: 32; top: 24px; right: clamp(16px, 3vw, 40px); padding: 12px 20px; border-radius: 99px; font: 400 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--fg); background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: color .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease); }
.talk:hover { background: var(--glass-hi); }
html.top-paper .talk { color: var(--ink); background: var(--frost); box-shadow: var(--frost-edge); }
html.top-paper .talk:hover { background: var(--frost-hi); }
.hdr__lnk { padding: 11px 0; opacity: .75; transition: opacity .3s; }
.hdr__lang { padding-inline: 12px; margin-inline: -12px; } /* a short label, a full-size target */
.hdr__lnk:hover { opacity: 1; }
/* Over the solid night-blue sections a difference blend would tint white towards yellow: plain colours there */
html.hdr-plain .hdr, html.hdr-plain .logo { mix-blend-mode: normal; color: var(--fg); }
.hdr__home { position: fixed; z-index: 32; left: clamp(16px, 3vw, 40px); top: 18px; width: 110px; height: 48px; }

/* The logo flies from the hero into the header (js/site.js sets its transform). */
.logo { position: fixed; z-index: 31; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; mix-blend-mode: difference; color: #fff; }
.logo svg { width: 100%; height: auto; overflow: visible; }
.logo .star { transform-box: fill-box; transform-origin: center; animation: twinkle 5s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes twinkle { 0%, 76% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
html:not(.js) .logo { position: absolute; left: var(--pad); top: 30vh; width: min(52vw, 760px); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; background: var(--paper); color: var(--ink); display: grid; grid-template-columns: 1.6fr 1fr; align-items: center; gap: clamp(40px, 6vw, 120px); padding: 100px var(--pad) 56px; }
.hero__slot { height: 100%; min-height: 40vh; }
.hero__side { justify-self: center; width: min(100%, 440px); }
.services { list-style: none; margin: 0 0 22px; padding: 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.3; }
.services li { display: flex; gap: 14px; align-items: center; padding: 18px 0; border-top: 1px solid #0000001a; color: #1113189e; transition: color .6s var(--ease); } /* inactive stays readable (~4.5:1) */
.services li:last-child { border-bottom: 1px solid #0000001a; }
.services li.is-active { color: var(--ink); }
.services span { flex: none; width: 16px; height: 16px; transform: scale(0) rotate(-90deg); transition: transform .7s var(--ease); }
.services li.is-active span { transform: scale(1) rotate(0); }
.services span svg { width: 100%; height: 100%; }
html:not(.js) .services li { color: var(--ink); }
.hero__meta { margin: 0 0 40px; color: #111318a6; }

/* Pixel dissolve band between paper and night blue */
.dissolve { position: relative; display: block; width: 100%; height: 62vh; margin: -2px 0 -1px; image-rendering: pixelated; background: linear-gradient(var(--paper), var(--navy)); }
html.js .dissolve { background: none; } /* the canvas draws the paper; the night blue is the page behind it */

/* Reel */
.work { padding: 0 8px 8px; }
.work__head { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 4px 22px; color: var(--muted); }
.reel { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.tile { position: relative; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--navy-2); cursor: pointer; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1)); transition: filter .5s var(--ease), box-shadow .5s var(--ease); }
.tile:nth-child(4n+1) { transform-origin: left center; } /* edge tiles grow inwards, never past the screen */
.tile:nth-child(4n) { transform-origin: right center; }
.tile video, .tile img, .tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tile.c video, .tile.c img { object-position: center; }
.tile video { opacity: 0; transition: opacity .6s var(--ease); }
.tile.is-playing video { opacity: 1; }
.tile canvas { image-rendering: pixelated; }
.reel.is-dim .tile:not(:hover) { filter: brightness(.66) saturate(.88); transition: filter .7s var(--ease), box-shadow .5s var(--ease); } /* JS adds is-dim after a pause; leaving a tile removes it at once */
.tile:hover, .tile:focus-visible { z-index: 3; }
.reel.is-dim .tile:hover, .tile:focus-visible { box-shadow: 0 36px 70px -26px #000; } /* the zoom and the lean are eased in by JS */
.tile:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* Sections on night blue */
.block { padding: clamp(96px, 12vw, 160px) var(--pad); border-top: 1px solid var(--line); }
.block__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 60px; align-items: end; margin-bottom: 56px; }
.block h2 { margin: 0; font: 400 clamp(40px, 5.4vw, 84px)/1 var(--f-display); letter-spacing: -0.035em; }
.block__lead { margin: 0; max-width: 46ch; color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); }
.block__tag { display: block; margin-bottom: 18px; color: var(--muted); }

/* Kit: step by step, in blues, sketch lines and glass: logo → creatives → explainer video (10s, four scenes) → launch → live.
   One 28s timeline, written from seconds by a script; the light behind is HTML (.proc__blobs) and follows the scroll. */
.proc { position: relative; margin: 0 0 clamp(40px, 5vw, 64px); }
.proc__stage { position: relative; overflow: hidden; isolation: isolate; border-radius: clamp(12px, 1.6vw, 22px); background: linear-gradient(#050930, #010224); box-shadow: inset 0 0 0 1px #ffffff1f, 0 50px 100px -50px #000; }
.proc__svg { position: relative; display: block; width: 100%; height: auto; }
.proc__steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 22px 0 0; padding: 0; }
.proc__steps li { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.proc__steps span { width: 12px; height: 12px; }
.proc__steps svg { width: 100%; height: 100%; }
.proc :is(.ph, .mark, .word, .ann, .cr, .sc, .vs, .zoom, .tap, .ft, .pub, .play, .bar, .q, .burst, .pill, .icon) { transform-box: fill-box; transform-origin: center; }
.proc .bar { transform-origin: left center; }
.proc .q { transform-origin: center; }
.proc .draw { fill: none; stroke: #ffffff80; stroke-width: 1.5; stroke-dasharray: 1; }
.proc .word { font: 500 66px var(--f-display); letter-spacing: -2px; fill: #fff; }
.proc .pr-a { font: 400 14px var(--f-mono); fill: #ffffff99; }
.proc .pr-h { font: 500 22px var(--f-display); letter-spacing: -.5px; fill: #fff; }
.proc .pr-c, .proc .pr-p { font: 500 17px var(--f-display); fill: #fff; }
.proc .pr-r, .proc .pr-v { font: 500 15px var(--f-display); fill: #fff; }
.proc .pr-v { font-size: 14px; }
.proc .pr-f { font: 500 22px var(--f-display); letter-spacing: -.4px; fill: #fff; }
.proc .pr-x { font: 700 16px var(--f-display); fill: #fff; }
.proc .pr-end { font: 500 52px var(--f-display); letter-spacing: -1.5px; fill: #fff; }
.proc .pr-url { font: 400 11px var(--f-mono); fill: #ffffffb3; }
.proc .pr-n { font: 500 30px var(--f-display); letter-spacing: -.8px; fill: #fff; }
.proc .pr-u { font: 400 15px var(--f-display); fill: #ffffffb3; }
.proc .pr-g { font: 500 15px var(--f-display); fill: #fff; }
.proc .ph1 { animation: ph1 28s infinite; }
.proc .ph1 .draw { animation: d1 28s infinite; }
.proc .ann { animation: ann 28s infinite; }
.proc .word { animation: word 28s infinite; }
.proc .mark { animation: mark 28s infinite; }
.proc .ph2 { animation: ph2 28s infinite; }
.proc .cr { animation: rise 28s infinite; }
.proc .cr1 { animation-delay: .25s; } .proc .cr2 { animation-delay: .5s; }
.proc .ph3 { animation: ph3 28s infinite; }
.proc .play { animation: play 28s infinite; }
.proc .bar { animation: bar 28s infinite linear; }
.proc .zoom { animation: zoom 28s infinite; }
.proc .tap { animation: tap 28s infinite; }
.proc .vs1 { animation: vs1 28s infinite; }
.proc .vs2 { animation: vs2 28s infinite; }
.proc .vs3 { animation: vs3 28s infinite; }
.proc .vs4 { animation: vs4 28s infinite; }
.proc .sc0 { animation: sc1 28s infinite; }
.proc .sc1 { animation: sc2 28s infinite; }
.proc .sc2 { animation: sc3 28s infinite; }
.proc .sc3 { animation: sc4 28s infinite; }
.proc .ft0 { animation: ft0 28s infinite; }
.proc .ft1 { animation: ft1 28s infinite; }
.proc .ft2 { animation: ft2 28s infinite; }
.proc .jit { animation: jit .5s infinite alternate ease-in-out; } .proc .jit1 { animation-delay: -.2s; } .proc .jit2 { animation-delay: -.35s; }
.proc .recdot { animation: blink 1s infinite steps(2); }
.proc .q { animation: eq .5s infinite alternate; } .proc .q1 { animation-delay: -.2s; } .proc .q2 { animation-delay: -.35s; } .proc .q3 { animation-delay: -.1s; }
.proc .ph4 { animation: ph4 28s infinite; }
.proc .burst { animation: burst 28s infinite; }
.proc .pill { animation: pill 28s infinite; }
.proc .pill1 { animation-delay: .3s; } .proc .pill2 { animation-delay: .6s; } .proc .pill3 { animation-delay: .9s; }
.proc .icon { animation: icon 28s infinite; }
.proc .ph5 { animation: ph5 28s infinite; }
.proc .pub { animation: pub 28s infinite; }
.proc .pub1 { animation-delay: .4s; }
.proc__steps li:nth-child(1) { animation: lab1 28s infinite; } .proc__steps li:nth-child(1) span { animation: labs1 28s infinite; }
.proc__steps li:nth-child(2) { animation: lab2 28s infinite; } .proc__steps li:nth-child(2) span { animation: labs2 28s infinite; }
.proc__steps li:nth-child(3) { animation: lab3 28s infinite; } .proc__steps li:nth-child(3) span { animation: labs3 28s infinite; }
.proc__steps li:nth-child(4) { animation: lab4 28s infinite; } .proc__steps li:nth-child(4) span { animation: labs4 28s infinite; }
.proc__steps li:nth-child(5) { animation: lab5 28s infinite; } .proc__steps li:nth-child(5) span { animation: labs5 28s infinite; }
/* Each phase is named in plain words over the stage (HTML, so it stays readable on phones) */
.proc__cap { position: absolute; left: clamp(10px, 2.2vw, 30px); top: clamp(10px, 2.2vw, 30px); right: clamp(10px, 2.2vw, 30px); margin: 0; pointer-events: none; }
.proc__cap span { position: absolute; left: 0; top: 0; display: inline-flex; gap: 10px; align-items: center; max-width: 100%; padding: 10px 18px 10px 14px; border-radius: 22px; background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #fff; font: 500 clamp(13px, 1.4vw, 20px)/1.25 var(--f-display); letter-spacing: -.01em; opacity: 0; }
.proc__cap b { font-weight: 400; font-size: 11px; color: var(--muted); }
.proc__cap span:nth-child(1) { animation: cap1 28s infinite; }
.proc__cap span:nth-child(2) { animation: cap2 28s infinite; }
.proc__cap span:nth-child(3) { animation: cap3 28s infinite; }
.proc__cap span:nth-child(4) { animation: cap4 28s infinite; }
.proc__cap span:nth-child(5) { animation: cap5 28s infinite; }
@media (max-width: 760px) { .proc__cap { position: relative; inset: auto; height: 64px; margin-top: 14px; } .proc__cap span { font-size: 15px; } } /* on phones the caption sits under the stage */
.proc.is-off * { animation-play-state: paused; } /* paused while off screen */
/* Light behind the stage: soft abstract shapes, moved by js/site.js with the scroll */
.proc__blobs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.proc__blobs i { position: absolute; display: block; width: 62%; height: 70%; filter: blur(70px); opacity: .75; will-change: transform; }
.proc__blobs i:nth-child(1) { left: -12%; top: -18%; background: #121a6e; border-radius: 63% 37% 54% 46% / 45% 62% 38% 55%; }
.proc__blobs i:nth-child(2) { right: -16%; bottom: -24%; background: #232b78; border-radius: 41% 59% 37% 63% / 58% 33% 67% 42%; opacity: .55; }
.proc__blobs i:nth-child(3) { left: 28%; top: 30%; width: 46%; height: 36%; background: #0a1050; border-radius: 70% 30% 60% 40% / 40% 70% 30% 60%; }
.proc__blobs i:nth-child(4) { right: 8%; top: -30%; width: 40%; height: 60%; background: #1f1868; border-radius: 35% 65% 50% 50% / 60% 45% 55% 40%; opacity: .45; }
@keyframes ph1 { 0% { opacity: 0; } 1.43%, 13.57% { opacity: 1; } 15.71%, 100% { opacity: 0; } }
@keyframes d1 { 0%, 0.71% { stroke-dashoffset: 1; } 6.43%, 100% { stroke-dashoffset: 0; } }
@keyframes ann { 0%, 5.71% { opacity: 0; } 7.86%, 12.86% { opacity: 1; } 14.29%, 100% { opacity: 0; } }
@keyframes word { 0%, 7.14% { opacity: 0; transform: translateY(12px); } 9.29%, 13.57% { opacity: 1; transform: none; } 15%, 100% { opacity: 0; } }
@keyframes mark { 0%, 5% { opacity: 0; transform: scale(.6); } 7.86%, 12.86% { opacity: 1; transform: none; } 15.71%, 67.14% { opacity: 1; transform: translate(489px, -231px) scale(.28); } 69.29%, 100% { opacity: 0; transform: translate(489px, -231px) scale(.28); } }
@keyframes ph2 { 0%, 15% { opacity: 0; transform: none; } 17.14%, 30% { opacity: 1; transform: none; } 32.14%, 100% { opacity: 0; transform: scale(.92); } }
@keyframes rise { 0%, 15.71% { opacity: 0; transform: translateY(60px); } 20%, 100% { opacity: 1; transform: none; } }
@keyframes ph3 { 0%, 31.43% { opacity: 0; transform: scale(1.06); } 33.57%, 66.43% { opacity: 1; transform: none; } 68.57%, 100% { opacity: 0; transform: scale(.6); } }
@keyframes play { 0%, 34.29% { opacity: 1; transform: none; } 36.07%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes bar { 0%, 35% { transform: scaleX(0); } 66.43%, 100% { transform: scaleX(1); } }
@keyframes vs1 { 0%, 35.71% { opacity: 0; transform: scale(.96); } 36.96%, 43.39% { opacity: 1; transform: none; } 44.29%, 100% { opacity: 0; transform: scale(1.03); } }
@keyframes sc1 { 0%, 36.43% { opacity: 0; transform: translateY(8px); } 37.50%, 43.39% { opacity: 1; transform: none; } 44.29%, 100% { opacity: 0; } }
@keyframes vs2 { 0%, 44.29% { opacity: 0; transform: scale(.96); } 45.54%, 51.96% { opacity: 1; transform: none; } 52.86%, 100% { opacity: 0; transform: scale(1.03); } }
@keyframes sc2 { 0%, 45% { opacity: 0; transform: translateY(8px); } 46.07%, 51.96% { opacity: 1; transform: none; } 52.86%, 100% { opacity: 0; } }
@keyframes vs3 { 0%, 52.86% { opacity: 0; transform: scale(.96); } 54.11%, 59.82% { opacity: 1; transform: none; } 60.71%, 100% { opacity: 0; transform: scale(1.03); } }
@keyframes sc3 { 0%, 53.57% { opacity: 0; transform: translateY(8px); } 54.64%, 59.82% { opacity: 1; transform: none; } 60.71%, 100% { opacity: 0; } }
@keyframes vs4 { 0%, 60.71% { opacity: 0; transform: scale(.96); } 61.96%, 65.54% { opacity: 1; transform: none; } 66.43%, 100% { opacity: 0; transform: scale(1.03); } }
@keyframes sc4 { 0%, 61.43% { opacity: 0; transform: translateY(8px); } 62.50%, 65.54% { opacity: 1; transform: none; } 66.43%, 100% { opacity: 0; } }
@keyframes zoom { 0%, 44.29% { transform: scale(.82); } 47.86%, 100% { transform: scale(1.06); } }
@keyframes tap { 0%, 48.57% { opacity: 0; transform: scale(.4); } 49.29% { opacity: 1; transform: scale(.6); } 51.79%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes ft0 { 0%, 54.29% { opacity: 0; transform: translateX(24px); } 55.71%, 100% { opacity: 1; transform: none; } }
@keyframes ft1 { 0%, 56.07% { opacity: 0; transform: translateX(24px); } 57.50%, 100% { opacity: 1; transform: none; } }
@keyframes ft2 { 0%, 57.86% { opacity: 0; transform: translateX(24px); } 59.29%, 100% { opacity: 1; transform: none; } }
@keyframes ph4 { 0%, 67.14% { opacity: 0; } 69.29%, 81.43% { opacity: 1; } 83.57%, 100% { opacity: 0; } }
@keyframes burst { 0%, 68.57% { opacity: 0; transform: scale(.2); } 69.64% { opacity: 1; transform: scale(.6); } 75%, 100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(1); } }
@keyframes pill { 0%, 70% { opacity: 0; transform: scale(.8); } 72.14%, 100% { opacity: 1; transform: none; } }
@keyframes icon { 0%, 67.14% { opacity: 0; transform: scale(.4); } 69.29% { opacity: 1; transform: scale(1.06); } 70.36%, 82.14% { opacity: 1; transform: none; } 85.71%, 97.14% { opacity: 1; transform: translate(-279px, -160px) scale(.4375); } 99.29%, 100% { opacity: 0; transform: translate(-279px, -160px) scale(.4375); } }
@keyframes ph5 { 0%, 82.86% { opacity: 0; transform: translateY(40px); } 85.71%, 97.14% { opacity: 1; transform: none; } 99.29%, 100% { opacity: 0; transform: none; } }
@keyframes pub { 0%, 83.57% { opacity: 0; transform: translateY(40px); } 87.14%, 100% { opacity: 1; transform: none; } }
@keyframes lab1 { 0%, 15.36% { opacity: 1; } 16.07%, 100% { opacity: .45; } }
@keyframes labs1 { 0%, 15.36% { transform: scale(1); } 16.07%, 100% { transform: scale(0); } }
@keyframes cap1 { 0% { opacity: 0; transform: translateY(6px); } 1.43%, 15% { opacity: 1; transform: none; } 16.07%, 100% { opacity: 0; transform: none; } }
@keyframes lab2 { 0%, 16.04% { opacity: .45; } 16.11%, 31.43% { opacity: 1; } 32.14%, 100% { opacity: .45; } }
@keyframes labs2 { 0%, 16.04% { transform: scale(0); } 16.79%, 31.43% { transform: scale(1); } 32.14%, 100% { transform: scale(0); } }
@keyframes cap2 { 0%, 16.07% { opacity: 0; transform: translateY(6px); } 17.50%, 31.07% { opacity: 1; transform: none; } 32.14%, 100% { opacity: 0; transform: none; } }
@keyframes lab3 { 0%, 32.11% { opacity: .45; } 32.18%, 67.14% { opacity: 1; } 67.86%, 100% { opacity: .45; } }
@keyframes labs3 { 0%, 32.11% { transform: scale(0); } 32.86%, 67.14% { transform: scale(1); } 67.86%, 100% { transform: scale(0); } }
@keyframes cap3 { 0%, 32.14% { opacity: 0; transform: translateY(6px); } 33.57%, 66.79% { opacity: 1; transform: none; } 67.86%, 100% { opacity: 0; transform: none; } }
@keyframes lab4 { 0%, 67.82% { opacity: .45; } 67.89%, 83.21% { opacity: 1; } 83.93%, 100% { opacity: .45; } }
@keyframes labs4 { 0%, 67.82% { transform: scale(0); } 68.57%, 83.21% { transform: scale(1); } 83.93%, 100% { transform: scale(0); } }
@keyframes cap4 { 0%, 67.86% { opacity: 0; transform: translateY(6px); } 69.29%, 82.86% { opacity: 1; transform: none; } 83.93%, 100% { opacity: 0; transform: none; } }
@keyframes lab5 { 0%, 83.89% { opacity: .45; } 83.96%, 99.29% { opacity: 1; } 100%, 100% { opacity: .45; } }
@keyframes labs5 { 0%, 83.89% { transform: scale(0); } 84.64%, 99.29% { transform: scale(1); } 100%, 100% { transform: scale(0); } }
@keyframes cap5 { 0%, 83.93% { opacity: 0; transform: translateY(6px); } 85.36%, 98.93% { opacity: 1; transform: none; } 100%, 100% { opacity: 0; transform: none; } }
@keyframes jit { from { transform: translate(-2px, 1px) rotate(-1deg); } to { transform: translate(2px, -1px) rotate(1deg); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .proc *, .proc__steps li, .proc__steps span { animation: none !important; }
  .proc :is(.ph, .mark) { opacity: 0; } .proc .ph5 { opacity: 1; } .proc__cap span:last-child { opacity: 1; } .proc .icon { transform: translate(-279px, -160px) scale(.4375); }
}
/* Rebranding and website makeover: the visitor walks the steps and the stage builds up (after the stepper in the client's reference) */
.int__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(32px, 5vw, 80px); align-items: start; }
.int__side { display: grid; gap: 36px; align-content: start; }
.int--flip .int__body { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); }
.int--flip .int__panel { order: -1; }
.int__steps { display: grid; border-top: 1px solid #ffffff1f; }
.int__step { display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; padding: 22px 16px 22px 8px; border: 0; border-bottom: 1px solid #ffffff1f; border-radius: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; opacity: .5; transition: opacity .5s var(--ease), background .5s var(--ease); }
.int__step .mono { grid-row: span 2; padding-top: 5px; color: var(--muted); }
.int__step strong { font: 500 clamp(19px, 1.6vw, 22px)/1.2 var(--f-display); letter-spacing: -.015em; }
.int__desc { color: var(--muted); font-size: 15px; line-height: 1.5; max-height: 0; overflow: hidden; transition: max-height .6s var(--ease); }
.int__step:hover { opacity: .8; }
.int__step[aria-selected="true"] { opacity: 1; background: linear-gradient(90deg, #ffffff0f, #ffffff00); }
.int__step[aria-selected="true"] .mono { color: #a5adf0; }
.int__step[aria-selected="true"] .int__desc { max-height: 6em; }
.int__stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; border-radius: 18px; background: linear-gradient(#050930, #010224); box-shadow: inset 0 0 0 1px #ffffff1f, 0 40px 80px -40px #000; }
.int__svg { position: relative; display: block; width: 100%; height: 100%; }
.int__svg .s { opacity: 0; transform: translateY(14px) scale(.985); transform-box: fill-box; transform-origin: center; transition: opacity .5s var(--ease), transform .8s var(--ease); }
.int__svg .pop { transform-box: fill-box; transform-origin: center; }
.int__stage[data-step="1"] .s1, .int__stage[data-step="2"] .s2, .int__stage[data-step="3"] .s3, .int__stage[data-step="4"] .s4 { opacity: 1; transform: none; transition-delay: .12s; }
.int__svg .d { stroke-dasharray: 1; }
.int__stage[data-step="2"] .s2 .d { animation: idraw 1.4s var(--ease) both .15s; }
:is(.int__stage[data-step="2"] .s2, .int__stage[data-step="3"] .s3, .int__stage[data-step="4"] .s4) .pop { animation: ipop .8s var(--ease) both .55s; }
.int__stage[data-step="4"] .s4 .p2 { animation-delay: .7s; } .int__stage[data-step="4"] .s4 .p3 { animation-delay: .85s; } .int__stage[data-step="4"] .s4 .p4 { animation-delay: 1s; }
.int__stage[data-step="3"] .s3 .sw { animation: ipop .7s var(--ease) both; } .int__stage[data-step="3"] .s3 .sw:nth-child(2) { animation-delay: .1s; } .int__stage[data-step="3"] .s3 .sw:nth-child(3) { animation-delay: .2s; } .int__stage[data-step="3"] .s3 .sw:nth-child(4) { animation-delay: .3s; }
.int__stage[data-step="2"] .s2 .lab { animation: ifade .6s var(--ease) both 1.2s; }
@keyframes idraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ipop { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ifade { from { opacity: 0; } to { opacity: 1; } }
.int__svg .i-old { font: italic 700 54px "Times New Roman", serif; fill: none; stroke: #c9cef5; stroke-width: 1.4; }
.int__svg .i-aaline { font: 500 64px var(--f-display); letter-spacing: -2px; fill: none; stroke: #c9cef5; stroke-width: 1.4; }
.int__svg .i-typel { font: 500 22px var(--f-display); fill: #c9cef5; }
.int__svg .i-signl { font: 500 50px var(--f-display); letter-spacing: -1.5px; fill: none; stroke: #c9cef5; stroke-width: 1.4; }
.int__svg .i-old2 { font: 700 12px "Times New Roman", serif; letter-spacing: .06em; fill: #c9cef5b3; }
.int__svg .i-pin { font: 500 14px var(--f-display); fill: #e6e8fb; }
.int__svg .i-n { font: 700 12px var(--f-display); fill: #fff; }
.int__svg .i-a, .int__svg .i-hex { font: 400 12px var(--f-mono); fill: #a5adf0b3; }
.int__svg .i-aa { font: 500 64px var(--f-display); letter-spacing: -2px; fill: #c9cef5; }
.int__svg .i-type { font: 500 22px var(--f-display); fill: #c9cef5; }
.int__svg .i-sign { font: 500 50px var(--f-display); letter-spacing: -1.5px; fill: #a5adf0; }
.int__svg .i-w { font: 400 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; fill: #a5adf0; }
.int__nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.int__count { color: var(--muted); margin-right: auto; }
.int__prev, .int__next { height: 44px; padding: 0 18px; border: 0; border-radius: 99px; background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--fg); font: 500 15px/1 var(--f-sans); cursor: pointer; }
.int__prev { width: 44px; padding: 0; }
.int__prev:disabled { opacity: .35; cursor: default; }
.int:not(.touched) .int__next { animation: nudge 2.4s var(--ease) infinite 2s; } /* invites the first tap */
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(5px); } 90% { transform: translateX(-2px); } }
.int__foot { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--quiet { background: transparent; box-shadow: inset 0 0 0 1px #ffffff40; }
.btn--quiet svg { width: 13px; height: 13px; }
@media (max-width: 900px) { .int__body, .int--flip .int__body { grid-template-columns: 1fr; } .int__panel, .int--flip .int__panel { order: -1; width: min(100%, 520px); } }
@media (prefers-reduced-motion: reduce) { .int__svg *, .int__next { animation: none !important; transition: none !important; } }
/* Case studies: before and after, in the project sheet's dialog */
/* one case at a time, sized to the screen: nothing is ever cut off at the bottom */
.cases__in { max-height: calc(100dvh - 64px); overflow: auto; padding: 12px 6px 24px; overscroll-behavior: contain; }
.cases__in:focus, .sheet__grid:focus { outline: none; }
.cases__head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 0 0 24px; padding-right: 64px; } /* clear of the close button */
.cases h2 { margin: 0; }
.cases__tabs { display: flex; gap: 8px; }
.cases__tabs button { height: 40px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--glass); box-shadow: var(--glass-edge); color: var(--muted); font: 400 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.cases__tabs button[aria-pressed="true"] { color: var(--fg); background: var(--glass-hi); }
.case:not(.is-on) { display: none; }
.case__tag { display: none; }
.case__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.case__shot { max-height: calc(100dvh - 260px); }
@media (max-width: 760px) { .case__shot { max-height: calc((100dvh - 300px) / 2); } }
.case__shot { position: relative; margin: 0; min-height: 0; aspect-ratio: 16 / 10; display: grid; place-items: center; border-radius: 16px; background: #ffffff0f; box-shadow: inset 0 0 0 1px #ffffff26; overflow: hidden; }
.case__shot--after { background: linear-gradient(#0d1356, #070b3e); }
.case__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case__label { position: absolute; left: 14px; top: 14px; z-index: 1; padding: 6px 11px; border-radius: 99px; background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #fff; }
.case__ph { display: grid; justify-items: center; gap: 12px; color: var(--muted); font-size: 15px; text-align: center; padding: 48px 24px; }
.case__ph svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .case__pair { grid-template-columns: 1fr; } }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.packs { align-items: stretch; }
.pack { display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 30px; border-radius: 16px; background: var(--navy-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .6s var(--ease), transform .9s var(--ease); }
.pack:hover { box-shadow: inset 0 0 0 1px #ffffff40; transform: translateY(-4px); }
.pack__top { display: flex; justify-content: space-between; align-items: center; min-height: 26px; }
.pack__n { color: var(--muted); }
.pack h3 { margin: 6px 0 0; font: 500 clamp(28px, 2.5vw, 36px)/1.05 var(--f-display); letter-spacing: -0.025em; }
.pack__for { margin: 0; color: var(--muted); }
.pack__count { margin: 8px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pack ul { list-style: none; margin: 4px 0 26px; padding: 0; display: grid; gap: 13px; flex: 1; align-content: start; }
.pack li { display: flex; gap: 12px; }
.pack li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: .5em; background: currentColor; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.pack li.is-off { color: #8186b5; text-decoration: line-through; text-decoration-color: #8186b580; } /* dimmer than included, still 4.5:1 */
.pack li.is-off::before { height: 1.5px; margin-top: .72em; clip-path: none; } /* a dash instead of the star */
.pack .btn { align-self: stretch; justify-content: center; }
/* The recommended package: paper card, like the hero */
.pack--pick { background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -40px #000; }
.pack--pick:hover { box-shadow: 0 50px 90px -40px #000; }
.pack--pick .pack__n, .pack--pick .pack__for, .pack--pick .pack__count { color: #111318a6; }
.pack--pick .pack__count { border-color: #1113181f; }
.pack--pick li.is-off { color: #676a73; text-decoration-color: #6a6d7680; }
.pack__pick { padding: 6px 10px; border-radius: 99px; background: var(--navy); color: var(--fg); font-size: 11px; letter-spacing: .08em; }

.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.contact h2 { font-size: clamp(64px, 9vw, 150px); }
.ways { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.ways .btn { padding: 11px 18px; font-size: 14px; }

.form { display: grid; gap: 22px; padding: clamp(24px, 3vw, 40px); border-radius: 16px; background: var(--navy-2); box-shadow: inset 0 0 0 1px var(--line); }
.form fieldset { margin: 0; padding: 0; border: 0; }
.form legend, .form label { font-size: 14px; color: var(--muted); }
.form legend { margin-bottom: 12px; padding: 0; }
.form > label, .form__row label { display: grid; gap: 8px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; padding: 14px 16px; border: 0; border-radius: 10px; background: #02052a; color: var(--fg); font: 400 16px/1.4 var(--f-sans); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s; }
.form textarea { resize: vertical; min-height: 130px; }
.form ::placeholder, .chat__panel ::placeholder { color: #8a8fbd; opacity: 1; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--fg); }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; color: var(--fg); }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 10px 16px; border-radius: 99px; background: var(--glass); box-shadow: var(--glass-edge); transition: background .3s, color .3s, box-shadow .3s; }
.chips label:hover span { background: var(--glass-hi); }
.chips input:checked + span { background: var(--fg); color: var(--navy); box-shadow: none; }
.chips input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 3px; }
.form__error, .form__fail { margin: 0; color: #ffb4a8; }
.form__ok { margin: 0; padding: 14px 16px; border-radius: 10px; background: #eef0f614; color: var(--fg); }
.form button[disabled] { opacity: .6; cursor: progress; }
.form__send { display: flex; flex-wrap: wrap; gap: 10px; }
.form__note { margin: -6px 0 0; color: var(--muted); }
.priv { margin: 0; color: var(--muted); font-size: 13px; }
.priv a { display: inline-block; padding-block: 6px; color: var(--fg); text-underline-offset: 3px; }
.dissolve--up { transform: scaleY(-1); margin: -1px 0 -2px; } /* the same dissolve, run back from night blue to paper */
.foot { padding: 8px var(--pad) 32px; background: var(--paper); color: var(--ink); }
.foot__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; color: #111318a6; }
.foot__row nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot__row nav > * { padding-block: 11px; }
.foot__row { align-items: center; }
.foot a { text-decoration: none; }
.foot__row a:hover { color: var(--ink); }

/* Project sheet */
.sheet { width: min(1200px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); margin: auto; padding: 0; border: 0; background: none; color: var(--fg); overflow: visible; }
.sheet::backdrop { background: #010330b3; backdrop-filter: blur(18px) brightness(.7); -webkit-backdrop-filter: blur(18px) brightness(.7); }
.sheet[open] .sheet__info { animation: sheet-in .8s var(--ease) .12s both; }
.sheet[open]::backdrop { animation: fade-in .6s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(26px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }
.sheet__grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 32px; align-items: end; }
.sheet__media { position: relative; aspect-ratio: var(--ar, 16 / 9); width: min(100%, calc((100dvh - 120px) * var(--ar, 1.78))); justify-self: center; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 50px 100px -40px #000; }
.sheet__media :is(video, img) { display: block; width: 100%; height: 100%; object-fit: cover; } /* the box takes each piece's own aspect, so nothing is cropped or barred */
.sheet__tools { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; opacity: 0; transition: opacity .3s; } /* only while the pointer is on the piece */
.sheet__media:hover .sheet__tools, .sheet__tools:focus-within { opacity: 1; }
@media (hover: none) { .sheet__tools { opacity: 1; } }
.sheet__tools button { display: grid; place-items: center; height: 38px; min-width: 38px; padding: 0 14px; border: 0; border-radius: 99px; background: #010330d9; box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--paper); font-size: 12px; cursor: pointer; transition: background .3s; } /* solid navy: legible over white pieces too */
.sheet__tools .sheet__wide { padding: 0; }
.sheet__tools button:hover { background: #010330; }
.sheet--wide { width: min(1900px, calc(100% - 24px)); }
.sheet--wide .sheet__grid { grid-template-columns: 1fr; }
.sheet--wide .sheet__info { display: none; }
.sheet--wide .sheet__media { width: min(100%, calc((100dvh - 130px) * var(--ar, 1.78))); margin-top: 56px; } /* the piece starts below the close and arrow buttons */
.sheet--wide::backdrop { background: #000000eb; backdrop-filter: blur(24px) brightness(.35); -webkit-backdrop-filter: blur(24px) brightness(.35); }
.sheet__tag { color: #ffffffb0; }
.sheet h2 { margin: 10px 0 14px; font: 400 clamp(30px, 3.2vw, 46px)/1.04 var(--f-display); letter-spacing: -0.03em; }
.sheet__text { margin: 0 0 14px; color: #ffffffcc; }
.sheet__role { margin: 0 0 24px; color: var(--muted); }
.sheet__thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.sheet__thumbs button { height: 44px; aspect-ratio: var(--ar, 16 / 10); max-width: 88px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: .55; transition: opacity .3s; }
.sheet__thumbs button[aria-current="true"], .sheet__thumbs button:hover { opacity: 1; }
.sheet__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sheet__close { position: fixed; top: 22px; right: 22px; width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--fg); cursor: pointer; transition: transform .6s var(--ease); }
.sheet__close:hover { transform: rotate(90deg); }
.sheet__nav { position: fixed; top: 22px; right: 84px; display: flex; gap: 8px; }
.sheet__nav button { width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--fg); font-size: 18px; cursor: pointer; transition: background .3s; }
.sheet__nav button:hover, .sheet__close:hover, .chat__open:hover { background: var(--glass-hi); }
html.bottom-paper .chat__open:hover { background: var(--frost-hi); }
body:has(.sheet[open]) { overflow: hidden; }

/* Cursors: the logo's star, and a pixel "Ver" disc over the reel */
@media (pointer: fine) {
  html.js body, html.js .tile { cursor: none; }
  html.js :is(a, button:not(.tile), label, select, summary) { cursor: pointer; } /* the usual hand: no doubt about what is clickable */
  html.js :is(input:not([type=checkbox]), textarea) { cursor: text; }
}
.scur, .vcur { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; display: none; }
@media (pointer: fine) { html.js .scur, html.js .vcur { display: block; } }
.scur { width: 22px; height: 22px; margin: -11px 0 0 -11px; color: #fff; mix-blend-mode: difference; transition: opacity .3s; } /* position + scale set per frame in JS */
.scur svg { width: 100%; height: 100%; animation: spin 9s linear infinite; }
.scur.hide, .scur.off { opacity: 0; }
.vcur { width: 84px; height: 84px; margin: -42px 0 0 -42px; image-rendering: pixelated; transform: scale(0); transition: transform .5s var(--ease); }
.vcur.on { transform: scale(1); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pixel loader (first visit of the session) */
.boot { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: var(--paper); color: var(--ink); transition: opacity .7s var(--ease), visibility .7s; }
html.booting .boot { display: grid; }
.boot.done { opacity: 0; visibility: hidden; }
.boot__in { display: grid; gap: 14px; justify-items: center; }
.boot svg { width: 26px; height: 26px; animation: spin 1.6s steps(8) infinite; }
.boot__bar { display: flex; gap: 3px; }
.boot__bar i { width: 9px; height: 9px; background: currentColor; opacity: .12; }
.boot__bar i.on { opacity: 1; }

@media (max-width: 900px) {
  .reel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tile:nth-child(n) { transform-origin: left center; }
  .tile:nth-child(2n) { transform-origin: right center; }
  .packs, .block__head, .sheet__grid, .contact { grid-template-columns: 1fr; }
  .hdr__lnk:not(.hdr__lang) { display: none; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; align-content: start; gap: 28px; padding-top: 88px; min-height: 0; padding-bottom: 40px; } /* ends with its content: no empty screen once the list has faded */
  .hero__slot { min-height: 0; height: calc((100vw - 40px) * .42); } /* just the logo's own height */
  .hero__side { justify-self: stretch; width: auto; }
  .services li { padding: 13px 0; }
  .form__row { grid-template-columns: 1fr; }
  .dissolve { height: 44vh; }
  .sheet { width: calc(100% - 20px); }
  .sheet__close { top: 12px; right: 12px; }
  .sheet__nav { top: 12px; right: 70px; }
  .sheet__grid { padding-top: 64px; } /* clear of the close and arrow buttons */
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .sheet[open] .sheet__info, .sheet[open]::backdrop { animation: none; }
  .logo .star, .scur svg, .boot svg { animation: none; }
  .tile, .pack, .btn { transition: none; }
}
.work__head h2 { margin: 0; font: inherit; letter-spacing: inherit; }
.contact .block__lead { margin-top: 28px; }

/* Floating chat: a bubble with the star that opens a short message card (sent like the form) */
.chat { position: fixed; right: clamp(14px, 2.4vw, 28px); bottom: clamp(14px, 2.4vw, 28px); z-index: 40; display: grid; justify-items: end; gap: 12px; transition: opacity .5s var(--ease), transform .7s var(--ease); }
.chat.is-away { opacity: 0; transform: translateY(16px); pointer-events: none; } /* hidden while the contact form is on screen */
.chat__open { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 99px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--fg); font: 500 15px/1 var(--f-sans); box-shadow: var(--glass-edge); cursor: pointer; transition: transform .6s var(--ease); }
html.bottom-paper .chat__open { background: var(--frost); box-shadow: var(--frost-edge); color: var(--ink); }
.chat__open:hover { transform: translateY(-3px); }
.chat__open svg { width: 18px; height: 18px; animation: spin 9s linear infinite; }
.chat__open[aria-expanded="true"] svg { animation-duration: 2.4s; }
.chat__panel { width: min(360px, calc(100vw - 28px)); display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: var(--navy-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -30px #000; transform-origin: 100% 100%; }
.chat__panel:not([hidden]) { animation: chat-in .5s var(--ease); }
@keyframes chat-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.chat__head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.chat__head strong { font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
.chat__head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.chat__x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #ffffff12; color: var(--fg); cursor: pointer; }
.chat__x svg { width: 12px; height: 12px; }
.chat__panel textarea, .chat__panel input:not([type=checkbox]) { width: 100%; padding: 12px 14px; border: 0; border-radius: 10px; background: #02052a; color: var(--fg); font: 400 15px/1.4 var(--f-sans); box-shadow: inset 0 0 0 1px var(--line); }
.chat__panel textarea { resize: none; }
.chat__panel ::placeholder { color: #8b93a8aa; }
.chat__panel :is(textarea, input):focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--fg); }
.chat__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chat__panel .btn { justify-self: start; }
.chat__panel .form__error, .chat__panel .form__fail { font-size: 14px; }
.chat__ok { margin: 0; padding: 12px 14px; border-radius: 10px; background: #eef0f614; font-size: 14px; }
@media (max-width: 560px) {
  .chat__open { width: 52px; padding: 0; justify-content: center; }
  .chat__open span { display: none; }
  .chat__row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .chat__open svg { animation: none; } .chat__panel:not([hidden]) { animation: none; } }

/* Plain pages: legal notice and 404, on paper */
body.plain { background: var(--paper); color: var(--ink); }
.plain__in { width: min(100% - 2 * var(--pad), 68ch); margin: 0 auto; padding: clamp(40px, 7vw, 96px) 0 96px; }
.plain__logo { width: 140px; height: auto; margin-bottom: clamp(40px, 6vw, 72px); }
.plain h1 { margin: 18px 0 32px; font: 400 clamp(36px, 5vw, 64px)/1.02 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; }
.plain h2 { margin: 40px 0 8px; font: 500 20px/1.2 var(--f-display); }
.plain p { margin: 0 0 12px; color: #111318cc; }
.plain__back { color: #111318a6; text-decoration: none; }
.plain__back:hover { color: var(--ink); }
.plain :focus-visible { outline-color: var(--ink); }
.btn--ink { margin-right: 18px; }

/* Mini game in the footer: the star jumps the pixels */
.foot__play { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.foot__play svg { width: 12px; height: 12px; transition: transform .6s var(--ease); }
.foot__play:hover { color: var(--ink); }
.foot__play:hover svg { transform: rotate(90deg); }
.game { position: relative; height: clamp(260px, 30vw, 360px); margin: 0 0 28px; border-radius: 16px; overflow: hidden; background: var(--paper); }
.game::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #11131826; pointer-events: none; }
.game__c { display: block; width: 100%; height: 100%; image-rendering: pixelated; touch-action: none; cursor: none; }
.game__c:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.game__score { position: absolute; top: 16px; right: 64px; margin: 0; color: #111318a6; font-variant-numeric: tabular-nums; }
.game__msg { position: absolute; top: 16px; left: 18px; margin: 0; color: var(--ink); }
.game__x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.game__x:hover { background: #1113180f; }

/* Glass rim: a 1px ring of light drawn with a mask; on hover its bright side turns towards the pointer (--ang, js/site.js) */
:where(.btn, .chat__open, .chips span, .sheet__nav button) { position: relative; }
:where(.btn, .talk, .chat__open, .chips span, .sheet__nav button, .sheet__close, .sheet__tools button) { isolation: isolate; }
:where(.btn, .talk, .chat__open, .chips span, .sheet__nav button, .sheet__close, .sheet__tools button)::before { content: ""; position: absolute; inset: 0; z-index: -1; padding: 1px; border-radius: inherit; background: linear-gradient(var(--ang, 140deg), var(--rim)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
:is(.hero, .pack--pick, .plain, .foot) .btn::before, .btn--ink::before, html.top-paper .talk::before, html.bottom-paper .chat__open::before { content: none; }
.chips input:checked + span::before { opacity: 0; }
/* Grain over the night blue, like film */
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* The "Ver" cursor: a glass disc; only its label is pixel-drawn (canvas), so it still pixelates with the tile */
.vcur { border-radius: 50%; background: #01033033; -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); box-shadow: inset 0 1px 1px #ffffff52, inset 0 -18px 34px -14px #ffffff3d, inset 0 0 0 1px #ffffff2e, 0 16px 36px -14px #000000a6; }
