/* ==========================================================================
   Wyrdtafl product site
   Dark Nordic Fantasy, matching the game: night black, hammered bronze and
   gold, Muspelheim embers on the left, Niflheim frost on the right.

   No build step and no third-party requests: one stylesheet, the bundled
   Cinzel (OFL) for display type, the system serif stack for reading text.
   The home page uses the full layout (hero, sections, gallery); the article
   pages (privacy, credits, data deletion) reuse the header, .article and footer.
   ========================================================================== */

@font-face {
  font-family: 'Cinzel';
  src: url('Cinzel-Variable.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;

  /* Surfaces: AMOLED-friendly blacks, slightly warm like the game's hall. */
  --night: #07070a;
  --ink: #0d0e12;
  --panel: #14161c;
  --panel-2: #1b1e26;
  --edge: rgba(226, 185, 122, 0.16);
  --edge-strong: rgba(226, 185, 122, 0.38);

  /* Text */
  --bone: #ece2c8;
  --bone-dim: #b1a78f;
  --bone-faint: #8a8270;

  /* Accents (same hues as the game's tokens) */
  --gold: #f2c46d;
  --gold-hi: #fff1c4;
  --gold-deep: #a8762f;
  --ember: #ff6a1a;
  --ember-soft: #ff9a4a;
  --frost: #63d2ff;
  --frost-soft: #bfeaff;

  /* Type */
  --display: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --header-h: 68px;
  /* Inline padding that aligns full-bleed scrollers with the centred content column. */
  --bleed: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));

  /* Motion: a soft spring-like ease-out used everywhere for consistency. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* SVG fractal noise tile used as film grain (see body below). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--serif);
  font-size: clamp(16px, 0.35vw + 15px, 18px);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Film grain: breaks up banding in the dark gradients and gives the flat
   blacks a printed feel. It lives on the page background (painted once and
   scrolled), not in a fixed full-screen overlay: an overlay above the hero
   film would have to be blended again on every video frame. The hero and the
   cinematic backdrops cover it, which is fine: the film has its own grain. */
body {
  background-image: var(--grain);
}
img, video { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(242, 196, 109, 0.35); color: #fff; }
p { margin: 0 0 1em; }
strong { color: var(--bone); font-weight: 700; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--bone);
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 3.6vw + 0.6rem, 3.4rem); letter-spacing: 0.02em; }
h3 { font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.3rem); letter-spacing: 0.06em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--bone-dim); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; font-family: var(--display); font-weight: 700; }
.skip:focus { left: 8px; }

/* Small all-caps label above a heading ("eyebrow"), flanked by bronze rules. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 600;
  font-size: 0.74rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.eyebrow::after { transform: scaleX(-1); }
.eyebrow.left::before { display: none; }

.lead { font-size: clamp(1.08rem, 0.5vw + 1rem, 1.3rem); color: var(--bone-dim); max-width: 40rem; }
.ember-text { color: var(--ember-soft); }
.frost-text { color: var(--frost); }
.gold-text { color: var(--gold); }

/* ---------- Header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  min-height: var(--header-h); padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bone);
  font-family: var(--display); font-weight: 700; letter-spacing: 0.24em; font-size: 0.95rem;
}
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold-deep), 0 0 18px rgba(255, 140, 50, 0.25); }
.brand:hover { color: var(--gold-hi); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; }
.site-nav a {
  position: relative; text-decoration: none; color: var(--bone-dim);
  font-family: var(--display); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 6px 0; transition: color 0.3s var(--ease);
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform 0.4s var(--ease);
}
.site-nav a:hover { color: var(--gold-hi); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav .nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  color: #1a1206; padding: 9px 16px; border-radius: 999px; line-height: 1;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-deep));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.site-nav .nav-cta::after { display: none; }
.site-nav .nav-cta svg { width: 13px; height: 13px; flex: none; }
.site-nav .nav-cta:hover { color: #000; filter: brightness(1.07); }

/* Home page: the header floats over the hero and turns into frosted glass
   once the page scrolls (class toggled by the script). */
