/* ==========================================================================
   Fantasy Forge — site styles
   Shared by index.html and the legal pages.
   ========================================================================== */

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ink-0: #040306;
  --ink-1: #09080d;
  --ink-2: #110f17;
  --ink-3: #1a1722;
  --ink-4: #252130;

  --text: #efe6d4;
  --text-dim: #bdb19b;
  --text-faint: #8d836f;

  --gold-1: #fff0c2;
  --gold-2: #f0c35c;
  --gold-3: #c8923a;
  --gold-4: #8a5f22;
  --line: rgba(240, 195, 92, 0.16);
  --line-strong: rgba(240, 195, 92, 0.42);

  --ruby: #e2472b;
  --ember: #ff8a1f;
  --citrine: #f7c531;
  --emerald: #35b560;
  --teal: #19a7a3;
  --sapphire: #2d8fd8;

  --display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --serif: "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gilded: linear-gradient(178deg, #fff4cf 0%, #f6d27a 38%, #e3a943 62%, #a8712a 100%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink-1);
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Parchment grain over everything — very subtle */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-1); }
::selection { background: rgba(240, 195, 92, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold-2);
  color: var(--ink-0);
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Shared type helpers ---------- */

.gilded {
  background: var(--gilded);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  margin: 0 0 1.1rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border: 1px solid currentColor;
  opacity: 0.8;
}

.section { position: relative; padding-block: clamp(84px, 11vw, 150px); scroll-margin-top: var(--header-h); }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head h2,
.demo-copy h2,
.create-copy h2,
.voice-copy h2 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.35rem); }
.lead { font-size: 1.12em; color: var(--text-dim); }

/* ---------- Buttons ---------- */

