/* ==========================================================
   thunderstorms.co.uk: joyful storm palette
   ========================================================== */
:root {
  --ink: #170a38;          /* deep violet night */
  --ink-2: #24104f;
  --text: #ffffff;
  --muted: #d9ccff;
  --line: rgba(255, 255, 255, 0.22);

  --bolt: #fff04d;         /* electric lemon */
  --pink: #ff3ea5;
  --cyan: #22e4ff;
  --lime: #b6ff3b;
  --orange: #ff8a3d;
  --violet: #8b5cf6;
  --danger: #ff3ea5;

  --radius: 26px;
  --head: 'Unbounded', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--head); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
a { color: inherit; }
img, svg { display: block; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--bolt); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--bolt); color: var(--ink); }

.eyebrow {
  display: inline-block;
  font-family: var(--head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bolt);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  transform: rotate(-2deg);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(23, 10, 56, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 900; font-size: 1.05rem; letter-spacing: -0.02em; }
.logo svg { width: 30px; height: 30px; fill: var(--bolt); filter: drop-shadow(0 0 10px rgba(255, 240, 77, 0.8)); transition: transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover svg { transform: rotate(-12deg) scale(1.15); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted); transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--bolt); }
.nav .nav-cta {
  color: var(--ink);
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 3px 3px 0 var(--pink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav .nav-cta:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--pink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px;
  border-radius: 999px;
  font: 700 1rem var(--head);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  border: 3px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.15s;
}
.btn-primary { background: var(--bolt); box-shadow: 6px 6px 0 var(--pink); }
.btn-ghost { background: #fff; box-shadow: 6px 6px 0 var(--cyan); }
.btn:hover { transform: translate(-3px, -3px) rotate(-1deg); }
.btn-primary:hover { box-shadow: 9px 9px 0 var(--pink); }
.btn-ghost:hover { box-shadow: 9px 9px 0 var(--cyan); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--pink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  cursor: crosshair;
}
.hero > * { position: absolute; inset: 0; }
.sky {
  background:
    radial-gradient(ellipse 90% 45% at 70% 100%, rgba(255, 138, 61, 0.85), transparent 70%),
    radial-gradient(ellipse 70% 50% at 10% 95%, rgba(255, 62, 165, 0.75), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(34, 228, 255, 0.35), transparent 70%),
    linear-gradient(180deg, #1d0b4a 0%, #3b1384 38%, #7a1f9e 66%, #c2307f 86%, #ff6a5c 100%);
}
.clouds { pointer-events: none; background-repeat: repeat-x; }
.clouds-back {
  background-image:
    radial-gradient(ellipse 30% 18% at 15% 20%, rgba(190, 140, 255, 0.45), transparent 70%),
    radial-gradient(ellipse 35% 20% at 55% 12%, rgba(160, 110, 255, 0.5), transparent 70%),
    radial-gradient(ellipse 28% 16% at 88% 24%, rgba(255, 140, 220, 0.35), transparent 70%);
  background-size: 1600px 100%;
  animation: drift 90s linear infinite;
}
.clouds-front {
  background-image:
    radial-gradient(ellipse 40% 14% at 30% 4%, rgba(29, 11, 74, 0.95), transparent 70%),
    radial-gradient(ellipse 45% 16% at 80% 2%, rgba(29, 11, 74, 0.9), transparent 70%);
  background-size: 1400px 100%;
  animation: drift 60s linear infinite reverse;
}
@keyframes drift { to { background-position: 1600px 0; } }

#sky { width: 100%; height: 100%; }
.flash {
  --fx: 50%;
  --fc: rgba(220, 240, 255, 0.9);
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 60% 60% at var(--fx) 0%, var(--fc), transparent 70%),
    rgba(255, 255, 255, 0.1);
  mix-blend-mode: screen;
}

.hero-content { position: relative; inset: auto; padding: 150px 0 150px; pointer-events: none; }
.hero-content a { pointer-events: auto; }
.hero h1 {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin-bottom: 26px;
  text-shadow: 0 6px 40px rgba(29, 11, 74, 0.5);
}
.charge {
  display: inline-block;
  color: var(--bolt);
  text-shadow: 5px 5px 0 var(--pink), 0 0 40px rgba(255, 240, 77, 0.55);
  transform: rotate(-3deg);
  transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1), text-shadow 0.2s;
}
.hero.lit .charge { transform: rotate(-3deg) scale(1.06); text-shadow: 5px 5px 0 var(--cyan), 0 0 70px rgba(255, 255, 255, 0.95); transition-duration: 0.05s; }
.lede { font-size: clamp(1.1rem, 2vw, 1.35rem); color: #fff; max-width: 34ch; margin-bottom: 36px; text-shadow: 0 2px 20px rgba(29, 11, 74, 0.6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; }

.hero-controls {
  position: absolute;
  inset: auto 16px 24px auto;
  display: flex; align-items: center; gap: 10px;
  z-index: 2;
}
.hint { font-size: 0.9rem; font-weight: 700; color: #fff; margin-right: 6px; text-shadow: 0 1px 10px rgba(29, 11, 74, 0.8); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(29, 11, 74, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font: 700 0.85rem var(--body);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { background: #fff; color: var(--ink); border-color: #fff; }
.chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip svg path:first-child { fill: currentColor; stroke: none; }
.chip .waves { opacity: 0.25; transition: opacity 0.2s; }
.chip[aria-pressed="true"] .waves { opacity: 1; }
#sound-toggle[aria-pressed="true"] { background: var(--bolt); color: var(--ink); border-color: var(--bolt); }

/* ---------- Marquee + counter ---------- */
.marquee {
  background: var(--pink);
  color: #fff;
  overflow: hidden;
  border-block: 3px solid var(--ink);
  transform: rotate(-1.5deg) scale(1.03);
  margin-top: -18px;
  position: relative;
  z-index: 3;
  box-shadow: 0 10px 0 var(--bolt);
}
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee span {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(1.2rem, 3vw, 2rem);
  text-transform: uppercase;
  padding: 14px 28px;
  white-space: nowrap;
}
.marquee span::after { content: ''; display: inline-block; width: 0.55em; height: 0.9em; margin-left: 56px; background: var(--bolt); clip-path: polygon(55% 0, 0 58%, 42% 58%, 30% 100%, 100% 38%, 58% 38%); vertical-align: -0.1em; }
@keyframes marquee { to { transform: translateX(-50%); } }

.counter-strip {
  background: var(--bolt);
  color: var(--ink);
  padding: 46px 0 34px;
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
}
.counter-strip strong {
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.8em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 4ch;
  margin: 0 4px;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--pink);
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 900; letter-spacing: -0.04em; margin-bottom: 18px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.15rem; }
.section-head-sub { margin-top: 110px; }

#science {
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(34, 228, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 60%, rgba(255, 62, 165, 0.18), transparent 70%),
    var(--ink);
}

.ingredients, .stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ingredient, .stage {
  --c: var(--cyan);
  background: var(--ink-2);
  border: 3px solid var(--c);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 8px 8px 0 var(--c);
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.25s;
}
.ingredient:nth-child(2), .stage:nth-child(2) { --c: var(--pink); }
.ingredient:nth-child(3), .stage:nth-child(3) { --c: var(--lime); }
.ingredient:hover, .stage:hover { transform: translate(-4px, -4px) rotate(-1deg); box-shadow: 12px 12px 0 var(--c); }
.ingredient .num { font-family: var(--head); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--c); }
.ingredient h3, .stage h3 { font-size: 1.5rem; margin: 12px 0 12px; }
.ingredient p, .stage p { color: var(--muted); }

