/* Arkeocean homepage — overlay on the WebGPU ocean (#scene). Tokens, header, menu, footer: site.css. *//* Arkeocean — shared by every page: tokens, base, header, the site menu, footer.
   Palette from the logo: black, white, signal red #f2473b. Type: Archivo (wide, like the wordmark) +
   IBM Plex Mono for labels. */

:root {
	--bg: #000;
	--fg: #f4f3f1;
	--fg-2: rgba( 244, 243, 241, 0.74 );
	--fg-3: rgba( 244, 243, 241, 0.5 );
	--line: rgba( 244, 243, 241, 0.18 );
	--red: #f2473b;
	--glass: rgba( 6, 12, 18, 0.42 );
	--paper: #eceef1;
	--ink: #0b0d10;
	--ink-2: rgba( 11, 13, 16, 0.62 );
	--gutter: clamp( 16px, 4.2vw, 72px );
	--font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--explanation-size: clamp( 20px, 2.1vw, 28px );
	--mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
	--header-h: 72px;
	--notch: 22px;
	color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.cta {
	display: inline-flex; align-items: center; gap: 0.6em; padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px;
	font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--fg); text-decoration: none; transition: border-color 0.2s, background 0.2s;
}
.cta:hover, .cta:focus-visible { border-color: var(--red); background: rgba( 242, 71, 59, 0.12 ); }
.cta-solid { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.cta-solid:hover, .cta-solid:focus-visible { background: var(--red); color: var(--fg); border-color: var(--red); }

/* ---------------------------------------------------------------- header */
.site-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--header-h);
	display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
	pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand img { height: 20px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.header-link { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--fg-2); transition: color 0.2s; }
.header-link:hover, .header-link:focus-visible { color: var(--fg); }
.menu-button {
	display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 16px 0 14px; border: 0; cursor: pointer;
	background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
	clip-path: polygon( 0 0, calc( 100% - 10px ) 0, 100% 10px, 100% 100%, 0 100% );
	transition: background 0.2s, color 0.2s;
}
.menu-button:hover, .menu-button:focus-visible { background: var(--fg); }
.menu-dots { display: grid; grid-template-columns: repeat( 2, 4px ); gap: 2px; }
.menu-dots i { width: 4px; height: 4px; background: currentColor; }
.menu-button:hover .menu-dots i:nth-child( 1 ), .menu-button:hover .menu-dots i:nth-child( 4 ) { background: var(--red); }

