/* ============================================================
   MIRTILO — THE COVER (nov/2026)
   The studio's stamp as a particle sculpture in candle-lit fog.
   One warm accent (candle) on the site's own void and paper; type
   small and quiet, the scene does the talking.
   ============================================================ */

:root {
    --void: #050507;
    --chamber: #0B0B10;
    --chamber-2: #111018;
    --paper: #F0ECE3;
    --paper-dim: #98939B;
    --hairline: rgba(240, 236, 227, 0.08);
    --hairline-hot: rgba(240, 236, 227, 0.16);
    --accent: #E5A33F;
    --accent-hot: #F2C063;
    --mirtilo: #6C5CE0;

    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-cut: cubic-bezier(0.65, 0, 0.35, 1);
    --pad-x: clamp(1.25rem, 5vw, 6rem);
}

::selection { background: var(--mirtilo); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    background: var(--void);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[id] { scroll-margin-top: 5rem; }
a { color: inherit; }
em { font-style: italic; }

.kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-dim);
    margin-bottom: 1.1rem;
}
.kicker--accent { color: var(--accent); }

h2 {
    font-family: var(--font-display);
    font-weight: 380;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
}
h2 em { color: var(--accent); font-weight: 320; }

/* ---------------- buttons ---------------- */

.btn-accent, .btn-cta {
    display: inline-flex; align-items: center;
    background: var(--accent); color: var(--void);
    font-weight: 500; text-decoration: none;
    padding: 0.95rem 1.6rem; border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(229, 163, 63, 0.4);
    transition: background 0.25s, box-shadow 0.4s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn-accent:hover, .btn-cta:hover {
    background: var(--accent-hot);
    box-shadow: 0 0 40px 4px rgba(229, 163, 63, 0.28);
    transform: translateY(-1px);
}
.btn-ghost {
    display: inline-flex; align-items: center;
    padding: 0.95rem 1.2rem; text-decoration: none; color: var(--paper);
    border-bottom: 1px solid transparent;
    transition: color 0.2s;
}
.btn-ghost:hover { color: var(--accent); }

.pill {
    font-size: 14px; text-decoration: none;
    padding: 0.5rem 1rem; border-radius: 999px;
    border: 1px solid var(--hairline-hot);
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- top bar ---------------- */

.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
    padding: 0.85rem var(--pad-x);
    background: rgba(5, 5, 7, 0.72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
    transform: translateY(-105%);
    transition: transform 0.5s var(--ease-out);
}
.topbar.is-on { transform: none; }
.topbar-logo img { height: 22px; width: auto; filter: invert(1) brightness(1.4); }
.topbar-links { display: flex; gap: 1.8rem; margin-left: auto; }
.topbar-links a { font-size: 14px; text-decoration: none; color: var(--paper-dim); transition: color 0.2s; }
.topbar-links a:hover { color: var(--paper); }

/* ---------------- language toggle (js/i18n.js) ---------------- */

.lang { display: inline-flex; gap: 0.15rem; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; }
.lang a { padding: 0.35rem 0.4rem; text-decoration: none; color: var(--paper-dim); transition: color 0.2s; }
.lang a:hover { color: var(--paper); }
.lang a[aria-current] { color: var(--accent); }
.lang--cover { position: absolute; z-index: 6; top: calc(1.4rem + 10px); right: calc(var(--pad-x) + 11.5rem); }

/* ============================================================
   COVER · the skull as a sculpture of light, and a walk around it
   .cover-stage is tall (when the journey is on); .cover is the
   sticky screen inside it. js/home-hero.js drives the rest.
   ============================================================ */

.cover-stage { position: relative; height: 100vh; height: 100svh; min-height: 600px; }
.cover-stage.is-journey { height: 540vh; }

.cover {
    position: sticky; top: 0;
    height: 100vh; height: 100svh;
    min-height: 600px;
    overflow: hidden;
    /* the night before the canvas wakes (and all there is without WebGL) */
    background:
        radial-gradient(55% 45% at 50% 40%, rgba(229, 150, 50, 0.22), transparent 70%),
        radial-gradient(70% 90% at 100% 100%, rgba(110, 50, 14, 0.4), transparent 70%),
        linear-gradient(to bottom, #1C1208 0%, #0E0A06 60%, var(--void) 100%);
}

.cover-gl { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 1.8s var(--ease-out); }
.cover.is-live .cover-gl { opacity: 1; }
.cover-gl canvas { width: 100%; height: 100%; display: block; }

/* no WebGL / power off: the stamp itself, softly lit */
.cover-flat {
    position: absolute; z-index: 1; display: none;
    left: 50%; top: 40%; transform: translate(-50%, -50%);
    width: min(34vw, 46vh); height: auto;
    filter: drop-shadow(0 0 70px rgba(229, 163, 63, 0.4)) saturate(0.8);
    opacity: 0.9;
}
.cover.is-flat .cover-flat { display: block; }

/* ---- HUD plate: glass with two corners cut ---- */

.hud {
    --c: 9px;
    position: relative;
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
    color: #EDE6D8; text-decoration: none;
    background: linear-gradient(160deg, rgba(229, 163, 63, 0.14), rgba(20, 13, 6, 0.20));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.hud::before {
    /* the hairline, drawn inside the cut shape */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(160deg, rgba(240, 214, 170, 0.7), rgba(240, 214, 170, 0.16) 55%, rgba(240, 214, 170, 0.45));
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c),
        1px calc(var(--c) + 0.4px), 1px calc(100% - 1px), calc(100% - var(--c) - 0.4px) calc(100% - 1px),
        calc(100% - 1px) calc(100% - var(--c) - 0.4px), calc(100% - 1px) 1px, calc(var(--c) + 0.4px) 1px,
        1px calc(var(--c) + 0.4px), 0 var(--c));
    transition: opacity 0.3s;
}

.hud-nav {
    position: absolute; z-index: 6; top: 1.4rem; left: var(--pad-x);
    display: flex; align-items: center;
    padding: 0 0.5rem 0 1.1rem; height: 44px;
}
.hud-logo { display: flex; align-items: center; padding-right: 1.1rem; }
.hud-logo img { height: 15px; width: auto; filter: invert(1) brightness(1.5); }
.hud-nav a:not(.hud-logo) {
    position: relative; padding: 0 0.95rem; line-height: 44px;
    color: rgba(240, 236, 227, 0.78); text-decoration: none; transition: color 0.25s;
}
.hud-nav a:not(.hud-logo)::before {
    content: ''; position: absolute; left: 0; top: 15px; bottom: 15px; width: 1px; background: rgba(240, 214, 170, 0.35);
}
.hud-nav a:not(.hud-logo):hover { color: var(--accent-hot); }

.hud-talk {
    position: absolute; z-index: 6; top: 1.4rem; right: var(--pad-x);
    display: flex; align-items: center; height: 44px; padding: 0 1.15rem;
    transition: color 0.25s, background 0.3s;
}
.hud-talk:hover, .cover-start:hover { color: #fff; background: linear-gradient(160deg, rgba(229, 163, 63, 0.34), rgba(120, 70, 20, 0.34)); }

/* ---- stop 00: the name of the thing ---- */

.cover-intro {
    position: absolute; z-index: 5; left: 0; right: 0; bottom: clamp(1.6rem, 6vh, 3.4rem);
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 0 var(--pad-x);
    will-change: transform, opacity;
}
.cover-k, .act-k {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--accent);
}
.cover-intro h1 {
    font-family: var(--font-display); font-weight: 360;
    font-size: clamp(1.45rem, 2.25vw, 2.2rem); line-height: 1.12; letter-spacing: -0.015em;
    color: #F6F1E6; max-width: 24ch; margin-top: 0.8rem;
    text-shadow: 0 2px 30px rgba(5, 5, 7, 0.6);
}
.cover-intro h1 em { color: var(--accent-hot); font-weight: 320; }
.cover-start { display: inline-flex; align-items: center; height: 42px; padding: 0 1.5rem; margin-top: 1.5rem; transition: color 0.25s, background 0.3s; }
.cover-scroll {
    margin-top: 0.9rem; font-size: 11px; letter-spacing: 0.04em; color: rgba(240, 236, 227, 0.6);
}
.cover-stage:not(.is-journey) .cover-scroll { display: none; }
@media (prefers-reduced-motion: no-preference) {
    .cover.is-live .cover-intro > * { animation: cover-in 1.4s var(--ease-out) both; }
    .cover.is-live .cover-intro > :nth-child(1) { animation-delay: 1.0s; }
    .cover.is-live .cover-intro > :nth-child(2) { animation-delay: 1.15s; }
    .cover.is-live .cover-intro > :nth-child(3) { animation-delay: 1.4s; }
    .cover.is-live .cover-intro > :nth-child(4) { animation-delay: 1.6s; }
    .cover-scroll { animation-name: cover-in, cover-pulse !important; animation-duration: 1.4s, 2.6s !important; animation-iteration-count: 1, infinite !important; }
}
@keyframes cover-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes cover-pulse { 50% { opacity: 0.45; } }

/* ---- stops 01 to 04: panels beside the skull ---- */

.acts { display: none; position: absolute; inset: 0; z-index: 5; perspective: 1300px; pointer-events: none; }
.cover-stage.is-journey .acts { display: block; }
.act {
    --c: 16px;
    position: absolute; top: 50%; translate: 0 -50%;
    left: clamp(var(--pad-x), 9vw, 11rem);
    width: min(370px, 32vw);
    padding: 1.5rem 1.6rem 1.55rem;
    opacity: 0; visibility: hidden;
    background: linear-gradient(160deg, rgba(229, 163, 63, 0.16), rgba(14, 10, 6, 0.34));
    backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
    transform-origin: 0 50%;
    will-change: transform, opacity;
}
.act--right { left: auto; right: max(9vw, calc(var(--pad-x) + 8.5rem)); transform-origin: 100% 50%; }
.act::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(160deg, rgba(240, 214, 170, 0.65), rgba(240, 214, 170, 0.1) 55%, rgba(240, 214, 170, 0.4));
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c),
        1px calc(var(--c) + 0.4px), 1px calc(100% - 1px), calc(100% - var(--c) - 0.4px) calc(100% - 1px),
        calc(100% - 1px) calc(100% - var(--c) - 0.4px), calc(100% - 1px) 1px, calc(var(--c) + 0.4px) 1px,
        1px calc(var(--c) + 0.4px), 0 var(--c));
}
.act h2 {
    font-family: var(--font-display); font-weight: 370;
    font-size: clamp(1.3rem, 1.75vw, 1.7rem); line-height: 1.14; letter-spacing: -0.012em;
    color: #F6F1E6; margin-top: 0.85rem;
}
.act h2 em { color: var(--accent-hot); font-weight: 330; }
.act p { margin-top: 0.8rem; font-size: 13.5px; line-height: 1.6; color: rgba(240, 236, 227, 0.74); }
.act-go {
    display: inline-block; margin-top: 1.15rem;
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
    color: #F0ECE3; text-decoration: none;
    padding-bottom: 0.3rem; border-bottom: 1px solid rgba(240, 214, 170, 0.45);
    transition: color 0.25s, border-color 0.25s;
}
.act-go:hover { color: var(--accent-hot); border-color: var(--accent-hot); }

