/* wolklaw.dev — shared styles
   Direction: a clean signal that keeps breaking. Calm surfaces, sharp 3px corners, and one
   recurring fault: magenta and cyan channels slipping out of register. */

:root {
  --bg: #0a0919;
  --bg-2: #100f26;
  --surface: #141233;
  --surface-2: #1b1948;
  --line: rgba(236, 233, 255, 0.14);
  --line-strong: rgba(236, 233, 255, 0.3);
  --text: #f1efff;
  --muted: #b3b0d2;

  --mint: #9be8b8;
  --gold: #f4c95d;
  --pink: #ff9ebb;
  --sky: #8ec9ff;

  /* the two channels that slip out of register */
  --ch-a: #ff2e88;
  --ch-b: #22d8ff;

  --paper: #e7e3ff;
  --paper-2: #f6f4ff;
  --ink: #120f2e;

  --accent: var(--mint);
  --on-accent: #0a0919;

  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --r: 3px;
  --max: 72rem;
  --split: 4px 0 0 var(--ch-a), -4px 0 0 var(--ch-b);
}

.t-mint { --accent: var(--mint); }
.t-gold { --accent: var(--gold); }
.t-pink { --accent: var(--pink); }
.t-sky  { --accent: var(--sky); }
.t-lilac { --accent: #b9a6ff; }
.t-clay { --accent: #f0a671; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; text-wrap: balance; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 100; background: var(--text); color: var(--bg); padding: 0.5rem 1rem; border-radius: var(--r); }
.skip:focus { top: 0.75rem; }

/* ───────── The fault: channels slipping out of register ───────── */

.glitch { position: relative; text-shadow: 2px 0 var(--ch-a), -2px 0 var(--ch-b); }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none;
  text-shadow: none; mix-blend-mode: screen;
}
.glitch::before { color: var(--ch-a); }
.glitch::after { color: var(--ch-b); }
.glitch.is-burst::before { opacity: 1; animation: cut-a 0.34s steps(1) 1; }
.glitch.is-burst::after { opacity: 1; animation: cut-b 0.34s steps(1) 1; }

@keyframes cut-a {
  0%   { clip-path: inset(6% 0 80% 0);  transform: translate(-7px, 0); }
  25%  { clip-path: inset(44% 0 40% 0); transform: translate(6px, 0); }
  50%  { clip-path: inset(72% 0 10% 0); transform: translate(-5px, 0); }
  75%  { clip-path: inset(24% 0 60% 0); transform: translate(8px, 0); }
  100% { clip-path: inset(0 0 100% 0);  transform: none; }
}
@keyframes cut-b {
  0%   { clip-path: inset(62% 0 22% 0); transform: translate(7px, 0); }
  25%  { clip-path: inset(10% 0 74% 0); transform: translate(-6px, 0); }
  50%  { clip-path: inset(36% 0 48% 0); transform: translate(5px, 0); }
  75%  { clip-path: inset(80% 0 6% 0);  transform: translate(-8px, 0); }
  100% { clip-path: inset(0 0 100% 0);  transform: none; }
}

/* ───────── Header ───────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 9, 25, 0.84);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap; padding-block: 0.8rem; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em; text-decoration: none; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo:hover svg, .contact .mark:hover { animation: nudge 0.3s steps(1) 1; }
@keyframes nudge {
  0%   { transform: translateX(-3px); filter: drop-shadow(-3px 0 var(--ch-a)) drop-shadow(3px 0 var(--ch-b)); }
  34%  { transform: translateX(3px);  filter: drop-shadow(3px 0 var(--ch-a)) drop-shadow(-3px 0 var(--ch-b)); }
  67%  { transform: translateX(-2px); filter: drop-shadow(-2px 0 var(--ch-a)) drop-shadow(2px 0 var(--ch-b)); }
  100% { transform: none; filter: none; }
}

.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.3rem; }
.site-nav a {
  font-family: var(--display); font-weight: 500; font-size: 1rem;
  text-decoration: none; color: var(--muted); padding: 0.35rem 0.7rem; border-radius: var(--r);
  border-bottom: 2px solid transparent; transition: color 0.12s;
}
.site-nav a:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.site-nav .nav-cta { margin-left: 0.4rem; color: var(--text); border: 1px solid var(--line-strong); }
.site-nav .nav-cta:hover { box-shadow: 3px 0 0 var(--ch-a), -3px 0 0 var(--ch-b); border-bottom-color: var(--line-strong); }

.lang-switch { display: inline-flex; margin-left: 0.5rem; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.site-nav .lang-switch a, .lang-switch .on {
  font-family: var(--display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem; border-radius: 0; border-bottom: 0; line-height: 1.4;
}
.lang-switch .on { background: var(--mint); color: var(--on-accent); }
.site-nav .lang-switch a:hover { background: rgba(236, 233, 255, 0.1); border-bottom: 0; }

/* ───────── Buttons & chips ───────── */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: var(--r);
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: box-shadow 0.12s, border-color 0.12s, background 0.12s;
}
.btn:hover { box-shadow: var(--split); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn svg { width: 1.1em; height: 1.1em; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font-size: 0.82rem; font-weight: 500; color: var(--muted); border: 1px solid var(--line); padding: 0.1rem 0.6rem; border-radius: 2px; }
.chip.ok { color: var(--gold); border-color: rgba(244, 201, 93, 0.45); }

.eyebrow { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1; color: var(--accent); }
.eyebrow::before { content: ""; width: 0.6rem; height: 0.6rem; margin-inline: 3px; background: var(--accent); box-shadow: 3px 0 0 var(--ch-a), -3px 0 0 var(--ch-b); }

/* ───────── Landing hero ───────── */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(3.25rem, 8vw, 6.5rem) clamp(5rem, 10vw, 8rem);
  /* the torn edge: a staircase, not a curve */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), 95% calc(100% - 26px), 95% calc(100% - 12px), 87% calc(100% - 12px), 87% 100%, 62% 100%, 62% calc(100% - 18px), 48% calc(100% - 18px), 48% calc(100% - 6px), 31% calc(100% - 6px), 31% calc(100% - 22px), 14% calc(100% - 22px), 14% calc(100% - 4px), 0 calc(100% - 4px));
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(38rem 26rem at 8% 0%, rgba(155, 232, 184, 0.13), transparent 70%),
    radial-gradient(34rem 26rem at 92% 25%, rgba(255, 46, 136, 0.10), transparent 70%),
    radial-gradient(30rem 22rem at 60% 100%, rgba(34, 216, 255, 0.10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px);
  -webkit-mask-image: linear-gradient(#000 20%, transparent 90%);
  mask-image: linear-gradient(#000 20%, transparent 90%);
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero .eyebrow { --accent: var(--mint); }
.hero h1 { margin-top: 1.4rem; max-width: 13ch; font-size: clamp(2.6rem, 6.6vw, 5.4rem); line-height: 1; }
.hero-lede { margin-top: 1.6rem; max-width: 34rem; font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.1rem; }
.hero .btn-primary { --accent: var(--mint); }

/* the W: sliced, with the two channels drifting behind it */
.glitch-w-wrap { position: relative; display: grid; gap: 1rem; justify-items: center; isolation: isolate; }
.glitch-w-wrap::before {
  content: ""; position: absolute; inset: -8% -6%; z-index: -1;
  background: radial-gradient(closest-side, rgba(155, 232, 184, 0.2), transparent 72%);
}
.glitch-w { appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; display: block; width: 100%; max-width: 25rem; color: inherit; font: inherit; }
.glitch-w svg { display: block; width: 100%; height: auto; overflow: visible; }
.glitch-w .base { stroke: var(--mint); }
.glitch-w .ghost { mix-blend-mode: screen; }
.glitch-w .ghost.a { stroke: var(--ch-a); transform: translate(calc(var(--gx, 6) * 1px), 0); }
.glitch-w .ghost.b { stroke: var(--ch-b); transform: translate(calc(var(--gx, 6) * -1px), 0); }
.glitch-w .slice { transform: translate(calc(var(--dx, 0) * 1px), 0); }
.glitch-w:focus-visible { outline: 2px solid var(--mint); outline-offset: 10px; }
.glitch-w-cap { min-height: 1.6em; font-size: 0.95rem; color: var(--muted); }

/* ───────── Sections ───────── */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { padding-top: 0; }
.section.about-sec { padding-top: clamp(3.5rem, 8vw, 6.5rem); }
section[id] { scroll-margin-top: 4.5rem; }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.1rem; }
.section-head .eyebrow { margin-bottom: 1rem; }

/* ───────── Project cards ───────── */

.group + .group { margin-top: clamp(2.5rem, 6vw, 4rem); }
.group-title { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.25rem; font-size: 1.5rem; }
.group-title::before { content: ""; width: 0.6rem; height: 0.6rem; margin-inline: 3px; background: var(--mint); box-shadow: 3px 0 0 var(--ch-a), -3px 0 0 var(--ch-b); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.cards { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.solo { grid-template-columns: minmax(0, 1fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; transition: border-color 0.12s, box-shadow 0.12s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--split); }

.card-media { border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.card:hover .card-media img { animation: jitter 0.3s steps(1) 1; }
@keyframes jitter {
  0%   { transform: translateX(-3px); filter: drop-shadow(-4px 0 var(--ch-a)) drop-shadow(4px 0 var(--ch-b)); }
  34%  { transform: translateX(3px);  filter: drop-shadow(4px 0 var(--ch-a)) drop-shadow(-4px 0 var(--ch-b)); }
  67%  { transform: translateX(-2px); filter: drop-shadow(-2px 0 var(--ch-a)) drop-shadow(2px 0 var(--ch-b)); }
  100% { transform: none; filter: none; }
}

.card-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.35rem 1.4rem 1.5rem; flex: 1; }
.card h3 { font-size: 1.65rem; }
.card p { color: var(--muted); font-size: 1rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 0.5rem; }
.card-more { font-family: var(--display); font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; }
.card-more svg { width: 1em; height: 1em; transition: transform 0.15s; }
.card:hover .card-more svg { transform: translateX(4px); }
.card-ver { font-size: 0.85rem; color: var(--muted); }

.cards.solo .card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.cards.solo .card-media { border-bottom: 0; border-right: 1px solid var(--line); }
.cards.solo .card-media img { height: 100%; aspect-ratio: auto; min-height: 16rem; }
.cards.solo .card-body { justify-content: center; padding: clamp(1.5rem, 4vw, 2.75rem); }
.cards.solo .card h3 { font-size: clamp(2rem, 4vw, 2.75rem); }
.cards.solo .card p { font-size: 1.08rem; }

/* ───────── The light slab ───────── */

.band {
  position: relative; background: var(--paper); color: var(--ink);
  padding-block: clamp(4rem, 9vw, 7rem);
  clip-path: polygon(0 14px, 9% 14px, 9% 0, 34% 0, 34% 20px, 58% 20px, 58% 6px, 83% 6px, 83% 0, 100% 0, 100% calc(100% - 16px), 77% calc(100% - 16px), 77% 100%, 41% 100%, 41% calc(100% - 10px), 18% calc(100% - 10px), 18% 100%, 0 100%);
}
.band h2 { color: var(--ink); text-shadow: 2px 0 rgba(255, 46, 136, 0.55), -2px 0 rgba(34, 216, 255, 0.7); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.principle { padding: 1.6rem; background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--r); }
.principle:nth-child(1) { box-shadow: 6px 6px 0 var(--ch-a); }
.principle:nth-child(2) { box-shadow: 6px 6px 0 var(--ch-b); }
.principle:nth-child(3) { box-shadow: 6px 6px 0 var(--ink); }
.principle h3 { font-size: 1.35rem; color: var(--ink); }
.principle p { margin-top: 0.6rem; color: #3b3764; font-size: 1.02rem; }

/* ───────── Contact ───────── */

.contact { text-align: center; padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem); }
.contact .mark { display: block; width: 2.6rem; height: 2.6rem; margin: 0 auto 1rem; }
.contact h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.contact p { margin: 1rem auto 0; max-width: 30rem; color: var(--muted); }
.mail { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.75rem; }
.mail-addr { display: inline-flex; align-items: center; padding: 0.8rem 1.2rem; border: 1px solid var(--line-strong); border-radius: var(--r); font-family: var(--display); font-weight: 600; font-size: 1.05rem; text-decoration: none; transition: box-shadow 0.12s, border-color 0.12s; }
.mail-addr:hover { border-color: var(--text); box-shadow: var(--split); }
.mail-alt { margin-top: 1.1rem; font-size: 0.98rem; }
.mail-alt a { color: var(--muted); }
.mail-alt a:hover { color: var(--text); }

/* ───────── Project page ───────── */

.p-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem); }
.p-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(44rem 28rem at 85% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(30rem 20rem at 0% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}
.p-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
  -webkit-mask-image: linear-gradient(#000 10%, transparent 80%);
  mask-image: linear-gradient(#000 10%, transparent 80%);
}

.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }

.p-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.p-hero h1 { margin-top: 1.25rem; font-size: clamp(2.75rem, 6.5vw, 5rem); line-height: 1; }
.p-lede { margin-top: 1.4rem; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; color: var(--text); font-weight: 500; }
.p-sub { margin-top: 1rem; color: var(--muted); max-width: 34rem; }
.p-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* screenshot with its two ghost frames slipping behind it */
.shot { position: relative; }
.shot::before, .shot::after { content: ""; position: absolute; inset: 0; border: 1px solid; border-radius: var(--r); pointer-events: none; opacity: 0.75; }
.shot::before { border-color: var(--ch-a); transform: translate(-10px, 7px); }
.shot::after { border-color: var(--ch-b); transform: translate(10px, -7px); }
.shot img { position: relative; z-index: 1; width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.9); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.facts div { background: var(--bg); padding: 1.4rem var(--gutter) 1.4rem 0; }
.facts div:not(:first-child) { padding-left: 1.5rem; }
.facts dt { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.facts dd { margin: 0.3rem 0 0; font-family: var(--display); font-size: 1.3rem; font-weight: 600; }

.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 4.5rem); }
.about h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.prose p { color: var(--muted); font-size: 1.15rem; line-height: 1.7; }
.prose p + p { margin-top: 1.25rem; }
.prose p:first-child { color: var(--text); font-size: 1.3rem; line-height: 1.55; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.feature { padding: 1.6rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.12s, box-shadow 0.12s; }
.feature:hover { border-color: var(--accent); box-shadow: var(--split); }
.feature .ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.feature .ico svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.feature h3 { margin-top: 1.1rem; font-size: 1.3rem; }
.feature p { margin-top: 0.5rem; color: var(--muted); font-size: 1rem; line-height: 1.6; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.pair a { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.5rem; border-radius: var(--r); border: 1px solid var(--line); text-decoration: none; background: var(--surface); transition: border-color 0.12s, box-shadow 0.12s; }
.pair a:hover { border-color: var(--accent); box-shadow: var(--split); }
.pair strong { font-family: var(--display); font-size: 1.2rem; }
.pair span { color: var(--muted); font-size: 0.98rem; }
.pair em { font-style: normal; color: var(--accent); font-weight: 600; font-size: 0.95rem; margin-top: 0.4rem; }

.cta { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem); border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); box-shadow: 8px 0 0 var(--ch-a), -8px 0 0 var(--ch-b); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(34rem 16rem at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%); }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 18ch; margin-inline: auto; }
.cta p { margin: 1rem auto 0; max-width: 32rem; color: var(--muted); }
.cta .p-actions { justify-content: center; }

.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.more a { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--r); border: 1px solid var(--line); text-decoration: none; background: var(--surface); transition: border-color 0.12s, box-shadow 0.12s; }
.more a:hover { border-color: var(--accent); box-shadow: var(--split); }
.more .dot { width: 0.7rem; height: 0.7rem; background: var(--accent); flex: none; margin-inline: 3px; box-shadow: 3px 0 0 var(--ch-a), -3px 0 0 var(--ch-b); }
.more strong { display: block; font-family: var(--display); font-size: 1.1rem; }
.more small { display: block; color: var(--muted); font-size: 0.88rem; line-height: 1.35; }

