/* ─────────────────────────────────────────────────────────────
   Imanza — secondary pages (legal, account deletion, 404).

   These pages share the landing page's design system: journey.css
   supplies the tokens, nav, buttons and footer; journey.js paints the
   same sky behind them. This file only adds what long-form prose
   needs. Load it AFTER journey.css.

   The sky here holds still at night (each page declares data-t on its
   hero and footer), so text stays light and legible top to bottom.
   ───────────────────────────────────────────────────────────── */

/* ── Hero ──────────────────────────────────────────────────── */
.legal-hero {
  position: relative;
  padding: calc(var(--nav-h) + 18vh) 0 8vh;
}
.legal-hero__in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.legal-hero .ic--moon {
  font-size: 34px;
  color: #fbd34c;
  filter: drop-shadow(0 0 18px rgb(251 211 76 / 0.35));
  margin-bottom: 2.4rem;
}
.legal-hero h1 { margin-bottom: 1.2rem; max-width: 16ch; }
.legal-hero .meta {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-4);
}

/* ── Prose ─────────────────────────────────────────────────── */
.legal-body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) 12vh;
  font-size: 1rem;
  color: var(--fg-2);
}
/* prose stays a comfortable measure, but keeps the hero's left edge */
.legal-body > * { max-width: 78ch; }
.legal-body > .lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.5;
  color: var(--fg);
  max-width: 52ch;
  margin: 0 0 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hair-soft);
}
.legal-body h2 {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  margin: 3.4rem 0 1rem;
  color: var(--fg);
}
.legal-body h2 .ic { font-size: 0.72em; color: var(--accent); flex: none; }
.legal-body h2 .ic svg * { stroke-width: 1.5; }
.legal-body h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--fg);
  margin: 2.2rem 0 0.6rem;
}
.legal-body p { margin: 0 0 1.1rem; line-height: 1.7; text-wrap: pretty; }
.legal-body strong { color: var(--fg); font-weight: 600; }
.legal-body a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--fg-4);
  transition: text-decoration-color 0.3s;
}
.legal-body a:hover { text-decoration-color: var(--fg); }

.legal-body ul, .legal-body ol { margin: 0 0 1.4rem; padding: 0 0 0 1.4em; }
.legal-body li { margin-bottom: 0.7rem; line-height: 1.65; }
.legal-body ul { list-style: none; padding-left: 0; }
.legal-body ul > li { position: relative; padding-left: 1.5em; }
.legal-body ul > li::before {
  content: '';
  position: absolute;
  left: 0.15em;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.legal-body ol { list-style: none; counter-reset: step; padding-left: 0; }
.legal-body ol > li { position: relative; padding-left: 2.1em; counter-increment: step; }
.legal-body ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5em;
  height: 1.5em;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hair);
  font-family: var(--serif);
  font-size: 0.78em;
  color: var(--fg-3);
}

/* a highlighted step-by-step or callout block */
.legal-body .box {
  margin: 0 0 1.6rem;
  padding: 26px 28px 8px;
  border-radius: 20px;
  border: 1px solid var(--hair-soft);
  background: linear-gradient(160deg, rgb(var(--env-fg) / 0.06), rgb(var(--env-fg) / 0.02));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal-body .box > :last-child { margin-bottom: 18px; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.6rem; font-size: 0.94rem; }
.legal-body th, .legal-body td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hair-soft); }
.legal-body th { color: var(--fg); font-weight: 600; }

/* ── Closing block ─────────────────────────────────────────── */
.legal-end {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) 14vh;
}
.legal-end > * { max-width: 78ch; }
.legal-end__rule { height: 1px; background: var(--hair-soft); margin: 0 0 6vh; }
.legal-end p { color: var(--fg-3); font-size: 0.95rem; margin: 0 0 2rem; }


/* ── 404 ───────────────────────────────────────────────────── */
.lost {
  min-height: 100svh;
  display: grid;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 12vh) var(--gutter) 12vh;
}
.lost .ic--moon {
  font-size: 40px;
  color: #fbd34c;
  filter: drop-shadow(0 0 22px rgb(251 211 76 / 0.35));
  margin-bottom: 2.4rem;
}
.lost h1 { margin-bottom: 1.2rem; }
.lost .cta-row { justify-content: center; }
.lost p { color: var(--fg-2); font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin: 0 auto 2.6rem; max-width: 40ch; }

@media (max-width: 900px) {
  .legal-hero { padding-top: calc(var(--nav-h) + 10vh); }
  .legal-body { font-size: 0.98rem; }
  .legal-body h2 { margin-top: 2.8rem; }
}

/* ── Nav over long prose ───────────────────────────────────
   The landing page's nav floats over open sky; here it floats over
   running text, so once the page scrolls it gets a soft, masked
   backdrop of its own instead of the plain gradient. */
.page-legal .nav::before {
  content: '';
  position: absolute;
  inset: 0 0 -28px 0;
  z-index: -1;
  background: linear-gradient(rgb(var(--env-bg) / 0.92), rgb(var(--env-bg) / 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(#000 0, #000 58%, transparent);
  mask-image: linear-gradient(#000 0, #000 58%, transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.page-legal .nav.is-scrolled { background: none; }
.page-legal .nav.is-scrolled::before { opacity: 1; }
