/* ─────────────────────────────────────────────
   lifewoven — linen paper and cinema
   Linen #FAF6EF · Ink #16233D · Thread Teal #0E9384
   Deep Teal #0B7268 · Loom Amber #E8A13D
   Tints DFF2EF / FBEBD2 / F6E3DA (fills only)
   ───────────────────────────────────────────── */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces.woff2") format("woff2");
}
/* Fraunces italic is loaded by main.js after first paint —
   it only appears below the fold, so it stays off the critical path. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter.woff2") format("woff2");
}

:root {
  --linen: #FAF6EF;
  --ink: #16233D;
  --teal: #0E9384;
  --deep-teal: #0B7268;
  --amber: #E8A13D;
  --tint-teal: #DFF2EF;
  --tint-amber: #FBEBD2;
  --tint-rose: #F6E3DA;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --measure: 34em;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--linen);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--deep-teal); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--deep-teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ── The thread ───────────────────────────── */
#thread {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
  display: none; /* enabled by JS on wide screens */
}
main, .site-header, .site-footer { position: relative; z-index: 1; }

/* Mobile stitches: short dashes leading into each section */
@media (max-width: 767px) {
  .loss::before, .film::before, .how::before, .failed::before,
  .vignettes::before, .honest::before, .final::before {
    content: "";
    display: block;
    width: 2px;
    height: 3rem;
    margin: 0 auto 2.5rem;
    background-image: linear-gradient(var(--teal) 55%, transparent 55%);
    background-size: 2px 11px;
  }
  .vignettes::before, .honest::before, .final::before {
    background-image: linear-gradient(var(--amber) 55%, transparent 55%);
  }
}

/* ── Header ───────────────────────────────── */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 1.75rem clamp(1.25rem, 4vw, 3rem);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.mark { width: 1.5em; height: 1.5em; }

/* ── Hero ─────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem clamp(1.25rem, 5vw, 3rem) 4.5rem;
  position: relative;
}
h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 13em;
}
.hero .sub {
  margin: 1.6rem auto 2.6rem;
  max-width: var(--measure);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink) 82%, var(--linen));
}

/* ── Waitlist form ────────────────────────── */
.waitlist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}
.waitlist input[type="email"] {
  flex: 1 1 14rem;
  font: inherit;
  color: var(--ink);
  padding: 0.85rem 1.1rem;
  border: 1.5px solid color-mix(in srgb, var(--ink) 25%, var(--linen));
  border-radius: 999px;
  background: #fff;
}
.waitlist input[type="email"]::placeholder {
  color: color-mix(in srgb, var(--ink) 45%, var(--linen));
}
.waitlist button {
  font: inherit;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border: none;
  border-radius: 999px;
  background: var(--deep-teal);
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease-out, transform 160ms ease-out;
}
.waitlist button:hover { background: var(--teal); transform: translateY(-1px); }
.form-note {
  flex-basis: 100%;
  min-height: 1.5em;
  font-size: 0.95rem;
  color: var(--deep-teal);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--deep-teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.scroll-cue:hover { border-bottom-color: var(--deep-teal); }

/* ── Sections: shared rhythm ──────────────── */
section { padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 5vw, 3rem); }

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: 1.2rem;
}

/* ── 2 · Loss line ────────────────────────── */
.loss { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.loss-line {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  line-height: 1.45;
  text-align: center;
  max-width: 26em;
  margin: 0 auto;
}

/* ── 3 · Film ─────────────────────────────── */
.film { padding-top: 1rem; }
.film-frame {
  max-width: 62rem;
  margin: 0 auto;
  background: var(--tint-amber);
  padding: clamp(0.75rem, 2.5vw, 1.5rem);
  border-radius: 6px;
  box-shadow: 0 30px 80px -30px rgba(22, 35, 61, 0.35);
}
.film-frame video { width: 100%; border-radius: 3px; background: #0b1526; }
.caption {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  margin-top: 1rem;
  color: color-mix(in srgb, var(--ink) 75%, var(--linen));
}

/* ── 4 · How it works ─────────────────────── */
.how h2 { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.steps {
  list-style: none;
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 5.5rem);
}
.step { max-width: 30rem; }
.step:nth-child(odd) { align-self: flex-start; text-align: left; }
.step:nth-child(even) { align-self: flex-end; text-align: right; }
.step-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep-teal);
  background: var(--tint-teal);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}
#reveal-step .step-kicker { color: #8a5a14; background: var(--tint-amber); }
.step-line {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  line-height: 1.3;
}
.step-detail {
  margin-top: 0.5rem;
  color: color-mix(in srgb, var(--ink) 75%, var(--linen));
}

/* ── 5 · Why everything else failed ───────── */
.failed { text-align: center; }
.failed-lede {
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}
.failures {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 52rem;
  margin: 0 auto 2.5rem;
}
.failures li {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  padding: 1.4rem 1.8rem;
  border-radius: 6px;
  background: var(--tint-rose);
  flex: 1 1 14rem;
}
.failed-close {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  color: var(--deep-teal);
}

/* ── 6 · From the film ────────────────────── */
.vignettes-note {
  text-align: center;
  max-width: var(--measure);
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  color: color-mix(in srgb, var(--ink) 75%, var(--linen));
}
.stills {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 0 auto;
}
/* Main cast — four large 4:5 portraits */
.stills-main {
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  max-width: 72rem;
}
/* Supporting cast — three smaller squares, narrower row */
.stills-supporting {
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  max-width: 48rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}
.stills-supporting figcaption { font-size: 0.9rem; }
.stills img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 18px 50px -22px rgba(22, 35, 61, 0.4);
}
.stills figcaption {
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  margin-top: 0.7rem;
  color: color-mix(in srgb, var(--ink) 75%, var(--linen));
}

/* ── 7 · The honest part ──────────────────── */
.honest { display: flex; justify-content: center; }
.honest-card {
  max-width: 40rem;
  background: var(--tint-teal);
  border-radius: 8px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.honest-card h2 {
  text-align: left;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 0.8rem;
}

/* ── 8 · Final ask ────────────────────────── */
.final { text-align: center; }
.final-note {
  font-family: var(--display);
  font-style: italic;
  margin: 0 auto 2.2rem;
  color: color-mix(in srgb, var(--ink) 75%, var(--linen));
}

/* ── Footer ───────────────────────────────── */
.site-footer {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem 3rem;
}
.footer-o { width: 72px; height: 72px; margin: 0 auto 1rem; }
.footer-wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}
.footer-privacy {
  font-size: 0.95rem;
  max-width: 34em;
  margin: 0 auto 0.6rem;
  color: color-mix(in srgb, var(--ink) 75%, var(--linen));
}
.footer-copy { font-size: 0.9rem; color: color-mix(in srgb, var(--ink) 78%, var(--linen)); }

/* ── Reveal on scroll ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .waitlist button { transition: none; }
}

/* ── Privacy page ─────────────────────────── */
.privacy-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}
.privacy-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.5rem; }
.privacy-page h2 { text-align: left; font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
.privacy-page p + p { margin-top: 1rem; }
.privacy-page .back { display: inline-block; margin-top: 3rem; }
