/* Landing page (AI-448): public marketing + showcase home at "/".
   Token-driven — inherits palette + theme from tokens.css (loaded first) and
   palette.js (data-palette / data-theme on <html>, dusk from 19:00, ?palette=
   / ?theme= overrides). No hardcoded palette hex: colours come from the
   semantic variables so the landing tracks the four palettes and light/dusk.
   The one allowed literal is white button text (#FFFDF7). Icons are CSS
   shapes; hero art is the only image asset. */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-app);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: var(--page-glow);
  background-repeat: no-repeat;
}

/* ─── Shared building blocks ─────────────────────────────────────── */
.l-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.l-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: var(--font-app);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--settle);
}
.l-btn:active { transform: scale(0.98); }

.l-btn-primary {
  background: var(--accent);
  color: #FFFDF7; /* the one allowed literal — white button text in both themes */
  box-shadow: 0 8px 22px var(--accent-22);
}
.l-btn-ghost {
  background: var(--ghost);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1.5px var(--primary-ring);
  font-size: 15.5px;
}

.l-play-icon {
  width: 0;
  height: 0;
  border-left: 13px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

/* ─── Hero + nav ─────────────────────────────────────────────────── */
.l-hero {
  position: relative;
  overflow: hidden;
  background: var(--card);
}

.l-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 44px);
}
.l-nav-brand { display: flex; align-items: center; gap: 11px; }
.l-brand {
  font-family: var(--font-app);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}
.l-brand-dot { color: var(--accent); }

.l-nav-parents {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--accent-text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1.5px var(--primary-ring);
  transition: transform var(--settle);
}
.l-nav-parents:active { transform: scale(0.97); }

/* Sphere-lit mascot moon (mirrors the shelf moon, scaled to 32px) */
.l-moon {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--moon-light), var(--moon-mid) 52%, var(--accent) 100%);
  box-shadow: inset -4px -3px 8px var(--moon-shade);
}
.l-moon-crater {
  position: absolute;
  border-radius: 50%;
  background: rgba(112, 92, 158, 0.3);
}
.l-moon-crater-a { top: 4px; right: 6px; width: 6px; height: 6px; }
.l-moon-crater-b { bottom: 5px; right: 10px; width: 4px; height: 4px; background: rgba(112, 92, 158, 0.26); }
.l-moon-eye {
  position: absolute;
  top: 14px;
  width: 6px;
  height: 2.5px;
  border-radius: 0 0 6px 6px;
  background: var(--moon-ink);
}
.l-moon-eye-l { left: 7px; }
.l-moon-eye-r { right: 9px; }
.l-moon-mouth {
  position: absolute;
  top: 19px;
  left: 46%;
  transform: translateX(-50%);
  width: 8px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: var(--moon-ink);
}

/* Hero art: watercolor image, softened into the surface with a vignette */
.l-hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.l-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  display: block;
}
.l-hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(78% 58% at 50% 44%, transparent, var(--card) 100%);
}

.l-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 9vw, 84px) clamp(20px, 5vw, 32px) clamp(40px, 7vw, 68px);
}
.l-hero-h1 {
  font-family: var(--font-app);
  font-weight: 700;
  font-size: clamp(34px, 8vw, 60px);
  line-height: 1.06;
  color: var(--ink);
  text-wrap: pretty;
}
.l-hero-lede {
  font-family: var(--font-app);
  font-weight: 500;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 30em;
}
.l-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 4px;
}

.l-trust {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 8px;
  list-style: none;
}
.l-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--ghost);
  box-shadow: inset 0 0 0 1px var(--accent-22);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.l-trust-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.l-trust-dot-confirm { background: var(--confirm); }
.l-trust-dot-accent { background: var(--accent); }
.l-trust-dot-info { background: var(--info); }

/* ─── Sections ───────────────────────────────────────────────────── */
.l-section {
  padding: clamp(42px, 6vw, 68px) clamp(20px, 5vw, 32px);
  display: flex;
  justify-content: center;
}
.l-section-how-works { background: var(--surface); }
.l-section-how-made { background: var(--card); }

.l-section-inner {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 38px);
}
.l-section-inner-centered {
  max-width: 760px;
  align-items: center;
  text-align: center;
  gap: 22px;
}
.l-section-head {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 22em;
}
.l-section-h2 {
  font-family: var(--font-app);
  font-weight: 700;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.14;
  color: var(--ink);
  text-wrap: pretty;
}
.l-section-h2 em { font-style: italic; }
.l-section-sub {
  font-family: var(--font-app);
  font-weight: 400;
  font-size: clamp(14.5px, 2vw, 16px);
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ─── Steps grid ─────────────────────────────────────────────────── */

/* Default: 4-up on wide desktop */
.l-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 3vw, 30px);
}

