/* Shadow Loom — the page is a dark room and the pointer is the lamp.
   Everything here serves that one idea: nothing is lit until somebody looks at it. */

:root {
  --ink: #08070a;
  --ink-soft: #0f0d12;
  --gold: #d8b16a;
  --gold-bright: #f0cd8c;
  --cream: #f4f1eb;
  --muted: rgba(244, 241, 235, 0.62);
  --line: rgba(216, 177, 106, 0.18);

  /* Driven by js/app.js. Defaults put the light in the middle so the page is readable
     before any script runs, and on any browser where it never does. */
  --torch-x: 50%;
  --torch-y: 38%;
  --torch-r: 55vmax;

  --shell: min(1120px, 92vw);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 17px/1.7 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

img { max-width: 100%; height: auto; display: block; }

.shell { width: var(--shell); margin: 0 auto; }

/* ── The lamp ───────────────────────────────────────────────────────────────
   One fixed layer over the whole page with a hole cut in it. The hole follows the
   pointer, so reading the page is literally moving a light across a dark room. */
.torch {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    circle var(--torch-r) at var(--torch-x) var(--torch-y),
    rgba(8, 7, 10, 0) 0%,
    rgba(8, 7, 10, 0) 38%,
    rgba(8, 7, 10, 0.30) 68%,
    rgba(6, 5, 8, 0.62) 100%);
  transition: background 90ms linear;
}

/* A warm cast where the light falls, so it reads as a lamp rather than a hole. */
.torch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle calc(var(--torch-r) * 0.55) at var(--torch-x) var(--torch-y),
    rgba(216, 177, 106, 0.10) 0%,
    rgba(216, 177, 106, 0) 70%);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px max(20px, 4vw);
  background: linear-gradient(rgba(8, 7, 10, 0.92), rgba(8, 7, 10, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  font-family: "Cinzel", Georgia, serif;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; }

.langs { display: flex; gap: 6px; font-size: 13px; letter-spacing: 0.08em; }

.langs a {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.langs a[aria-current="true"] { color: var(--ink); background: var(--gold); border-color: var(--gold); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  background: url("../assets/workshop.webp") center 30% / cover no-repeat;
  opacity: 0.85;
}

/* Keeps the words legible wherever the lamp happens to be. */
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(8, 7, 10, 0.35), rgba(8, 7, 10, 0.82) 72%, var(--ink));
}

.hero-inner { position: relative; z-index: 5; }

/* The lamp bites harder over the hero, where there is nothing to read but four words, and
   eases off further down the page. A beautiful effect that costs a paragraph its legibility
   is not a beautiful effect. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    circle var(--torch-r) at var(--torch-x) var(--torch-y),
    rgba(8, 7, 10, 0) 0%,
    rgba(8, 7, 10, 0) 30%,
    rgba(8, 7, 10, 0.34) 62%,
    rgba(6, 5, 8, 0.62) 100%);
}

.hero h1 {
  font-size: clamp(44px, 9vw, 96px);
  letter-spacing: 0.04em;
  text-shadow: 0 0 60px rgba(216, 177, 106, 0.28);
}

.hero h1 span { display: block; color: var(--gold); }

.tagline {
  margin: 22px auto 0;
  max-width: 30ch;
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--muted);
}

.cta-row { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  color: #17120a;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 50px rgba(216, 177, 106, 0.22);
}

.cta:hover { color: #17120a; transform: translateY(-1px); }

.cta.ghost {
  background: none;
  color: var(--cream);
  border: 1px solid var(--line);
  box-shadow: none;
}

.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(244, 241, 235, 0.4);
}

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding: clamp(72px, 12vw, 132px) 0; position: relative; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 14px;
}

section h2 { font-size: clamp(28px, 4.6vw, 44px); max-width: 22ch; }

.lede { margin-top: 18px; max-width: 58ch; color: var(--muted); font-size: 18px; }

.steps {
  margin-top: 56px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.step {
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(216, 177, 106, 0.05), rgba(255, 255, 255, 0.01));
}

.step .n {
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.step h3 { margin: 12px 0 10px; font-size: 21px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

.split {
  margin-top: 56px;
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.plate {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--ink-soft);
}

.stat-row { margin-top: 42px; display: flex; gap: 44px; flex-wrap: wrap; }
.stat .k { font-family: "Cinzel", Georgia, serif; font-size: 34px; color: var(--gold); }
.stat .v { font-size: 14px; color: var(--muted); letter-spacing: 0.04em; }

/* ── Reveal on scroll ───────────────────────────────────────────────────── */
.rise { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rise.lit { opacity: 1; transform: none; }

/* ── Prose pages (privacy, terms, faq) ──────────────────────────────────── */
.doc { padding: 140px 0 100px; }
.doc h1 { font-size: clamp(30px, 5vw, 46px); }
.doc h2 { font-size: clamp(20px, 3vw, 26px); margin: 44px 0 12px; }
.doc p, .doc li { color: rgba(244, 241, 235, 0.78); }
.doc ul { padding-left: 20px; }
.doc .updated { margin-top: 10px; color: var(--muted); font-size: 14px; }

details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

details summary {
  cursor: pointer;
  font-family: "Cinzel", Georgia, serif;
  font-size: 18px;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }
details summary::after { content: " +"; color: var(--gold); }
details[open] summary::after { content: " −"; }
details p { margin: 12px 0 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 60px;
  color: var(--muted);
  font-size: 14.5px;
}

.foot-row { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── Motion and small screens ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .torch { transition: none; }
  .rise { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  /* A wider, softer pool on a phone: there is no pointer to aim it with, so it drifts
     on its own and a tight circle would just feel like the page is broken. */
  :root { --torch-r: 78vmax; }
  .stat-row { gap: 26px; }
}