.site-head-bar { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease); padding-top: env(safe-area-inset-top); }
.site-head-bar.is-scrolled {
  background: rgba(8, 8, 11, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--edge), 0 10px 30px rgba(0, 0, 0, 0.35);
}
@media (max-width: 720px) {
  /* On phones keep only the brand and the call to action; the page is short enough to scroll. */
  .site-head-bar .site-nav a:not(.nav-cta) { display: none; }
  .site-head-bar .site-head { flex-wrap: nowrap; min-height: 60px; }
  /* A compact pill on phones: it must not compete with the hero's own
     call to action right below it. */
  .site-nav .nav-cta { padding: 8px 13px; font-size: 0.62rem; letter-spacing: 0.14em; gap: 6px; }
  .site-nav .nav-cta svg { width: 11px; height: 11px; }
  .brand { font-size: 0.82rem; letter-spacing: 0.2em; gap: 10px; }
  .brand img { width: 30px; height: 30px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 58px; padding: 10px 26px; border-radius: 12px; text-decoration: none; cursor: pointer; border: 0;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.86rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s, background 0.35s, color 0.35s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.btn-text small { font-family: var(--serif); text-transform: none; letter-spacing: 0.01em; font-weight: 400; font-size: 0.78rem; opacity: 0.82; }

/* Hammered-gold primary button. Drawn here instead of Google's badge
   artwork, so no brand-asset rules apply. A light sweep crosses it on hover. */
.btn-gold {
  position: relative; overflow: hidden; color: #1a1206;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold) 46%, #b5802f 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 220, 150, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(90, 52, 20, 0.45);
}
.btn-gold::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg); transition: left 0.8s var(--ease);
}
.btn-gold:hover { color: #000; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 34px rgba(255, 170, 70, 0.35), 0 0 0 1px rgba(255, 230, 170, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn-gold:hover::before { left: 120%; }

.btn-ghost {
  color: var(--bone); background: rgba(16, 17, 22, 0.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--edge-strong);
}
.btn-ghost:hover { color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold), 0 0 26px rgba(242, 196, 109, 0.15); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  padding: calc(var(--header-h) + 30px) 0 120px; overflow: hidden; isolation: isolate; text-align: center;
}
.hero-media { position: absolute; inset: 0; z-index: -3; background: #0a0b0e; }
.hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { opacity: 0; transition: opacity 1.6s var(--ease); }
.hero-media video.is-ready { opacity: 1; }
/* Grade the film toward the game's palette and keep text readable:
   a deep top/bottom fade, a centre vignette, ember warmth left, frost right. */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(7, 7, 10, 0.3), rgba(7, 7, 10, 0.8) 100%),
    linear-gradient(180deg, rgba(7, 7, 10, 0.7) 0%, rgba(7, 7, 10, 0.15) 22%, rgba(7, 7, 10, 0.25) 60%, var(--night) 100%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(255, 90, 20, 0.3), transparent 70%),
    radial-gradient(ellipse 45% 55% at 100% 0%, rgba(80, 190, 255, 0.18), transparent 70%);
}
.hero canvas.embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }

.logo-stone {
  width: min(540px, 84vw); height: auto; overflow: visible;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7));
  animation: stone-in 1.8s var(--ease) both;
}
@keyframes stone-in { from { opacity: 0; transform: translateY(20px) scale(0.95); } }

.hero .subtitle {
  font-family: var(--display); font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase;
  font-size: clamp(0.68rem, 0.6vw + 0.55rem, 0.95rem); color: var(--bone); margin: 2px 0 30px; padding-left: 0.42em;
  text-shadow: 0 2px 12px #000; animation: rise 1.2s 0.35s var(--ease) both;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.2vw + 0.6rem, 3rem); font-weight: 600; letter-spacing: 0.01em; margin-bottom: 14px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9); animation: rise 1.2s 0.5s var(--ease) both;
}
.hero h1 .ember-text { text-shadow: 0 0 28px rgba(255, 106, 26, 0.55), 0 4px 30px #000; }
.hero h1 .frost-text { text-shadow: 0 0 28px rgba(99, 210, 255, 0.5), 0 4px 30px #000; }
.hero .lead { margin: 0 auto 34px; color: #d9cfb6; text-shadow: 0 2px 16px #000; animation: rise 1.2s 0.65s var(--ease) both; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; animation: rise 1.2s 0.8s var(--ease) both; }
.hero-facts {
  list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone-dim);
  animation: rise 1.2s 0.95s var(--ease) both;
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ''; width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold-deep); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 520px) {
  /* Phones: the two hero buttons stack at the same width instead of a wide
     gold slab above a narrower outline button. */
  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 330px; margin: 0 auto; }
  .hero-cta .btn { min-height: 54px; padding: 10px 20px; }
  .hero-facts { gap: 6px 16px; font-size: 0.62rem; }
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--display); font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--bone-faint);
}
.scroll-cue span { width: 1px; height: 38px; background: linear-gradient(var(--gold), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-height: 700px) { .scroll-cue { display: none; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(72px, 9vw, 124px) 0; }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(40px, 6vw, 72px); }
.section-head .lead { margin: 0 auto; }

/* Bronze divider with a small Wheel of the Norns in the middle. */
.divider { display: flex; align-items: center; justify-content: center; gap: 18px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); color: var(--gold-deep); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.divider::after { transform: scaleX(-1); }
.divider svg { width: 26px; height: 26px; flex: none; }

/* ---------- Pillars strip ---------- */
.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: -50px; position: relative; z-index: 2;
  background: var(--edge); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--edge);
}
.pillar { background: linear-gradient(180deg, rgba(27, 30, 38, 0.94), rgba(15, 16, 21, 0.97)); padding: 26px 24px; display: flex; gap: 16px; align-items: flex-start; }
.pillar svg { width: 30px; height: 30px; flex: none; color: var(--gold); margin-top: 2px; }
.pillar h3 { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 4px; }
.pillar p { margin: 0; font-size: 0.92rem; color: var(--bone-dim); line-height: 1.5; }
@media (max-width: 960px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } .pillar { padding: 20px; } }

