/**
 * Echelon theme — tokens and base components for One More Chance at Love.
 * Ported from design-system/assets/css/theme.css (without Atelier photo slots / canvas).
 *
 * Base components for downstream specs:
 *   .btn-cta      — primary CTA pill (terracotta; combine with .deep-shadow)
 *   .eyebrow      — uppercase tracking label
 *   .soft-shadow  — card elevation
 *   .deep-shadow  — CTA / hero elevation
 *   .noise        — warm atmospheric glow (fixed, non-interactive)
 *   .page-shell   — single reading column (~42–45rem)
 *   .fold         — empty section placeholder shell
 */

:root {
  --paper: #F6F0E8;
  --surface: #FFFCF7;
  --surface-2: #FBF4EC;
  --line: #E7D8C8;
  --ink: #241A16;
  --muted: #7B6A5F;
  --soft: #A99683;
  --accent: #B78A56;
  --accent-dark: #946D40;
  --deep: #1D1714;
  --terracotta: #CB4D22;
  --max-read: 45rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: .35;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(203, 77, 34, .08), transparent 26%),
    radial-gradient(circle at 80% 15%, rgba(45, 27, 17, .06), transparent 28%),
    radial-gradient(circle at 50% 95%, rgba(203, 77, 34, .08), transparent 32%);
}

.soft-shadow {
  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, .06), 0px 1px 1px -.5px rgba(0, 0, 0, .06), 0px 3px 3px -1.5px rgba(0, 0, 0, .06), 0px 6px 6px -3px rgba(0, 0, 0, .06), 0px 12px 12px -6px rgba(0, 0, 0, .06), 0px 24px 24px -12px rgba(0, 0, 0, .06);
}

.deep-shadow {
  box-shadow:
    0 18px 45px rgba(36, 26, 22, .10),
    0 4px 12px rgba(36, 26, 22, .06);
}

/* Primary CTA — pill terracotta (add .deep-shadow for elevation) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.9rem 1.75rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.btn-cta:focus-visible {
  box-shadow:
    0 0 0 3px var(--paper),
    0 0 0 5px var(--terracotta);
}

/* Eyebrow — uppercase tracking label */
.eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

/* Shell layout — single reading column */
.page-shell {
  width: min(100% - 2rem, var(--max-read));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.fold {
  padding-block: 3.5rem;
  /* Inline breathing room so text never touches the full-bleed surface edge.
     Applied to every fold (paper and colored) so all reading columns align. */
  padding-inline: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.fold:last-of-type {
  border-bottom: none;
}

.fold__label {
  margin: 0 0 0.75rem;
}

.fold__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 200;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.fold__hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
}

.site-footer {
  padding-block: 2.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.site-footer__legal {
  margin: 0.75rem 0 0;
}

/* Reveal helpers (GSAP stub / section specs).
   The hidden resting state is scoped to .js-reveal on <html>, set by an inline
   script and dropped by a failsafe timer — so a script or GSAP failure can
   never leave content permanently invisible. */
.js-reveal .fade-in-up {
  opacity: 0;
  transform: translateY(22px);
}

.reveal-line {
  display: inline-flex;
  overflow: hidden;
  vertical-align: top;
  margin-right: .25em;
}

.reveal-word {
  display: inline-block;
}

.js-reveal .reveal-word {
  transform: translateY(112%);
}

.section-reveal-line {
  display: inline-flex;
  overflow: hidden;
  vertical-align: top;
  gap: .25em;
}

.section-reveal-word {
  display: inline-block;
}

.js-reveal .section-reveal-word {
  transform: translateY(112%);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-reveal .fade-in-up,
  .js-reveal .reveal-word,
  .js-reveal .section-reveal-word {
    opacity: 1;
    transform: none;
  }
}