/* ---------------------------------------------------------------- menu (inspired by hubtown.co.in) */
.menu-backdrop {
	position: fixed; inset: 0; z-index: 60; background: rgba( 0, 0, 0, 0.55 ); backdrop-filter: blur( 3px ); -webkit-backdrop-filter: blur( 3px );
	opacity: 0; transition: opacity 0.4s ease;
}
.site-menu {
	position: fixed; z-index: 61; top: 12px; right: 12px; width: min( 460px, calc( 100% - 24px ) ); max-height: calc( 100% - 24px ); display: flex;
	transform: translateX( 24px ); opacity: 0;
	transition: transform 0.5s cubic-bezier( 0.2, 0.8, 0.2, 1 ), opacity 0.35s ease;
}
/* the panel, its top-right corner notched; the Close tab sits in the notch */
.menu-panel {
	position: relative; flex: 1; display: flex; flex-direction: column; padding: 30px 32px 22px;
	background: var(--paper); color: var(--ink);
	clip-path: polygon( 0 0, calc( 100% - 128px ) 0, calc( 100% - 128px + var(--notch) ) var(--notch), 100% var(--notch), 100% 100%, 0 100% );
	overflow-y: auto; overscroll-behavior: contain;
}
/* (closed: out of the layout; `display` here would otherwise override the hidden attribute) */
.site-menu[hidden], .menu-backdrop[hidden] { display: none; }
html.menu-open .menu-backdrop { opacity: 1; }
html.menu-open .site-menu { transform: none; opacity: 1; }
.menu-close {
	position: absolute; z-index: 1; top: 0; right: 0; height: calc( var(--notch) - 3px ); width: 104px; border: 0; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding-left: 10px;
	background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
	clip-path: polygon( 16px 0, 100% 0, 100% 100%, 0 100%, 0 calc( 100% - 3px ) );
}
.menu-kicker { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.menu-kicker i { width: 7px; height: 7px; background: var(--red); }
.menu-main { list-style: none; margin: 30px 0 72px; display: grid; gap: 2px; }
.menu-main a {
	display: inline-block; text-decoration: none; text-transform: uppercase; color: var(--ink);
	font-weight: 800; font-stretch: 104%; font-size: clamp( 40px, 4.6vw, 64px ); line-height: 0.96; letter-spacing: -0.02em;
	transition: color 0.2s;
}
/* every link ends on the red full stop of the logo; the current page is greyed */
.menu-main a::after { content: ''; display: inline-block; width: 0.18em; height: 0.18em; margin-left: 0.14em; background: var(--red); vertical-align: 0.1em; }
.menu-main a:hover, .menu-main a:focus-visible { color: var(--red); }
.menu-main a[aria-current='page'] { color: var(--ink-2); }
.menu-foot { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.menu-foot a { color: var(--ink); display: inline-flex; }
.menu-foot a:hover { color: var(--red); }

/* ---------------------------------------------------------------- footer */
.site-footer { position: relative; z-index: 20; background: #000; border-top: 1px solid var(--line); }
.footer-inner { padding: 64px var(--gutter) 56px; display: grid; gap: 20px; justify-items: start; }
.footer-inner img { height: 22px; width: auto; }
.footer-line { color: var(--fg-2); font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-links a { text-decoration: none; color: var(--fg-2); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--fg); }
.fine { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-3); text-transform: uppercase; }

/* ---------------------------------------------------------------- ?embed: a page shown inside the slides */
html.embed .site-header, html.embed .site-footer, html.embed .site-menu, html.embed .menu-backdrop, html.embed .scroll-hint { display: none !important; }
html.embed { scrollbar-width: none; }
html.embed::-webkit-scrollbar { display: none; }

@media ( max-width: 820px ) {
	:root { --header-h: 60px; }
	.brand img { height: 16px; }
	.header-link { display: none; }
	.menu-panel { padding: 26px 22px 18px; }
}

@media ( prefers-reduced-motion: reduce ) {
	.site-menu, .menu-backdrop { transition: none; }
}

/* Keep controls clear of phone cutouts and provide comfortable touch targets. */
:root { --safe-top:env(safe-area-inset-top,0px); }
.site-header { padding-top:var(--safe-top); padding-left:max(var(--gutter),env(safe-area-inset-left,0px)); padding-right:max(var(--gutter),env(safe-area-inset-right,0px)); }
.site-menu { top:calc(12px + var(--safe-top)); right:max(12px,env(safe-area-inset-right,0px)); max-height:calc(100% - 24px - var(--safe-top) - env(safe-area-inset-bottom,0px)); }
.footer-inner { padding-bottom:calc(56px + env(safe-area-inset-bottom,0px)); }
@media(max-width:820px) {
  :root { --header-h:calc(60px + var(--safe-top)); }
  .brand { min-height:44px; display:flex; align-items:center; }
  .menu-button,.menu-close { min-height:44px; }
  .menu-main a { min-height:44px; display:inline-flex; align-items:center; }
  .cta { min-height:44px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .menu-main { margin-bottom:24px; }
  .menu-main a { font-size:36px; }
}
/* Keep every menu item, including M Platform, on a single line. Size the
   lettering from the actual panel width rather than the browser width. */
.menu-main { container-type:inline-size; }
.menu-main a { white-space:nowrap; font-size:min(64px,11cqw); }
@media(max-height:500px) and (orientation:landscape) {
  .menu-main a { font-size:min(36px,11cqw); }
}
/* Match the compact desktop Close tab visually on phones, with an invisible
   44px touch area below it. Keep desktop geometry unchanged. */
@media(max-width:820px) {
  .menu-close { height:44px; min-height:44px; clip-path:none; background:transparent; align-items:flex-start; padding-top:3px; isolation:isolate; }
  .menu-close::before { content:''; position:absolute; top:0; left:0; right:0; height:calc(var(--notch) - 3px); background:var(--ink); clip-path:polygon(16px 0,100% 0,100% 100%,0 100%,0 calc(100% - 3px)); z-index:-1; pointer-events:none; }
}
/* ---------------------------------------------------------------- fixed layers */
#scene { position: fixed; inset: 0; z-index: 0; }
#scene canvas { display: block; width: 100%; height: 100%; }
#fallback-bg { position: fixed; inset: 0; z-index: 0; display: none; background: #02070c center / cover no-repeat; transition: background-image 0.8s; }
#vignette {
	position: fixed; inset: 0; z-index: 1; pointer-events: none;
	background:
		linear-gradient( to bottom, rgba( 0, 0, 0, 0.38 ), transparent 22% ),
		linear-gradient( to top, rgba( 0, 0, 0, 0.42 ), transparent 30% ),
		radial-gradient( 120% 90% at 50% 50%, transparent 55%, rgba( 0, 0, 0, 0.45 ) 100% );
}

/* ---------------------------------------------------------------- loader */
#loader {
	position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 22px;
	background: #000; transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
body:not( .is-loading ) #loader { opacity: 0; visibility: hidden; }
.loader-mark { width: 56px; height: auto; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale( 0.96 ); } 50% { opacity: 1; transform: scale( 1 ); } }
.loader-bar { width: 160px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--fg); transition: width 0.4s ease; }
.loader-text { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }

/* ---------------------------------------------------------------- chapter rail + depth */
#rail { position: fixed; left: var(--gutter); bottom: calc( var(--gutter) * 0.75 ); z-index: 30; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
#rail ol { list-style: none; display: grid; gap: 7px; }
#rail a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; color: var(--fg-3); text-transform: uppercase; transition: color 0.3s; }
#rail .n { width: 18px; color: inherit; }
#rail .l { opacity: 0; transform: translateX( -6px ); transition: opacity 0.3s, transform 0.3s; white-space: nowrap; }
#rail:hover .l, #rail li.is-active .l { opacity: 1; transform: none; }
#rail li.is-active a { color: var(--fg); }
#rail li.is-active .n { color: var(--red); }
#rail a:focus-visible .l { opacity: 1; transform: none; }
.rail-progress { margin-top: 14px; width: 120px; height: 1px; background: var(--line); }
.rail-progress i { display: block; height: 100%; width: 0; background: var(--fg); }

#depth {
	position: fixed; right: var(--gutter); bottom: calc( var(--gutter) * 0.75 ); z-index: 30;
	font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-3); display: flex; gap: 4px; align-items: baseline;
	transition: opacity 0.6s;
}
#depth .depth-v { font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
#depth::before { content: 'Depth'; margin-right: 8px; text-transform: uppercase; }

/* ---------------------------------------------------------------- beats */
main { position: relative; z-index: 10; }
/* sections are scroll spacers (their heights come from the pacing plan, story/plan.js); each one's
   copy sits on a fixed stage and fades in and out (ui/overlay.js), so nothing scrolls away mid-read
   and the 3D never waits for a panel to slide off */
.beat { position: relative; height: 300svh; }
.stage { position: fixed; inset: 0; pointer-events: none; }
.copy {
	position: absolute; pointer-events: none;
	opacity: var(--vis, 0); transform: translate3d( 0, calc( ( 1 - var(--vis, 0) ) * 22px ), 0 );
	will-change: opacity, transform;
}
.copy[data-active='1'] { pointer-events: auto; }
.copy.pos-center { left: 50%; top: 50%; translate: -50% -50%; width: min( 1100px, calc( 100% - 2 * var(--gutter) ) ); text-align: center; }
.copy.pos-left { left: var(--gutter); top: 50%; translate: 0 -50%; width: min( 560px, 46vw ); }
.copy.pos-right { right: var(--gutter); top: 50%; translate: 0 -50%; width: min( 560px, 46vw ); }
.copy.pos-bottom { left: var(--gutter); bottom: calc( var(--gutter) * 0.75 + 150px ); width: min( 1180px, calc( 100% - 2 * var(--gutter) ) ); }
.copy.pos-wide { left: var(--gutter); right: var(--gutter); top: 50%; translate: 0 -50%; }

.kicker {
	display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
	font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2);
}
.kicker span { color: var(--red); }
.kicker span::after { content: ''; display: inline-block; width: 28px; height: 1px; margin-left: 12px; background: var(--fg-3); vertical-align: middle; }
.pos-center .kicker { justify-content: center; }