/* ---------- The rule: interactive Dissonance demo ---------- */
.rule-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
@media (max-width: 900px) { .rule-grid { grid-template-columns: 1fr; } }

.oracle {
  position: relative; padding: clamp(26px, 4vw, 44px) clamp(18px, 4vw, 44px); border-radius: 22px; text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 0% 100%, rgba(255, 90, 20, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 70% at 100% 0%, rgba(80, 190, 255, 0.13), transparent 70%),
    linear-gradient(180deg, #16181f, #0c0d11);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--edge), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.oracle-title { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--bone-faint); margin: 0 0 22px; }
.oracle-tiles { display: flex; justify-content: center; gap: clamp(14px, 4vw, 34px); perspective: 900px; }
.tile-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tile-label { font-family: var(--display); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; }
.tile {
  --glow: rgba(255, 106, 26, 0.5);
  position: relative; width: clamp(100px, 22vw, 146px); aspect-ratio: 3 / 4; border-radius: 12px; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 7vw, 3.5rem); letter-spacing: 0.02em;
  transform-style: preserve-3d; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.tile:hover { transform: translateY(-6px) rotateX(8deg); }
.tile.ember {
  color: #ffd9a8;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(255, 106, 26, 0.55), transparent 70%),
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #3a2418, #1c120c);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 34px var(--glow), inset 0 0 0 2px #7a4a22, inset 0 0 0 5px rgba(0, 0, 0, 0.4), inset 0 0 0 6px rgba(255, 170, 90, 0.4);
  text-shadow: 0 0 18px rgba(255, 120, 40, 0.9), 0 2px 0 #000;
}
.tile.frost {
  --glow: rgba(99, 210, 255, 0.42);
  color: #e9f8ff;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(180, 235, 255, 0.4), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(180deg, #33414f, #151c25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 34px var(--glow), inset 0 0 0 2px #7fa6c2, inset 0 0 0 5px rgba(0, 0, 0, 0.35), inset 0 0 0 6px rgba(200, 240, 255, 0.45);
  text-shadow: 0 0 18px rgba(120, 220, 255, 0.9), 0 2px 0 #000;
}
.tile .num { display: block; }
.tile.flip .num { animation: num-flip 0.5s var(--ease); }
@keyframes num-flip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg); opacity: 0.2; } 100% { transform: rotateY(0); } }
.tile-steps { display: flex; gap: 8px; }
.tile-steps button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; color: var(--bone);
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--edge-strong); font-size: 1.2rem; line-height: 1;
  transition: background 0.3s, box-shadow 0.3s, color 0.3s;
}
.tile-steps button:hover { color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 196, 109, 0.08); }

.verdict { margin-top: 28px; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.verdict-word { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 2.6vw, 1.8rem); letter-spacing: 0.18em; text-transform: uppercase; transition: color 0.4s, text-shadow 0.4s; }
.verdict-note { color: var(--bone-dim); font-size: 0.95rem; margin: 6px 0 0; }
.verdict.harmony .verdict-word { color: var(--gold); text-shadow: 0 0 26px rgba(242, 196, 109, 0.7); animation: harmony 0.9s var(--ease); }
@keyframes harmony { 0% { transform: scale(0.88); filter: brightness(2); } 100% { transform: scale(1); filter: none; } }
.oracle-hint { font-size: 0.82rem; color: var(--bone-faint); margin: 14px 0 0; }

/* Turn steps as a numbered list with Roman numerals, like the tiles. */
.steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step, upper-roman);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 0.86rem; color: var(--gold);
  background: radial-gradient(circle at 35% 30%, #2b2418, #0f0d0a); box-shadow: inset 0 0 0 1px var(--gold-deep), 0 6px 16px rgba(0, 0, 0, 0.5);
}
.steps h3 { font-size: 0.92rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 3px 0 4px; }
.steps p { margin: 0; color: var(--bone-dim); font-size: 0.98rem; }

