/* Ember Foundry — the site. Palette and shapes follow the game's К2 «Кромка» interface
   (src/game/ui_theme.gd): cream ink, gold lines, dark wood panels, the octagon emblem. */

@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night-0: #070a14;
  --night-1: #0b1121;
  --night-2: #10182c;
  --night-3: #18223b;
  --ink: #f7f1e8;
  --ink-dim: #c3bfdc;
  --ink-faint: #8f8bab;
  --gold: #f4c66e;
  --gold-hi: #ffe3a3;
  --gold-deep: #d29a43;
  --ember: #ff9a4d;
  --mint: #9ae8b0;
  --violet: #7e6fd0;
  --wood-ink: #24170a;
  --panel: rgba(22, 17, 14, .74);
  --panel-cool: rgba(16, 22, 40, .72);
  --line: rgba(255, 216, 160, .2);
  --line-strong: rgba(255, 216, 160, .45);
  --shadow: 0 24px 70px rgba(0, 0, 0, .5);
  --wrap: 1200px;
  --gutter: 16px;
  --header: 64px;
  --font-text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Alegreya SC", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --octagon: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(126, 111, 208, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 45%, rgba(255, 154, 77, .06), transparent 60%),
    var(--night-1);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-text);
  font-feature-settings: "lnum" 1, "pnum" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-hi); }
b, strong { font-weight: 700; color: var(--ink); }
code { font: 500 .88em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink); background: rgba(255, 216, 160, .08); padding: .1em .35em; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(244, 198, 110, .35); color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: calc(860px + var(--gutter) * 2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--gold); color: var(--wood-ink); font-weight: 700; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }
.i { width: 1.15em; height: 1.15em; flex: none; }

/* ------------------------------------------------------------------ emblem and lockup */
.emblem {
  position: relative; display: grid; place-items: center; flex: none;
  width: 76px; aspect-ratio: 1; color: var(--gold);
  filter: drop-shadow(0 0 18px rgba(244, 198, 110, .28));
}
.emblem::before, .emblem::after { content: ""; position: absolute; clip-path: var(--octagon); }
.emblem::before { inset: 0; background: linear-gradient(160deg, var(--gold-hi), var(--gold) 40%, var(--gold-deep)); }
.emblem::after { inset: 2px; background: radial-gradient(circle at 50% 35%, rgba(244, 198, 110, .22), rgba(36, 26, 14, .96) 70%); }
.emblem svg { position: relative; z-index: 1; width: 60%; height: 60%; }
.emblem-sm { width: 34px; filter: none; }
.emblem-sm::after { inset: 1.5px; }

.lockup { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); margin: 18px 0 26px; }
.lockup .emblem { width: clamp(58px, 7vw, 84px); animation: beacon 4.8s ease-in-out infinite; }
.lockup-text { display: grid; gap: 10px; min-width: 0; }
.lockup-word {
  font: 700 clamp(19px, 3.5vw, 48px)/1 var(--font-text);
  letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}