.btn {
  --btn-pad: 0.95rem 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: var(--btn-pad);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.3s, border-color 0.3s, color 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { flex: none; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  color: #1d1204;
  background: linear-gradient(180deg, #ffe39c 0%, #f0bd52 48%, #c98b2f 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 -2px 0 rgba(0, 0, 0, 0.18) inset, 0 10px 30px -10px rgba(240, 170, 60, 0.6);
}
.btn-primary:hover {
  color: #1d1204;
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 -2px 0 rgba(0, 0, 0, 0.18) inset, 0 18px 44px -12px rgba(255, 170, 60, 0.85), 0 0 0 6px rgba(240, 195, 92, 0.12);
}

.btn-ghost {
  color: var(--gold-1);
  background: rgba(17, 15, 23, 0.55);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  color: #fff;
  border-color: var(--gold-2);
  background: rgba(240, 195, 92, 0.1);
  transform: translateY(-2px);
}

.btn-store { --btn-pad: 0.7rem 1.35rem 0.7rem 1.1rem; text-transform: none; letter-spacing: 0.02em; }
.btn-store .store-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.btn-store small { font-family: var(--serif); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.btn-store strong { font-size: 1.06rem; font-weight: 700; letter-spacing: 0.03em; }

.btn-play { --btn-pad: 0.6rem 1.7rem 0.6rem 0.6rem; gap: 0.85rem; text-transform: none; letter-spacing: 0.02em; }
.btn-play .store-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.btn-play small { font-family: var(--serif); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.78; }
.btn-play strong { font-size: 1.22rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.play-disc {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--gold-1);
  background: radial-gradient(circle at 35% 30%, #3a2a12, #140d05 75%);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 170, 0.35), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-out);
}
.play-disc svg { margin-left: 3px; filter: drop-shadow(0 0 6px rgba(255, 200, 100, 0.8)); }
.play-disc::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(29, 18, 4, 0.55);
  animation: playPulse 2.4s var(--ease-out) infinite;
}
.btn-play:hover .play-disc { transform: scale(1.08); }
.header-cta svg { margin-right: -2px; }
@keyframes playPulse { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }

.btn-sm { --btn-pad: 0.62rem 1.1rem; font-size: 0.78rem; gap: 0.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid,
.site-header.nav-open {
  background: rgba(9, 8, 13, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand img { width: 27px; height: 32px; filter: drop-shadow(0 0 10px rgba(255, 150, 50, 0.45)); transition: transform 0.6s var(--ease-out); }
.brand:hover { color: var(--gold-1); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  position: relative;
  padding: 8px 12px;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: color 0.25s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 1px;
  background: var(--gold-2);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold-1); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17, 15, 23, 0.6);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--gold-1);
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-cta { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: rgba(9, 8, 13, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.35s var(--ease-out), visibility 0.3s;
  }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
  .site-nav a { padding: 14px 4px; font-size: 0.9rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { display: none; }
}
@media (max-width: 420px) {
  .brand span { font-size: 0.96rem; }
  .header-cta { --btn-pad: 0.55rem 0.85rem; letter-spacing: 0.05em; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 28px) 0 96px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 50% 34%, rgba(255, 138, 31, 0.17), transparent 70%),
    radial-gradient(45% 45% at 12% 85%, rgba(25, 150, 190, 0.16), transparent 70%),
    radial-gradient(40% 40% at 90% 80%, rgba(226, 71, 43, 0.14), transparent 70%),
    radial-gradient(30% 30% at 80% 12%, rgba(53, 181, 96, 0.07), transparent 70%),
    var(--ink-0);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, var(--ink-1));
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero-inner { display: flex; flex-direction: column; align-items: center; }

.gem-stage {
  position: relative;
  height: clamp(150px, 27vh, 280px);
  aspect-ratio: 525 / 625;
  margin-bottom: clamp(18px, 3.5vh, 34px);
  perspective: 900px;
}
.gem-stage::before {
  /* slow-turning god rays */
  content: "";
  position: absolute;
  inset: -135%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 205, 120, 0.085) 0deg 3.5deg, transparent 3.5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 58%);
  mask: radial-gradient(circle, #000 12%, transparent 58%);
  animation: spin 110s linear infinite;
}
.gem-stage::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 164, 70, 0.42) 0%, rgba(40, 140, 200, 0.14) 38%, transparent 66%);
  filter: blur(8px);
  animation: halo 6.5s ease-in-out infinite;
}
.gem-float { position: relative; width: 100%; height: 100%; animation: float 7s ease-in-out infinite; }
.gem {
  width: 100%;
  height: 100%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
  filter: drop-shadow(0 0 28px rgba(255, 150, 50, 0.45)) drop-shadow(0 22px 40px rgba(0, 0, 0, 0.6));
}
.gem-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("../img/gem.webp") center / contain no-repeat;
  mask: url("../img/gem.webp") center / contain no-repeat;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%) 0 0 / 300% 100% no-repeat;
  mix-blend-mode: overlay;
  animation: shine 8s ease-in-out infinite;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.9rem, 1.3rem + 7.4vw, 6.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.015em;
  filter: drop-shadow(0 4px 30px rgba(240, 170, 60, 0.28));
}
.hero-ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 1rem 0 1.6rem;
  font-family: var(--display);
  font-size: clamp(0.72rem, 0.6rem + 0.5vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.hero-ornament::before,
.hero-ornament::after {
  content: "";
  width: clamp(28px, 7vw, 72px);
  height: 7px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000);
  mask: linear-gradient(90deg, transparent, #000);
}
.hero-ornament::after { transform: scaleX(-1); }

.hero-lead {
  max-width: 40rem;
  margin: 0 auto 2.1rem;
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.34rem);
  color: var(--text-dim);
}
.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin: 1.9rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 10px; }
.hero-meta li::before { content: ""; width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold-3); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--gold-2), transparent);
  animation: drip 2.4s ease-in-out infinite;
  transform-origin: top;
}
.scroll-cue:hover { color: var(--gold-1); }
@media (max-height: 700px) { .scroll-cue { display: none; } }

/* ---------- Story demo ---------- */