/* ---------- Feature rows (screenshot + copy, alternating) ---------- */
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.feature + .feature { margin-top: clamp(90px, 12vw, 160px); }
.feature.flip { grid-template-columns: 1fr 1.25fr; }
.feature.flip .feature-media { order: 2; }
.feature.tall { grid-template-columns: 0.8fr 1fr; }
.feature.tall.flip { grid-template-columns: 1fr 0.8fr; }
@media (max-width: 900px) {
  .feature, .feature.flip, .feature.tall, .feature.tall.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
}
.feature-copy h2 { font-size: clamp(1.7rem, 2.6vw + 0.7rem, 2.7rem); }
.feature-copy .lead { font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.18rem); }
.feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.feature-list li { position: relative; padding-left: 26px; color: var(--bone-dim); }
.feature-list li::before { content: ''; position: absolute; left: 4px; top: 0.62em; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); }

/* A screenshot presented as a lit object: thin bronze frame, deep shadow,
   and a coloured glow behind it (ember, frost, gold) that matches the scene. */
.shot { position: relative; margin: 0; isolation: isolate; }
.shot::before {
  content: ''; position: absolute; inset: 10% 8%; z-index: -1; border-radius: 50%;
  background: var(--shot-glow, rgba(255, 106, 26, 0.35)); filter: blur(60px);
}
.shot.frost-glow { --shot-glow: rgba(70, 180, 255, 0.32); }
.shot.gold-glow { --shot-glow: rgba(242, 196, 109, 0.28); }
.shot.violet-glow { --shot-glow: rgba(170, 90, 255, 0.28); }
.shot img {
  width: 100%; height: auto; border-radius: 14px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(226, 185, 122, 0.22);
}
/* Portrait screenshots sit in a phone-like bezel. */
.shot.phone { max-width: 340px; margin: 0 auto; }
.shot.phone img { border-radius: 30px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 7px #0b0b0e, 0 0 0 8px rgba(226, 185, 122, 0.3); }

/* ---------- The Nine Realms (cinematic carousel) ---------- */
.realms-section { overflow: hidden; }
.realm-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(236px, 25vw, 320px); gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px var(--bleed) 30px; scroll-padding-inline: var(--bleed);
}
.realm-track::-webkit-scrollbar { display: none; }
.realm {
  position: relative; aspect-ratio: 3 / 4.2; border-radius: 16px; overflow: hidden; scroll-snap-align: start; isolation: isolate; margin: 0;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--edge);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.realm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.realm::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(6, 6, 9, 0.94) 100%); }
.realm:hover { transform: translateY(-6px); box-shadow: 0 40px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--gold-deep); }
.realm:hover img { transform: scale(1.06); }
.realm figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.realm-num { font-family: var(--display); font-size: 0.64rem; letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase; }
.realm h3 { font-size: 1.3rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 4px 0 6px; }
.realm p { margin: 0; font-size: 0.9rem; color: var(--bone-dim); line-height: 1.45; }
.realm-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.realm-foot p { margin: 0; color: var(--bone-faint); font-size: 0.85rem; }
.realm-nav { display: flex; gap: 10px; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; color: var(--bone); display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--edge-strong); transition: color 0.3s, box-shadow 0.3s, background 0.3s;
}
.round-btn:hover { color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 196, 109, 0.08); }
.round-btn svg { width: 18px; height: 18px; }

