/* LaBeau Love Notes waitlist page. Mobile first. No build step, no JavaScript.
   Ink & Stem palette from remotion/src/brand.ts: ink 20,15,14 · cream 238,227,205 · gold 176,141,87 (hairlines) ·
   rose-wine 142,38,53 (the one bright element: the button, identical everywhere).
   The card component reproduces tools/render_proofs.py (proof v1): one column, same left edge, block centred between
   the top margin and the signature; sizes scale with the card width through container query units. */
:root {
  --ink: #14100e;
  --ink-2: #1c1613;
  --cream: #eee3cd;
  --cream-2: #e4d6bb;
  --paper: #f4ecdd;
  --gold: #b08d57;
  --rose: #8e2635;
  --rose-2: #a52d3f;
  --brown: #3a2a1f;
  --muted: #6b5747;
  --muted-on-ink: #bfae90;
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --display: "Italiana", "Crimson Pro", Georgia, serif;
  --mono: "DM Mono", Menlo, Consolas, monospace;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --max: 66rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--brown);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-underline-offset: 3px; }
a:hover { color: var(--rose-2); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-weight: 400; line-height: 1.12; margin: 0 0 .55em; color: var(--ink); }
h2 { font-family: var(--display); font-size: clamp(1.9rem, 6vw, 2.7rem); letter-spacing: .01em; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: .2em; }
p { margin: 0 0 1em; }
.small { font-size: .95rem; color: var(--muted); }
.todo { background: #fff3c4; color: #5a3d00; padding: 0 .25em; border-radius: 2px; font-style: normal; }
.section-intro { color: var(--muted); max-width: 34rem; }

.skip {
  position: absolute; left: -999px; top: .5rem;
  background: var(--ink); color: var(--cream); padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: .5rem; }

/* ---------- The button: one style, one colour, everywhere ---------- */
.btn {
  display: inline-block;
  font: 600 1rem/1 var(--serif);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 1rem 1.5rem; min-height: 48px;
  background: var(--rose); color: var(--cream);
  border: 1px solid var(--rose); border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--rose-2); border-color: var(--rose-2); color: var(--cream); }
/* the pop: a press squeezes, the release springs back (haptic on tap from app.js) */
.btn { transition: transform .18s cubic-bezier(.2,.9,.3,1.6), background-color .15s ease, border-color .15s ease; }
.btn:active, .btn.pressed { transform: scale(.94); transition-duration: .08s; }
.faq summary:active, .what summary:active { transform: translateX(2px); }
.btn--top { padding: .7rem 1rem; min-height: 44px; font-size: .85rem; }
/* the phone's way in at #signup: the same rose button, opening Substack's own page (see index.html) */
.btn-out {
  display: inline-block; font: 600 1rem/1 var(--serif); letter-spacing: .08em; text-transform: uppercase;
  padding: 1rem 1.5rem; min-height: 48px; background: var(--rose); color: var(--cream);
  border: 1px solid var(--rose); border-radius: 2px; text-decoration: none; cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.9,.3,1.6), background-color .15s ease;
}
.btn-out:hover { background: var(--rose-2); border-color: var(--rose-2); color: var(--cream); }
.btn-out:active { transform: scale(.94); transition-duration: .08s; }
.signup-phone { margin-top: .5rem; }
.signup-phone .small { margin-top: .9rem; }
.signup .embed-wrap { display: none; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--pad);
  background: rgba(20,16,14,.96); color: var(--cream);
  border-bottom: 1px solid rgba(176,141,87,.35);
}
.wordmark {
  font-family: var(--display); font-size: 1.6rem; letter-spacing: .14em;
  color: var(--cream); text-decoration: none; margin: 0;
}

/* ---------- Sections: each one fades in from the colour of the one before (his note, 2026-10-08) ---------- */
main > section {
  --from: var(--bg); --h2: var(--ink);
  --fade: clamp(5rem, 12vw, 7.5rem);
  padding: calc(var(--fade) + .5rem) max(var(--pad), calc((100% - var(--max)) / 2)) clamp(3rem, 9vw, 5.5rem);
  /* an eased fade: most of the change happens in the middle of the band, so neither edge reads as a hard line */
  background: linear-gradient(to bottom,
    var(--from) 0,
    color-mix(in oklab, var(--from) 78%, var(--bg)) calc(var(--fade) * .25),
    color-mix(in oklab, var(--from) 40%, var(--bg)) calc(var(--fade) * .55),
    color-mix(in oklab, var(--from) 12%, var(--bg)) calc(var(--fade) * .8),
    var(--bg) var(--fade));
}
@supports not (color: color-mix(in oklab, red, blue)) {
  main > section { background: linear-gradient(to bottom, var(--from) 0, var(--bg) var(--fade)); }
}
.hero, .how, .closing { --bg: var(--ink); color: var(--muted-on-ink); }
.hero h1, .how h2, .how h3, .closing h2 { color: var(--cream); }
.how, .closing { --h2: var(--cream); }