.demo { background: linear-gradient(180deg, var(--ink-1), #0c0a12 60%, var(--ink-1)); }
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.checks { list-style: none; margin: 1.6rem 0; padding: 0; display: grid; gap: 0.85rem; }
.checks li { position: relative; padding-left: 2rem; color: var(--text); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.5em;
  width: 0.62rem;
  height: 0.62rem;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 12px rgba(240, 195, 92, 0.6);
}
.fine { font-size: 0.92rem; color: var(--text-faint); }

.tome {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(180deg, #15121c, #0d0b12);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 6px rgba(240, 195, 92, 0.04), 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 80px -30px rgba(255, 140, 40, 0.35);
  overflow: hidden;
}
.tome::before {
  /* corner filigree */
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px solid rgba(240, 195, 92, 0.1);
  pointer-events: none;
  z-index: 3;
}
.tome-scene { position: relative; height: 190px; overflow: hidden; }
.tome-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.04); transition: transform 8s linear; }
.tome:hover .tome-scene img { transform: scale(1.12); }
.tome-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 11, 18, 0) 30%, #13101a 100%);
}
.tome-location {
  position: absolute;
  left: 22px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-1);
  text-shadow: 0 2px 10px #000;
}
.tome-location .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: pulse 2s ease-in-out infinite; }

.tome-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hud-label { color: var(--gold-3); font-weight: 700; margin-right: 8px; }
.hp { display: flex; align-items: center; }
.hp .bar { width: 96px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-right: 8px; }
.hp .bar i { display: block; width: var(--hp, 100%); height: 100%; background: linear-gradient(90deg, #b3261e, var(--ruby), #ff7a59); box-shadow: 0 0 10px rgba(226, 71, 43, 0.7); transition: width 0.8s var(--ease-out); }
.hp-num { color: var(--text); font-variant-numeric: tabular-nums; }
.inv { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.inv-items { display: inline-flex; flex-wrap: wrap; gap: 6px; color: var(--text-faint); }
.inv-chip {
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--gold-1);
  background: rgba(240, 195, 92, 0.08);
  letter-spacing: 0.06em;
  animation: pop 0.5s var(--ease-out);
}

.tome-log {
  height: 250px;
  overflow-y: auto;
  padding: 18px 24px 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-4) transparent;
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 22px);
  mask: linear-gradient(180deg, transparent 0, #000 22px);
}
.tome-log p { margin: 0 0 0.95em; font-size: 1.06rem; line-height: 1.6; color: #e9dfcb; }
.tome-log p.you {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-2);
  padding-left: 14px;
  border-left: 2px solid var(--gold-3);
}
.tome-log p.note { font-size: 0.95rem; color: var(--text-faint); padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.tome-log .caret::after { content: "▍"; margin-left: 2px; color: var(--gold-2); animation: blink 1s steps(1) infinite; }

.tome-choices { display: grid; gap: 8px; padding: 6px 22px 14px; min-height: 60px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.25s, background-color 0.25s, transform 0.35s var(--ease-out);
  animation: rise 0.55s var(--ease-out) both;
}
.choice:nth-child(2) { animation-delay: 0.07s; }
.choice:nth-child(3) { animation-delay: 0.14s; }
.choice-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-1);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, rgba(240, 195, 92, 0.35), rgba(240, 195, 92, 0.08));
}
.choice:hover { border-color: var(--line-strong); background: rgba(240, 195, 92, 0.07); transform: translateX(4px); }
.choice.cta-choice { justify-content: center; font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-row .btn { flex: 1 1 200px; animation: rise 0.55s var(--ease-out) both; }
.restart { background: none; border: 0; color: var(--text-faint); font: inherit; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; justify-self: center; padding: 6px; }
.restart:hover { color: var(--gold-1); }

.tome-input {
  display: flex;
  gap: 8px;
  margin: 0 22px 22px;
  padding: 6px 6px 6px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  transition: border-color 0.25s;
}
.tome-input:focus-within { border-color: var(--line-strong); }
.tome-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.tome-input input::placeholder { color: var(--text-faint); }
.tome-input button {
  flex: none;
  width: 42px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: #1d1204;
  background: linear-gradient(180deg, #ffe39c, #d99a37);
  display: grid;
  place-items: center;
}
.tome-toast {
  position: absolute;
  left: 50%;
  top: 150px;
  z-index: 4;
  transform: translate(-50%, 10px);
  padding: 8px 16px;
  border-radius: 99px;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1d1204;
  background: linear-gradient(180deg, #ffe7a8, #e9ae47);
  box-shadow: 0 10px 30px -8px rgba(255, 170, 60, 0.8);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.35s, transform 0.5s var(--ease-out);
}
.tome-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tome-toast.is-bad { color: #fff; background: linear-gradient(180deg, #ff6b4f, #b3261e); box-shadow: 0 10px 30px -8px rgba(226, 71, 43, 0.8); }

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.feature {
  --hue: var(--gold-2);
  position: relative;
  padding: 28px 24px 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 23, 34, 0.9), rgba(14, 12, 19, 0.9));
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease-out), border-color 0.4s;
}
.feature::before {
  /* pointer spotlight */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--hue) 22%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.feature:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--hue) 45%, transparent); }