/* ---------- Modes grid ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .modes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .modes { grid-template-columns: 1fr; } }
.mode {
  --accent: var(--gold);
  position: relative; padding: 30px 28px 28px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--edge), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
/* Cursor-following light (position set by the script via --mx/--my). */
.mode::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.mode:hover { transform: translateY(-4px); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.mode:hover::before { opacity: 1; }
.mode.ember { --accent: var(--ember); }
.mode.frost { --accent: var(--frost); }
.mode .rune {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  font-size: 1.5rem; color: var(--accent); background: #0e0e12;
  background: color-mix(in srgb, var(--accent) 8%, #0c0c10);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 18%, transparent);
}
.mode h3 { font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; }
.mode p { margin: 0; color: var(--bone-dim); font-size: 0.96rem; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(190px, 21vw, 260px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  padding: 10px var(--bleed) 34px; scroll-padding-inline: var(--bleed);
}
.gallery::-webkit-scrollbar { display: none; }
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; border-radius: 22px; color: inherit; text-align: center;
  transition: transform 0.5s var(--ease);
}
.gallery button:hover { transform: translateY(-6px); }
.gallery img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 5px #0b0b0e, 0 0 0 6px rgba(226, 185, 122, 0.22); }
.gallery .cap { display: block; margin-top: 18px; font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone-dim); }

/* Lightbox: native <dialog>, so focus trapping and Esc come for free. */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; color: var(--bone); }
.lightbox::backdrop { background: rgba(4, 4, 6, 0.92); }
.lightbox[open] { display: grid; place-items: center; animation: fade 0.35s var(--ease); }
.lightbox img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; border-radius: 18px; box-shadow: 0 40px 100px #000, 0 0 0 1px var(--edge-strong); }
.lightbox p { margin: 14px 0 0; text-align: center; font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone-dim); }
.lightbox .close { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lightbox .prev, .lightbox .next { position: fixed; top: 50%; margin-top: -24px; }
.lightbox .prev { left: 12px; }
.lightbox .next { right: 12px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Craft section (cinematic backdrop + numbers) ---------- */
.craft { isolation: isolate; overflow: hidden; }
.backdrop { position: absolute; inset: 0; z-index: -2; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.craft::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--night) 0%, rgba(7, 7, 10, 0.25) 25%, rgba(7, 7, 10, 0.3) 75%, var(--night) 100%),
              linear-gradient(90deg, rgba(7, 7, 10, 0.88) 0%, rgba(7, 7, 10, 0.2) 65%, rgba(7, 7, 10, 0.45) 100%);
}
.craft-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
@media (max-width: 900px) { .craft-grid { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--edge); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--edge), 0 30px 70px rgba(0, 0, 0, 0.5); }
.stat { background: rgba(12, 13, 17, 0.86); padding: 26px 24px; }
.stat b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; color: var(--gold); text-shadow: 0 0 24px rgba(242, 196, 109, 0.35); }
.stat span { display: block; margin-top: 10px; font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone-dim); }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 12px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: inset 0 0 0 1px var(--edge); transition: box-shadow 0.3s; }
.faq details[open] { box-shadow: inset 0 0 0 1px var(--edge-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-family: var(--display); font-weight: 600; letter-spacing: 0.05em; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); transition: transform 0.35s var(--ease), margin 0.35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--bone-dim); }

/* ---------- Final call to action ---------- */
.finale { text-align: center; isolation: isolate; overflow: hidden; padding: clamp(110px, 16vw, 220px) 0; }
.finale::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 70% 75% at 50% 50%, rgba(7, 7, 10, 0.3), rgba(7, 7, 10, 0.75) 80%, var(--night) 100%), linear-gradient(180deg, var(--night), transparent 22%, transparent 78%, var(--night));
}
.finale .backdrop img { opacity: 0.85; }
.finale h2 { font-size: clamp(2.1rem, 5vw + 0.5rem, 4.4rem); text-shadow: 0 6px 40px rgba(0, 0, 0, 0.9); }
.finale .lead { margin: 0 auto 34px; color: #d9cfb6; text-shadow: 0 2px 16px #000; }
.finale .hero-cta { animation: none; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--edge); padding: 54px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--bone-faint); font-size: 0.9rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone-dim); margin-bottom: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--bone-dim); text-decoration: none; }
.foot-grid a:hover { color: var(--gold-hi); }
.foot-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 0.8rem; }
.foot-legal p { margin: 0; }
footer .links a { margin-right: 16px; }

/* ---------- Scroll reveal ---------- */
/* Only hidden once the script has run (html.js), so content never stays
   invisible when JavaScript is off. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Article pages (privacy, credits, data deletion) ---------- */
body:not(.home) {
  background-image: radial-gradient(ellipse 60% 40% at 0% 0%, rgba(255, 90, 20, 0.08), transparent 70%), radial-gradient(ellipse 50% 40% at 100% 0%, rgba(80, 190, 255, 0.06), transparent 70%), var(--grain);
  background-repeat: no-repeat, no-repeat, repeat;
}
body:not(.home) > header.site-head { max-width: none; padding-left: var(--bleed); padding-right: var(--bleed); border-bottom: 1px solid var(--edge); }
.article { max-width: 46rem; margin: 0 auto; padding: 40px var(--gutter) 80px; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--gold); letter-spacing: 0.04em; }
.article h2 { font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-top: 2.2em; }
.article ul { padding-left: 1.2em; }
.article li { margin-bottom: 0.4em; }
.article .effective { color: var(--bone-dim); font-style: italic; }
.article code { font-size: 0.9em; color: var(--bone-dim); }
.lang { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
body:not(.home) > footer .wrap p { margin: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