/* ---- the rail: where you are in the walk ---- */

.rail {
    display: none; position: absolute; z-index: 6; right: calc(var(--pad-x) - 0.4rem); top: 50%; transform: translateY(-50%);
    flex-direction: column; align-items: flex-end; gap: 0.15rem;
}
.cover-stage.is-journey .rail { display: flex; }
.rail, .readout { opacity: calc(1 - var(--out, 0)); }
.rail-mark {
    display: flex; align-items: center; gap: 0.6rem; flex-direction: row-reverse;
    background: none; border: 0; cursor: pointer; padding: 0.42rem 0.4rem;
    font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(240, 236, 227, 0.5); transition: color 0.3s;
}
.rail-mark::before { content: ''; width: 14px; height: 1px; background: currentColor; transition: width 0.45s var(--ease-out), background 0.3s; }
.rail-mark i { font-style: normal; }
.rail-mark b { font-weight: 400; opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.45s var(--ease-out); }
.rail-mark:hover, .rail-mark.is-on { color: var(--accent-hot); }
.rail-mark:hover b, .rail-mark.is-on b { opacity: 1; transform: none; }
.rail-mark.is-on::before { width: 34px; }

/* ---- the readout ---- */

.readout {
    position: absolute; z-index: 5; left: var(--pad-x); right: var(--pad-x); bottom: 1.5rem;
    display: flex; gap: 1.6rem; align-items: baseline;
    font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(240, 236, 227, 0.45); pointer-events: none;
}
.readout-act { color: var(--accent); }
.readout-hint { margin-left: auto; transition: opacity 0.8s; }
.cover.has-moved .readout-hint { opacity: 0; }
.cover:not(.is-live) .readout, .cover-stage:not(.is-journey) .readout-act { display: none; }
@media (hover: none), (pointer: coarse) { .readout-hint { display: none; } }