/* ───────── Footer ───────── */

.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 3.5rem; background: var(--bg-2); }
.footer-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.footer-row p { color: var(--muted); font-size: 0.98rem; margin-top: 1rem; max-width: 24rem; }
.footer-row h2 { font-size: 1.05rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.footer-row ul { margin-top: 1rem; display: grid; gap: 0.5rem; }
.footer-row ul a { text-decoration: none; }
.footer-row ul a:hover { text-decoration: underline; }
.copyright { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }

/* ───────── Media: trailer, galleries ───────── */

.video { position: relative; aspect-ratio: 16 / 9; max-width: 60rem; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.video a, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-btn { position: absolute; left: clamp(0.75rem, 2.5vw, 1.5rem); bottom: clamp(0.75rem, 2.5vw, 1.5rem); display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.25rem 0.7rem 0.9rem; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font-family: var(--display); font-weight: 700; font-size: 1.05rem; transition: box-shadow 0.12s; }
.video-btn svg { width: 1.6rem; height: 1.6rem; }
.video a:hover .video-btn { box-shadow: var(--split); }
.video a:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.gallery figure { margin: 0; }
.gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gallery img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.9); }
.gallery figcaption { margin-top: 0.7rem; font-size: 0.95rem; color: var(--muted); }

.screens { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.screens figure { margin: 0; }
.screens img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9); }
.screens.tall img { aspect-ratio: auto; }
.screens figcaption { margin-top: 0.65rem; font-size: 0.9rem; color: var(--muted); }
.screens:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--r); }