/* Tablet: 2-up */
@media (max-width: 860px) {
  .l-steps { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: 1-up */
@media (max-width: 480px) {
  .l-steps { grid-template-columns: 1fr; }
}

/* Individual step: art on top, copy below (column layout) */
.l-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Wrapper that positions the number badge relative to the art frame */
.l-step-art-wrap {
  position: relative;
  align-self: flex-start;
  width: 120px;
}

/* Step number badge — CSS shape, token colours only */
.l-step-num {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFDF7;
  font-family: var(--font-app);
  font-weight: 700;
  font-size: 12px;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 0 0 2.5px var(--surface), 0 2px 6px var(--accent-22);
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Art frame: portrait ratio ~9:16, slightly larger for visibility */
.l-step-art {
  width: 120px;
  height: 214px;
  flex: none;
  border-radius: 14px;
  background-color: var(--field);
  background-size: cover;
  background-position: center top;
  box-shadow: 0 0 0 1.5px var(--accent-22), var(--card-shadow);
}

.l-step-art-placeholder {
  background-image: radial-gradient(120% 80% at 50% 20%, var(--accent-22), transparent 70%);
}

.l-step-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.l-step-h3 {
  font-family: var(--font-app);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.l-step-p {
  font-family: var(--font-app);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* ─── Scroll reveal (one-shot, no loop) ──────────────────────────── */
.l-step-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 480ms ease,
    transform 480ms ease;
}
/* Stagger via nth-child so each step arrives a beat after the previous */
.l-step-reveal:nth-child(1) { transition-delay:   0ms; }
.l-step-reveal:nth-child(2) { transition-delay:  80ms; }
.l-step-reveal:nth-child(3) { transition-delay: 160ms; }
.l-step-reveal:nth-child(4) { transition-delay: 240ms; }

.l-step-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced-motion: skip the animation; show immediately */
@media (prefers-reduced-motion: reduce) {
  .l-step-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Pipeline card */
.l-pipeline {
  width: 100%;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
  padding: 24px clamp(16px, 4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.l-pipeline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.l-pipeline-step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.l-bead { width: 14px; height: 14px; border-radius: 50%; }
.l-bead-confirm { background: var(--confirm); }
.l-bead-accent { width: 22px; height: 22px; background: var(--accent); }
.l-bead-accent-halo { box-shadow: 0 0 0 5px var(--accent-22); }
.l-bead-label {
  font-family: var(--font-app);
  font-weight: 700;
  font-size: clamp(10px, 1.4vw, 12.5px);
  color: var(--ink-soft);
}
.l-bead-label-accent { color: var(--accent-text); }
.l-pipeline-note {
  font-family: var(--font-app);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  border-top: 1px solid var(--line-10);
  padding-top: 13px;
}

.l-ghost-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ghost);
  box-shadow: inset 0 0 0 1.5px var(--line-12);
  font-family: var(--font-app);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: box-shadow var(--settle), color var(--settle);
}
.l-ghost-btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--primary-ring);
  color: var(--accent-text);
}

/* ─── Family-stories frame (AI-452, 5th section) ─────────────────── */
.l-section-family { background: var(--surface); }

.l-section-inner-family {
  flex-direction: row;
  align-items: center;
  gap: clamp(30px, 5vw, 60px);
  max-width: 1000px;
}

.l-family-copy {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.l-family-visual {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The cover card: violet ring mirrors .cover--family in player.css */
.l-family-cover {
  position: relative;
  width: 148px;
  height: 204px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--accent), var(--card-shadow);
}

.l-family-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CSS star badge — mirrors .cover--family::after in player.css */
.l-family-cover::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%,
    2% 35%, 39% 35%
  );
  pointer-events: none;
}

@media (max-width: 600px) {
  .l-section-inner-family {
    flex-direction: column;
    align-items: flex-start;
  }
  .l-family-visual {
    align-self: center;
  }
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.l-footer {
  background: var(--surface);
  padding: clamp(40px, 6vw, 60px) clamp(20px, 5vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.l-footer-tagline {
  font-family: var(--font-story);
  font-style: italic;
  font-size: clamp(18px, 3vw, 23px);
  color: var(--accent-text);
}
.l-footer-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.l-colophon {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 40em;
}
.l-heart { color: var(--rest); font-size: 14px; }

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .l-btn, .l-nav-parents, .l-ghost-btn { transition: none; }
}