/* ============================================================
   BLOCKS
   ============================================================ */

.block { position: relative; padding: clamp(5rem, 12vh, 9rem) var(--pad-x); }
.block-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.block-intro { margin-top: 1.4rem; color: rgba(240, 236, 227, 0.72); max-width: 38rem; }

.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.rv.is-inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   THE WORLD · one fixed canvas behind the page (js/home-world.js)
   ============================================================ */

.world { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
.world canvas { width: 100%; height: 100%; display: block; }
main > section, .footer { position: relative; z-index: 1; }
.cover-stage { z-index: 2; }

/* ---------------- 01 + 02 · the gallery ---------------- */

.jobs {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1rem, 2vw, 2rem); row-gap: clamp(4rem, 16vh, 10rem);
    margin-top: clamp(3rem, 10vh, 7rem);
}
.job { display: flex; flex-direction: column; }
.job:nth-child(4n + 1) { grid-column: 1 / span 7; }
.job:nth-child(4n + 2) { grid-column: 9 / span 4; margin-top: clamp(8rem, 42vh, 24rem); }
.job:nth-child(4n + 3) { grid-column: 2 / span 4; }
.job:nth-child(4n + 4) { grid-column: 7 / span 6; margin-top: clamp(6rem, 30vh, 18rem); }