.feature:hover::before { opacity: 1; }
.feature h3 { font-size: 1.12rem; margin: 20px 0 10px; letter-spacing: 0.02em; }
.feature p { margin: 0; color: var(--text-dim); font-size: 1rem; line-height: 1.55; }
.facet {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 60px;
  color: #fff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(200deg, color-mix(in srgb, var(--hue) 100%, #fff 10%), color-mix(in srgb, var(--hue) 55%, #000));
  box-shadow: 0 0 30px color-mix(in srgb, var(--hue) 60%, transparent);
}
.facet svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }
.feature:nth-child(8n + 1) { --hue: var(--ember); }
.feature:nth-child(8n + 2) { --hue: var(--sapphire); }
.feature:nth-child(8n + 3) { --hue: var(--emerald); }
.feature:nth-child(8n + 4) { --hue: var(--ruby); }
.feature:nth-child(8n + 5) { --hue: var(--citrine); }
.feature:nth-child(8n + 6) { --hue: var(--teal); }
.feature:nth-child(8n + 7) { --hue: #c05ce0; }
.feature:nth-child(8n + 8) { --hue: var(--gold-2); }

/* ---------- Gallery ---------- */

.gallery { overflow: hidden; background: radial-gradient(60% 60% at 50% 50%, rgba(45, 143, 216, 0.08), transparent 70%); }
.gallery-track {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 30px max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))) 40px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.shot {
  flex: none;
  width: clamp(220px, 23vw, 280px);
  margin: 0;
  scroll-snap-align: start;
  transition: transform 0.6s var(--ease-out);
}
.shot img {
  width: 100%;
  aspect-ratio: 560 / 1212;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0 0 5px rgba(240, 195, 92, 0.05);
  background: var(--ink-3);
}
.shot figcaption { margin-top: 14px; text-align: center; font-size: 0.95rem; color: var(--text-faint); }
.shot:hover { transform: translateY(-8px) rotate(-0.6deg); }
.gallery-controls { display: flex; justify-content: center; gap: 12px; }
.round-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(17, 15, 23, 0.7);
  color: var(--gold-1);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s, transform 0.35s var(--ease-out);
}
.round-btn:hover { background: rgba(240, 195, 92, 0.12); border-color: var(--gold-2); transform: scale(1.06); }
.round-btn:disabled { opacity: 0.35; cursor: default; transform: none; }

/* ---------- Worlds ---------- */