.lockup-motto {
  display: flex; align-items: center; gap: 14px; color: var(--gold);
  font: 700 clamp(10px, 1.2vw, 15px)/1 var(--font-text); letter-spacing: .42em; text-transform: uppercase;
}
.lockup-motto .rule { flex: 1; min-width: 40px; height: 1px; background: linear-gradient(90deg, rgba(244, 198, 110, .7), transparent); transform-origin: left; }
@keyframes beacon {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(244, 198, 110, .25)); }
  50% { filter: drop-shadow(0 0 30px rgba(255, 170, 80, .55)); }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  --cut: 9px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 11px 22px;
  font: 700 17px/1.1 var(--font-text); letter-spacing: .01em;
  color: var(--ink); text-decoration: none; text-align: center;
  background: none; border: 0; cursor: pointer;
  transition: transform .25s var(--ease), color .2s, filter .3s;
}
.btn::before, .btn::after {
  content: ""; position: absolute; z-index: -1;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.btn::before { inset: 0; }
.btn::after { inset: 1px; --cut: 8.6px; }
.btn:hover { color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-gold { color: var(--wood-ink); }
.btn-gold::before { background: #ffe9b8; }
.btn-gold::after { background: linear-gradient(180deg, #ffe3a3, var(--gold) 46%, var(--gold-deep)); }
.btn-gold:hover { color: var(--wood-ink); filter: drop-shadow(0 0 18px rgba(244, 198, 110, .45)) brightness(1.05); }
.btn-ghost::before { background: var(--line-strong); }
.btn-ghost::after { background: rgba(16, 13, 12, .62); backdrop-filter: blur(6px); }
.btn-ghost:hover::after { background: rgba(60, 44, 24, .7); }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 15px; --cut: 7px; }
.btn-sm::after { --cut: 6.6px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 18px; --cut: 11px; }
.btn-lg::after { --cut: 10.6px; }
.btn-block { display: flex; width: 100%; }

/* ------------------------------------------------------------------ header */
.header-sentinel { position: absolute; top: 0; height: 24px; width: 1px; }
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
  background: linear-gradient(180deg, rgba(7, 10, 20, .7), rgba(7, 10, 20, 0));
}
.site-header.is-solid {
  background: rgba(9, 13, 26, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}
.header-bar { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand-word { font: 700 15px/1 var(--font-text); letter-spacing: .28em; text-transform: uppercase; white-space: nowrap; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 8px 12px; color: var(--ink-dim); text-decoration: none; font-weight: 500; font-size: 16px; border-radius: 6px; transition: color .2s, background .2s; }
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--ink); background: rgba(255, 216, 160, .07); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang {
  min-width: 44px; height: 38px; padding: 0 10px;
  font: 700 13px/1 var(--font-text); letter-spacing: .14em; color: var(--ink-dim);
  background: transparent; border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
  transition: color .2s, border-color .2s;
}
.lang:hover { color: var(--gold); border-color: var(--line-strong); }
.burger { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; }
.burger-lines, .burger-lines::before, .burger-lines::after { display: block; width: 20px; height: 2px; margin: 0 auto; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger-lines { position: relative; }
.burger-lines::before, .burger-lines::after { content: ""; position: absolute; left: 0; }
.burger-lines::before { top: -6px; }
.burger-lines::after { top: 6px; }
.burger[aria-expanded="true"] .burger-lines { background: transparent; }
.burger[aria-expanded="true"] .burger-lines::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .burger { display: block; }
  .site-nav {
    position: absolute; top: var(--header); left: 0; right: 0; margin: 0;
    padding: 8px var(--gutter) 18px; background: rgba(9, 13, 26, .97); backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line), 0 24px 40px rgba(0, 0, 0, .4);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 13px 10px; font-size: 18px; }
  .site-header.menu-open { background: rgba(9, 13, 26, .97); }
}
@media (max-width: 520px) {
  .header-cta { display: none; }
  .brand-word { font-size: 13px; letter-spacing: .22em; }
}
@media (max-width: 340px) { .brand-word { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: max(640px, min(100svh, 1000px));
  padding: calc(var(--header) + 48px) 0 110px;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: var(--night-0); }
.hero-media picture, .hero-still, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-still { animation: drift 26s ease-in-out infinite alternate; transform-origin: 62% 55%; }
.hero-video { opacity: 0; transition: opacity 1.4s ease; }
.hero-video.is-playing { opacity: 1; }
.hero-video.is-playing.is-dim { opacity: 0; transition-duration: .7s; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 20, .92) 0%, rgba(7, 10, 20, .7) 34%, rgba(7, 10, 20, .18) 66%, rgba(7, 10, 20, 0) 100%),
    linear-gradient(0deg, var(--night-1) 0%, rgba(11, 17, 33, 0) 26%),
    linear-gradient(180deg, rgba(7, 10, 20, .55) 0%, rgba(7, 10, 20, 0) 22%);
}
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero-inner { position: relative; z-index: 2; }
.hero-inner > * { max-width: 660px; }
.hero-inner > .lockup, .hero-inner > .tagline { max-width: 820px; }
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font: 700 13px/1.2 var(--font-text); letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before, .kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.tagline {
  font: 800 clamp(36px, 5vw, 64px)/1.02 var(--font-display);
  color: var(--ink); text-shadow: 0 4px 30px rgba(0, 0, 0, .55);
}
.lead { margin-top: 22px; font-size: clamp(17px, 1.45vw, 20px); color: var(--ink-dim); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta { margin-top: 18px; font-size: 15px; color: var(--ink-faint); }
.hero-meta [data-release="version"] { color: var(--ink-dim); }
.release-date:not(:empty)::before { content: " · "; }
.video-toggle {
  position: absolute; right: var(--gutter); bottom: 28px; z-index: 3;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--ink); background: rgba(9, 13, 26, .6); border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  backdrop-filter: blur(6px); transition: border-color .2s, color .2s;
}
.video-toggle:hover { color: var(--gold); border-color: var(--line-strong); }
.video-toggle .i { width: 16px; height: 16px; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; z-index: 3; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(247, 241, 232, .45); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--gold); border-radius: 2px; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes drift { from { transform: scale(1.08) translate3d(0, 0, 0); } to { transform: scale(1.0) translate3d(-1.2%, .6%, 0); } }

/* entrance */
.js .hero-inner > * { opacity: 0; transform: translateY(18px); animation: rise 1s var(--ease) forwards; }
.js .hero-inner > :nth-child(1) { animation-delay: .15s; }
.js .hero-inner > :nth-child(2) { animation-delay: .3s; }
.js .hero-inner > :nth-child(3) { animation-delay: .5s; }
.js .hero-inner > :nth-child(4) { animation-delay: .65s; }
.js .hero-inner > :nth-child(5) { animation-delay: .8s; }
.js .hero-inner > :nth-child(6) { animation-delay: .95s; }
.js .lockup-motto .rule { animation: draw 1.4s 1.1s var(--ease) both; }
@keyframes rise { to { opacity: 1; transform: none; } }
/* If the animation clock never runs (a stalled tab, a headless renderer), site.js shows the hero anyway. */
.hero-ready .hero-inner > * { animation: none !important; opacity: 1 !important; transform: none !important; }
.hero-ready .lockup .emblem { animation: beacon 4.8s ease-in-out infinite !important; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 720px) {
  .hero { align-items: flex-end; min-height: max(620px, 100svh); padding-bottom: 96px; }
  .hero-media::after {
    background:
      linear-gradient(0deg, var(--night-1) 0%, rgba(11, 17, 33, .92) 34%, rgba(7, 10, 20, .35) 66%, rgba(7, 10, 20, .55) 100%);
  }
  .hero-still { object-position: 60% 50%; }
  .scroll-cue { display: none; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* ------------------------------------------------------------------ sections */
.section { position: relative; padding: clamp(80px, 10vw, 140px) 0; }
.section-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { margin-top: 14px; font: 800 clamp(32px, 4.2vw, 54px)/1.04 var(--font-display); }
.section-head p:not(.kicker) { margin-top: 18px; font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-dim); }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* frames: a gold corner bracket in each corner, like the К2 cards */
.frame { position: relative; overflow: hidden; border-radius: 12px; background: var(--night-0); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.frame::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none; z-index: 3; opacity: .75;
  --c: rgba(255, 216, 160, .85); --l: 22px; --w: 1.5px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}

/* ------------------------------------------------------------------ day and night */
.daynight { background: linear-gradient(180deg, var(--night-1), var(--night-2) 60%, var(--night-1)); }
.compare {
  --pos: 50%;
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: var(--night-0);
}
.compare picture, .compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-day { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: linear-gradient(180deg, transparent, var(--gold) 12%, var(--gold) 88%, transparent); box-shadow: 0 0 16px rgba(244, 198, 110, .7); pointer-events: none; }
.compare-knob {
  position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 70px; height: 40px; transform: translate(-50%, -50%);
  color: var(--wood-ink); background: linear-gradient(180deg, #ffe3a3, var(--gold) 50%, var(--gold-deep));
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  box-shadow: 0 0 24px rgba(244, 198, 110, .6);
  transition: transform .2s var(--ease);
}
.compare-knob svg { width: 18px; height: 18px; }
.compare:hover .compare-knob, .compare.is-dragging .compare-knob { transform: translate(-50%, -50%) scale(1.08); }
.compare-label {
  position: absolute; top: 16px; padding: 6px 12px;
  font: 700 12px/1 var(--font-text); letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink); background: rgba(9, 13, 26, .62); border: 1px solid var(--line); border-radius: 6px; backdrop-filter: blur(6px);
  pointer-events: none; transition: opacity .3s;
}
.compare-label-day { left: 16px; }
.compare-label-night { right: 16px; }
.compare-range { position: absolute; inset: auto 0 0 0; width: 100%; height: 2px; margin: 0; opacity: 0; pointer-events: none; }
.compare:focus-within { box-shadow: var(--shadow), 0 0 0 2px var(--gold); }
.dn-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.note { padding: 24px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.note h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; color: var(--ink); }
.note h3 .i { color: var(--gold); width: 22px; height: 22px; }
.note:last-child h3 .i { color: #dfe4ef; }
.note p { margin-top: 10px; color: var(--ink-dim); }
@media (max-width: 720px) {
  .dn-notes { grid-template-columns: 1fr; }
  .compare { aspect-ratio: 4 / 3; border-radius: 10px; }
  .compare img { object-position: 50% 50%; }
  .compare-label { top: 10px; font-size: 11px; }
  .compare-label-day { left: 10px; }
  .compare-label-night { right: 10px; }
}

/* ------------------------------------------------------------------ features */
.feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 9vw, 120px); }
.feature-flip .feature-media { order: 2; }
.feature-media { aspect-ratio: 16 / 10; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.feature-media:hover img { transform: scale(1.08); }
.feature-tag { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--font-text); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.feature-tag .i { width: 22px; height: 22px; }
.feature-text h3 { margin-top: 14px; font: 800 clamp(27px, 2.7vw, 38px)/1.08 var(--font-display); }
.feature-text p:not(.feature-tag) { margin-top: 16px; color: var(--ink-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink); background: rgba(255, 216, 160, .06); border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 960px) {
  .feature { grid-template-columns: 1fr; }
  .feature-flip .feature-media { order: 0; }
  .feature-media { aspect-ratio: 16 / 10; }
}

/* fog of war over the grove: the cursor is a beacon */
.fog-frame { cursor: crosshair; touch-action: pan-y; }
.fog-frame .fog { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.fog-hint {
  position: absolute; left: 50%; bottom: 22px; z-index: 4; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; transform: translateX(-50%); white-space: nowrap;
  font: 700 14px/1 var(--font-text); color: var(--ink); background: rgba(9, 13, 26, .72); border: 1px solid var(--line-strong); border-radius: 6px; backdrop-filter: blur(6px);
  transition: opacity .6s, transform .6s;
  pointer-events: none;
}
.fog-hint .i { color: var(--gold); width: 18px; height: 18px; }
.fog-frame.is-cleared .fog-hint { opacity: 0; transform: translate(-50%, 8px); }
html:not(.js) .fog-hint { display: none; }
@media (max-width: 520px) { .fog-hint { font-size: 12px; } }

/* ------------------------------------------------------------------ showreel */
.showreel { background: radial-gradient(900px 420px at 50% 30%, rgba(255, 154, 77, .08), transparent 70%), var(--night-1); }
.player { aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.player-start {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px;
  font: 700 17px/1 var(--font-text); color: var(--ink); letter-spacing: .04em;
  background: radial-gradient(circle, rgba(7, 10, 20, .15), rgba(7, 10, 20, .55)); border: 0; cursor: pointer;
}
.play-ring { display: grid; place-items: center; width: 84px; height: 84px; color: var(--wood-ink); background: linear-gradient(180deg, #ffe3a3, var(--gold) 50%, var(--gold-deep)); clip-path: var(--octagon); transition: transform .3s var(--ease); }
.play-ring svg { width: 34px; height: 34px; margin-left: 4px; }
.player-start:hover .play-ring { transform: scale(1.08); }
.player.is-playing .player-start { display: none; }

/* ------------------------------------------------------------------ gallery */
.shots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 15.5vw, 212px); grid-auto-flow: dense;
  gap: 14px; margin: 0; padding: 0; list-style: none;
}
.shot-wide { grid-column: span 2; grid-row: span 2; }
.shot-wide-right { grid-column: 2 / span 2; }
.shot button {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden;
  background: var(--night-0); border: 0; border-radius: 10px; cursor: zoom-in;
  box-shadow: 0 0 0 1px var(--line), 0 14px 34px rgba(0, 0, 0, .35);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; }
.shot button::after {
  content: attr(data-caption);
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px;
  font: 700 15px/1.3 var(--font-text); color: var(--ink); text-align: left;
  background: linear-gradient(180deg, transparent, rgba(7, 10, 20, .9));
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease);
}
.shot button:hover img, .shot button:focus-visible img { transform: scale(1.06); }
.shot button:hover::after, .shot button:focus-visible::after { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 26vw, 220px); }
  .shot-wide, .shot-wide-right { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 560px) {
  .shots { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 12px; }
  .shot-wide, .shot-wide-right { grid-column: auto; grid-row: auto; }
  .shot button { aspect-ratio: 16 / 9; height: auto; }
  .shot button::after { opacity: 1; transform: none; font-size: 14px; padding-top: 28px; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 56px 64px;
  background: rgba(5, 7, 14, .95); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .3s;
}
.lightbox.is-open { opacity: 1; }
.lightbox figure { margin: 0; display: grid; gap: 14px; justify-items: center; max-width: 100%; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 160px); width: auto; height: auto; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--line); transform: scale(.97); transition: transform .35s var(--ease), opacity .25s; }
.lightbox.is-open img { transform: none; }
.lightbox img.is-loading { opacity: .4; }
.lightbox figcaption { font-size: 16px; color: var(--ink-dim); text-align: center; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; color: var(--ink); background: rgba(22, 17, 14, .7); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: color .2s, border-color .2s; }
.lb-btn:hover { color: var(--gold); border-color: var(--line-strong); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
@media (max-width: 720px) {
  .lightbox { padding: 64px 8px 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; margin: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

/* ------------------------------------------------------------------ download */
.download { background: linear-gradient(180deg, var(--night-1), var(--night-2)); }
.download::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 360px at 50% 0%, rgba(244, 198, 110, .08), transparent 70%); }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dl-card {
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 3vw, 32px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .3s, box-shadow .3s;
}
.dl-card.is-recommended { border-color: rgba(244, 198, 110, .6); box-shadow: 0 0 0 1px rgba(244, 198, 110, .25), 0 24px 60px rgba(244, 198, 110, .08); }
.dl-card.is-recommended::before {
  content: attr(data-badge);
  position: absolute; top: -12px; right: 20px; padding: 5px 10px;
  font: 700 11px/1 var(--font-text); letter-spacing: .2em; text-transform: uppercase; color: var(--wood-ink);
  background: var(--gold); border-radius: 4px;
}
.dl-head { display: flex; gap: 16px; align-items: flex-start; }
.dl-head .os { width: 40px; height: 40px; color: var(--ink); flex: none; margin-top: 2px; }
.dl-head h3 { font: 800 30px/1 var(--font-display); }
.dl-req { margin-top: 8px; font-size: 15px; color: var(--ink-dim); }
.dl-file { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--ink-faint); margin-top: -6px; word-break: break-all; }
.dl-size:not(:empty)::before { content: "·"; margin-right: 12px; }
.steps { counter-reset: step; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; font-size: 16px; color: var(--ink-dim); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px;
  font: 700 13px/1 var(--font-text); color: var(--wood-ink); background: var(--gold); clip-path: var(--octagon);
}
.steps b { color: var(--ink); font-weight: 700; }
.sha { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-faint); }
.sha summary { cursor: pointer; width: fit-content; }
.sha summary:hover { color: var(--ink-dim); }
.sha code { display: block; margin-top: 10px; padding: 10px 12px; word-break: break-all; font-size: 12.5px; color: var(--ink-dim); }
.copy { margin-top: 8px; padding: 6px 12px; font: 700 13px/1 var(--font-text); color: var(--gold); background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.copy:hover { border-color: var(--line-strong); }
.dl-foot { margin-top: 28px; text-align: center; color: var(--ink-dim); font-size: 16px; }
.dl-mobile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; padding: 16px 18px; color: var(--ink); background: rgba(244, 198, 110, .08); border: 1px solid var(--line-strong); border-radius: 12px; font-size: 16px; }
@media (max-width: 860px) { .dl-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ craft */
.craft { background: radial-gradient(800px 400px at 15% 20%, rgba(126, 111, 208, .1), transparent 70%), var(--night-1); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.stat { display: grid; gap: 10px; align-content: start; padding: 24px 24px 26px; background: var(--panel-cool); border: 1px solid var(--line); border-radius: 12px; }
.stat b { font: 800 clamp(38px, 4.4vw, 54px)/1 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }
.stat b::after { content: attr(data-suffix); }
.stat span { color: var(--ink-dim); font-size: 16px; line-height: 1.45; }
.tech { margin-top: 28px; padding: clamp(22px, 3vw, 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.tech h3 { font: 800 26px/1.1 var(--font-display); }
.tech ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; margin: 18px 0 0; padding: 0; list-style: none; }
.tech li { position: relative; padding-left: 24px; color: var(--ink-dim); font-size: 16px; }
.tech li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; background: var(--gold); clip-path: var(--octagon); }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech ul { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ faq */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative; display: block; padding: 22px 48px 22px 0; cursor: pointer; list-style: none;
  font: 700 clamp(18px, 1.6vw, 21px)/1.3 var(--font-text); color: var(--ink); transition: color .2s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -9px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .3s var(--ease), margin .3s;
}
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list summary:hover { color: var(--gold); }
.faq-list details p { padding: 0 0 22px; color: var(--ink-dim); max-width: 46em; }
.faq-list code { word-break: break-all; }

/* ------------------------------------------------------------------ last call and footer */
.last-call { position: relative; isolation: isolate; overflow: hidden; padding: clamp(96px, 12vw, 160px) 0; text-align: center; background: radial-gradient(600px 320px at 50% 100%, rgba(255, 154, 77, .22), transparent 70%), radial-gradient(900px 500px at 50% 120%, rgba(244, 198, 110, .12), transparent 70%), var(--night-0); }
.last-call .embers { z-index: -1; }
.last-inner { display: grid; justify-items: center; gap: 18px; }
.last-inner h2 { font: 800 clamp(34px, 4.6vw, 58px)/1.05 var(--font-display); }
.last-inner p { max-width: 34em; color: var(--ink-dim); font-size: clamp(17px, 1.4vw, 20px); }
.last-inner .btn { margin-top: 12px; }

.site-footer { padding: 56px 0 40px; background: var(--night-0); border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-faint); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr; gap: 28px 48px; align-items: start; }
.footer-note { margin-top: 14px; max-width: 26em; }
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--ink-dim); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.credits a { color: var(--ink-dim); }
.copyright { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(255, 216, 160, .1); font-size: 14px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-still { animation: none; }
  .js .hero-inner > *, .js .lockup-motto .rule { animation: none !important; opacity: 1; transform: none; }
}