.job-plate {
    position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
    background: var(--chamber); text-decoration: none; color: #fff;
}
.job:nth-child(4n + 2) .job-plate, .job:nth-child(4n + 3) .job-plate { aspect-ratio: 4 / 4.6; }
.job-plate img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.25) saturate(0.9); transition: filter 0.5s, transform 1.2s var(--ease-out); }
.job-plate:hover img { filter: none; transform: scale(1.03); }
.job-plate--type { display: flex; flex-direction: column; justify-content: flex-end; padding: 1.4rem; background: var(--plate); }
.job-plate--type b { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; }
.job-plate--type i { font-family: var(--font-mono); font-style: normal; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; margin-top: 0.6rem; }

/* the canvas draws the plates: the DOM keeps the box, the link and the alt */
.world-on .job-plate:not(.is-dom) { background: none; overflow: visible; }
.world-on .job-plate:not(.is-dom) > * { opacity: 0; }

.job-cap {
    display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 0.4rem; row-gap: 0.55rem;
    padding-top: 1.2rem; max-width: 34rem;
}
.job-cap > * { grid-column: 2; }
.job-n { grid-column: 1; grid-row: 1; font-family: var(--font-mono); font-size: 11px; color: var(--accent); padding-top: 0.5rem; }
.job-cap h3 { font-family: var(--font-display); font-weight: 370; font-size: clamp(1.5rem, 2.3vw, 2.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.job-cap p { color: rgba(240, 236, 227, 0.7); font-size: 0.92rem; }
.job-meta {
    display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim);
}
.status { padding: 0.12rem 0.5rem; border-radius: 999px; border: 1px solid var(--hairline-hot); color: var(--paper); }
.status--live { border-color: rgba(229, 163, 63, 0.5); color: var(--accent); }
.status--live::before {
    content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); margin-right: 0.4rem; vertical-align: 1px;
}
.job-go { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-decoration: none; color: var(--paper-dim); transition: color 0.2s; justify-self: start; }
a.job-go:hover { color: var(--accent); }

.work--clients { padding-top: clamp(8rem, 26vh, 16rem); }
.clients-outro {
    margin-top: clamp(4rem, 12vh, 8rem); text-align: right;
    font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.4rem); color: var(--paper-dim);
}
.clients-outro a { color: var(--accent); text-decoration: none; display: inline-block; transition: transform 0.3s var(--ease-out); }
.clients-outro a:hover { transform: translateX(6px); }