.worlds-row {
  display: flex;
  gap: 14px;
  height: clamp(420px, 56vw, 560px);
}
.world {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  isolation: isolate;
  transition: flex-grow 0.8s var(--ease-out), border-color 0.4s;
  cursor: default;
}
.world img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.2s var(--ease-out), filter 0.8s;
  filter: saturate(0.85) brightness(0.8);
}
.world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 3, 6, 0) 35%, rgba(4, 3, 6, 0.92) 100%);
}
.world-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 20px; }
.world h3 {
  margin: 0;
  font-size: clamp(1.02rem, 0.85rem + 0.5vw, 1.4rem);
  line-height: 1.18;
  overflow-wrap: normal;
  text-shadow: 0 2px 16px #000;
}
.world p {
  margin: 10px 0 0;
  max-width: 30ch;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s 0.1s, transform 0.6s 0.1s var(--ease-out);
}
.world .tag {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.world.is-active,
.worlds-row:not(:hover) .world:first-child { flex-grow: 3.2; border-color: var(--line-strong); }
.world.is-active img,
.worlds-row:not(:hover) .world:first-child img { transform: scale(1); filter: saturate(1.05) brightness(0.95); }
.world.is-active p,
.worlds-row:not(:hover) .world:first-child p { opacity: 1; transform: none; }
.worlds-row:hover .world:hover { flex-grow: 3.2; border-color: var(--line-strong); }
.worlds-row:hover .world:hover img { transform: scale(1); filter: saturate(1.05) brightness(0.95); }
.worlds-row:hover .world:hover p { opacity: 1; transform: none; }

.marquee {
  margin-top: clamp(40px, 6vw, 64px);
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee li {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-family: var(--display);
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.35rem);
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-dim);
}
.marquee li::after {
  content: "";
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-1), var(--gold-4));
}
.marquee-caption { margin: 18px 0 0; text-align: center; font-size: 0.95rem; color: var(--text-faint); }

/* ---------- Voice band ---------- */

.voice { background: radial-gradient(50% 70% at 72% 50%, rgba(25, 167, 163, 0.12), transparent 70%); }
.voice-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.voice-orb {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
}
.voice-orb .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(64, 214, 208, 0.35);
  animation: ripple 4.5s var(--ease-out) infinite;
}
.voice-orb .ring:nth-child(2) { animation-delay: 1.5s; }
.voice-orb .ring:nth-child(3) { animation-delay: 3s; }
.voice-core {
  position: relative;
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #1d4a55, #0b1418 70%);
  border: 1px solid rgba(64, 214, 208, 0.6);
  box-shadow: 0 0 50px rgba(25, 167, 163, 0.45), inset 0 0 30px rgba(64, 214, 208, 0.25);
  color: #bff7f3;
}
.voice-core svg { width: 34%; height: 34%; }
.wave {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 90px;
  transform: translateY(-50%);
}
.wave.left { right: 76%; }
.wave.right { left: 76%; }
.wave i {
  width: 4px;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(180deg, #7ff3ec, #19a7a3);
  box-shadow: 0 0 10px rgba(64, 214, 208, 0.6);
  transform: scaleY(0.2);
  animation: eq 1.2s ease-in-out infinite;
}
.wave i:nth-child(2) { animation-delay: -0.2s; }
.wave i:nth-child(3) { animation-delay: -0.5s; }
.wave i:nth-child(4) { animation-delay: -0.8s; }
.wave i:nth-child(5) { animation-delay: -0.35s; }
.voice-quote {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(10, 18, 22, 0.85);
  border: 1px solid rgba(64, 214, 208, 0.3);
  font-size: 1rem;
  color: #d9f5f2;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.voice-quote b { display: block; font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #7ff3ec; margin-bottom: 4px; }

/* ---------- Creator ---------- */

.create { background: linear-gradient(180deg, var(--ink-1), #0d0b13 50%, var(--ink-1)); }
.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.4rem; counter-reset: step; }
.steps li { position: relative; padding-left: 64px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 44px;
  height: 50px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #1d1204;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(170deg, #ffe7a8, #c98b2f);
}
.steps h3 { font-size: 1.1rem; margin: 0 0 4px; }
.steps p { margin: 0; color: var(--text-dim); font-size: 1rem; }

.editor {
  position: relative;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #16131e, #0e0c14);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 80px -40px rgba(240, 195, 92, 0.45);
}
.editor-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.editor-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--text); margin: 0; }
.editor-dots { display: flex; gap: 6px; }
.editor-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-4); }
.editor-dots i:first-child { background: var(--ruby); }
.editor-dots i:nth-child(2) { background: var(--citrine); }
.editor-dots i:last-child { background: var(--emerald); }
.editor-tabs { display: flex; gap: 6px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.editor-tabs span {
  flex: 1;
  padding: 8px 6px;
  text-align: center;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-radius: 9px;
}
.editor-tabs span.on { color: var(--gold-1); background: rgba(240, 195, 92, 0.1); box-shadow: inset 0 0 0 1px var(--line-strong); }
.field { margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 6px; font-family: var(--display); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-3); }
.field-box { padding: 11px 14px; border-radius: 11px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 1rem; line-height: 1.45; color: var(--text); min-height: 46px; }
.field-box.blurb { min-height: 96px; }
.field-box.title { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; }
.chip {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.9rem;
  color: var(--gold-1);
  background: rgba(240, 195, 92, 0.09);
  border: 1px solid var(--line-strong);
  animation: pop 0.45s var(--ease-out) both;
}
.events { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; min-height: 150px; }
.events li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  font-size: 0.97rem;
  color: var(--text-dim);
  animation: rise 0.5s var(--ease-out) both;
}
.events b { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-family: var(--display); font-size: 0.8rem; color: var(--gold-1); background: rgba(240, 195, 92, 0.1); }
.editor-publish { margin-top: 16px; width: 100%; pointer-events: none; }
.editor-publish.flash { animation: flash 1.1s var(--ease-out); }

