/* Ever After — shared stylesheet.
   Tokens mirror the app's design system (tailwind.config.js) so the site and
   the app read as one brand: warm near-black ground, cream type, gold accent,
   Cormorant Garamond for display and Jost for UI. */

:root {
  --screen: #161310;
  --surface: #1e1b17;
  --elevated: #252118;
  --tinted: #2c2720;
  --foreground: #f0ece4;
  --muted: #9c9088;
  /* Lightened from the app's #635D58: every use here is small text, and the
     TMDb credit rides on it, so it has to clear WCAG AA (4.5:1) on both
     --screen and the lighter --surface the footer sits on. */
  --subtle: #8c847c;
  --ink: #1c1815;
  --cream: #ede9e0;
  --gold: #c4a24a;
  --gold-dim: rgba(196, 162, 74, 0.15);
  --divider: #2a2520;
  --hairline: #221f1a;

  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--screen);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

/* Skip link — keyboard users shouldn't have to tab the whole header. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.65rem 1rem;
  font-family: var(--sans);
  font-weight: 600;
  z-index: 100;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ─── Wordmark ───────────────────────────────────────────────────────────── */

.wordmark {
  /* Asset is 411×84; width-driven so the ratio holds at any size. */
  width: var(--wordmark-w, 230px);
  height: auto;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(3.5rem, 10vh, 6rem) var(--gutter) clamp(2.5rem, 7vh, 4rem);
  overflow: hidden;
}

/* A slow warm glow behind the wordmark — the "projector" note. Decorative. */
.hero::before {
  content: "";
  position: absolute;
  top: 26%;
  left: 50%;
  width: min(120vw, 62rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(196, 162, 74, 0.11) 0%,
    rgba(196, 162, 74, 0.045) 34%,
    rgba(22, 19, 16, 0) 68%
  );
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero .wordmark {
  --wordmark-w: clamp(220px, 40vw, 340px);
  margin-inline: auto;
}

.tagline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.95rem, 6.2vw, 3.35rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: clamp(2rem, 6vh, 3rem) auto 0;
  max-width: 17ch;
  text-wrap: balance;
}

.subhead {
  font-size: clamp(1.02rem, 2.4vw, 1.16rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 1.15rem auto 0;
  max-width: 40ch;
  text-wrap: pretty;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.cta-group {
  margin-top: clamp(2rem, 5vh, 2.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.03rem;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
  /* 44px minimum touch target. */
  min-height: 52px;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #d3b25e;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn .apple {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: currentColor;
  /* Optically centers the glyph against the cap height. */
  margin-top: -0.13em;
}

.cta-note {
  font-size: 0.88rem;
  color: var(--subtle);
  letter-spacing: 0.02em;
}

/* ─── Section scaffolding ────────────────────────────────────────────────── */

.section {
  padding: clamp(3.5rem, 11vh, 6.5rem) var(--gutter);
  border-top: 1px solid var(--hairline);
}

.section-inner {
  max-width: 60rem;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.2vw, 2.4rem);
  line-height: 1.2;
  color: var(--cream);
  margin: 0 0 1rem;
  max-width: 22ch;
  text-wrap: balance;
}

/* ─── Three-up feature grid ──────────────────────────────────────────────── */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(2.25rem, 5vh, 3.25rem);
}

.feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.25;
  color: var(--cream);
  margin: 0 0 0.5rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.62;
}

.feature .num {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 0.7rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(2.75rem, 7vh, 4rem) var(--gutter) clamp(2.25rem, 5vh, 3rem);
  background: var(--surface);
}

.footer-inner {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  align-items: flex-start;
  justify-content: space-between;
}

.site-footer .wordmark {
  --wordmark-w: 150px;
  opacity: 0.85;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--foreground);
}

.footer-meta {
  max-width: 60rem;
  margin: clamp(2rem, 5vh, 2.75rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--subtle);
}

.footer-meta a {
  color: var(--subtle);
}

.footer-meta a:hover,
.footer-meta a:focus-visible {
  color: var(--muted);
}

/* ─── Document pages (privacy, terms, support) ───────────────────────────── */

.doc-header {
  padding: clamp(2rem, 5vh, 2.75rem) var(--gutter) 0;
}

.doc-header-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.doc {
  padding: clamp(2.5rem, 7vh, 4rem) var(--gutter) clamp(4rem, 10vh, 6rem);
}

.doc-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.doc h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3rem);
  line-height: 1.14;
  color: var(--cream);
  margin: 0 0 0.5rem;
  text-wrap: balance;
}

.doc .updated {
  font-size: 0.88rem;
  color: var(--subtle);
  letter-spacing: 0.02em;
  margin: 0 0 2.25rem;
}

.doc .intro {
  font-size: 1.09rem;
  line-height: 1.68;
  color: var(--foreground);
  margin: 0 0 1rem;
}

.doc h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--cream);
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

.doc h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.doc h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--foreground);
  margin: 1.75rem 0 0.5rem;
}

.doc p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.72;
}

.doc ul {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: var(--muted);
}

.doc li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.doc li::marker {
  color: var(--gold);
}

.doc strong {
  color: var(--foreground);
  font-weight: 600;
}

.doc .note {
  font-style: italic;
  color: var(--subtle);
  font-size: 0.94rem;
}

/* Callout card — contact blocks, the TMDb attribution, key notices. */
.card {
  background: var(--elevated);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: clamp(1.35rem, 4vw, 1.85rem);
  margin: 1.75rem 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card .email {
  font-size: 1.1rem;
  font-weight: 500;
}

/* ─── Back link ──────────────────────────────────────────────────────────── */

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

.back:hover,
.back:focus-visible {
  color: var(--foreground);
}

/* ─── Motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-primary:hover {
    transform: none;
  }
}