/* ---------------- 03 · labs: a grid, or a flight ---------------- */

.tunnel-stage { padding: clamp(5rem, 12vh, 9rem) var(--pad-x); }
.tunnel-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.lab-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); }
.lab {
    position: relative; display: flex; flex-direction: column;
    text-decoration: none; border: 1px solid var(--hairline); border-radius: 12px;
    padding: 1rem 1rem 1.5rem; background: var(--void);
    transition: border-color 0.3s, transform 0.5s var(--ease-out);
}
.lab:hover { border-color: rgba(229, 163, 63, 0.55); transform: translateY(-4px); }
.lab-path { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.04em; margin: 0.2rem 0.3rem 0.9rem; }
.lab-path::before { content: 'mirtilo.co'; color: var(--paper-dim); }
.lab--out .lab-path::before { content: none; }
.lab-img { display: block; aspect-ratio: 16 / 11; border-radius: 8px; overflow: hidden; background: #0A0A0F; }
.lab-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.lab-img--gp { background: radial-gradient(80% 70% at 50% 60%, rgba(229, 163, 63, 0.14), transparent), #08070C; }
.lab-img--gp svg { width: 100%; height: 100%; }
.gp-track { fill: none; stroke: var(--paper); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; opacity: 0.65; }
.gp-car { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.lab-title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; margin: 1.2rem 0.3rem 0.6rem; }
.lab-what { color: rgba(240, 236, 227, 0.7); font-size: 0.93rem; margin: 0 0.3rem; }
.lab-tags { margin: auto 0.3rem 0; padding-top: 1.1rem; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.tunnel-count { display: none; }

/* the flight */
.tunnel-stage.is-live { padding: 0; height: 520vh; }
.tunnel-stage.is-live .tunnel { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.tunnel-stage.is-live .tunnel-head {
    position: absolute; z-index: 2; left: var(--pad-x); top: clamp(4.5rem, 11vh, 6.5rem); margin: 0; max-width: 15rem;
}
.tunnel-stage.is-live .tunnel-head h2 { font-size: clamp(1.4rem, 2.1vw, 2rem); }
.tunnel-stage.is-live .lab-grid { display: block; position: absolute; inset: 0; }
.tunnel-stage.is-live .lab {
    --c: 14px;
    position: absolute; left: 50%; bottom: clamp(1.6rem, 6vh, 3.5rem); translate: -50% 0;
    width: min(560px, calc(100vw - 2 * var(--pad-x)));
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.4rem; row-gap: 0.35rem; align-items: baseline;
    padding: 1.15rem 1.4rem 1.2rem; border: 0; border-radius: 0;
    background: linear-gradient(160deg, rgba(229, 163, 63, 0.10), rgba(14, 10, 6, 0.55));
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
    opacity: 0; transform: translateY(18px); pointer-events: none;
    transition: opacity 0.45s, transform 0.7s var(--ease-out), background 0.3s;
}
.tunnel-stage.is-live .lab::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(160deg, rgba(240, 214, 170, 0.65), rgba(240, 214, 170, 0.1) 55%, rgba(240, 214, 170, 0.4));
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c),
        1px calc(var(--c) + 0.4px), 1px calc(100% - 1px), calc(100% - var(--c) - 0.4px) calc(100% - 1px),
        calc(100% - 1px) calc(100% - var(--c) - 0.4px), calc(100% - 1px) 1px, calc(var(--c) + 0.4px) 1px,
        1px calc(var(--c) + 0.4px), 0 var(--c));
}
.tunnel-stage.is-live .lab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.tunnel-stage.is-live .lab:hover { background: linear-gradient(160deg, rgba(229, 163, 63, 0.22), rgba(14, 10, 6, 0.55)); }
.tunnel-stage.is-live .lab-img { display: none; }
.tunnel-stage.is-live .lab-path { grid-column: 1; grid-row: 1; margin: 0; font-size: 11px; }
.tunnel-stage.is-live .lab-title { grid-column: 2; grid-row: 1; margin: 0; font-size: 1.35rem; }
.tunnel-stage.is-live .lab-title::after { content: '  ↗'; color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem; }
.tunnel-stage.is-live .lab-what { grid-column: 2; margin: 0; font-size: 0.86rem; }
.tunnel-stage.is-live .lab-tags { grid-column: 2; margin: 0; padding-top: 0.35rem; }
.tunnel-stage.is-live .tunnel-count {
    display: block; position: absolute; z-index: 2; right: var(--pad-x); top: clamp(4.5rem, 11vh, 6.5rem);
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--paper-dim);
}
.tunnel-count span { color: var(--accent); }