/* ───────── Project pages: depth ───────── */

.prose p.note { margin-top: 1.5rem; padding: 1rem 1.25rem; color: var(--text); font-size: 1.02rem; line-height: 1.6; border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--surface); }

.steps { counter-reset: step; max-width: 52rem; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); column-gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: 1 / span 2; font: 700 1.9rem/1 var(--display); color: var(--accent); text-shadow: 2px 0 var(--ch-a), -2px 0 var(--ch-b); }
.steps h3 { font-size: 1.3rem; }
.steps p { margin-top: 0.4rem; color: var(--muted); }

.detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem); }
.detail article { border-top: 2px solid var(--line-strong); padding-top: 1.1rem; }
.detail h3 { font-size: 1.45rem; }
.detail p { margin-top: 0.75rem; color: var(--muted); font-size: 1.03rem; line-height: 1.7; }
.detail a { color: var(--text); }

.faq { display: grid; gap: 0.6rem; max-width: 52rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color 0.12s; }
.faq details[open] { border-color: var(--accent); }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 1rem 3.2rem 1rem 1.2rem; font: 600 1.12rem/1.35 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font: 700 1.5rem/1 var(--display); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { box-shadow: var(--split); }
.faq p { padding: 0 1.2rem 1.15rem; color: var(--muted); }