.stage-art { width: 100%; height: auto; max-height: 180px; margin-bottom: 18px; }
.stage-art .cloud { fill: rgba(255, 255, 255, 0.92); stroke: none; }
.stage-art .faded { opacity: 0.45; }
.stage-art .bolt { fill: var(--bolt); filter: drop-shadow(0 0 8px rgba(255, 240, 77, 0.9)); }
.stage-art .rain, .stage-art .updraft { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stage-art .updraft { stroke: var(--pink); }
.stage:hover .bolt { animation: blink 1s steps(1) infinite; }
.stage:hover .stage-art { animation: bob 1.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 60% { opacity: 0.15; } 70% { opacity: 1; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.stage-tag { font-family: var(--head); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c) !important; }

/* Lightning section: hot pink to violet */
#lightning {
  background:
    radial-gradient(ellipse 50% 50% at 90% 10%, rgba(255, 240, 77, 0.35), transparent 70%),
    linear-gradient(140deg, #ff3ea5 0%, #b92fd6 45%, #6d28d9 100%);
}
#lightning .section-head p:not(.eyebrow) { color: #fff; }
#lightning .eyebrow { background: var(--ink); color: var(--bolt); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.fact {
  --bg: #fff;
  background: var(--bg);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-1.2deg);
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1);
}
.fact:nth-child(1) { --bg: var(--bolt); }
.fact:nth-child(2) { --bg: var(--cyan); transform: rotate(1.2deg); }
.fact:nth-child(3) { --bg: #fff; }
.fact:nth-child(4) { --bg: var(--lime); transform: rotate(1deg); }
.fact:nth-child(5) { --bg: #ffc2e4; }
.fact:nth-child(6) { --bg: var(--orange); transform: rotate(1.4deg); }
.fact:hover { transform: rotate(0) scale(1.04); }
.fact p { color: var(--ink); font-weight: 500; }
.fact-num {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(2.3rem, 4.4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -0.05em;
}
.fact-num span { font-size: 0.4em; margin-left: 6px; letter-spacing: 0; }

.uk-panel {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: start;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--bolt);
}
.uk-panel .eyebrow { background: var(--orange); color: var(--ink); }
.uk-panel h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; color: var(--bolt); }
.uk-panel p:not(.eyebrow) { color: var(--muted); }
.uk-panel em { color: var(--orange); font-style: normal; font-weight: 700; }

/* ---------- Calculator ---------- */
#distance {
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(34, 228, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 50% at 100% 100%, rgba(182, 255, 59, 0.15), transparent 70%),
    var(--ink);
}
.calc {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  border: 3px solid var(--cyan);
  border-radius: 32px;
  overflow: hidden;
  background: var(--ink-2);
  box-shadow: 12px 12px 0 var(--cyan);
}
.calc-controls { padding: 40px; border-right: 3px solid var(--cyan); display: flex; flex-direction: column; justify-content: center; background: rgba(34, 228, 255, 0.06); }
.btn-big { padding: 22px 26px; font-size: 1.05rem; margin-bottom: 36px; width: 100%; }
.btn-big.armed {
  background: var(--pink);
  color: #fff;
  box-shadow: 6px 6px 0 var(--bolt);
  animation: pulse 0.9s infinite;
}
@keyframes pulse { 50% { transform: scale(1.04) rotate(-1deg); } }
.slider-label { font-size: 0.95rem; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: 99px;
  background: var(--line);
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--bolt); border: 3px solid var(--ink); cursor: grab;
  box-shadow: 3px 3px 0 var(--pink);
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bolt); border: 3px solid var(--ink); cursor: grab;
}
.slider-scale { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

.calc-readout { padding: 40px; display: flex; flex-direction: column; gap: 34px; }
.readings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.readings > div:nth-child(1) .reading { color: var(--bolt); }
.readings > div:nth-child(2) .reading { color: var(--cyan); }
.readings > div:nth-child(3) .reading { color: var(--lime); }
.reading { font-family: var(--head); font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.unit { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }

.track { position: relative; height: 110px; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 64px; height: 3px; border-radius: 3px; background: var(--line); }
.zone {
  position: absolute; left: 0; top: 40px; height: 50px;
  width: 51.45%; /* 30 s = 10.29 km of a 20 km track */
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 62, 165, 0.45), rgba(255, 62, 165, 0.08));
  border: 2px dashed var(--pink);
}
.zone span { position: absolute; right: 10px; bottom: 4px; font-size: 0.75rem; font-weight: 700; color: #ffc2e4; white-space: nowrap; }
.you {
  position: absolute; left: 0; top: 53px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--lime);
  border: 3px solid var(--ink);
  box-shadow: 0 0 16px rgba(182, 255, 59, 0.8);
  font-size: 0; transform: translateX(-4px);
}
.storm-marker {
  position: absolute; top: 14px; left: 20%;
  width: 56px; transform: translateX(-50%);
  transition: left 0.45s cubic-bezier(.3, 1.4, .5, 1);
  animation: bob 1.6s ease-in-out infinite;
}
.storm-marker svg path { fill: #fff; }
.storm-marker svg .b { fill: var(--bolt); }
.track-scale { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }

.verdict {
  padding: 18px 20px;
  border-radius: 18px;
  border: 3px solid var(--line);
  font-weight: 700;
  min-height: 3.6em;
}
.verdict.danger { border-color: var(--ink); background: var(--pink); color: #fff; box-shadow: 5px 5px 0 var(--bolt); }
.verdict.caution { border-color: var(--ink); background: var(--bolt); color: var(--ink); box-shadow: 5px 5px 0 var(--cyan); }

/* ---------- Safety: sunny lemon ---------- */
#safety { background: var(--bolt); color: var(--ink); }
#safety .eyebrow { background: var(--ink); color: var(--bolt); }
#safety .section-head p:not(.eyebrow) { color: var(--ink); }
.rule { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 26px; }
.rule-item, .list {
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 8px 8px 0 var(--ink);
}
.rule-item p { color: var(--ink); font-weight: 500; }
.rule-num { font-family: var(--head); font-weight: 900; font-size: clamp(4rem, 9vw, 6.5rem); line-height: 0.9; color: var(--violet) !important; letter-spacing: -0.06em; margin-bottom: 16px; text-shadow: 4px 4px 0 var(--pink); }
.rule-num span { display: block; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); text-shadow: none; margin-top: 12px; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.list h3 { font-size: 1.6rem; font-weight: 900; margin-bottom: 18px; }
.list ul { list-style: none; display: grid; gap: 14px; }
.list li { position: relative; padding-left: 38px; font-weight: 500; }
.list li::before {
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 900;
  border: 2px solid var(--ink);
}
.do li::before { content: '✓'; background: var(--lime); color: var(--ink); }
.dont li::before { content: '✕'; background: var(--pink); color: #fff; }

/* ---------- Live: cyan to violet ---------- */
.live { background: linear-gradient(150deg, #22e4ff 0%, #6d7cff 45%, #8b5cf6 100%); }
.live .section-head p:not(.eyebrow) { color: var(--ink); font-weight: 500; }
.live .section-head h2 { color: var(--ink); }
.live .eyebrow { background: var(--ink); color: var(--cyan); }
.live-links { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.live-card {
  display: block; text-decoration: none; position: relative;
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.25s;
}
.live-card:hover { transform: translate(-4px, -4px) rotate(-1deg); box-shadow: 12px 12px 0 var(--ink); }
.live-card h3 { font-size: 1.5rem; font-weight: 900; margin: 18px 0 10px; }
.live-card p { color: #3d2a6e; }
.live-card .go { display: inline-block; margin-top: 20px; font-weight: 700; background: var(--ink); color: var(--bolt); padding: 6px 14px; border-radius: 999px; }
.live-card .go::after { content: ' ↗'; }
.live-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); animation: ping 1.6s infinite; }
.live-dot.amber { background: var(--orange); animation-name: ping-amber; }
@keyframes ping { 70% { box-shadow: 0 0 0 14px rgba(255, 62, 165, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 62, 165, 0.7); } }
@keyframes ping-amber { 70% { box-shadow: 0 0 0 14px rgba(255, 138, 61, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.7); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 3px solid var(--pink); padding: 40px 0 48px; }
.footer-inner { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.site-footer p { color: var(--muted); font-size: 0.88rem; max-width: 64ch; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; translate: 0 34px; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(.3, 1.4, .5, 1); }
.js .reveal.in { opacity: 1; translate: 0 0; }
.ingredients .reveal:nth-child(2), .stages .reveal:nth-child(2), .facts .reveal:nth-child(3n+2) { transition-delay: 0.1s; }
.ingredients .reveal:nth-child(3), .stages .reveal:nth-child(3), .facts .reveal:nth-child(3n) { transition-delay: 0.2s; }

/* ==========================================================
   Gallery page
   ========================================================== */
.gallery-hero {
  padding: 160px 0 70px;
  background:
    radial-gradient(ellipse 70% 60% at 85% 100%, rgba(255, 138, 61, 0.6), transparent 70%),
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(255, 62, 165, 0.55), transparent 70%),
    linear-gradient(180deg, #1d0b4a 0%, #3b1384 50%, #7a1f9e 100%);
}
.gallery-hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.6rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.05em; margin-bottom: 24px; }
.gallery-section { padding: 60px 0 40px; }
.gallery { columns: 3 320px; column-gap: 20px; }
.shot {
  --c: var(--cyan);
  position: relative;
  break-inside: avoid;
  margin: 0 0 20px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid var(--c);
  background: var(--ink-2);
  box-shadow: 6px 6px 0 var(--c);
}
.shot:nth-child(4n+2) { --c: var(--pink); }
.shot:nth-child(4n+3) { --c: var(--bolt); }
.shot:nth-child(4n) { --c: var(--lime); }
.js .shot { opacity: 0; translate: 0 24px; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(.3, 1.4, .5, 1), transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.js .shot.in { opacity: 1; translate: 0 0; }
.shot:hover { transform: rotate(-1deg) scale(1.02); }
.shot-link { display: block; cursor: zoom-in; }
.shot img { width: 100%; height: auto; transition: transform 0.6s cubic-bezier(.2, .8, .2, 1), filter 0.4s; }
.shot:hover img { transform: scale(1.05); filter: brightness(1.15) saturate(1.2); }
.shot figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 44px 16px 14px;
  display: grid; gap: 3px;
  background: linear-gradient(transparent, rgba(23, 10, 56, 0.94));
  pointer-events: none;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.shot:hover figcaption, .shot:focus-within figcaption { opacity: 1; transform: none; }
.shot-place { font-family: var(--head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c); }
.shot-caption { font-weight: 700; font-size: 0.95rem; line-height: 1.35; }
.shot-credit { font-size: 0.75rem; color: var(--muted); }
@media (hover: none) {
  .shot figcaption { opacity: 1; transform: none; padding-top: 28px; }
  .shot-caption { font-size: 0.85rem; }
}

.credits-section { padding-top: 70px; }
.credits { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 32px; counter-reset: c; }
.credits li { font-size: 0.88rem; color: var(--muted); padding-left: 38px; position: relative; counter-increment: c; }
.credits li::before { content: counter(c, decimal-leading-zero); position: absolute; left: 0; font-family: var(--head); font-weight: 900; color: var(--bolt); }
.credits .c-title { color: var(--text); font-weight: 700; }
.credits a { color: var(--cyan); }

/* Lightbox */
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
  background: rgba(23, 10, 56, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: lb-in 0.25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } }
.lb-figure { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100vh; padding: 56px 0 24px; }
.lb-img {
  max-width: 100%; max-height: calc(100vh - 170px);
  object-fit: contain; border-radius: 14px;
  border: 3px solid #fff;
  box-shadow: 10px 10px 0 var(--pink);
  transition: opacity 0.25s;
}
.lightbox.loading .lb-img { opacity: 0.3; }
.lb-caption { text-align: center; max-width: 70ch; }
.lb-title { font-weight: 700; margin-bottom: 4px; }
.lb-credit { font-size: 0.85rem; color: var(--muted); }
.lb-credit a { color: var(--cyan); }
.lb-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--ink); background: var(--bolt);
  color: var(--ink); font-size: 1.8rem; font-weight: 900; line-height: 1;
  cursor: pointer; display: grid; place-items: center; justify-self: center;
  box-shadow: 4px 4px 0 var(--pink);
  transition: transform 0.15s cubic-bezier(.3, 1.6, .5, 1);
}
.lb-btn:hover { transform: scale(1.1) rotate(-6deg); }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 14px; right: 14px; font-size: 1.6rem; background: #fff; }
.lb-count { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); font-family: var(--head); font-weight: 700; font-size: 0.8rem; color: var(--bolt); font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ingredients, .stages { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .uk-panel { grid-template-columns: 1fr; gap: 16px; padding: 30px; }
  .calc { grid-template-columns: 1fr; }
  .calc-controls { border-right: 0; border-bottom: 3px solid var(--cyan); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { gap: 14px; }
  .nav a:not(.nav-cta):not(.nav-keep) { display: none; }
  .nav .nav-cta { padding: 7px 14px; font-size: 0.85rem; }
  .logo { font-size: 0.9rem; }
  .logo svg { width: 24px; height: 24px; }
  .rule, .dos, .live-links, .facts { grid-template-columns: 1fr; }
  .hero-content { padding-bottom: 160px; }
  .hero-controls { left: 16px; right: 16px; justify-content: flex-start; flex-wrap: wrap; }
  .hint { width: 100%; }
  .calc-controls, .calc-readout { padding: 24px; }
  .calc { box-shadow: 7px 7px 0 var(--cyan); }
  .readings { gap: 8px; }
  .reading { font-size: 1.7rem; }
  .ingredient, .stage, .fact, .live-card, .list, .rule-item { padding: 24px; box-shadow: 6px 6px 0 var(--c, var(--ink)); }
  .fact, .fact:nth-child(n) { transform: rotate(0); }
  .uk-panel { box-shadow: 7px 7px 0 var(--bolt); }
  .gallery { columns: 2 150px; column-gap: 12px; }
  .shot { margin-bottom: 12px; border-radius: 14px; box-shadow: 4px 4px 0 var(--c); }
  .shot-credit { display: none; }
  .lightbox { grid-template-columns: 1fr; }
  .lb-figure { grid-column: 1; padding: 64px 12px 96px; }
  .lb-prev, .lb-next { position: absolute; bottom: 24px; grid-column: auto; }
  .lb-prev { left: calc(50% - 68px); }
  .lb-next { left: calc(50% + 16px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clouds, .live-dot, .btn-big.armed, .stage:hover .bolt, .stage:hover .stage-art, .storm-marker, .marquee-track { animation: none; }
  .js .reveal, .js .shot { opacity: 1; translate: 0 0; transition: none; }
  .lightbox { animation: none; }
}