/* ---------- Section headers: larger, a gold hairline, and one sheen as the section enters ---------- */
h2 {
  color: var(--h2, var(--ink));
  font-size: clamp(2.3rem, 7.5vw, 3.3rem);
  padding-bottom: .3em;
}
h2::after {
  content: ""; display: block; width: 3.5rem; height: 2px; margin-top: .4em;
  background: linear-gradient(90deg, var(--gold), rgba(176,141,87,0));
}
.js section.in h2, .js .foot.in .wordmark { animation: sheen 1.4s ease-out .15s both; }
.js section h2 {
  background-image: linear-gradient(105deg, var(--h2, var(--ink)) 0 42%, #e9c982 50%, var(--h2, var(--ink)) 58% 100%);
  background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Entry motion: a pull into the screen as each section arrives (app.js adds .in; off when motion is reduced) ---------- */
/* the two sections that hold the Substack frame (hero, signup) never move: iOS Safari stops routing taps into an
   iframe whose ancestor has been transformed or animated, which is what broke typing on the phone on Oct 8 */
.js main > section:not(.hero):not(.signup), .js .foot, .js .signup-text { opacity: 0; transform: translateY(22px) scale(.985); transform-origin: 50% 20%; }
.js main > section.in:not(.hero):not(.signup), .js .foot.in, .js .signup.in .signup-text { opacity: 1; transform: none; transition: opacity .7s ease-out, transform .9s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .js main > section, .js .foot, .js .signup-text { opacity: 1; transform: none; transition: none; }
  .js section.in h2, .js section h2 { animation: none; background: none; color: var(--h2, var(--ink)); -webkit-text-fill-color: initial; }
}
.haptic { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(110% 70% at 100% 0%, rgba(142,38,53,.18), transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgba(176,141,87,.12), transparent 60%),
    var(--ink);
  display: grid; gap: 0; align-content: start;
  padding-top: clamp(3rem, 9vw, 5.5rem);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 8.5vw, 4.4rem);
  margin-bottom: .35em;
}
.eyebrow {
  font-family: var(--mono); font-weight: 300; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.25rem;
}
.lede { font-size: 1.3rem; line-height: 1.45; color: var(--cream); max-width: 30rem; }
.stack { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; max-width: 30rem; }
.stack li { position: relative; padding-left: 1.4rem; margin-bottom: .55rem; color: #dccfb6; }
.stack li::before { content: ""; position: absolute; left: 0; top: .78em; width: .8rem; height: 1px; background: var(--gold); }
.hero .small { color: var(--muted-on-ink); }
.hero .date { margin: 1.25rem 0 0; }
.hero .small strong { color: var(--cream); font-weight: 600; }
.hero .lede { margin-top: 0; }
.embed-wrap--hero { display: none; }

/* ---------- The card (proof v1 typesetting, scaled to its box) ---------- */
.card {
  container-type: inline-size;
  position: relative;
  width: 100%; aspect-ratio: 4.25 / 5.5;
  margin: 0;
  background: var(--cream); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 24px 48px -20px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.18);
  -webkit-font-smoothing: antialiased;
}
.card-col {
  overflow: hidden;
  position: absolute; left: 11.8%; right: 11.8%; top: 10%; bottom: 19.1%;
  display: flex; flex-direction: column; justify-content: center;
}
.card-line {
  font-family: var(--serif); font-weight: 400;
  font-size: 6.2cqw; line-height: 1.42; letter-spacing: .004em;
  text-wrap: balance; hanging-punctuation: first; margin: 0;
}
/* his typesetting rule of 2026-09-29 ("All should start with capital letters"), applied here as the proofs apply it:
   the pool text stays verbatim in the HTML (verify_pool.py checks it); only the first letter is set as a capital */
.card-line::first-letter { text-transform: uppercase; }
.card-col.long .card-line { font-size: 5.4cqw; }
.card-col.xlong .card-line { font-size: 4.75cqw; line-height: 1.45; }
.card-sig {
  position: absolute; left: 11.8%; bottom: 9.1%; margin: 0;
  font-style: italic; font-size: 3.6cqw; line-height: 1;
}
.card-sig .x { font-size: 2.6cqw; margin-right: .18em; }
.card-sig .rule { display: block; height: 1px; background: var(--gold); width: 31.8cqw; margin-top: .35em; margin-left: -1px; }
.card-cap {
  position: absolute; left: 0; right: 0; bottom: -2.1rem;
  font-family: var(--mono); font-weight: 300; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-on-ink); text-align: center;
}
/* fallback for browsers without container units: a fixed scale that fits the common card widths */
@supports not (font-size: 1cqw) {
  .card-line { font-size: 1.25rem; }
  .card-col.long .card-line { font-size: 1.05rem; }
  .card-sig { font-size: .8rem; }
  .card-sig .x { font-size: .6rem; }
  .card-sig .rule { width: 5.5rem; }
}
/* phones: sized so the H1, the card and the start of the lede share the first screen (390 x 844) */
.card--back .stamp {
  position: absolute; left: 0; right: 0; bottom: 10.5%; margin: 0; text-align: center;
  font-family: var(--mono); font-weight: 300; font-size: 3.3cqw; letter-spacing: .18em; color: var(--ink);
}
.card--back .stamp::before, .card--back .stamp::after {
  content: ""; display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: var(--rose);
  vertical-align: middle; margin: 0 1em; position: relative; top: -.1em;
}
/* the tilt: app.js sets --rx/--ry from the pointer on wide screens; nothing happens without it */
.card { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; will-change: transform; }
.card--hero { width: min(15.5rem, 68vw); margin: .25rem auto 3.1rem; transform: rotate(-2deg) perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }

/* ---------- Stakes ---------- */
.stakes { --bg: var(--paper); --from: var(--ink); }
.stakes h2 { max-width: 30rem; }
.stakes p { max-width: 34rem; font-size: 1.25rem; }
.stakes .btn { margin-top: .5rem; }

/* ---------- Moments and the gallery ---------- */
.moments { --bg: var(--cream-2); --from: var(--paper); }
.m-kept .m-name { color: var(--muted); font-style: italic; }
.moment-list {
  list-style: none; padding: 0; margin: 1.5rem 0 2.5rem;
  display: grid; gap: 0;
  border-top: 1px solid rgba(176,141,87,.55);
}
.moment-list li { display: grid; gap: .05rem; padding: .85rem 0; border-bottom: 1px solid rgba(176,141,87,.55); }
.m-name { font-size: 1.25rem; color: var(--ink); }
.m-desc { color: var(--muted); font-size: 1rem; }

.swipe-hint {
  font-family: var(--mono); font-weight: 300; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}
.gallery {
  list-style: none; padding: 0 0 1rem; margin: 0 calc(-1 * var(--pad));
  display: flex; gap: 1.25rem; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
  -webkit-overflow-scrolling: touch;
}
.gallery::before, .gallery::after { content: ""; flex: 0 0 calc(var(--pad) - 1.25rem); }
.gallery li { flex: 0 0 min(76vw, 20rem); scroll-snap-align: center; }
.g-label {
  font-family: var(--mono); font-weight: 300; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .6rem;
}

/* ---------- Guide ---------- */
.guide { --bg: var(--paper); --from: var(--cream-2); display: grid; gap: 2.25rem; }
.pull {
  margin: 0; padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 1px solid var(--gold);
}
.pull .card-line { font-size: clamp(1.5rem, 5.2vw, 2.1rem); line-height: 1.3; color: var(--ink); text-wrap: balance; }
.pull-sig { font-style: italic; color: var(--rose); margin-top: 1rem; }
.pull-sig .x { font-size: .75em; margin-right: .18em; }
.guide-text p { max-width: 34rem; }
.idea { font-family: var(--display); font-size: 1.5rem; color: var(--ink); margin-top: 1.25rem; }