.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.way { display: flex; flex-direction: column; gap: 0.8rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.way.main { border-color: var(--accent); box-shadow: var(--split); }
.way h3 { font-size: 1.4rem; }
.way p { flex: 1; color: var(--muted); font-size: 1rem; }
.way .btn { align-self: flex-start; }

/* ───────── Leaning in: the page-wide fault ───────── */

::selection { background: var(--ch-b); color: var(--on-accent); }

/* a faint scanline texture over everything, and one sweep when a page first loads */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
}
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ch-b) 30%, var(--ch-a) 70%, transparent);
  opacity: 0; animation: boot-sweep 0.9s ease-out 0.05s 1 both;
}
@keyframes boot-sweep {
  0%   { transform: translateY(0);      opacity: 0.7; }
  100% { transform: translateY(100vh);  opacity: 0; }
}

/* section headings tear once as they arrive (see glitch.js) */
h2.glitch { text-shadow: 1px 0 var(--ch-a), -1px 0 var(--ch-b); }
.band h2.glitch { text-shadow: 1px 0 rgba(255, 46, 136, 0.6), -1px 0 rgba(34, 216, 255, 0.75); }
.band .glitch::before, .band .glitch::after { mix-blend-mode: multiply; }

/* a little more colour slip on the things you touch */
.site-nav a:hover, .footer-row ul a:hover, .crumbs a:hover { text-shadow: 1px 0 var(--ch-a), -1px 0 var(--ch-b); }
.btn:hover { text-shadow: 1px 0 rgba(255, 46, 136, 0.55), -1px 0 rgba(34, 216, 255, 0.55); }
.gallery img:hover, .screens img:hover, .video:hover img { animation: jitter 0.3s steps(1) 1; }