h1, h2 { font-weight: 520; font-stretch: 108%; letter-spacing: -0.025em; line-height: 0.98; text-wrap: balance; text-shadow: 0 2px 30px rgba( 0, 0, 0, 0.25 ); }
h1 { font-size: clamp( 46px, 8.4vw, 136px ); }
h2 { font-size: clamp( 32px, 4.4vw, 68px ); }
h2.display { font-size: clamp( 40px, 6.6vw, 112px ); }
h3 { font-weight: 600; font-stretch: 112%; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; }
.lead { margin-top: 24px; max-width: 38rem; font-size: var(--explanation-size); line-height: 1.4; color: var(--fg-2); font-weight: 400; }
.pos-center .lead { margin-left: auto; margin-right: auto; }
.lead.quiet { color: var(--fg-2); font-size: var(--explanation-size); margin-top: 32px; }
.lead.scale-statement { max-width: 54rem; font-size: clamp( 22px, 2.4vw, 34px ); line-height: 1.35; font-weight: 450; color: var(--fg); opacity: var(--statement-vis, 0); transform: translateY( calc( ( 1 - var(--statement-vis, 0) ) * 14px ) ); }
.pillar { margin-bottom: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.pillar b { font-weight: 500; color: var(--fg); padding: 6px 10px; border: 1px solid var(--red); border-radius: 3px; }

.hero h1 { margin-top: 4px; }
/* the sea's horizon runs between the headline's two lines (ui/overlay.js places the copy: --hero-top) */
.hero h1 .bl { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.copy.hero.at-horizon { top: var(--hero-top); bottom: auto; translate: -50% 0; }
.scroll-hint { margin-top: 44px; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
.scroll-hint i { display: block; width: 1px; height: 36px; background: linear-gradient( var(--fg), transparent ); transform-origin: top; animation: drip 2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY( 0 ); opacity: 1; } 60% { transform: scaleY( 1 ); opacity: 1; } 100% { transform: scaleY( 1 ); opacity: 0; } }

.triad span { display: inline-block; opacity: var(--w, 1); transform: translateY( calc( ( 1 - var(--w, 1) ) * 18px ) ); }
.display-m { font-size: clamp( 48px, 10vw, 156px ); font-stretch: 118%; font-weight: 640; letter-spacing: -0.04em; line-height: 0.85; }
.dot { color: var(--red); }

.counter { list-style: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.18em 0.32em; font-size: clamp( 54px, 6.6vw, 124px ); font-weight: 540; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; }
.counter li { color: var(--fg-3); transition: color 0.5s, opacity 0.5s; opacity: 0.35; }
.counter li.arrow { font-weight: 300; font-size: 0.55em; opacity: 0.35; }
.counter li.is-on { color: var(--fg); opacity: 1; }
.counter li.is-now { color: var(--fg); }
.counter li.is-now::after { content: ''; display: block; height: 3px; margin-top: 10px; background: var(--red); }

.mode { margin-top: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.mode b { color: var(--fg); font-weight: 500; margin-left: 8px; }
.clock { margin-top: 26px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.clock b { display: inline-block; min-width: 3ch; color: var(--fg); font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* missions */
.missions { margin-top: 40px; display: grid; grid-template-columns: repeat( 3, 1fr ); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--glass); backdrop-filter: blur( 14px ); -webkit-backdrop-filter: blur( 14px ); }
.mission { padding: 28px 28px 26px; display: flex; flex-direction: column; min-height: 250px; }
.mission + .mission { border-left: 1px solid var(--line); }
.mission h3::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 12px; border-radius: 50%; background: var(--red); vertical-align: 2px; }
.mission ul { list-style: none; margin: 22px 0 28px; display: grid; gap: 12px; font-size: 17px; line-height: 1.35; color: var(--fg-2); }
.mission ul li { padding-left: 19px; position: relative; }
.mission ul li::before { content: ''; position: absolute; left: 0; top: 0.68em; width: 9px; height: 1px; background: var(--fg-3); }
.mission .more { margin-top: auto; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--fg); }
.mission .more span { display: inline-block; transition: transform 0.25s; color: var(--red); }
.mission .more:hover span, .mission .more:focus-visible span { transform: translateX( 5px ); }

/* finale */
.finale h2 { display: grid; gap: 28px; }
.finale .sub { font-size: clamp( 22px, 2.6vw, 40px ); font-weight: 420; font-stretch: 104%; letter-spacing: -0.01em; line-height: 1.15; color: var(--fg-2); opacity: var(--w2, 1); transform: translateY( calc( ( 1 - var(--w2, 1) ) * 16px ) ); }

/* links out of the story: a photo card (Meet M) and a text link (Connect) */
.peek {
	display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 16px; margin-top: 30px; padding: 8px 18px 8px 8px; width: min( 100%, 380px );
	border: 1px solid var(--line); border-radius: 4px; background: var(--glass); backdrop-filter: blur( 12px ); -webkit-backdrop-filter: blur( 12px );
	text-decoration: none; transition: border-color 0.25s, background 0.25s;
}
.peek img { width: 112px; height: 72px; object-fit: cover; border-radius: 2px; }
.peek-t { display: grid; gap: 4px; }
.peek-t b { font-size: 17px; font-weight: 600; font-stretch: 108%; }
.peek-t small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.peek-a { color: var(--red); transition: transform 0.25s; }
.peek:hover, .peek:focus-visible { border-color: rgba( 244, 243, 241, 0.45 ); background: rgba( 6, 12, 18, 0.62 ); }
.peek:hover .peek-a, .peek:focus-visible .peek-a { transform: translateX( 4px ); }
.more-link { display: inline-block; margin-top: 24px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--fg); }
.more-link span { display: inline-block; color: var(--red); transition: transform 0.25s; }
.more-link:hover span, .more-link:focus-visible span { transform: translateX( 5px ); }

/* ---------------------------------------------------------------- explore (after the story, over it) */
.explore { position: relative; z-index: 20; background: #000; padding: 96px var(--gutter) 88px; border-top: 1px solid var(--line); }
.explore-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; }
.explore-head h2 { text-align: right; }
.explore-grid { display: grid; grid-template-columns: repeat( 3, 1fr ); gap: 12px; }
.explore-card { position: relative; display: grid; align-content: end; gap: 6px; min-height: min( 62vh, 560px ); padding: 24px; overflow: hidden; border-radius: 4px; text-decoration: none; isolation: isolate; }
/* Share the copy rows so wrapping in one card never shifts its neighbours. */
@media ( min-width: 821px ) {
	.explore-grid { min-height: min( 62vh, 560px ); grid-template-rows: minmax( 0, 1fr ) auto auto auto; }
	.explore-card { grid-row: span 4; grid-template-rows: subgrid; align-content: normal; }
	.explore-card .ec-k { grid-row: 2; align-self: end; }
	.explore-card b { grid-row: 3; }
	.explore-card .ec-d { grid-row: 4; align-self: start; }
}
.explore-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier( 0.2, 0.8, 0.2, 1 ); }
.explore-card img.ec-mission { object-position: 100% 50%; transform: scale( 1.6 ); transform-origin: 88% 56%; }
.explore-card img.ec-platform { height: 90%; object-position: 58% 45%; mask-image: linear-gradient( to bottom, #000 80%, transparent 100% ); }
.explore-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient( to top, rgba( 0, 0, 0, 0.82 ), rgba( 0, 0, 0, 0.1 ) 55% ); }
.explore-card:hover img, .explore-card:focus-visible img { transform: scale( 1.04 ); }
.explore-card:hover img.ec-mission, .explore-card:focus-visible img.ec-mission { transform: scale( 1.64 ); }
@media ( min-width: 821px ) and ( max-width: 1100px ) {
	/* These narrow cards already crop tightly; extra zoom would cut off her head. */
	.explore-card img.ec-mission { object-position: 92% 50%; transform: none; }
	.explore-card:hover img.ec-mission, .explore-card:focus-visible img.ec-mission { transform: scale( 1.04 ); }
}
.ec-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.explore-card b { font-size: clamp( 32px, 3.4vw, 52px ); font-weight: 600; font-stretch: 110%; letter-spacing: -0.025em; line-height: 1; }
.ec-d { color: var(--fg-2); font-size: 16px; line-height: 1.4; }
.explore-card b::after { content: ' →'; color: var(--red); font-weight: 400; display: inline-block; transition: transform 0.25s; }
.explore-card:hover b::after { transform: translateX( 6px ); }
body.past-story #rail, body.past-story #depth { opacity: 0 !important; pointer-events: none; }
#rail { transition: opacity 0.4s; }

/* ---------------------------------------------------------------- phones / narrow */
@media ( max-width: 820px ) {
	#rail { display: none; }
	#depth { bottom: auto; top: calc( var(--header-h) - 6px ); right: var(--gutter); }
	.copy.pos-left, .copy.pos-right, .copy.pos-bottom, .copy.pos-center {
		left: var(--gutter); right: var(--gutter); width: auto; translate: none; top: auto; bottom: calc( 40px + env( safe-area-inset-bottom ) ); text-align: left;
	}
	.copy.pos-center .kicker { justify-content: flex-start; }
	.copy.hero.at-horizon { translate: none; }
	.copy.hero.at-horizon::before { display: none; }   /* (on the open sea: no panel behind it) */
	.copy.pos-wide { top: calc( var(--header-h) + 8px ); translate: none; bottom: auto; }
	.copy:not( .pos-wide )::before {
		content: ''; position: absolute; inset: -40px calc( -1 * var(--gutter) ) -60px; z-index: -1;
		background: linear-gradient( to top, rgba( 0, 0, 0, 0.6 ), rgba( 0, 0, 0, 0.35 ) 60%, transparent );
	}
	.lead { margin-top: 16px; }
	.missions { grid-template-columns: 1fr; margin-top: 20px; }
	.mission + .mission { border-left: 0; border-top: 1px solid var(--line); }
	.mission { min-height: 0; padding: 16px 18px; }
	.mission ul { margin: 12px 0 14px; gap: 6px; font-size: 15px; }
	.counter { font-size: clamp( 42px, 13vw, 72px ); }
	.peek { margin-top: 18px; grid-template-columns: 84px 1fr auto; }
	.peek img { width: 84px; height: 54px; }
	.explore { padding: 64px var(--gutter) 56px; }
	.explore-head { display: block; }
	.explore-head h2 { text-align: left; }
	.explore-grid { grid-template-columns: 1fr; }
	.explore-card { min-height: 56vw; }
	.explore-card img { object-position: 50% 82%; }   /* (wide, short cards: keep the vehicle above the title) */
	.explore-card img.ec-seaker { object-position: 50% 35%; }
	.explore-card img.ec-platform { height: 100%; object-position: 58% 45%; mask-image: none; }
	.explore-card:has( img.ec-mission ) { min-height: 90vw; }
	.explore-card img.ec-mission { object-position: 100% 50%; }
}

@media ( max-height: 700px ) and ( min-width: 821px ) {
	.mission { min-height: 0; padding: 20px 22px; }
	.missions { margin-top: 24px; }
}

/* ---------------------------------------------------------------- no WebGPU: still pages */
body.no-webgpu #scene { display: none; }
body.no-webgpu #fallback-bg { display: block; }
body.no-webgpu #depth { display: none; }

@media ( prefers-reduced-motion: reduce ) {
	.scroll-hint i, .loader-mark { animation: none; }
	.copy { transform: none; }
}

/* Opening brand and ocean statement. */
.copy.brand-hero { width: calc(100% - 2 * var(--gutter)); text-align: center; }
.brand-hero .hero-logo { display: block; width: 65vw; max-width: 100%; height: auto; margin: 0 auto 32px; }
.brand-hero h1 { font-size: clamp(28px, 4vw, 64px); line-height: 1.12; }
.horizon-baseline { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.copy.brand-hero.at-horizon { top: var(--hero-top); bottom: auto; translate: -50% 0; transform: none; }
@media (max-width: 820px) {
 .copy.brand-hero { left: var(--gutter); right: var(--gutter); top: 50%; bottom: auto; translate: 0 -50%; width: auto; text-align: center; }
 .brand-hero .hero-logo { width: 80vw; margin-bottom: 24px; }
 .copy.brand-hero::before { display: none; }
 .copy.brand-hero.at-horizon { top: var(--hero-top); translate: 0 0; }
}

/* Content is usable while the driver prepares the live ocean. */
#scene { transition:opacity .7s; }
#fallback-bg { display:block; opacity:0; pointer-events:none; transition:opacity .7s, background-image .8s; }
body.is-preparing #fallback-bg,body.no-webgpu #fallback-bg { opacity:1; }
body.is-preparing #scene { opacity:0; }

@media(prefers-reduced-motion:reduce) { #scene,#fallback-bg { transition:none; } }

/* Match the call to action to readiness: a progress indicator first, then
   Scroll to dive. Fixed-body locking also prevents iOS touch scrolling. */
html.is-preparing { overflow:hidden; overscroll-behavior:none; }
body.is-preparing { position:fixed; top:0; left:0; right:0; width:100%; height:100%; overflow:hidden; overscroll-behavior:none; }
body.is-preparing #story { touch-action:none; }
body.is-preparing .brand-hero .scroll-hint { display:none; }
.brand-hero #loader { position:static; inset:auto; z-index:auto; display:grid; place-content:center; justify-items:center; width:auto; margin:44px auto 0; gap:12px; background:transparent; transition:none; pointer-events:none; }
body:not(.is-loading) .brand-hero #loader { display:none; }

body.is-preparing #depth { display:none; }

/* Phones use the rendered surface photograph, scrolling off the already
   submerged first-AUV scene. No animated water surface is constructed. */
#mobile-opening { display:none; }
body.mobile-home #mobile-opening { display:block; position:fixed; inset:0; z-index:1; pointer-events:none; will-change:transform; }
#mobile-opening img { display:block; width:100%; height:100%; object-fit:cover; mask-image:linear-gradient(to bottom,#000 82%,transparent); }