/* ---------- Your data ---------- */

.data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.data-card {
  padding: 30px 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 23, 34, 0.85), rgba(14, 12, 19, 0.85));
  border: 1px solid var(--line);
}
.data-card .facet { --hue: var(--sapphire); width: 46px; height: 52px; }
.data-card:nth-child(2) .facet { --hue: var(--emerald); }
.data-card:nth-child(3) .facet { --hue: var(--ember); }
.data-card h3 { font-size: 1.15rem; margin: 18px 0 10px; }
.data-card p { margin: 0; color: var(--text-dim); font-size: 1rem; }
.data-card p + p { margin-top: 0.8em; }
.data-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 40px; }

/* ---------- FAQ ---------- */

.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--gold-1); }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--gold-2), var(--gold-2)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) center / 1.5px 100% no-repeat;
  transition: transform 0.4s var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(135deg); }
.faq-list .answer { padding: 0 4px 26px; color: var(--text-dim); max-width: 68ch; }
.faq-list .answer p:last-child { margin-bottom: 0; }

/* ---------- Final CTA ---------- */

.finale {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding-block: clamp(110px, 16vw, 200px);
}
.finale-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.finale-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; opacity: 0.55; }
.finale-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--ink-1) 0%, rgba(9, 8, 13, 0.35) 30%, rgba(9, 8, 13, 0.35) 70%, var(--ink-1) 100%),
    radial-gradient(60% 60% at 50% 50%, transparent, rgba(9, 8, 13, 0.8));
}
.finale h2 { font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.2rem); max-width: 16ch; margin-inline: auto; }
.finale .lead { max-width: 36rem; margin: 0 auto 2.2rem; color: var(--text); }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--ink-0);
  font-size: 1rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { margin: 14px 0 0; max-width: 32ch; color: var(--text-faint); }