/* the ghost frames behind a hero screenshot follow the pointer (see glitch.js) */
.shot::before { transform: translate(calc(-10px - var(--px, 0) * 1px), 7px); }
.shot::after { transform: translate(calc(10px + var(--px, 0) * 1px), -7px); }

.shot-note { margin-top: 1.1rem; max-width: 34rem; font-size: 0.92rem; color: var(--muted); }

/* the 404 page */
.lost { padding-block: clamp(3rem, 9vw, 7rem) clamp(2rem, 6vw, 4rem); text-align: center; }
.lost-code {
  margin: 0; font: 700 clamp(7rem, 34vw, 24rem) / 0.82 var(--display); letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 2px var(--text);
  text-shadow: 8px 0 var(--ch-a), -8px 0 var(--ch-b);
}
.lost .glitch.lost-code::before, .lost .glitch.lost-code::after { -webkit-text-stroke: 2px currentColor; }
.lost h1 { margin-top: 1.5rem; font-size: clamp(2.2rem, 6vw, 4rem); }
.lost p { margin: 1rem auto 0; max-width: 32rem; color: var(--muted); }
.lost .p-actions { justify-content: center; }
html:not([lang="fr"]) [data-l="fr"], html[lang="fr"] [data-l="en"] { display: none; }

/* ───────── Responsive ───────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .glitch-w { max-width: 15rem; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .detail, .ways { grid-template-columns: minmax(0, 1fr); }
  .screens { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0.9rem; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 0.75rem; scroll-padding-inline: var(--gutter); }
  .screens figure { flex: 0 0 min(62vw, 15rem); scroll-snap-align: start; }
  .cards.three, .cards.two, .pair { grid-template-columns: minmax(0, 1fr); }
  .cards.solo .card { grid-template-columns: minmax(0, 1fr); }
  .cards.solo .card-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .cards.solo .card-media img { height: auto; aspect-ratio: 16 / 10; min-height: 0; }
  .principles, .features { grid-template-columns: minmax(0, 1fr); }
  .p-grid, .about { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(odd) { padding-left: 0; }
  .facts div:nth-child(even) { padding-left: 1.5rem; }
  .footer-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-row > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .site-header { position: static; }
  .site-nav a { padding: 0.35rem 0.55rem; font-size: 0.95rem; }
  .btn { width: 100%; justify-content: center; }
  .site-nav .nav-cta { margin-left: 0; }
  .mail-addr { width: 100%; justify-content: center; }
  .cta { box-shadow: 5px 0 0 var(--ch-a), -5px 0 0 var(--ch-b); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* nine project links plus About, GitHub and the language switch: keep the header on one row on desktop */
@media (min-width: 1240px) {
  .header-row { gap: 0.6rem 1rem; }
  .site-nav { flex-wrap: nowrap; gap: 0.1rem; }
  .site-nav a { padding: 0.3rem 0.42rem; font-size: 0.9rem; white-space: nowrap; }
  .site-nav .nav-cta { margin-left: 0.2rem; }
}

/* a one-line announcement under the header */
.announce { display: block; text-align: center; padding: 0.65rem var(--gutter); background: #f0a671; color: #1a1008; font-weight: 500; text-decoration: none; border-bottom: 2px solid #1a1008; }
.announce strong { font-family: var(--display); font-weight: 700; }
.announce:hover { text-decoration: underline; text-underline-offset: 3px; }
.announce:focus-visible { outline: 3px solid var(--text); outline-offset: -3px; }
.chip.chip-hot { color: #f0a671; border-color: rgba(240, 166, 113, 0.6); font-weight: 600; }

/* two download cards side by side; one column on phones */
.ways.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .ways.two { grid-template-columns: minmax(0, 1fr); } }
.way code { word-break: break-all; font-size: 0.8rem; }