/* ---------- Plan ---------- */
.steps { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 1.6rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.15rem;
  font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--gold);
}
.steps p { margin: 0; }
.how { --from: var(--paper); }
.how .todo { background: #4a3a14; color: #ffe7a3; }

/* ---------- Explanatory paragraph ---------- */
.what { --bg: var(--cream-2); --from: var(--ink); }
.what > p { max-width: 34rem; font-size: 1.2rem; }
.what details { max-width: 34rem; }
.what summary { cursor: pointer; color: var(--rose); font-weight: 600; padding: .35rem 0; min-height: 44px; display: flex; align-items: center; }
.what details p { color: var(--muted); margin-top: .5rem; }

/* ---------- The ask ---------- */
.signup { --bg: var(--paper); --from: var(--cream-2); scroll-margin-top: 5rem; }
.signup:focus { outline: none; }
.embed-wrap { margin-top: .5rem; max-width: 30rem; position: relative; isolation: isolate; z-index: 1; }
/* his embed code's style attribute (border 1px solid #EEE, background white) lives here: the CSP forbids inline styles.
   Phones get more height than the code's 320 in case the publication name and description push the email box down. */
.embed-wrap iframe { display: block; width: 100%; max-width: 480px; height: 400px; border: 1px solid #EEE; background: white; }
.fallback { margin-top: .75rem; font-size: 1rem; color: var(--muted); }

/* ---------- Closing ---------- */
.closing { text-align: center; --from: var(--cream-2); }
.closing h2 { max-width: 24rem; margin-left: auto; margin-right: auto; }
.closing p { max-width: 30rem; margin: 0 auto 1.5rem; }

/* ---------- Junk drawer: questions ---------- */
.faq { --bg: var(--cream-2); --from: var(--paper); }
.faq details { border-bottom: 1px solid rgba(176,141,87,.6); max-width: 44rem; }
.faq details:first-of-type { border-top: 1px solid rgba(176,141,87,.6); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: .9rem 2rem .9rem 0; min-height: 44px;
  font-size: 1.15rem; color: var(--ink); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .75rem; font-size: 1.4rem; color: var(--gold); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding-bottom: .5rem; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid rgba(176,141,87,.35); background: var(--ink); color: var(--muted-on-ink); text-align: center; padding: 3rem var(--pad) 2.5rem; }
.foot-links { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.1rem; }
.foot-links a { color: var(--cream); display: inline-block; padding: .5rem 0; }
.foot .small { color: #8f806a; }

/* ---------- Larger screens ---------- */
@media (min-width: 760px) {
  /* tablets: still one column, the card larger, the form in the hero in place of the button */
  .hero > .btn { display: none; }
  .embed-wrap--hero { display: block; margin-top: 0; }
  .card--hero { width: min(20rem, 60vw); margin-bottom: 3.25rem; }
  .moment-list { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  /* seven cards as one set: four, then three centred (eight tracks, each card spans two, the fifth starts on track two) */
  .gallery { margin: 0; overflow: visible; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2.5rem 1.5rem; scroll-snap-type: none; }
  .gallery::before, .gallery::after { content: none; }
  .swipe-hint { display: none; }
  .gallery li { flex: none; grid-column: span 2; }
  .gallery li:nth-child(5) { grid-column: 2 / span 2; }
  .g-label { display: flex; align-items: flex-end; min-height: 2.3em; }
  .guide { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 4rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .signup { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4rem; align-items: center; }
  .embed-wrap { margin-top: 0; width: 100%; }
  .embed-wrap iframe { height: 320px; }
  .signup .embed-wrap { display: block; }
  .signup-phone { display: none; }
}
@media (min-width: 1024px) {
  .hero {
    padding-top: 3.5rem; padding-bottom: 4rem;
    grid-template-columns: 1.15fr .85fr; column-gap: 4rem; align-items: start;
    grid-template-areas: "eyebrow card" "title card" "lede card" "stack embed" "date embed" ". embed";
  }
  .hero .eyebrow { grid-area: eyebrow; } .hero h1 { grid-area: title; } .hero .lede { grid-area: lede; }
  .hero .stack { grid-area: stack; } .hero .date { grid-area: date; }
  .embed-wrap--hero { grid-area: embed; justify-self: end; width: 100%; max-width: 24rem; align-self: start; }
  .card--hero { grid-area: card; width: 100%; max-width: 17rem; justify-self: end; align-self: start; margin: 0 3.5rem 3rem 0; }
}
@media print {
  .top, .btn, .skip, .embed-wrap { display: none; }
  body { background: #fff; color: #000; }
}
