/* Beyond Games — one sans-serif (Space Grotesk), near-black background, the "Néon" palette
   (yellow accent for controls, magenta and turquoise for the game world and the two conditions).
   Scroll-driven layout: hero and "steps" are sticky stages driven by GSAP ScrollTrigger (app.js). */

:root {
  --bg: #0a0a12;
  --bg-2: #10101a;
  --bg-3: #171724;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f3f4;
  --muted: #8f8f99;
  --dim: #5c5c66;
  --accent: #ffd23f;
  --accent-hover: #ffe070;
  --accent-ink: #15120a;
  --accent-rgb: 255, 210, 63;
  --accent-2: #ff3ea5;
  --sample: #26f0f1;
  --threat: #ff3ea5;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1280px;
  --pad: 40px;
}
@media (max-width: 720px) { :root { --pad: 20px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.static { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--pad)); margin: 0 auto; }

/* ---------- type ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; letter-spacing: 0.01em; color: var(--muted); font-weight: 500;
}

/* ---------- halos: three night-blue glows (the deep water of the opening world) drifting with the scroll, under every section ---------- */
.halos { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: 0; }
.halos i { position: absolute; border-radius: 50%; width: 58vw; height: 58vw; max-width: 780px; max-height: 780px; background: radial-gradient(circle, rgba(22, 86, 160, 0.5) 0%, rgba(22, 86, 160, 0.16) 38%, rgba(22, 86, 160, 0) 66%); will-change: transform; }
.halos i:nth-child(1) { left: -24vw; top: 6vh; }
.halos i:nth-child(2) { right: -24vw; top: 38vh; width: 52vw; height: 52vw; }
.halos i:nth-child(3) { left: 26vw; top: 78vh; width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(16, 64, 128, 0.5) 0%, rgba(16, 64, 128, 0.14) 40%, rgba(16, 64, 128, 0) 66%); }
.display {
  font-weight: 500; letter-spacing: -0.035em; line-height: 0.96; margin: 0;
  font-size: clamp(40px, 6.6vw, 104px);
}
.display em { font-style: normal; color: var(--accent); }
.h2 { font-weight: 500; letter-spacing: -0.03em; line-height: 1; margin: 0; font-size: clamp(34px, 5vw, 76px); }
.h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0; font-size: clamp(22px, 2.2vw, 30px); }
.sub { font-size: clamp(17px, 1.35vw, 21px); line-height: 1.55; color: var(--muted); margin: 0; max-width: 34em; }
.sub strong { color: var(--text); font-weight: 500; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap;
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.4s var(--ease);
  will-change: transform;
}
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn .arr { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 13px; }
.btn.outline { border-color: var(--accent); color: var(--accent); }
.btn[hidden] { display: none; }
.btn.outline:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- nav: floats over the world, tightens into a pill once scrolled, slides away on scroll down ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: 18px; transition: transform 0.5s var(--ease), padding 0.5s var(--ease); }
.nav .wrap { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 6px 0 18px; border: 1px solid transparent; border-radius: 999px; transition: background 0.5s, border-color 0.5s, backdrop-filter 0.5s, width 0.6s var(--ease), height 0.5s var(--ease); }
.nav.solid { padding-top: 10px; }
.nav.solid .wrap { width: min(var(--wrap) - 80px, 100% - 2 * var(--pad)); height: 52px; background: rgba(10, 10, 18, 0.62); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-color: var(--line); }
.nav.hide, .nav.intro { transform: translateY(-120%); }
.brand { display: inline-flex; align-items: baseline; gap: 0.18em; font-weight: 600; letter-spacing: -0.035em; font-size: 21px; line-height: 1; transition: transform 0.4s var(--ease); }
.brand b { font-weight: 600; }
.brand b:last-child { color: var(--accent); }
.brand:hover { transform: translateY(-1px); }
/* Big wordmark over the hero; its letters fly one by one into .brand when the nav arrives (app.js) */
.brand .ch, .hero-brand .ch { display: inline-block; }
.hero-brand { position: fixed; left: 0; right: 0; top: clamp(24px, 5.5vh, 56px); z-index: 51; pointer-events: none; }
.hero-brand .hb { display: inline-flex; align-items: baseline; gap: 0.18em; font-weight: 600; letter-spacing: -0.035em; font-size: clamp(34px, 4.2vw, 62px); line-height: 1; white-space: nowrap; }
.hero-brand b { font-weight: 600; }
.hero-brand b:last-child { color: var(--accent); }
.hero-brand .ch { will-change: transform; }
html.static .hero-brand { display: none; }
@media (prefers-reduced-motion: reduce) { .hero-brand { display: none; } }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--muted); position: relative; padding: 6px 0; transition: color 0.3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.lang button { font-size: 12px; font-weight: 500; color: var(--muted); padding: 5px 10px; border-radius: 999px; transition: background 0.3s, color 0.3s; }
.lang button.on { background: var(--text); color: var(--bg); }
.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--text); transition: transform 0.3s; }
@media (max-width: 900px) {
  .nav .wrap { padding-right: 8px; }
  .nav-links { position: fixed; inset: 80px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px var(--pad) 28px; background: rgba(8, 8, 10, 0.96); border-bottom: 1px solid var(--line); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { font-size: 24px; padding: 10px 0; }
  .nav-toggle { display: flex; }
}

/* ---------- hero: real 3D world -> points -> plot, three lines of title timed on scroll ---------- */
.hero-track { height: 360vh; position: relative; }
.hero { position: sticky; top: 0; height: 100vh; overflow: hidden; }
/* The top 26 % is flat and equals the three.js fog colour (#3a1c58), so the far edge of the water plane melts into the sky instead of drawing a horizon line */
.hero-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #3a1c58 0%, #3a1c58 26%, #5a2470 46%, #8a2a78 62%, #2a1a54 74%, #0a0a12 100%); }
.hero-sky::after { content: ""; position: absolute; left: 50%; top: 58%; width: 60vw; height: 24vh; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(255, 62, 165, 0.42), rgba(255, 62, 165, 0) 70%); }
#cloud { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, rgba(10, 10, 18, 0) 45%, rgba(10, 10, 18, 0.7) 100%), linear-gradient(180deg, rgba(10, 10, 18, 0.5), rgba(10, 10, 18, 0) 30%, rgba(10, 10, 18, 0) 70%, rgba(10, 10, 18, 0.75)); }
.hero-lines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(56px, 11vh, 130px); pointer-events: none; }
.hero-lines .wrap { position: relative; }
.hero-lines .label { margin-bottom: 18px; }
.hero-lines .hl { position: absolute; left: 0; bottom: 0; margin: 0; max-width: 13ch; }
.hero-lines .hl .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-lines .hl .w > span { display: inline-block; transform: translateY(110%); }
.hero-lines .hl[data-line="2"] .w > span, .hero-lines .hl[data-line="3"] .w > span { transform: translateY(110%); }
.hero-axes { position: absolute; inset: 0; pointer-events: none; opacity: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.hero-axes .ax-y, .hero-axes .ax-x { position: absolute; left: 0; top: 0; white-space: nowrap; transform-origin: 0 0; }
.hero-axes .legend { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); white-space: nowrap; }
.hero-axes .legend i { width: 9px; height: 9px; border-radius: 50%; margin-left: 10px; }
.hero-axes .legend i.a { background: var(--sample); } .hero-axes .legend i.b { background: var(--accent-2); }
.hero-scroll { position: absolute; right: max(var(--pad), calc((100% - var(--wrap)) / 2)); bottom: clamp(28px, 6vh, 64px); display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 21px; white-space: nowrap; font-weight: 600; color: var(--text); text-shadow: 0 2px 14px rgba(10, 10, 18, 0.9); pointer-events: none; --in: 0; --out: 1; --back: 0; opacity: max(calc(var(--in) * var(--out)), var(--back)); }
.hero-scroll .cue-a, .hero-scroll .cue-b { display: inline-block; animation: bob 1.6s ease-in-out infinite; } .hero-scroll .cue-b { display: none; } .hero-scroll.again .cue-a { display: none; } .hero-scroll.again .cue-b { display: inline-block; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.hero-scroll .mouse { position: relative; width: 30px; height: 48px; border: 2.5px solid rgba(255, 255, 255, 0.85); border-radius: 16px; }
.hero-scroll .mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9); animation: wheel 1.6s cubic-bezier(0.4, 0, 0.3, 1) infinite; }
.hero-scroll .chev { display: flex; flex-direction: column; align-items: center; margin-top: -2px; }
.hero-scroll .chev i { width: 17px; height: 17px; margin-top: -7px; border-right: 3.5px solid var(--accent); border-bottom: 3.5px solid var(--accent); transform: rotate(45deg); animation: chev 1.6s ease-in-out infinite; }
.hero-scroll .chev i:nth-child(2) { animation-delay: 0.2s; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes chev { 0%, 100% { opacity: 0.15; transform: translateY(-3px) rotate(45deg); } 50% { opacity: 1; transform: translateY(3px) rotate(45deg); } }
html[lang="fr"] .hero-lines .hl[data-line="2"] { max-width: 17ch; }
@media (max-width: 720px) { .hero-lines { padding-bottom: 64px; } .hero-axes .ax-y { left: 4%; } }

/* ---------- generic section ---------- */
.section { position: relative; padding: clamp(110px, 16vh, 200px) 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: clamp(44px, 7vh, 84px); }
.section-head .h2 { max-width: 14ch; }
.section-head .sub { max-width: 40em; }
.section-head.split { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 48px; }
.section-head.split .lead, .section-head.split > .sub { padding-top: 0.2em; }
.rule { height: 1px; background: var(--line-2); transform-origin: left; transform: scaleX(0); margin-bottom: clamp(40px, 6vh, 72px); }
html.static .rule { transform: none; }
.section-head .lead { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.section-head .lead .sub { align-self: stretch; }
@media (max-width: 900px) { .section-head.split { grid-template-columns: 1fr; } }

/* Split-text reveal (GSAP sets the transforms; CSS just sets the masks) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.split .w > span { display: inline-block; transform: translateY(110%); }
.reveal { opacity: 0; transform: translateY(28px); }
html.static .reveal, html.static .split .w > span { opacity: 1 !important; transform: none !important; }
.steps-track { height: 780vh; }

/* ---------- steps: sticky stage, one step per 100vh ---------- */
.steps-track { position: relative; }
.steps { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.steps .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; }
/* progress: six wide segments above the step titles, filled in yellow as the scroll advances (no numbers) */
.step-col { display: flex; flex-direction: column; gap: 28px; }
.steps-bar { display: flex; gap: 10px; max-width: 28em; }
.steps-bar i { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.steps-bar i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
.step-text { position: relative; min-height: 360px; }
.step { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 20px; opacity: 0; pointer-events: none; }
.step.on { pointer-events: auto; }
.step .h2 { max-width: 10ch; font-size: clamp(38px, 5.4vw, 84px); }
.step .sub { max-width: 28em; font-size: clamp(18px, 1.5vw, 23px); }
.step-visual { position: relative; aspect-ratio: 1 / 1; max-height: 66vh; width: 100%; border: 1px solid var(--line-2); border-radius: 24px; background: radial-gradient(ellipse at 50% 35%, rgba(var(--accent-rgb), 0.07), transparent 65%), rgba(255, 255, 255, 0.025); }
.step-visual svg { position: absolute; inset: 4%; width: 92%; height: 92%; opacity: 0; }
.step-visual svg.on { opacity: 1; }
.step-visual svg rect, .step-visual svg path, .step-visual svg line { stroke-width: 1.6; }
.step-visual svg .thin { stroke-width: 1; }
.step-visual text { font-family: var(--font); }
@media (max-width: 900px) {
  .steps .wrap { grid-template-columns: 1fr; gap: 24px; align-content: center; }
  .step-visual { max-height: 34vh; aspect-ratio: 16 / 9; order: -1; }
  .step-text { min-height: 300px; }
  .step-col { gap: 16px; }
  .steps-bar { gap: 6px; }
}

/* ---------- levels: from a website to a real game (sticky stage, one level per 130vh, app.js drives the mock screen) ---------- */
.levels-head { padding-bottom: 0; }
.levels-head .section-head { margin-bottom: 0; }
.levels-track { position: relative; height: 650vh; }
.levels { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.levels .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); column-gap: 64px; row-gap: clamp(30px, 6vh, 64px); align-items: center; }
.lv-scale { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 22px; }
.lv-scale .end { font-size: clamp(17px, 1.45vw, 22px); font-weight: 500; letter-spacing: -0.01em; color: var(--accent); white-space: nowrap; line-height: 28px; }
.lv-rail { position: relative; height: 62px; }
.lv-rail::before, .lv-rail .fill { content: ""; position: absolute; left: 0; top: 12px; height: 4px; border-radius: 2px; }
.lv-rail::before { right: 0; background: var(--line-2); }
.lv-rail .fill { width: calc(var(--p, 0.1) * 100%); background: var(--accent); }
.lv-node { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lv-node i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease); }
.lv-node span { font-size: 15px; color: var(--muted); white-space: nowrap; transition: color 0.4s; }
.lv-node.past i { border-color: var(--accent); background: var(--bg); }
.lv-node.on i { border-color: var(--accent); background: var(--accent); transform: scale(1.15); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.16); }
.lv-node.on span { color: var(--text); }
.lv-node:hover span { color: var(--text); }
.lv-text { position: relative; min-height: 400px; }
.lv { position: absolute; inset: 0 0 auto 0; opacity: 0; pointer-events: none; }
.lv.on { pointer-events: auto; }
.lv-text { container-type: inline-size; }
/* sized on the text column itself (cqi), so long French words ("comportementales") never run into the screen */
.lv h3 { margin: 0 0 20px; font-size: clamp(28px, min(4.3vw, 10cqi), 66px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; max-width: 11ch; overflow-wrap: break-word; }
html[lang="fr"] .lv h3 { max-width: 13ch; }
.lv .sub { max-width: 26em; font-size: clamp(17px, 1.35vw, 21px); }
.lv-data { margin: 28px 0 0; display: flex; gap: 18px; align-items: baseline; font-size: 16px; max-width: 32em; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.lv-data .k { color: var(--muted); flex: 0 0 auto; }
.lv-data .k + span { color: var(--accent); }
.lv-ex { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 32em; }
.lv-ex > div { padding: 2px 0 2px 16px; border-left: 2px solid var(--line-2); }
.lv-ex > div + div { border-left-color: var(--accent); }
.lv-ex .k { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.lv-ex > div + div .k { color: var(--accent); }
.lv-ex .v { display: block; line-height: 1.5; }
.lv-ex .nw { white-space: nowrap; }
.lv-ex a, .lv-ex .lv-proj { display: inline; font-size: 18px; font-weight: 500; color: var(--text); text-align: left; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color 0.25s, border-color 0.25s; }
.lv-ex a:hover, .lv-ex .lv-proj:hover { color: var(--accent); border-color: var(--accent); }
.lv-ex .ext { display: inline-block; width: 11px; height: 11px; margin-left: 6px; vertical-align: 0.1em; opacity: 0.7; }
/* the screen: a browser window (bar hidden for games and phone apps) showing a real capture of each example */
.lv-screen { position: relative; width: 100%; aspect-ratio: 560 / 400; max-height: 60vh; border-radius: 16px; overflow: hidden; background: #11111b; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); --bar: 34px; }
.lv-bar { position: absolute; inset: 0 0 auto 0; height: var(--bar); display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #171724; border-bottom: 1px solid rgba(255, 255, 255, 0.1); z-index: 2; transition: transform 0.5s var(--ease); }
.lv-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.lv-url { margin-left: 18px; flex: 0 1 62%; height: 18px; line-height: 18px; padding: 0 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-shots { position: absolute; inset: var(--bar) 0 0 0; transition: top 0.5s var(--ease); }
.lv-screen.nobar .lv-bar { transform: translateY(-100%); }
.lv-screen.nobar .lv-shots { top: 0; }
.lv-shot { position: absolute; inset: 0; margin: 0; opacity: 0; }
.lv-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.lv-shot.full img { object-position: 50% 50%; }
.lv-shot figcaption { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: baseline; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(10, 10, 18, 0.84); border: 1px solid var(--line-2); backdrop-filter: blur(6px); font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; }
.lv-shot figcaption span { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.lv-shot figcaption.ours { border-color: rgba(var(--accent-rgb), 0.7); }
.lv-shot figcaption.ours span { color: var(--accent); }
/* research examples (not made by us) stay as greyed links; only our realization is shown on the screen */
.lv-ex > div:first-child { opacity: 0.55; transition: opacity 0.25s; }
.lv-ex > div:first-child a { color: var(--muted); font-weight: 400; }
.lv-ex > div:first-child:hover { opacity: 0.8; }
.lv-ex > div:first-child a:hover { color: var(--text); border-color: var(--line-2); }
@media (max-width: 900px) {
  .levels .wrap { grid-template-columns: minmax(0, 1fr); row-gap: 18px; align-content: center; }
  .lv-scale { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .lv-scale .end { font-size: 14px; line-height: 1.2; }
  .lv-scale .end.hi { grid-row: 1; grid-column: 2; text-align: right; }
  .lv-rail { grid-column: 1 / -1; grid-row: 2; }
  .lv-rail { height: 52px; }
  .lv-node i { width: 22px; height: 22px; }
  .lv-rail::before, .lv-rail .fill { top: 9px; }
  .lv-node span { font-size: 12px; }
  .lv-screen { max-height: 34vh; order: 1; }
  .lv-text { order: 2; min-height: 280px; }
  .lv h3 { font-size: clamp(26px, 7.4vw, 40px); margin-bottom: 10px; max-width: none; }
  html[lang="fr"] .lv h3 { max-width: none; }
  .lv .sub { font-size: 15px; }
  .lv-data { margin-top: 12px; font-size: 13px; gap: 12px; padding-bottom: 8px; }
  .lv-ex { margin-top: 10px; gap: 12px; }
  .lv-ex > div { padding-left: 10px; }
  .lv-ex .k { font-size: 11px; margin-bottom: 4px; }
  .lv-ex a, .lv-ex .lv-proj { font-size: 14px; }
}

/* ---------- playground / RCI ---------- */
.play .sub + .sub { margin-top: 12px; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.play-grid > * { min-width: 0; }
.play-stage { position: relative; background: var(--bg-2); min-height: 420px; aspect-ratio: 28 / 17; align-self: stretch; }
@media (min-width: 1001px) { .play-stage { aspect-ratio: auto; height: 100%; min-height: 540px; } }
.play-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; outline: none; }
.play-stage canvas.hidden { visibility: hidden; }
.play-stage.hit::after { content: ""; position: absolute; inset: 0; background: rgba(255, 77, 109, 0.28); animation: flash 0.5s forwards; pointer-events: none; }
@keyframes flash { to { opacity: 0; } }
.play-hud { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); pointer-events: none; flex-wrap: wrap; }
.play-hud .mode { flex: 1 1 auto; min-width: 0; }
.play-hud .stats { white-space: nowrap; }
.play-hud .mode { display: inline-flex; align-items: center; gap: 8px; background: rgba(8, 8, 10, 0.7); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); backdrop-filter: blur(6px); }
.play-hud .mode::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.play-stage.human .play-hud .mode::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.play-hud .stats { background: rgba(8, 8, 10, 0.7); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); backdrop-filter: blur(6px); }
.play-hud b { color: var(--text); font-weight: 500; }
.play-stage.nofb .play-hud .fb { display: none; }
.play-pop { position: absolute; right: 22px; top: 52px; font-size: 15px; font-weight: 500; color: var(--accent); pointer-events: none; animation: popup 0.9s var(--ease) forwards; }
.play-pop.bad { color: var(--threat); }
@keyframes popup { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.play-legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 16px; font-size: 12px; color: var(--muted); pointer-events: none; }
.play-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sw-player { background: var(--accent); } .sw-reward { background: var(--sample); } .sw-enemy { background: var(--threat); }
.play-pad { position: absolute; right: 14px; bottom: 14px; display: none; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 4px; }
.play-pad button { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; font-size: 18px; touch-action: none; }
.play-pad button[data-dir="up"] { grid-column: 2; } .play-pad button[data-dir="left"] { grid-column: 1; grid-row: 2; } .play-pad button[data-dir="down"] { grid-column: 2; grid-row: 2; } .play-pad button[data-dir="right"] { grid-column: 3; grid-row: 2; }
@media (pointer: coarse) { .play-pad { display: grid; } .play-legend { display: none; } }

/* game flow: setup card, controls intro, stop button, locked parameters */
.play-hud .stop { pointer-events: auto; display: none; align-items: center; gap: 8px; background: rgba(8, 8, 10, 0.7); padding: 5px 12px 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); font-size: 12px; backdrop-filter: blur(6px); transition: border-color 0.25s, color 0.25s; }
.play-hud .stop i { width: 8px; height: 8px; border-radius: 2px; background: var(--threat); }
.play-hud .stop:hover { border-color: var(--accent); color: var(--accent); }
.play-stage.playing .play-hud .stop { display: inline-flex; font-size: 13px; font-weight: 600; padding: 7px 14px 7px 12px; border: 2px solid var(--accent); color: var(--accent); animation: stopPulse 1.4s ease-out infinite; }
.play-stage.playing .play-hud .stop:hover { background: var(--accent); color: #0a0a12; animation: none; }
@keyframes stopPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.75); } 70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
.play-stage:not(.playing) .play-pad { display: none; }
.play-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(6, 6, 12, 0.28); opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0s 0.4s; pointer-events: none; }
.play-over.on { opacity: 1; visibility: visible; transition: opacity 0.4s; }
.play-over .pg-card { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 380px; padding: 24px 28px; text-align: center; background: rgba(10, 10, 18, 0.82); border: 1px solid var(--line-2); border-radius: 16px; backdrop-filter: blur(8px); }
.play-over .res { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.play-over .res b { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.play-over .res span { font-size: 15px; color: var(--accent); font-variant-numeric: tabular-nums; }
.play-over .t { margin: 0; font-size: 16px; line-height: 1.45; color: var(--muted); }
.play-over .pg-card:has(.arrive:not([hidden])) { max-width: 420px; }
.play-over .pg-card:has(.arrive:not([hidden])) .t { display: none; }
.pg-btns { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
/* end of game: "data received" (file icon that fills and ticks, rows count up; app particles fly into it) */
.arrive { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 16px; text-align: left; border: 1px solid rgba(var(--accent-rgb), 0.55); border-radius: 12px; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.03)); box-shadow: 0 0 40px -12px rgba(var(--accent-rgb), 0.55); }
.arrive[hidden] { display: none; }
.arr-ico { position: relative; flex: 0 0 auto; width: 46px; height: 56px; }
.arr-ico .doc { width: 46px; height: 56px; overflow: visible; }
.arr-ico .sheet { fill: rgba(255, 255, 255, 0.06); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.arr-ico .fold { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.arr-ico .ln rect { fill: var(--sample); }
.arr-ico .ln rect:nth-child(even) { fill: rgba(255, 255, 255, 0.75); }
.arr-ico .ok { position: absolute; right: -10px; bottom: -8px; width: 26px; height: 26px; overflow: visible; }
.arr-ico .ok circle { fill: var(--accent); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 76; }
.arr-ico .ok path { fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 18; }
.arr-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.arr-txt b { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.arr-txt span { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.arr-txt span b { font-size: inherit; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.arr-txt em { font-style: normal; color: var(--text); overflow-wrap: anywhere; }
.pg-bit { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 6; box-shadow: 0 0 10px currentColor; }
.data.arrived { animation: dataArrive 1.6s var(--ease) 1.2s both; }
@keyframes dataArrive { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); border-color: var(--line); } 25% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35); border-color: var(--accent); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); border-color: var(--line); } }
.data tr.ev-collect td:nth-child(3) { color: var(--sample); }
.data tr.ev-caught td:nth-child(3), .data tr.ev-chase_start td:nth-child(3) { color: var(--threat); }
.data tr.ev-episode_end td:nth-child(3), .data tr.ev-episode_start td:nth-child(3) { color: var(--accent); }
.play-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: rgba(6, 6, 12, 0.72); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; }
.play-intro.on { opacity: 1; visibility: visible; transition: opacity 0.3s; }
.play-intro .how-row { display: flex; gap: clamp(28px, 6vw, 72px); align-items: flex-end; }
.play-intro .how { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.play-intro .how p { margin: 0; font-size: 15px; color: var(--text); }
.play-intro .keys { display: grid; grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(2, 42px); gap: 5px; }
.play-intro .k { display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line-2); border-radius: 8px; font-size: 18px; color: var(--text); background: rgba(255, 255, 255, 0.04); }
.play-intro .k.up { grid-column: 2; } .play-intro .k.left { grid-column: 1; grid-row: 2; } .play-intro .k.down { grid-column: 2; grid-row: 2; } .play-intro .k.right { grid-column: 3; grid-row: 2; }
.play-intro .clickdemo { position: relative; width: 132px; height: 89px; border-radius: 8px; border: 1.5px solid var(--line-2); background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 22px 22px; }
.play-intro .clickdemo .cell { position: absolute; left: 88px; top: 44px; width: 22px; height: 22px; border: 1.5px solid var(--accent); border-radius: 3px; opacity: 0; }
.play-intro .clickdemo .ripple { position: absolute; left: 99px; top: 55px; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.play-intro .clickdemo .cursor { position: absolute; left: 20px; top: 14px; width: 18px; height: 22px; }
.play-intro .go { margin: 0; font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; letter-spacing: -0.03em; color: var(--accent); opacity: 0; }
.play-intro.run .k.up { animation: keyhit 0.42s 0.25s; } .play-intro.run .k.right { animation: keyhit 0.42s 0.65s; } .play-intro.run .k.down { animation: keyhit 0.42s 1.05s; } .play-intro.run .k.left { animation: keyhit 0.42s 1.45s; }
.play-intro.run .clickdemo .cursor { animation: cursormove 1.9s 0.2s var(--ease) forwards; }
.play-intro.run .clickdemo .ripple { animation: ripple 0.6s 1.35s ease-out; }
.play-intro.run .clickdemo .cell { animation: cellon 0.3s 1.35s forwards; }
.play-intro.run .go { animation: goin 0.5s 2.3s var(--ease) forwards; }
@keyframes keyhit { 0%, 100% { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); color: var(--text); transform: none; } 30%, 70% { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(2px); } }
@keyframes cursormove { 0% { transform: translate(0, 0); } 55%, 100% { transform: translate(72px, 36px); } 60% { transform: translate(72px, 36px) scale(0.85); } 68% { transform: translate(72px, 36px) scale(1); } }
@keyframes ripple { from { opacity: 1; transform: scale(0.3); } to { opacity: 0; transform: scale(1.4); } }
@keyframes cellon { to { opacity: 1; background: rgba(var(--accent-rgb), 0.22); } }
@keyframes goin { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }
/* setup: the panel invites the visitor to move the parameters; during a game it is locked */
.play-panel { position: relative; transition: opacity 0.3s; }
.play-panel:not(.locked):not(.touched) { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.5); animation: invite 2.4s ease-in-out infinite; }
.play-panel:not(.locked):not(.touched) input[type="range"]::-webkit-slider-thumb { background: var(--accent); }
.play-panel:not(.locked):not(.touched) input[type="range"]::-moz-range-thumb { background: var(--accent); }
@keyframes invite { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.25); } 50% { box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), 0.75); } }
.play-panel.locked .fields { opacity: 0.38; pointer-events: none; }
.play-panel.locked .play-note { color: var(--accent); }
.play-panel:not(.locked) .play-note { color: var(--text); }
@media (max-width: 720px) { .play-over .pg-card { padding: 18px; gap: 12px; } .play-over .t { font-size: 14px; } .play-intro .keys { grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(2, 34px); } .play-intro .clickdemo { transform: scale(0.85); } .play-intro .how p { font-size: 13px; } }
.panel { background: var(--bg-2); display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.panel-head b { color: var(--text); font-weight: 500; }
.fields { padding: 6px 18px 10px; display: grid; grid-template-columns: 1fr; gap: 0; }
.field { padding: 5px 0; }
.field label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.field label output, .field label .v { color: var(--text); font-weight: 500; }
.field label .lbl { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.field { position: relative; }
.info { flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-grid; place-items: center; color: var(--muted); cursor: help; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.info > i { font-style: normal; font-size: 10px; font-weight: 600; line-height: 1; }
.info:hover, .info:focus-visible { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); outline: none; }
/* the tip spans the whole field (anchored on .field, not on the button) so it never leaves the panel */
.info .tip { position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); z-index: 20; padding: 9px 12px; font-size: 12.5px; line-height: 1.4; font-weight: 400; text-align: left; color: var(--text); background: #16161f; border: 1px solid rgba(var(--accent-rgb), 0.6); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.info:hover .tip, .info:focus .tip { opacity: 1; transform: none; }
.fields .field:first-child .info .tip { bottom: auto; top: 26px; transform: translateY(-4px); }
.fields .field:first-child .info:hover .tip, .fields .field:first-child .info:focus .tip { transform: none; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--text); margin-top: -5.5px; transition: transform 0.2s, background 0.2s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--text); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:active::-webkit-slider-thumb { background: var(--accent); transform: scale(1.25); }
.seg { display: flex; gap: 4px; }
.seg span, .seg button { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 12px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.seg .on { background: var(--text); color: var(--bg); border-color: var(--text); }
.toggle { width: 38px; height: 22px; border: 1px solid var(--line-2); border-radius: 999px; position: relative; display: inline-block; cursor: pointer; transition: background 0.25s, border-color 0.25s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.3s var(--ease), background 0.25s; }
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on::after { transform: translateX(16px); background: var(--accent-ink); }
.toggles { display: flex; gap: 14px; align-items: center; }
.seedrow { display: flex; gap: 8px; align-items: center; }
.seedrow .numv { font-weight: 500; font-variant-numeric: tabular-nums; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; flex: 1; }
.seedrow .numv.flash { border-color: var(--accent); color: var(--accent); }
.mini { font-size: 12px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--text); transition: border-color 0.25s; }
.mini:hover { border-color: var(--accent); color: var(--accent); }
.play-note { margin: auto 0 0; padding: 10px 18px 12px; font-size: 12px; color: var(--dim); border-top: 1px solid var(--line); }

.data { margin-top: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); margin-top: 16px; }
.data table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.data th, .data td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data th { color: var(--dim); font-weight: 500; }
.data td { color: var(--muted); }
.data td:first-child, .data td:nth-child(3) { color: var(--text); }
.data tr.new td { animation: rowin 0.5s var(--ease); }
@keyframes rowin { from { background: rgba(var(--accent-rgb), 0.14); } to { background: transparent; } }
.data .foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.data .foot b { color: var(--text); font-weight: 500; }
.data-scroll { overflow: auto; max-height: 300px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
.data thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-2); box-shadow: inset 0 -1px 0 var(--line); }
.caption { font-size: 13px; color: var(--dim); margin: 22px 0 0; max-width: 60em; line-height: 1.6; }
@media (max-width: 1000px) { .play-grid { grid-template-columns: minmax(0, 1fr); } .play-stage { aspect-ratio: 4 / 3; } .field.two { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .play-stage { aspect-ratio: 1 / 1; min-height: 0; width: 100%; } .play-hud .mode { font-size: 11px; } }

/* ---------- projects ---------- */
.section.play { padding-bottom: clamp(48px, 7vh, 96px); }
.section.projects { padding-top: clamp(24px, 4vh, 56px); }
.projects .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column; --mx: 50%; --my: 50%; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.4s; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.08), transparent 60%); }
.card:hover::before { opacity: 1; }
.card .media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.card .media { transition: transform 1.2s var(--ease); }
.card .media img, .card .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.card:hover .media { transform: scale(1.03); }
.play-hint { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; transition: opacity 0.45s var(--ease); }
.play-hint .pb { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 10, 18, 0.62); border: 1.5px solid var(--accent); backdrop-filter: blur(6px); transition: transform 0.4s var(--ease), background 0.4s var(--ease); }
.play-hint .pb svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--accent); transition: fill 0.4s var(--ease); }
.play-hint .pb::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid var(--accent); animation: hintPulse 2.2s ease-out infinite; }
@keyframes hintPulse { 0% { transform: scale(1); opacity: 0.8; } 70%, 100% { transform: scale(1.75); opacity: 0; } }
.play-hint b { font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: rgba(10, 10, 18, 0.74); border: 1px solid var(--line-2); color: var(--text); white-space: nowrap; }
.card:hover .play-hint .pb { transform: scale(1.12); background: var(--accent); }
.card:hover .play-hint .pb svg { fill: #0a0a12; }
.media.playing .play-hint { opacity: 0; }
@media (hover: none), (pointer: coarse) { .play-hint b { display: none; } }
@media (prefers-reduced-motion: reduce) { .play-hint .pb::after { animation: none; opacity: 0; } }
.card .status { position: absolute; top: 14px; left: 14px; z-index: 3; font-size: 11px; font-weight: 500; padding: 5px 9px; border-radius: 999px; background: rgba(8, 8, 10, 0.72); border: 1px solid var(--line-2); backdrop-filter: blur(6px); display: inline-flex; align-items: center; gap: 6px; }
.card .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.card .status.coming::before { background: var(--muted); }
.card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 3; }
.card .body .top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card .body h3 { margin: 0; font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.card .tag { margin: 0; font-size: 13px; color: var(--accent); }
.card .sum { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 40em; }
.card .actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.card .partner { font-size: 12px; color: var(--dim); max-width: 26em; }
@media (max-width: 900px) { .projects .cards { grid-template-columns: 1fr; } }

/* science drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(8, 8, 10, 0.6); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.4s; z-index: 80; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); z-index: 90; transform: translateX(100%); transition: transform 0.6s var(--ease); display: flex; flex-direction: column; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-bg { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.drawer-head .label { margin: 0; }
.drawer-body { padding: 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.drawer-body h3 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.drawer-body .tag { color: var(--accent); font-size: 14px; margin: -10px 0 0; }
.drawer-body p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.drawer-body h4 { margin: 8px 0 0; font-size: 12px; color: var(--dim); font-weight: 500; letter-spacing: 0.02em; }
.drawer-body ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.drawer-body li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.drawer-body li a { color: var(--text); transition: color 0.3s; }
.drawer-body li a:hover { color: var(--accent); }
.drawer-body li i { color: var(--muted); }
.drawer-body .partner { font-size: 13px; color: var(--dim); }
.drawer-body .site-link { align-self: flex-start; }
.drawer .close { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: border-color 0.3s, transform 0.4s var(--ease); }
.drawer .close:hover { border-color: var(--text); transform: rotate(90deg); }

/* ---------- team ---------- */
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.person .photo { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.person .photo .init { font-size: 28px; font-weight: 500; color: var(--dim); letter-spacing: -0.02em; }
.person .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.6s, transform 1s var(--ease); }
.person:hover .photo img { filter: none; transform: scale(1.04); }
.person .name { margin: 14px 0 0; font-size: 18px; font-weight: 500; }
.person .role { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.person .bio { margin: 12px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); max-width: 30em; }
.person .site { display: inline-block; margin-top: 10px; font-size: 14.5px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color 0.25s, border-color 0.25s; }
.person .site:hover { color: var(--accent); border-color: var(--accent); }
.person .site .ext { display: inline-block; width: 10px; height: 10px; margin-left: 6px; vertical-align: 0.05em; opacity: 0.7; }
@media (max-width: 520px) { .person .bio, .person .site { font-size: 13px; } }
@media (max-width: 1000px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .people { grid-template-columns: repeat(2, 1fr); } }

/* ---------- trust ---------- */
.trust { padding: clamp(56px, 8vh, 96px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.trust .h3 { font-size: 15px; color: var(--muted); font-weight: 500; }
.logos { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.logos img { height: 44px; width: auto; filter: grayscale(1) brightness(0) invert(1); opacity: 0.6; transition: opacity 0.4s; }
.logos img.tall { height: 64px; }
.logos img.opaque { filter: invert(1) grayscale(1); mix-blend-mode: screen; }
.logos img.dark { filter: grayscale(1); mix-blend-mode: screen; }
.logos img:hover { opacity: 1; }
@media (max-width: 800px) { .trust .wrap { grid-template-columns: 1fr; } .logos { justify-content: flex-start; gap: 24px; } .logos img { height: 34px; } .logos img.tall { height: 48px; } }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(56px, 8vh, 96px); }
.contact .h2 { font-size: clamp(26px, 3vw, 44px); }
.contact .mail { display: block; font-size: clamp(26px, 4.6vw, 72px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; margin: clamp(32px, 5vh, 56px) 0; position: relative; width: fit-content; }
.contact .mail .c { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.contact .mail .c > span { display: inline-block; transform: translateY(110%); }
html.static .contact .mail .c > span { transform: none; }
.contact .mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
.contact .mail:hover::after { transform: scaleX(1); }
.contact-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }

/* ---------- faq: accordion, one thin line per question ---------- */
.faq { padding-top: 0; }
.faq-list { border-top: 1px solid var(--line-2); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; text-align: left; font-size: clamp(19px, 1.7vw, 26px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; transition: color 0.3s; }
.faq-q:hover { color: var(--accent); }
.faq-q i { flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; position: relative; color: var(--text); transition: transform 0.5s var(--ease), border-color 0.3s, background 0.3s, color 0.3s; }
.faq-q i::before, .faq-q i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.faq-q i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-q:hover i { border-color: var(--accent); color: var(--accent); }
.faq-item.open .faq-q i { transform: rotate(45deg); border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.faq-a { height: 0; overflow: hidden; }
.faq-a p { margin: 0; padding: 0 0 28px; color: var(--muted); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; max-width: 44em; }
html.static .faq-a { height: auto; }
@media (max-width: 720px) { .faq-q { padding: 20px 0; } .faq-q i { width: 34px; height: 34px; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: 12px; color: var(--dim); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .lines .l > span { opacity: 1 !important; transform: none !important; }
  .hero-scroll .mouse::after, .hero-scroll .chev i, .hero-scroll .cue-a, .hero-scroll .cue-b { animation: none; }
}
#pg-placement span { white-space: normal; text-overflow: clip; line-height: 1.2; display: flex; align-items: center; justify-content: center; }
@media (max-width: 720px) { .hero-scroll { right: auto; left: 50%; transform: translateX(-50%); bottom: 14px; gap: 8px; font-size: 18px; } .hero-scroll .mouse { display: none; } .hero-lines { padding-bottom: 128px; } }

/* ---------- small "keep scrolling" cue that follows the page once the hero is over ---------- */
.site-cue { position: fixed; right: max(var(--pad), calc((100% - var(--wrap)) / 2)); bottom: 22px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 14px; border-radius: 999px; background: rgba(10, 10, 18, 0.72); backdrop-filter: blur(6px); font-size: 13px; font-weight: 500; color: var(--text); pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity 0.5s, transform 0.5s var(--ease); }
.site-cue.on { opacity: 1; transform: none; }
body.drawer-open .site-cue { opacity: 0; }
.site-cue .chev { display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.site-cue .chev i { width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); animation: chev 1.6s ease-in-out infinite; }
.site-cue .chev i:nth-child(2) { animation-delay: 0.2s; }
@media (max-width: 720px) { .site-cue { bottom: 12px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .site-cue .chev i { animation: none; } }