.footer-col h4 { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-3); margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-dim); text-decoration: none; }
.footer-col a:hover { color: var(--gold-1); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text-faint);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--text-dim); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(8px); } }
@keyframes halo { 0%, 100% { opacity: 0.75; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes shine { 0%, 55% { background-position: 110% 0; } 85%, 100% { background-position: -10% 0; } }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes ripple { 0% { transform: scale(0.45); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes eq { 0%, 100% { transform: scaleY(0.18); } 50% { transform: scaleY(1); } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(240, 195, 92, 0.7); } 100% { box-shadow: 0 0 0 18px rgba(240, 195, 92, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track ul[aria-hidden] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .demo-grid,
  .create-grid,
  .voice-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-copy,
  .create-copy,
  .voice-copy { text-align: left; }
  .voice-visual { order: -1; }
  .data-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .worlds-row {
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .worlds-row::-webkit-scrollbar { display: none; }
  .world { flex: 0 0 min(76vw, 320px); height: min(112vw, 460px); scroll-snap-align: start; }
  .world img { transform: none; filter: saturate(1.05) brightness(0.95); }
  .world p { opacity: 1; transform: none; }
  .worlds-row:not(:hover) .world:first-child,
  .worlds-row:hover .world:hover { flex-grow: 0; }
}
@media (max-width: 600px) {
  .gem-stage { height: clamp(130px, 22vh, 200px); }
  .hero-ornament { gap: 10px; letter-spacing: 0.16em; white-space: nowrap; }
  .hero-ornament::before,
  .hero-ornament::after { width: 16px; }
  .features-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
  .hero-meta { gap: 8px 18px; font-size: 0.66rem; }
  .tome-log { height: 280px; padding-inline: 18px; }
  .tome-choices { padding-inline: 16px; }
  .tome-input { margin-inline: 16px; }
  .tome-hud { padding-inline: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .wave { display: none; }
}

/* ==========================================================================
   Legal pages (privacy policy, account deletion)
   ========================================================================== */

.legal { background: radial-gradient(70% 40% at 50% 0%, rgba(255, 138, 31, 0.09), transparent 70%) no-repeat, var(--ink-1); }
.legal .wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(40px, 7vw, 80px)) var(--gutter) 96px;
}
.legal h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 0.35em;
  background: var(--gilded);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.legal h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  margin: 2.4em 0 0.8em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--line);
  color: var(--gold-1);
}
.legal .card h2 { margin-top: 0.2em; }
.legal h3 { font-size: 1.1rem; }
.legal section { scroll-margin-top: calc(var(--header-h) + 16px); }
.legal .meta { color: var(--text-faint); font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1.6rem; }
.legal p, .legal li { color: var(--text-dim); }
.legal strong { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.4rem; }
.legal li { margin: 0.4em 0; }
.legal li::marker { color: var(--gold-3); }
.legal .card,
.legal .toc {
  margin: 22px 0;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 23, 34, 0.85), rgba(14, 12, 19, 0.85));
  border: 1px solid var(--line);
}
.legal .card p:last-child { margin-bottom: 0; }
.legal .toc strong { font-family: var(--display); letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.8rem; color: var(--gold-2); }
.legal .toc ul { margin: 0.6em 0 0; }
.legal .toc a { color: var(--text); text-decoration: none; }
.legal .toc a:hover { color: var(--gold-1); text-decoration: underline; }
.legal h3 { margin: 1.8em 0 0.5em; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--text); }
.legal li > ul { margin-top: 0.3em; }
.legal em { font-style: normal; font-family: var(--display); font-size: 0.85em; letter-spacing: 0.04em; color: var(--gold-1); }

.legal .summary {
  border-color: var(--line-strong);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(240, 195, 92, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(26, 23, 34, 0.9), rgba(14, 12, 19, 0.9));
}
.legal .summary h2 { margin: 0 0 0.7em; padding: 0; border: 0; font-size: 1.1rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); }
.legal .summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.legal .summary li { position: relative; margin: 0; padding-left: 1.7rem; color: var(--text); }
.legal .summary li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
}

.legal table { width: 100%; margin: 1.4em 0 1.8em; border-collapse: collapse; font-size: 0.98rem; line-height: 1.45; }
.legal th {
  padding: 10px 12px;
  text-align: left;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-3);
  border-bottom: 1px solid var(--line-strong);
}
.legal td { padding: 14px 12px; vertical-align: top; color: var(--text-dim); border-bottom: 1px solid var(--line); }
.legal td:first-child { color: var(--text); font-weight: 600; }
.legal td:last-child { white-space: nowrap; }
@media (max-width: 720px) {
  .legal thead { display: none; }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .legal td { padding: 3px 0; border: 0; }
  .legal td:first-child { font-family: var(--display); font-size: 1.02rem; margin-bottom: 4px; }
  .legal td:last-child { white-space: normal; }
  .legal td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--display);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-3);
  }
}

.legal footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.95rem;
}
.legal footer a { color: var(--gold-2); }

@media (max-width: 900px) {
  .site-nav.legal-nav {
    position: static;
    flex-direction: row;
    margin-left: auto;
    padding: 0;
    background: none;
    border: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .legal-nav a { padding: 8px 8px; border: 0; font-size: 0.72rem; letter-spacing: 0.08em; }
}
@media (max-width: 520px) {
  .legal .brand span { display: none; }
}