/* ---------------- 04 process ---------------- */

.process-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.principles { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.8rem; }
.principles li {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--hairline-hot);
}
.loop { max-width: 440px; justify-self: center; width: 100%; }
.loop svg { width: 100%; overflow: visible; }
.loop-ring { fill: none; stroke: var(--hairline-hot); stroke-width: 1.5; stroke-dasharray: 3 6; }
.loop-run {
    fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round;
    stroke-dasharray: 120 822; transform-origin: 200px 200px; transform: rotate(-90deg);
}
@media (prefers-reduced-motion: no-preference) {
    .loop.is-inview .loop-run { animation: loop-run 6s linear infinite; }
}
@keyframes loop-run { to { transform: rotate(270deg); } }
.loop-node circle { fill: var(--void); stroke: var(--paper); stroke-width: 1.5; }
.loop-node text { font-family: var(--font-display); font-style: italic; font-size: 17px; fill: var(--paper); text-anchor: middle; }
.loop-ai { font-family: var(--font-display); font-size: 52px; font-weight: 340; fill: var(--accent); text-anchor: middle; }
.loop-ai-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; fill: var(--paper-dim); text-anchor: middle; }

.steps {
    list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(3rem, 7vh, 5rem);
    border-top: 1px solid var(--hairline); padding-top: 2.2rem;
}
.step-n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.step h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.15rem, 1.4vw, 1.35rem); line-height: 1.2; margin: 0.7rem 0; }
.step p { color: rgba(240, 236, 227, 0.72); font-size: 0.95rem; }
.process-foot { margin-top: 3rem; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--paper-dim); }
.process-foot a { color: var(--accent); text-decoration: none; font-family: var(--font-body); font-style: normal; font-size: 0.95rem; margin-left: 0.6rem; }

.loop-live { display: none; }

/* the loop as a stage: the ring turns with the scroll */
.process.is-live { padding: 0; height: 400vh; }
.process.is-live .process-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.process.is-live .process-layout { display: block; }
.process.is-live .block-head { position: absolute; z-index: 2; left: var(--pad-x); top: clamp(5rem, 13vh, 7.5rem); margin: 0; max-width: min(30rem, 38vw); }
.process.is-live .block-head .rv { opacity: 1; transform: none; }
.process.is-live .loop { position: absolute; right: 0; top: 0; bottom: 0; width: 60%; max-width: none; opacity: 1; transform: none; }
.process.is-live .loop svg { display: none; }
.process.is-live .loop-live { display: block; position: absolute; inset: 0; }
.loop-l, .loop-core { position: absolute; left: 0; top: 0; will-change: transform; }
.loop-l {
    display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
    border: 1px solid rgba(240, 236, 227, 0.55); background: rgba(5, 5, 7, 0.82);
    font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--paper);
    transition: border-color 0.5s, color 0.5s, box-shadow 0.8s, background 0.5s;
}
.loop-l.is-on {
    border-color: var(--accent); color: var(--accent-hot); background: rgba(28, 18, 8, 0.9);
    box-shadow: 0 0 0 6px rgba(229, 163, 63, 0.08), 0 0 60px 6px rgba(229, 163, 63, 0.32);
}
.loop-core { text-align: center; pointer-events: none; }
.loop-core b { display: block; font-family: var(--font-display); font-weight: 330; font-size: clamp(3rem, 5.2vw, 5rem); line-height: 1; color: var(--accent); }
.loop-core i { display: block; margin-top: 0.5rem; font-family: var(--font-mono); font-style: normal; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-dim); white-space: nowrap; }

