/* =========================================================================
   film.html — the landing opened as a film: prologue, the name, "AT SEA",
   the record in numbers, the Main Engine album, then the site.
   Loaded after style.css. Cinema classes are prefixed f- to stay clear of it.
   Also carries the scroll effects first tried in Kimi's v8 copy.
   ========================================================================= */
:root { --bar: 0vh; }
html.lenis, html.lenis body { height: auto; }
body.locked { overflow: hidden; height: 100vh; }

/* fixed film layers (under main, over the ocean) */
#ocean { transform: scale(var(--push, 1)); transform-origin: 50% 60%; }
.f-shade { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(2,4,8,.75) 100%), linear-gradient(180deg, rgba(2,4,8,.35), transparent 30%, transparent 65%, rgba(2,4,8,.6)); }
.f-leak { position: fixed; inset: -20%; z-index: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(40% 35% at 20% 30%, rgba(255,120,40,.55), transparent 70%), radial-gradient(30% 30% at 85% 70%, rgba(255,70,20,.35), transparent 70%); }
.f-bars i { position: fixed; left: 0; right: 0; height: var(--bar); background: #000; z-index: 44; pointer-events: none; }
.f-bars i:first-child { top: 0; } .f-bars i:last-child { bottom: 0; }
.grain { opacity: .09; }

/* camera HUD */
.f-cam { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; }
.f-cam .c { position: absolute; width: 22px; height: 22px; border-color: rgba(233,238,242,.55); border-style: solid; }
.f-cam .c1 { left: var(--pad); top: calc(var(--bar) + 88px); border-width: 1px 0 0 1px; } .f-cam .c2 { right: var(--pad); top: calc(var(--bar) + 88px); border-width: 1px 1px 0 0; }
.f-cam .c3 { left: var(--pad); bottom: calc(var(--bar) + 22px); border-width: 0 0 1px 1px; } .f-cam .c4 { right: var(--pad); bottom: calc(var(--bar) + 22px); border-width: 0 1px 1px 0; }
.f-cam .tc { position: absolute; right: calc(var(--pad) + 34px); top: calc(var(--bar) + 92px); color: rgba(233,238,242,.8); font-variant-numeric: tabular-nums; }
.f-cam .tc i { display: inline-block; width: 7px; height: 7px; background: var(--accent); margin-right: 8px; animation: f-rec 1.2s steps(2) infinite; }
@keyframes f-rec { 50% { opacity: 0; } }
.f-cam .sc { position: absolute; left: calc(var(--pad) + 34px); top: calc(var(--bar) + 92px); color: rgba(233,238,242,.8); }
.f-cam .sc b { color: var(--accent); font-weight: 500; }
.f-cam .fr { display: none; position: absolute; left: calc(var(--pad) + 34px); bottom: calc(var(--bar) + 26px); color: rgba(233,238,242,.5); }
.f-cam .ar { position: absolute; right: calc(var(--pad) + 34px); bottom: calc(var(--bar) + 26px); color: rgba(233,238,242,.5); }
@media (max-width: 700px) { .f-cam .fr, .f-cam .ar { display: none; } }

/* nav and voyage log sit on the black bars during the film */
.nav, .log { z-index: 47; }

/* prologue */
.f-pro { position: fixed; inset: 0; z-index: 70; background: #000; display: grid; place-items: center; letter-spacing: .18em; }
.f-pro .cr { position: absolute; text-align: center; opacity: 0; padding: 0 20px; }
.f-pro .cr b { display: block; font: 300 clamp(14px, 1.4vw, 18px)/1.5 var(--body); letter-spacing: .32em; text-transform: uppercase; color: rgba(233,238,242,.85); }
.f-pro .cr span { color: var(--accent); }
.f-pro .hz { position: absolute; left: 50%; top: 50%; width: 0; height: 1px; background: var(--accent); translate: -50% 0; box-shadow: 0 0 18px rgba(255,90,31,.9); }
.f-pro .co { position: absolute; bottom: 9vh; left: 50%; translate: -50% 0; color: rgba(233,238,242,.45); font-variant-numeric: tabular-nums; opacity: 0; white-space: nowrap; }
.f-pro .skip { position: absolute; right: var(--pad); bottom: 6vh; color: rgba(233,238,242,.4); background: none; border: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.f-pro .skip:hover { color: var(--accent); }

/* SCENE 01 · the name */
.f-act1 { position: relative; height: 100vh; }
.f-act1 .in { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pad); }
.f-act1 .kick { color: var(--accent); margin-bottom: 22px; opacity: 0; }
.f-act1 h1 { opacity: 0; font: 860 clamp(64px, 13vw, 230px)/.84 var(--display); font-stretch: 112%; letter-spacing: -.035em; text-transform: uppercase; color: #eef2f5; }
.f-act1 h1 .ln { display: block; white-space: nowrap; }
.f-act1 h1 .ch { display: inline-block; will-change: transform, filter, opacity; }
.f-act1 h1 .ln:last-child .ch:first-child { color: var(--accent); }
.f-act1 .row { margin-top: 30px; display: flex; gap: 40px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.f-act1 .lead { max-width: 46ch; font-size: clamp(16px, 1.4vw, 20px); color: rgba(233,238,242,.82); }
.f-act1 .lead .w { display: inline-block; opacity: 0; }
.f-act1 .status { position: absolute; left: var(--pad); bottom: calc(var(--bar) + 78px); margin: 0; color: rgba(233,238,242,.7); opacity: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.f-act1 .status i { width: 7px; height: 7px; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
.f-act1 .cta { display: flex; gap: 14px; flex-wrap: wrap; opacity: 0; }
.f-act1 .hint { position: absolute; left: 50%; bottom: calc(var(--bar) + 26px); translate: -50% 0; color: rgba(233,238,242,.55); display: flex; align-items: center; gap: 12px; opacity: 0; }
.f-act1 .hint i { width: 46px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); animation: f-drop 1.8s ease-in-out infinite; transform-origin: left; }
@keyframes f-drop { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@media (max-width: 900px) { .f-act1 .hint { display: none; } }

/* SCENES 02–03 · through "AT SEA", then the record */
.f-act2 { position: relative; height: 100vh; }
.f-act2 .stage { position: absolute; inset: 0; overflow: hidden; background: #000; }
.f-act2 video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(1.08) brightness(.9); }
.f-act2 #v2 { opacity: 0; transform: scale(1.12); filter: saturate(.6) contrast(1.1) brightness(.55); }
.f-act2 .dim { position: absolute; inset: 0; opacity: 0; background: radial-gradient(70% 60% at 50% 50%, rgba(0,0,0,.15), rgba(0,0,0,.75)); }
.f-act2 svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.f-act2 .cap { position: absolute; left: 50%; bottom: calc(var(--bar) + 13vh); translate: -50% 0; text-align: center; opacity: 0; width: max-content; max-width: 90vw; }
.f-act2 .cap b { display: block; font: 700 clamp(22px, 2.6vw, 40px)/1.1 var(--display); letter-spacing: -.01em; margin-top: 10px; color: #fff; }
.f-act2 .cap .mono { color: var(--accent); }
.f-cr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; opacity: 0; }
.f-cr .n { font: 880 clamp(120px, 24vw, 380px)/.8 var(--display); font-stretch: 115%; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.5px rgba(233,238,242,.9); font-variant-numeric: tabular-nums; position: relative; }
/* the fill carries the same stroke as the outline, so the outline's outer half never shows as a rim */
.f-cr .n .fill { position: absolute; inset: 0; color: #fff; -webkit-text-stroke: 1.5px #fff; clip-path: inset(100% 0 0 0); }
.f-cr .n .wl { position: absolute; inset: 0; color: var(--accent); -webkit-text-stroke: 1.5px var(--accent); clip-path: inset(100% 0 0 0); }
.f-cr .l { margin-top: 26px; font: 700 clamp(22px, 2.6vw, 38px)/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.f-cr .s { margin-top: 12px; color: var(--accent); }

/* SCENE 04 · albums: one full-frame light table per system, scrolled like reels */
.f-albums { position: relative; height: 100vh; }
.f-albums .stage { position: absolute; inset: 0; overflow: hidden; background: #03060a; }
.f-alb { position: absolute; inset: 0; overflow: hidden; background: #03060a; }
.f-alb .table { position: absolute; left: 50%; top: 50%; width: 180vw; translate: -50% -50%; display: grid; gap: 1.2vh; rotate: -7deg; }
.f-alb .row { display: flex; gap: 1.2vh; height: 21vh; will-change: transform; }
.f-alb .row img { height: 100%; width: auto; flex: none; display: block; object-fit: cover; filter: saturate(.9) contrast(1.06) brightness(.95); }
/* albums still in preparation: the system's own drawing, white lines on the dark */
.f-alb .dwg { position: absolute; inset: -8%; }
.f-alb .dwg img { width: 100%; height: 100%; object-fit: cover; filter: invert(1); opacity: .34; }
.f-alb .dwg.is-ga img { object-fit: cover; opacity: .3; }
.f-alb .dwg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(233,238,242,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(233,238,242,.035) 1px, transparent 1px); background-size: 48px 48px; }
.f-alb .veil { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(46% 40% at 50% 56%, rgba(3,6,10,.88) 0, rgba(3,6,10,.6) 50%, rgba(3,6,10,.12) 100%), linear-gradient(180deg, rgba(3,6,10,.7), transparent 30%, transparent 70%, rgba(3,6,10,.8)); }
.f-alb .ttl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--pad); }
.f-alb .ttl .k { color: var(--accent); }
.f-alb .ttl .k em { font-style: normal; color: rgba(233,238,242,.55); }
.f-alb .ttl h2 { margin: 18px 0 20px; font: 880 var(--fs, clamp(64px, 12vw, 220px))/.86 var(--display); font-stretch: 115%; letter-spacing: -.045em; text-transform: uppercase; position: relative; color: transparent; -webkit-text-stroke: 1.5px rgba(233,238,242,.9); max-width: 16ch; }
.f-alb .ttl h2 .fill { position: absolute; inset: 0; color: #fff; -webkit-text-stroke: 0; clip-path: inset(100% 0 0 0); }
.f-alb .ttl p { max-width: 56ch; color: rgba(233,238,242,.88); text-shadow: 0 1px 14px rgba(0,0,0,.9); }
.f-alb .ttl .meta { margin-top: 18px; color: rgba(233,238,242,.55); }
.f-alb .ttl .meta b { color: var(--ink); font-weight: 500; }
.f-alb .ttl .open { margin-top: 30px; appearance: none; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.f-alb .ttl .soon { margin-top: 30px; color: rgba(233,238,242,.5); display: flex; gap: 10px; align-items: center; }
.f-alb .ttl .soon i { width: 7px; height: 7px; border: 1px solid var(--accent); }
.f-alb .chap { position: absolute; left: 0; right: 0; bottom: calc(var(--bar) + 64px); display: flex; justify-content: center; color: rgba(233,238,242,.45); flex-wrap: wrap; padding: 0 var(--pad); }
.f-alb .chap span { padding: 0 14px; border-left: 1px solid rgba(233,238,242,.16); white-space: nowrap; }
.f-alb .chap span:first-child { border-left: 0; }
.f-alb .chap b { color: var(--accent); font-weight: 500; margin-right: 6px; }
/* the album index: a measuring scale across the top of the frame */
.f-arail { position: absolute; z-index: 5; left: 50%; top: calc(var(--bar) + 66px); border-top: 1px solid rgba(233,238,242,.14); border-bottom: 1px solid rgba(233,238,242,.14); background: rgba(3,6,10,.55); backdrop-filter: blur(6px); translate: -50% 0; display: flex; align-items: center; opacity: 0; }
.f-arail button { appearance: none; background: none; border: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: rgba(233,238,242,.42); padding: 6px 10px; display: flex; gap: 8px; align-items: center; white-space: nowrap; transition: color .3s; }
.f-arail button + button::before { content: ""; width: 18px; height: 1px; background: rgba(233,238,242,.2); margin-right: 10px; }
.f-arail button span { max-width: 0; overflow: hidden; transition: max-width .5s cubic-bezier(.2,.7,.2,1); }
.f-arail button:hover { color: var(--ink); }
.f-arail button.on { color: var(--ink); }
.f-arail button.on b { color: var(--accent); }
.f-arail button.on span { max-width: 34ch; }
.f-arail button.is-soon b { opacity: .6; }
@media (max-width: 900px) { .f-alb .chap { display: none; } .f-alb .row { height: 15vh; } .f-arail button span { display: none; } .f-arail { top: calc(var(--bar) + 60px); } }

/* album overlay: the route album runs in its own page */
.f-ov { position: fixed; inset: 0; z-index: 80; background: #05090f; visibility: hidden; clip-path: inset(50% 0 50% 0); }
.f-ov iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #05090f; }
.f-ov .x { position: absolute; z-index: 2; top: 22px; left: 50%; translate: -50% 0; background: rgba(5,9,15,.82); backdrop-filter: blur(10px); border: 1px solid rgba(233,238,242,.2); color: var(--ink); padding: 10px 16px; cursor: pointer; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.f-ov .x:hover { background: var(--ink); color: #05090f; }
html.ov-on, html.ov-on body { overflow: hidden; }

/* =========================================================================
   Scroll effects from Kimi's v8 copy
   ========================================================================= */
/* giant outline words drifting behind sections */
.has-bgword { overflow: clip; }
.has-bgword > :not(.bgword) { position: relative; z-index: 1; }
.bgword { position: absolute; top: 6%; left: 0; z-index: 0; pointer-events: none; user-select: none;
  font: 800 clamp(120px, 17vw, 300px)/.9 var(--display); font-stretch: 112%; letter-spacing: -.04em; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 13%, transparent); }
.bgword em { font-style: normal; -webkit-text-stroke-color: color-mix(in srgb, var(--accent) 32%, transparent); }
@media (max-width: 900px) { .bgword { font-size: 26vw; top: 3%; } }

/* scramble caret on eyebrows */
.eyebrow .scr { color: var(--accent); }

/* =========================================================================
   LEVEL 1 · under the drawing: the way into the vessel's albums.
   Giant letters cut out of the page; the contact prints drift behind them.
   ========================================================================= */
.f-cta { position: relative; display: block; margin-top: clamp(40px, 6vw, 90px); isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.f-cta__photos { position: absolute; inset: -10% -20%; display: grid; align-content: center; gap: 10px; rotate: -4deg; }
.f-cta__photos .row { display: flex; gap: 10px; height: clamp(90px, 11vw, 190px); will-change: transform; }
.f-cta__photos img { height: 100%; width: auto; flex: none; display: block; filter: saturate(1.05) contrast(1.15) brightness(1.15); transition: filter .6s; }
.f-cta:hover .f-cta__photos img { filter: saturate(1.15) contrast(1.15) brightness(1.4); }
/* the knockout: page colour everywhere except the letters, which let the photos through */
.f-cta__knock { position: relative; background: var(--bg); color: #fff; mix-blend-mode: multiply; padding: clamp(24px, 3vw, 48px) 0 clamp(18px, 2.4vw, 40px);
  font: 880 clamp(56px, 10.4vw, 210px)/.84 var(--display); font-stretch: 112%; letter-spacing: -.04em; text-transform: uppercase; }
.f-cta__knock .ln { display: flex; align-items: center; gap: .12em; white-space: nowrap; }
.f-cta__knock .arr { height: .62em; width: auto; flex: none; fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: square; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.f-cta:hover .f-cta__knock .arr { transform: translateX(.18em); }
html[data-theme="day"] .f-cta__knock { color: #000; mix-blend-mode: screen; }
html[data-theme="day"] .f-cta__knock .arr { stroke: #000; }
.f-cta__meta { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 16px; color: var(--muted); }
.f-cta__meta b { color: var(--accent); font-weight: 500; }
.f-cta:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }

/* the voyage log sits on its own plate, so it never runs over the text below it */
.log { mix-blend-mode: normal; background: rgba(5,9,15,.86); border: 1px solid var(--line); padding: 7px 12px; backdrop-filter: blur(6px); }
html[data-theme="day"] .log { background: rgba(255,255,255,.86); }

/* the two actions on the first frame: one size, one face, laid out like a title block on a drawing */
.f-links { display: grid; min-width: min(420px, 100%); border-top: 1px solid rgba(233,238,242,.28); }
.f-link { display: grid; grid-template-columns: 34px 1fr auto 28px; align-items: center; gap: 14px; padding: 16px 2px; color: #fff; border-bottom: 1px solid rgba(233,238,242,.28); transition: background .4s, padding .4s cubic-bezier(.2,.7,.2,1); }
.f-link b { color: var(--accent); font-weight: 500; }
.f-link .label { display: inline-flex; overflow: hidden; padding-bottom: .06em; font: 600 clamp(18px, 1.5vw, 22px)/1.1 var(--display); letter-spacing: -.01em; }
.f-link .label span { position: relative; display: inline-block; white-space: pre; transition: transform .55s cubic-bezier(.7,0,.2,1); transition-delay: calc(var(--i) * 18ms); }
.f-link .label span::after { content: attr(data-c); position: absolute; left: 0; top: 100%; }
.f-link:hover .label span, .f-link:focus-visible .label span { transform: translateY(-100%); }
.f-link em { font-style: normal; color: rgba(233,238,242,.5); }
.f-link .ic { width: 22px; height: 18px; justify-self: end; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: square; overflow: visible; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.f-link:hover { background: linear-gradient(90deg, rgba(255,90,31,.08), transparent 70%); padding-left: 10px; }
.f-link:hover .ic { transform: translateX(4px); }
.f-link:first-child:hover .ic { transform: translateY(3px); }
@media (max-width: 700px) { .f-link em { display: none; } .f-link { grid-template-columns: 30px 1fr 24px; } }
.f-act1 .cta.f-links { display: grid; gap: 0; }
/* Class & Flag: the whole drawing turns accent when the superstructure is pointed at */
.ga-sheet svg.all-on .ga-lines { color: var(--accent); transition: color .3s; }
.ga-sheet svg .ga-lines { transition: color .3s; }

/* In numbers: one sheet, two columns, at sea and ashore */
.f-nums__lead { font: 700 clamp(26px, 3vw, 46px)/1.1 var(--display); letter-spacing: -.02em; max-width: 26ch; margin-bottom: clamp(28px, 4vw, 56px); }
.f-nums__lead em { font-style: normal; color: var(--muted); }
.f-nums { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 48px); }
.f-nums__h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; color: var(--muted); }
.f-nums__h b { color: var(--accent); font-weight: 500; }
.f-nums__grid { grid-template-columns: repeat(2, 1fr) !important; }
.f-nums__grid .num { min-height: clamp(128px, 11vw, 176px); padding: clamp(16px, 1.8vw, 26px); gap: 14px; }
.f-nums__grid .num b { font-size: clamp(34px, 3.4vw, 60px); }
.f-nums__grid .num span { font-size: 13px; max-width: 30ch; }
@media (max-width: 1000px) { .f-nums { grid-template-columns: 1fr; } }

/* =========================================================================
   SCENE 01 · the Arctic portrait in lines (js/hero-lines.js)
   ========================================================================= */
.f-hero-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
html.act2-on .f-hero-gl { visibility: hidden; }
/* scene 02 starts where the portrait scene stops pinning, on the identical frame; until then it stays out of sight */
.f-act2 { margin-top: -100vh; }
.f-act2 .stage { visibility: hidden; }
html.act2-on .f-act2 .stage { visibility: visible; }
/* type over the ice is navy; once the frame turns into lines it turns white */
.f-act1 { --hero-ink: #0d1b2a; }
html.hero-dark .f-act1 { --hero-ink: #e9eef2; }
.f-act1 h1 { color: var(--hero-ink); transition: color .6s; font-size: clamp(48px, 6.8vw, 140px); }
.f-act1 .lead, .f-act1 .status, .f-act1 .hint { color: var(--hero-ink); transition: color .6s; }
.f-act1 .row { flex-direction: column; align-items: flex-start; gap: 24px; }
.f-act1 .f-links { border-top-color: color-mix(in srgb, var(--hero-ink) 28%, transparent); }
.f-act1 .f-link { color: var(--hero-ink); border-bottom-color: color-mix(in srgb, var(--hero-ink) 28%, transparent); }
.f-act1 .f-link em { color: color-mix(in srgb, var(--hero-ink) 55%, transparent); }
html:not(.hero-dark):not(.act2-on) .nav:not(.is-solid) { color: #0d1b2a; --nav-ink: #0d1b2a; }
html:not(.hero-dark):not(.act2-on) .f-cam .sc, html:not(.hero-dark):not(.act2-on) .f-cam .tc, html:not(.hero-dark):not(.act2-on) .f-cam .ar { color: rgba(13,27,42,.7); }
html:not(.hero-dark):not(.act2-on) .f-cam .c { border-color: rgba(13,27,42,.5); }
.f-act1 h1 .ln:first-child .ch:first-child { color: var(--accent); }   /* S and Z both orange */
.f-act1 .status, .f-act1 .hint { translate: 0 var(--undo, 0px); }
.f-act1 .hint { translate: -50% var(--undo, 0px); }

/* palette switcher for the engraving (film.html?pal=…), only while choosing */
.pal-sw { position: fixed; z-index: 90; right: var(--pad); bottom: 64px; display: flex; border: 1px solid rgba(255,255,255,.22); background: rgba(5,9,15,.86); backdrop-filter: blur(10px); color: #c8d2dc; }
.pal-sw span { padding: 9px 12px; color: #8494a3; border-right: 1px solid rgba(255,255,255,.14); }
.pal-sw button { appearance: none; background: none; border: 0; border-right: 1px solid rgba(255,255,255,.14); color: #8494a3; padding: 9px 13px; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.pal-sw button:last-child { border-right: 0; } .pal-sw button.on { background: #e9eef2; color: #05090f; } .pal-sw button:hover:not(.on) { color: #fff; }

/* =========================================================================
   Round of fixes
   ========================================================================= */
/* the WebGL night sea is retired: the film closes on the portrait in lines, so nothing old can flash on load */
#ocean { display: none !important; }
html.hero-back .f-hero-gl { visibility: visible; }
.contact::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(90deg, rgba(4,7,11,.92) 0%, rgba(4,7,11,.75) 38%, rgba(4,7,11,.15) 70%, transparent), linear-gradient(180deg, var(--bg) 0, transparent 18%); }
.contact > * { position: relative; z-index: 1; }
.contact { background: transparent; }

/* first frame: the relocation line lives in the contact section, not here */
.f-act1 .status { display: none; }
/* scene 02: no caption before the numbers */
#cap2 { display: none; }
/* no empty field between the albums call and the service record */
#vessel { padding-bottom: clamp(36px, 4vw, 56px); }
#record { padding-top: clamp(56px, 6vw, 96px); }

/* name colour options over the ice (film.html?type to compare) */
html[data-ink="black"] .f-act1 { --hero-ink: #0a0d11; }
html[data-ink="white"] .f-act1 { --hero-ink: #ffffff; }
html[data-ink="white"]:not(.hero-dark) .f-act1 h1 { text-shadow: 0 2px 24px rgba(10,20,30,.35), 0 1px 2px rgba(10,20,30,.4); }
html[data-ink="outline"]:not(.hero-dark) .f-act1 h1 .ch { color: transparent; -webkit-text-stroke: 2px #0a0d11; }
html[data-ink="outline"]:not(.hero-dark) .f-act1 h1 .ln .ch:first-child { color: var(--accent); -webkit-text-stroke: 0; }
html.hero-dark .f-act1 { --hero-ink: #e9eef2; }
/* text under the name: options */
html[data-lead="mono"] .f-act1 .lead { font: 500 13px/1.75 var(--mono); letter-spacing: .08em; text-transform: uppercase; max-width: 58ch; }
html[data-lead="display"] .f-act1 .lead { font: 600 clamp(19px, 1.7vw, 26px)/1.25 var(--display); letter-spacing: -.01em; max-width: 34ch; }

/* service record: 2015 (steam) gets its own colour, it was nearly white */
.rec__row[style*="#c3ced8"] { --med: #b48cff !important; }

/* DIGITAL: the tools as the pipeline they run in; a pulse travels the line and lights each stage */
.pipe { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pipe::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 45%, #fff 50%, var(--accent) 55%, transparent) no-repeat; background-size: 22% 100%; animation: pipePulse 5.2s linear infinite; }
@keyframes pipePulse { from { background-position: -30% 0; } to { background-position: 130% 0; } }
.pipe__st { position: relative; padding: 26px 24px 30px; border-right: 1px solid var(--line); animation: pipeLit 5.2s linear infinite; animation-delay: calc(var(--i) * 1.3s - .4s); }
.pipe__st:last-child { border-right: 0; }
.pipe__st:not(:last-child)::after { content: ""; position: absolute; top: 33px; right: -13px; width: 26px; height: 2px; z-index: 2;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 11px); background-size: 11px 2px; animation: pipeFlow .55s linear infinite; }
@keyframes pipeFlow { to { background-position: 11px 0; } }
@keyframes pipeLit { 0%, 30%, 100% { background: transparent; } 8%, 18% { background: linear-gradient(180deg, rgba(255,90,31,.10), transparent 70%); } }
.pipe__n { color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.pipe__n i { font-style: normal; color: var(--accent); }
.pipe__st b { display: block; margin: 14px 0 20px; font: 600 clamp(17px, 1.35vw, 21px)/1.25 var(--display); letter-spacing: -.01em; color: var(--ink); max-width: 22ch; }
.pipe .chips { gap: 8px; }
.pipe .chips li { padding: 9px 11px 9px 10px; font-size: 11px; }
@media (max-width: 900px) { .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe__st:nth-child(2) { border-right: 0; } .pipe__st:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .pipe__st:not(:last-child)::after { display: none; } }

/* =========================================================================
   Ground palette: graphite black with warm greys and the orange, instead of navy
   (film.html?bg to compare; html[data-bg="navy"] brings the old one back)
   ========================================================================= */
html:not([data-theme="day"]):not([data-bg="navy"]):not([data-bg="carbon"]) {
  --bg: #0b0b0c; --bg-2: #111113; --ink: #f2efe9; --muted: #8a8781;
  --line: rgba(242, 239, 233, .12); --ink-soft: rgba(242, 239, 233, .8);
  --card-bg: #0e0e10; --hatch: rgba(242, 239, 233, .03); --nav-bg: rgba(11, 11, 12, .72); --nav-ink: #f2efe9;
  --veil: 11, 11, 12;
}
html[data-bg="carbon"]:not([data-theme="day"]) {
  --bg: #000; --bg-2: #0a0a0a; --ink: #ededed; --muted: #8c8c8c;
  --line: rgba(255, 255, 255, .11); --ink-soft: rgba(237, 237, 237, .8);
  --card-bg: #060606; --hatch: rgba(255, 255, 255, .03); --nav-bg: rgba(0, 0, 0, .72); --nav-ink: #ededed;
  --veil: 0, 0, 0;
}
html[data-bg="navy"] { --veil: 4, 7, 11; }
body { background: var(--bg); }
.contact::before { background: linear-gradient(90deg, rgba(var(--veil, 4,7,11), .92) 0%, rgba(var(--veil, 4,7,11), .75) 38%, rgba(var(--veil, 4,7,11), .15) 70%, transparent), linear-gradient(180deg, var(--bg) 0, transparent 18%); }

/* =========================================================================
   PROJECTS as glass: the cards are frosted panes sliding over slow glows and a big word;
   the liquid (oil-film) picture inside each card is untouched
   ========================================================================= */
.projects { background: var(--bg); isolation: isolate; }
.pj-amb { position: absolute; inset: 0; width: 160vw; pointer-events: none; z-index: 0; }
.pj-amb i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.pj-amb .g1 { width: 46vw; height: 46vw; left: 18vw; top: 8%; background: radial-gradient(circle, rgba(255,90,31,.55), transparent 65%); animation: pjFloat 18s ease-in-out infinite alternate; }
.pj-amb .g2 { width: 38vw; height: 38vw; left: 70vw; top: 38%; background: radial-gradient(circle, rgba(160,155,148,.32), transparent 65%); animation: pjFloat 23s ease-in-out infinite alternate-reverse; }
.pj-amb .g3 { width: 30vw; height: 30vw; left: 112vw; top: 4%; background: radial-gradient(circle, rgba(255,120,40,.4), transparent 65%); animation: pjFloat 20s ease-in-out infinite alternate; }
@keyframes pjFloat { to { transform: translate(6vw, 8vh) scale(1.12); } }
.pj-amb b { position: absolute; left: 4vw; bottom: 4vh; white-space: nowrap; font: 900 clamp(160px, 22vw, 380px)/.8 var(--display); font-stretch: 125%; letter-spacing: -.04em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(242, 239, 233, .14); }
.projects__track { position: relative; z-index: 1; }
.card { position: relative; padding: 14px 14px 26px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.018) 55%);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,.11); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 30px 60px -30px rgba(0,0,0,.7);
  transition: border-color .35s, transform .5s cubic-bezier(.2,.7,.2,1); }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(420px 220px at 85% 0%, rgba(255,90,31,.16), transparent 70%); }
.card > * { position: relative; z-index: 1; }
.card .card__meta, .card h3, .card p { padding: 0 8px; }
.card__img { border-color: rgba(255,255,255,.08); }
.card:hover { border-color: rgba(255,90,31,.55); transform: translateY(-6px); }
.card:hover .card__img { border-color: rgba(255,255,255,.08); }
html[data-theme="day"] .card { background: linear-gradient(160deg, rgba(255,255,255,.6), rgba(255,255,255,.25)); border-color: rgba(11,22,34,.12); }
html[data-theme="day"] .pj-amb b { -webkit-text-stroke-color: rgba(11,22,34,.12); }
@media (max-width: 900px) { .pj-amb { width: 100%; } .pj-amb b { font-size: 26vw; } }

/* =========================================================================
   DIGITAL as a wired network: tools are nodes, the wires carry data packets
   ========================================================================= */
.net { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(56px, 7vw, 130px);
  margin-top: clamp(40px, 5vw, 72px); padding: 30px 0 70px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.net__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.net__w { fill: none; stroke: rgba(242, 239, 233, .14); stroke-width: 1; transition: stroke .5s, opacity .3s; }
.net__w.lit { stroke: rgba(255, 90, 31, .45); }
.net__loop { stroke-dasharray: 3 6; }
.net.focus .net__w { opacity: .18; }
.net.focus .net__w.on { opacity: 1; stroke: var(--accent); }
.net__trail { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(255, 90, 31, .95)); }
.net__head { fill: #fff; filter: drop-shadow(0 0 6px #ff5a1f) drop-shadow(0 0 2px #ff5a1f); }
.net__col { position: relative; z-index: 1; min-width: 0; }
.net__col > b { display: block; margin: 14px 0 22px; min-height: 3.9em; font: 600 clamp(16px, 1.25vw, 20px)/1.25 var(--display); letter-spacing: -.01em; color: var(--ink); max-width: 22ch; }
.net__nodes { list-style: none; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.net__nodes li { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 10px 13px 10px 11px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); cursor: default; transition: border-color .4s, box-shadow .5s, color .3s; }
.net__nodes li::before { content: ""; width: 5px; height: 5px; background: var(--accent); transition: background .3s, box-shadow .3s; }
.net__nodes li.hit { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(255, 90, 31, .6), 0 0 26px rgba(255, 90, 31, .35); transition: none; }
.net__nodes li.hit::before { background: #fff; box-shadow: 0 0 8px #ff5a1f; }
.net__nodes li:hover { border-color: var(--accent); }
.net__lbl { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  background: var(--bg-2); padding: 0 12px; z-index: 1; white-space: nowrap; }
@media (max-width: 900px) { .net { grid-template-columns: 1fr 1fr; row-gap: 36px; padding-bottom: 30px; } .net__nodes { flex-direction: row; flex-wrap: wrap; } .net__lbl, .net__wires { display: none; } }

/* =========================================================================
   First frame: the name in graphite instead of navy; the lead set a touch heavier
   ========================================================================= */
.f-act1 { --hero-ink: #16181b; }
html.hero-dark .f-act1 { --hero-ink: #f2efe9; }
.f-act1 .lead { font: 500 clamp(17px, 1.45vw, 21px)/1.5 var(--display); letter-spacing: -.005em; max-width: 44ch; }
.f-act1 .lead .w { font-weight: 500; }

/* =========================================================================
   Let's talk: the whole section fits one screen, title included
   ========================================================================= */
.contact { min-height: 100svh; height: 100svh; padding-top: clamp(72px, 9svh, 110px); padding-bottom: 22px; }
.contact__title { font-size: min(15vw, 17.5svh, 260px); }
.contact .qr__code { width: min(12vw, 15svh, 164px); }
.contact__sub { margin-top: clamp(10px, 1.8svh, 20px); }
.contact__grid { margin-top: clamp(16px, 3svh, 48px); min-height: 0; }
.contact__links a:not(.btn) { padding: clamp(8px, 1.25svh, 16px) 0; }
.contact__links .fbtn { margin-top: clamp(14px, 2.6svh, 32px); }
.contact .foot { margin-top: clamp(14px, 2.4svh, 28px); }
@media (max-width: 900px) { .contact { height: auto; } }

/* =========================================================================
   DIGITAL as a neural net (canvas): neurons, breathing synapses, sparks
   ========================================================================= */
.neu { position: relative; margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.neu__heads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; padding-top: 30px; position: relative; z-index: 1; }
.neu__heads b { display: block; margin-top: 14px; font: 600 clamp(16px, 1.25vw, 20px)/1.25 var(--display); letter-spacing: -.01em; color: var(--ink); max-width: 22ch; }
.neu__cv { display: block; width: 100%; height: clamp(420px, 34vw, 580px); }
.neu__lists { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.neu__cap { position: absolute; left: 0; bottom: 14px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 700px) { .neu__heads { grid-template-columns: 1fr 1fr; row-gap: 24px; } .neu__cv { height: 620px; } }

/* DIGITAL · dense network: headers placed over their layers by film.js */
.neu__heads { display: block; position: relative; padding-top: 0; }
.neu__heads > div { padding-top: 30px; }
.neu__heads b { max-width: 24ch; }
.neu__tools { margin-top: 12px; font-size: 10.5px; line-height: 1.7; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); max-width: 34ch; }
.neu__cv { height: clamp(520px, 40vw, 700px); }
@media (max-width: 700px) { .neu__heads { display: grid; } .neu__cv { height: 520px; } }

/* DIGITAL · the layer blocks behind the living network */
.neu { --n0: 13, 255, 235; --n1: 51, 140, 255; --n2: 158, 77, 255; --n3: 255, 51, 199; }
.neu__cv { position: relative; z-index: 1; }
.neu__panels { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 0; }
.neu__pn { position: absolute; top: 6px; bottom: 6px; border: 1px solid rgba(var(--rgb), .28); background: linear-gradient(180deg, rgba(var(--rgb), .07), rgba(var(--rgb), .015) 40%, rgba(var(--rgb), .04));
  box-shadow: inset 0 0 40px rgba(var(--rgb), .05), 0 0 24px -8px rgba(var(--rgb), .25); display: flex; flex-direction: column; gap: 3px; padding: 10px 12px;
  font: 500 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(var(--rgb), .75); animation: pnGlow 6s ease-in-out infinite; animation-delay: calc(var(--c) * -1.5s); }
.neu__pn span:first-child { color: rgb(var(--rgb)); }
.neu__pn[style*="--c:0"] { --rgb: var(--n0); } .neu__pn[style*="--c:1"] { --rgb: var(--n1); } .neu__pn[style*="--c:2"] { --rgb: var(--n2); } .neu__pn[style*="--c:3"] { --rgb: var(--n3); }
@keyframes pnGlow { 50% { border-color: rgba(var(--rgb), .5); box-shadow: inset 0 0 50px rgba(var(--rgb), .09), 0 0 34px -6px rgba(var(--rgb), .45); } }
.neu .pipe__n i, .neu__tools { color: #3dfcec; }
.neu__heads > div:nth-child(2) .pipe__n i, .neu__heads > div:nth-child(2) .neu__tools { color: #5aa0ff; }
.neu__heads > div:nth-child(3) .pipe__n i, .neu__heads > div:nth-child(3) .neu__tools { color: #b07cff; }
.neu__heads > div:nth-child(4) .pipe__n i, .neu__heads > div:nth-child(4) .neu__tools { color: #ff4fd0; }
@media (max-width: 700px) { .neu__panels { display: none; } }

/* =========================================================================
   AGENTIC BUILD (js/agents.js): cursors, selection boxes, typing, HUD
   ========================================================================= */
.ag-hidden { opacity: 0 !important; }
.ag-w { opacity: 0; }
.ag-w.on { opacity: 1; }
.ag-built { transition: opacity .4s; }
.neu__cv, .neu__panels { transition: opacity .7s; }
.ag-over { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.ag-cur { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.ag-cur svg { display: block; }
.ag-cur span { position: absolute; left: 14px; top: 18px; padding: 2px 6px; font-size: 9px; letter-spacing: .06em; color: #08090b; white-space: nowrap; font-weight: 500; }
.ag-box { position: absolute; border: 1px solid #3d8bff; box-shadow: 0 0 0 1px rgba(61,139,255,.15), 0 0 18px rgba(61,139,255,.18); }
.ag-box > i { position: absolute; width: 7px; height: 7px; background: #0b0b0c; border: 1px solid #3d8bff; }
.ag-box > i:nth-child(1) { left: -4px; top: -4px; } .ag-box > i:nth-child(2) { right: -4px; top: -4px; }
.ag-box > i:nth-child(3) { left: -4px; bottom: -4px; } .ag-box > i:nth-child(4) { right: -4px; bottom: -4px; }
.ag-box em { position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%); background: #3d8bff; color: #fff; font-style: normal; font-size: 9px; padding: 2px 6px; white-space: nowrap; letter-spacing: .04em; }
.ag-box--type { background: rgba(61,139,255,.05); }
.ag-box--fill { background: repeating-linear-gradient(135deg, rgba(61,139,255,.08) 0 8px, transparent 8px 16px); }
.ag-box--fill.on { background: rgba(120,130,150,.18); transition: background .4s; }
.ag-caret { display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: #3d8bff; animation: agBlink .7s steps(2) infinite; }
@keyframes agBlink { 50% { opacity: 0; } }
.ag-hud { position: absolute; left: 50%; bottom: clamp(22px, 3vw, 40px); transform: translateX(-50%); z-index: 21; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(14,14,16,.82); backdrop-filter: blur(10px); color: var(--muted); font-size: 10.5px; letter-spacing: .08em; cursor: pointer; }
.ag-hud b { color: var(--ink); font-weight: 500; }
.ag-dots { display: flex; } .ag-dots i { width: 9px; height: 9px; border-radius: 50%; margin-left: -3px; border: 1px solid #0e0e10; } .ag-dots i:first-child { margin-left: 0; }
.ag-sep { width: 1px; height: 14px; background: rgba(255,255,255,.16); }
.ag-bar { width: 90px; height: 3px; background: rgba(255,255,255,.12); } .ag-bar i { display: block; height: 100%; width: 0; background: #3d8bff; transition: width .3s; }
.ag-st { padding: 3px 8px; background: rgba(61,139,255,.16); color: #8ab8ff; text-transform: uppercase; }
.ag-hud:hover { border-color: #3d8bff; }
.digital { padding-bottom: clamp(110px, 12vw, 180px); }
.section > .ag-over, .has-bgword > .ag-over { position: absolute; inset: 0; z-index: 20; }
.section > .ag-hud, .has-bgword > .ag-hud { position: absolute; z-index: 21; }

/* layers: no boxes; a hairline down through the neurons and a small label on top */
.neu__pn { border: 0 !important; background: none !important; box-shadow: none !important; animation: none !important; padding: 0 0 0 30px; }
.neu__pn::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(var(--rgb), .9), rgba(var(--rgb), .35) 12%, rgba(var(--rgb), .12) 50%, rgba(var(--rgb), .35) 88%, transparent); box-shadow: 0 0 10px rgba(var(--rgb), .5); }
.neu__pn span { text-shadow: 0 0 12px rgba(var(--rgb), .5); }

/* Digital: the build's replay button (replaces the status panel) */
.ag-hud { display: none !important; }
.section > .ag-again, .has-bgword > .ag-again { position: absolute; z-index: 21; }
.ag-again { right: var(--pad); bottom: clamp(26px, 3vw, 44px); display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px 9px 11px;
  background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  transition: color .25s, border-color .25s; }
.ag-again svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ag-again:hover { color: var(--ink); border-color: var(--accent); }
.ag-again:hover svg { transform: rotate(180deg); }
.ag-again.is-busy { pointer-events: none; opacity: .45; }
.ag-again.is-busy svg { animation: agSpin 1s linear infinite; }
@keyframes agSpin { to { transform: rotate(360deg); } }

/* project viewer: frame-to-frame wipe (js/frame-viewer.js) */
.pm__slide.fv { position: relative; overflow: hidden; display: block; }
.fv__f { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; overflow: hidden; will-change: clip-path; }
.fv__f img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; will-change: transform, filter; }
.fv__ph { display: grid; place-items: center; gap: 10px; color: var(--muted); text-align: center; }
.fv__ph b { font: 800 clamp(80px, 12vw, 200px)/.9 var(--display); color: rgba(242,239,233,.12); }

.fv__f { will-change: transform, opacity; }
.fv__curtain { position: absolute; inset: 0; background: #0b0b0c; z-index: 3; border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }

/* agentic build: letter-by-letter typing */
.ag-word { white-space: nowrap; }
.ag-c { opacity: 0; }
.ag-c.on { opacity: 1; transition: opacity .08s linear; }
.ag-over .ag-caret { position: absolute; display: block; width: 2px; margin: 0; vertical-align: 0; background: #3d8bff; box-shadow: 0 0 8px rgba(61,139,255,.7); animation: agBlink .7s steps(2) infinite; }

/* BLOB cursor trail (js/film.js) */
.blob { position: fixed; left: 0; top: 0; z-index: 59; border-radius: 50%; pointer-events: none; will-change: transform; filter: blur(18px); mix-blend-mode: screen; opacity: 0; transition: opacity .4s; }
body.blob-on .blob { opacity: 1; }
html[data-theme="day"] .blob { mix-blend-mode: multiply; }
@media (hover: none), (pointer: coarse) { .blob { display: none; } }
html:not(.hero-dark):not([data-theme="day"]) .blob { mix-blend-mode: normal; }   /* the first frame is light ice: screen would wash the glow out */

/* =========================================================================
   Phone and tablet fixes
   ========================================================================= */
@media (max-width: 700px) {
  /* first frame: a light veil under the text while the photo is still light, so the lead reads over the face */
  .f-act1::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: linear-gradient(0deg, rgba(236,241,245,.92) 0%, rgba(236,241,245,.8) 34%, rgba(236,241,245,0) 56%); transition: opacity .6s; }
  html.hero-dark .f-act1::before { opacity: 0; }
  .f-act1 .in { position: relative; z-index: 1; }
  /* the line under each number wraps instead of running off the screen */
  .f-cr .s { font-size: 10px; letter-spacing: .1em; padding: 0 18px; line-height: 1.6; white-space: normal; }
  /* THE VESSELS' ALBUMS fits the width */
  .f-cta__knock { font-size: 9.6vw; }
  /* contact: an even dark veil behind the text, over the whole width */
  .contact::before { background: linear-gradient(180deg, var(--bg) 0, rgba(var(--veil, 4,7,11), .84) 14%, rgba(var(--veil, 4,7,11), .84) 100%); }
}
/* nothing may push the page sideways (the name breaking up, a video overhang): clip, not hidden, so the pinned scenes keep working */
html, body { overflow-x: clip; }
@media (max-width: 1024px) { .contact::before { background: linear-gradient(180deg, var(--bg) 0, rgba(var(--veil, 4,7,11), .84) 14%, rgba(var(--veil, 4,7,11), .84) 100%); } }   /* tablet too: the text runs wider than the left shade */

/* phone: the whole ship fits the width (no sideways scroll); "Zoom in" still opens the wide sheet to drag around */
@media (max-width: 760px) {
  .ga-wrap:not(.is-zoom) { overflow-x: hidden; }
  .ga-wrap:not(.is-zoom) .ga-sheet { width: 100%; padding: 10px 6px; }
  .ga-wrap.is-zoom .ga-sheet { width: 340%; }
}
/* phone: the P&I drawing of each record row sits under its text, centred and readable, in the colour of the row */
@media (max-width: 760px) {
  .rec__wm, html[data-theme="day"] .rec__wm { position: relative; z-index: 0; right: auto; top: auto; translate: none; display: block; grid-column: 1 / -1;
    width: 100%; height: 170px; margin: 18px 0 4px; background: var(--med); opacity: .55; -webkit-mask-position: center; mask-position: center; }
  .rec__row:hover .rec__wm { opacity: .7; scale: 1; }
}

/* projects on phones and tablets: swipe carousel (js/film.js) */
@media (max-width: 900px) {
  .projects { padding-top: clamp(70px, 14vw, 120px); padding-bottom: clamp(60px, 12vw, 100px); }
  .projects > .projects__intro { padding: 0 var(--pad); margin-bottom: 28px; width: auto; }
  .projects__track.pj-rail { display: flex; gap: 14px; width: auto; padding: 6px var(--pad) 18px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
  .projects__track.pj-rail::-webkit-scrollbar { display: none; }
  .pj-rail .card { flex: 0 0 min(82vw, 420px); scroll-snap-align: center; transform-origin: 50% 60%; transition: transform .25s ease-out, opacity .25s; }
  .pj-rail .card:hover { transform: none; }
  .pj-foot { display: flex; align-items: center; gap: 10px; padding: 6px var(--pad) 0; color: var(--muted); font-size: 11px; letter-spacing: .14em; }
  .pj-foot b { color: var(--ink); font-weight: 500; }
  .pj-bar { position: relative; flex: 1; height: 1px; background: var(--line); }
  .pj-bar i { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--accent); transition: width .35s cubic-bezier(.2,.7,.2,1); }
  .pj-hint { text-transform: uppercase; transition: opacity .4s; }
  .pj-foot.swiped .pj-hint { opacity: 0; }
}
/* phone: the P&I drawing is the backdrop of its record row — centred behind the text, in the row colour, faint enough to read over */
@media (max-width: 760px) {
  .rec__wm, html[data-theme="day"] .rec__wm { position: absolute; z-index: -1; top: 10px; bottom: 10px; left: 0; right: 0; width: auto; height: auto; margin: 0; translate: none;
    background: var(--med); opacity: .2; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
  .rec__row:hover .rec__wm { opacity: .28; scale: 1; }
}

/* phones: full-screen scenes use the large viewport (address bar hidden), so nothing resizes while the bar slides away */
@supports (height: 100lvh) {
  .f-act1, .f-act2, .f-albums { height: 100lvh; }
  .f-act2 { margin-top: -100lvh; }
  .f-hero-gl { height: 100lvh; bottom: auto; }
}

/* scene 02 → 03: the footage of scene 03 is painted all along (transparent), so phones have its frames ready;
   at the hand-over only the opacity flips — no waking a hidden video, no jolt */
.f-act2 .stage { visibility: visible; opacity: 0; pointer-events: none; }
html.act2-on .f-act2 .stage { opacity: 1; pointer-events: auto; }

/* tablet held upright: the name a size up (it was ~52 px at 768 wide) */
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1100px) { .f-act1 h1 { font-size: clamp(64px, 11vw, 140px); } }
@media (orientation: portrait) and (min-width: 600px) and (max-width: 1100px) { .neu__cv { height: clamp(620px, 82vw, 820px); } }   /* tablet upright: a taller net, not squashed */
@media (min-width: 700px) and (max-width: 1099px) { .neu__heads { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; padding-bottom: 18px; } }   /* tablets: headings 2 x 2 */

/* one pointer only: the system cursor with the orange glow behind it; the crosshair is retired */
.cursor { display: none !important; }