.process.is-live .steps {
    position: absolute; z-index: 2; left: var(--pad-x); bottom: clamp(3.5rem, 11vh, 6.5rem);
    display: block; width: min(31rem, 38vw); height: 12.5rem; margin: 0; padding: 1.6rem 0 0;
}
.process.is-live .step {
    position: absolute; left: 0; right: 0; top: 1.6rem;
    opacity: 0; transform: translateY(18px); pointer-events: none;
    transition: opacity 0.45s, transform 0.8s var(--ease-out);
}
.process.is-live .step.is-on { opacity: 1; transform: none; pointer-events: auto; transition-delay: 0.12s; }
.process.is-live .step h3 { font-size: clamp(1.45rem, 2.1vw, 2rem); line-height: 1.1; letter-spacing: -0.015em; margin: 0.8rem 0 0.9rem; }
.process.is-live .process-foot { position: absolute; z-index: 2; left: var(--pad-x); right: var(--pad-x); bottom: 1.4rem; margin: 0; font-size: 0.95rem; }
@media (max-height: 760px) { .process.is-live .block-intro, .process.is-live .principles { display: none; } }

/* ---------------- 05 fresh paint ---------------- */

.journal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2.5rem; }
.paint-live { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); white-space: nowrap; }
.paint-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.paint-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--chamber); border: 1px solid var(--hairline); border-radius: 12px;
    padding: 1.75rem; text-decoration: none; overflow: hidden;
    transition: border-color 0.3s;
}
.paint-card:hover { border-color: var(--hairline-hot); }
.paint-card--lead { grid-column: 1 / -1; padding: 2.5rem; }
.paint-card-stamp {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--paper-dim); display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1.1rem;
}
.paint-new-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.paint-card-title { font-family: var(--font-display); font-weight: 440; font-size: 1.35rem; line-height: 1.25; margin-bottom: 0.9rem; }
.paint-card--lead .paint-card-title { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.paint-card-dek { color: var(--paper-dim); font-size: 0.92rem; margin-bottom: 1.3rem; }
.paint-card-foot { margin-top: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.journal-all { margin-top: 1.6rem; }
.journal-all a { color: var(--accent); text-decoration: none; }

/* ---------------- 06 contact ---------------- */

.contact { text-align: center; padding-top: clamp(6rem, 16vh, 12rem); padding-bottom: clamp(6rem, 16vh, 12rem); }
.contact h2 { max-width: 18ch; margin: 0 auto; font-size: clamp(1.9rem, 3.6vw, 3.2rem); }
.contact-sub { max-width: 36rem; margin: 1.6rem auto 2.4rem; color: rgba(240, 236, 227, 0.75); }
.btn-cta { font-size: 0.95rem; padding: 0.95rem 1.7rem; }
.contact-honesty { margin-top: 1.4rem; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.contact-email { margin-top: 0.6rem; }
.contact-email a { color: var(--paper-dim); text-decoration: none; }
.contact-email a:hover { color: var(--accent); }

/* ---------------- footer ---------------- */

.footer { padding: 3.5rem var(--pad-x) 2rem; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--paper-dim); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand strong { display: block; color: var(--paper); font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; margin-bottom: 0.5rem; }
.footer-brand { max-width: 26rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col a { text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--paper); }
.footer-clock { font-family: var(--font-mono); font-size: 12px; }
.footer-legal { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; font-size: 12px; opacity: 0.7; }

/* ---------------- curtain ---------------- */

.curtain {
    position: fixed; inset: 0; z-index: 998; background: var(--chamber);
    transform: translateY(103%); display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.curtain span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-dim); opacity: 0; transition: opacity 0.25s 0.3s; }
.curtain.is-in { transform: none; }
.curtain.is-in span { opacity: 1; }
.curtain.is-out { transform: translateY(-103%); }
@media (prefers-reduced-motion: no-preference) { .curtain { transition: transform 0.5s var(--ease-cut); } }

/* touch screens: glass over a live canvas is the most expensive pixel on a
   phone. Same plates, no blur, a denser tint to keep the text readable. */
@media (hover: none), (pointer: coarse) {
    .hud, .act, .topbar, .tunnel-stage.is-live .lab { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .hud { background: linear-gradient(160deg, rgba(60, 40, 16, 0.72), rgba(14, 10, 6, 0.78)); }
    .act, .tunnel-stage.is-live .lab { background: linear-gradient(160deg, rgba(52, 34, 14, 0.86), rgba(12, 9, 6, 0.9)); }
    .topbar { background: rgba(5, 5, 7, 0.92); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .topbar-links { display: none; }
    .process-layout { grid-template-columns: 1fr; }
    .loop { max-width: 300px; }
    .steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .cover-stage.is-journey { height: 460vh; }
    .hud-nav { top: 1rem; height: 40px; padding: 0 0.3rem 0 0.9rem; }
    .hud-nav a:not(.hud-logo) { line-height: 40px; padding: 0 0.7rem; font-size: 9.5px; }
    .hud-nav a:not(.hud-logo)::before { top: 13px; bottom: 13px; }
    .hud-nav a[href="#process"], .hud-nav a[href="#contact"] { display: none; }
    .hud-talk { top: 1rem; height: 40px; padding: 0 0.85rem; font-size: 9.5px; }
    .lang--cover { top: 4.1rem; right: var(--pad-x); }
    .cover-k { font-size: 9.5px; letter-spacing: 0.15em; }
    .act-k { letter-spacing: 0.16em; }
    .topbar .lang { margin-left: auto; }
    .cover-intro { bottom: 3.2rem; }
    .cover-intro h1 { font-size: 1.5rem; }
    .act, .act--right {
        top: auto; bottom: 3.4rem; translate: none;
        left: var(--pad-x); right: var(--pad-x); width: auto;
        padding: 1.2rem 1.25rem 1.3rem;
    }
    .act h2 { font-size: 1.3rem; }
    .rail { right: 0.5rem; top: 34%; }
    .rail-mark b { display: none; }
    .rail-mark { padding: 0.5rem 0.4rem; }
    .readout { bottom: 1.1rem; }
    .readout > span:nth-child(2) { display: none; }
    .cover-flat { top: 34%; width: 58vw; }
}

@media (max-width: 760px) {
    /* the HUD nav would run into the talk button: the logo stays, the rail and the top bar do the navigating */
    .hud-nav a:not(.hud-logo) { display: none; }
    .hud-nav { padding: 0 0.9rem; }
    .hud-logo { padding-right: 0; }
    .rail-mark { padding: 0.62rem 0.4rem; }
    .jobs { grid-template-columns: 1fr; row-gap: clamp(3.5rem, 10vh, 6rem); }
    .jobs .job { grid-column: 1; margin-top: 0; }
    .jobs .job:nth-child(even) { margin-left: 14%; }
    .jobs .job:nth-child(odd) { margin-right: 6%; }
    .job:nth-child(n) .job-plate { aspect-ratio: 16 / 11; }
    .lab-grid, .paint-grid { grid-template-columns: 1fr; }
    .tunnel-stage.is-live { height: 470vh; }
    .tunnel-stage.is-live .lab { grid-template-columns: 1fr; padding: 1rem 1.15rem 1.1rem; }
    .tunnel-stage.is-live .lab > * { grid-column: 1 !important; grid-row: auto !important; }
    .tunnel-stage.is-live .tunnel-head { top: 4.2rem; max-width: 70%; }
    .tunnel-stage.is-live .tunnel-count { top: 4.4rem; }
    .process.is-live .block-head { top: 4.4rem; max-width: none; right: var(--pad-x); }
    .process.is-live .block-intro, .process.is-live .principles { display: none; }
    .process.is-live .loop { left: 0; width: 100%; top: 14%; bottom: 47%; }
    .loop-l { width: 62px; height: 62px; font-size: 14px; }
    .process.is-live .steps { width: auto; right: var(--pad-x); bottom: 4.6rem; height: 17.5rem; }
    .process.is-live .step h3 { font-size: 1.3rem; margin: 0.6rem 0 0.7rem; }
    .process.is-live .step p { font-size: 0.9rem; }
    .process.is-live .process-foot { font-size: 0.8rem; bottom: 0.9rem; }
    .process.is-live .process-foot a { display: block; margin: 0.2rem 0 0; }
    .journal-head { flex-direction: column; align-items: flex-start; }
    .paint-card--lead { padding: 1.75rem; }
}
