/*
 * web/assets/css/style.css — OOEY marketing landing styles.
 *
 * Composition: The Recipe Card.
 * Bound by docs/design/decisions/marketing-coming-soon.md §4 (re-cast
 * 2026-04-28 final-pass amendment) and ADR-0028 §5a / §5b / §5c.
 *
 * Hard rules enforced by tools/web-lint:
 *   - Saffron is forbidden on the marketing surface (§5c reservation
 *     for the in-app AI voice). The lint rejects #D6A24E, #B7812A,
 *     #906621 anywhere in this file.
 *   - Every (foreground × background × mode) pair must clear WCAG 2.2
 *     AA. The CSS custom properties below carry the only colour values
 *     used in the page; the lint runs contrast checks against this set.
 *   - prefers-reduced-motion must degrade transitions to opacity-only.
 *
 * Total weight target: < 200 KB page total per §6e.
 *
 * Layout direction: a single centred editorial column. There is no
 * outer wide container; the page IS its column. Earlier revisions
 * carried `--content-max` / `--content-max-wide` parallel containers,
 * which produced misaligned left edges and stranded the wordmark
 * above empty space. The Recipe Card direction collapses that into
 * one width, centred — typography carries; chrome does not.
 */

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-var.woff2') format('woff2-variations'),
       url('/assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  /*
   * size-adjust + the local fallback metrics tune the system stack
   * to the same x-height as Fraunces, so the swap-in does not jump
   * line-height or column width. Values measured against
   * `-apple-system, BlinkMacSystemFont` at 16 px reference.
   */
  ascent-override: 96%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 102%;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2015, U+2018-201D, U+2022, U+2026, U+00A9, U+00B7, U+2116;
}

:root {
  --bone:        #F6F1E8;
  --cream:       #FFFCF5;
  --roasted:     #1A1613;
  --charcoal:    #221E1A;
  --muted-light: #6E655A;
  --muted-dark:  #9A9085;
  --brick-light: #8A2A2A;
  --brick-dark:  #B73636;
  --hairline-light: rgba(26, 22, 19, 0.18);
  --hairline-dark:  rgba(246, 241, 232, 0.18);

  --bg:        var(--bone);
  --surface:   var(--cream);
  --ink:       var(--roasted);
  --muted:     var(--muted-light);
  --action-bg: var(--roasted);
  --action-fg: var(--bone);
  --warn:      var(--brick-light);
  --hairline:  var(--hairline-light);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /*
   * The Recipe Card column. ~30 rem (~480 px) on desktop reads as a
   * recipe card / magazine reply card column rather than a full-width
   * editorial page; the typography is the design, so the column does
   * not need to fill the viewport.
   *
   * On a 1440-class viewport, 30 rem leaves generous gutters that
   * read as "room around the page", not as "the page is too small."
   * The headline and ingredient list have their own narrower
   * reading-width (--column-text) so titles don't run wider than the
   * body they sit above.
   */
  --column:      30rem;
  --column-text: 26rem;

  /*
   * Subscription-card width. Matches the page column on desktop so
   * the form sits inside the same vertical rhythm as the headline
   * and the ingredient list.
   */
  --reply-card-max: 28rem;

  --motion-fast: 120ms ease-out;
  --motion-base: 240ms ease-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        var(--roasted);
    --surface:   var(--charcoal);
    --ink:       var(--bone);
    --muted:     var(--muted-dark);
    --action-bg: var(--bone);
    --action-fg: var(--roasted);
    --warn:      var(--brick-dark);
    --hairline:  var(--hairline-dark);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  font-variation-settings: 'opsz' 32, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  padding-inline: max(env(safe-area-inset-left), var(--space-5));
  padding-inline-end: max(env(safe-area-inset-right), var(--space-5));
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--motion-base);
}

a:hover, a:focus-visible {
  text-decoration-color: currentColor;
}

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

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

/*
 * The page IS its column. Centre the column horizontally; let the
 * vertical flow stack masthead → main → colophon. `min-height` plus
 * `display: flex` makes the colophon stick to the bottom of short
 * pages (the privacy notice) without the hero-eats-the-page bug
 * earlier revisions hit.
 */
.page {
  display: flex;
  flex-direction: column;
  max-width: var(--column);
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-block-end: var(--space-7);
}

/* ---- masthead --------------------------------------------------------- */

/*
 * Folio + wordmark + headline as a single typographic block. A
 * hairline rule below the folio inset to the column gutter; the
 * wordmark anchors the block at display size; the headline
 * (.dek) restates the cover line in two centred lines.
 */
.masthead {
  text-align: center;
  padding-block-start: var(--space-9);
  padding-block-end: var(--space-9);
}

/*
 * On the privacy page the masthead is shorter — wordmark is a link
 * back home, no headline. Tighten the bottom padding so the prose
 * starts at a sensible vertical rhythm.
 */
.masthead--secondary {
  padding-block-end: var(--space-7);
}

.folio {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-feature-settings: 'kern' 1, 'liga' 1, 'smcp' 1;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 auto var(--space-6);
  padding-block-end: var(--space-4);
  border-block-end: 1px solid var(--hairline);
  max-width: var(--column-text);
}

.wordmark {
  display: block;
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  /*
   * Display axis pin per ADR-0028 §5b + decision doc §4b. opsz=144
   * is the display optical-size; wght=600 is SemiBold; SOFT=0
   * (Sharp) keeps the high-contrast register that Fraunces draws
   * its display glyphs against.
   */
  font-variation-settings: 'opsz' 144, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  /*
   * Display clamp ramp:
   *   - 4.5 rem floor (~ 72 px) at narrow viewports — the wordmark
   *     stays the dominant element on iPhone SE-class screens.
   *   - 9 vw mid-curve so the wordmark grows confidently with the
   *     viewport.
   *   - 8 rem ceiling (~ 128 px) at desktop, matching the high end
   *     of the 96–128 pt spec.
   */
  font-size: clamp(4.5rem, 9vw + 1rem, 8rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-block: 0;
}

a.wordmark {
  /* The privacy-page link form. No hover underline — the wordmark
     reads as a brand glyph, not a navigation link. Focus ring is
     the default :focus-visible outline. */
  text-decoration: none;
}

a.wordmark:hover, a.wordmark:focus-visible {
  text-decoration: none;
}

/* ---- dek (the headline) ---------------------------------------------- */

.dek {
  margin: var(--space-7) auto 0;
  max-width: var(--column-text);
  text-align: center;
}

.dek-line {
  display: block;
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 72, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  /*
   * Headline clamp ramp:
   *   - 1.5 rem floor (24 px) on iPhone SE-class screens.
   *   - 3.5 vw mid-curve so it grows with the viewport but stays
   *     subordinate to the wordmark above.
   *   - 2.25 rem ceiling (36 px) — the upper end of the original
   *     28–36 pt spec.
   */
  font-size: clamp(1.5rem, 3.5vw + 0.5rem, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.dek-primary {
  color: var(--ink);
}

.dek-secondary {
  color: var(--muted);
  margin-block-start: var(--space-3);
}

/* ---- ingredient list (the three movements) -------------------------- */

.movements {
  margin-block: var(--space-9) var(--space-9);
  text-align: center;
}

.eyebrow {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 500, 'SOFT' 0, 'WONK' 0;
  font-feature-settings: 'kern' 1, 'liga' 1, 'smcp' 1;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 auto var(--space-6);
  text-align: center;
}

.movements-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--column-text);
  text-align: start;
}

/*
 * Each movement is a three-line typographic block: numeral above,
 * title middle, body below. Hairline rules separate rows. No
 * surface boxes — typography carries.
 */
.movement {
  padding-block: var(--space-6) var(--space-6);
  border-block-end: 1px solid var(--hairline);
}

.movement:first-child {
  border-block-start: 1px solid var(--hairline);
}

.movement-numeral {
  display: block;
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 500, 'SOFT' 0, 'WONK' 0;
  font-feature-settings: 'kern' 1, 'liga' 1, 'smcp' 1;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-block-end: var(--space-3);
}

.movement-title {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 32, 'wght' 550, 'SOFT' 0, 'WONK' 0;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

.movement-body {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/*
 * Position 2 (the AI delight, ADR-0036 + ADR-0042) takes a small
 * upward translation on viewports where the column has room to
 * breathe. No saffron — the marketing surface is not the AI
 * speaking (ADR-0028 §5c). The body of the middle row carries the
 * one allowed exclamation mark on the page (decision doc §3).
 */
@media (min-width: 480px) and (prefers-reduced-motion: no-preference) {
  .movement-feature {
    transform: translateY(-2px);
  }
}

.movement-feature .movement-body {
  color: var(--ink);
}

/* ---- subscription card (the form) ----------------------------------- */

.reply-card {
  max-width: var(--reply-card-max);
  margin: 0 auto var(--space-9);
  padding: var(--space-7) var(--space-6) var(--space-6);
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 4px;
  text-align: start;
}

.reply-card .eyebrow {
  margin-block-end: var(--space-5);
}

.waitlist {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.waitlist-input {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 1rem;
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  transition: border-color var(--motion-base), box-shadow var(--motion-base);
  -webkit-appearance: none;
  appearance: none;
}

.waitlist-input::placeholder {
  color: var(--muted);
}

.waitlist-input:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.waitlist-input[aria-invalid="true"] {
  border-color: var(--warn);
  box-shadow: 0 0 0 1px var(--warn);
}

.waitlist-submit {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 500, 'SOFT' 0, 'WONK' 0;
  font-size: 1rem;
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  background: var(--action-bg);
  color: var(--action-fg);
  border: 1px solid var(--action-bg);
  border-radius: 4px;
  cursor: pointer;
  transition: opacity var(--motion-base), transform var(--motion-base);
  -webkit-appearance: none;
  appearance: none;
}

.waitlist-submit:hover { opacity: 0.92; }
.waitlist-submit:active { transform: translateY(1px); }
.waitlist-submit[disabled] { opacity: 0.6; cursor: progress; }

.waitlist-turnstile {
  /* Reserved height keeps the layout stable when Turnstile mounts
     (Cloudflare's iframe is 65 px tall managed-mode). Empty until
     the JS in /assets/js/main.js wires it on first focus/input. */
  min-height: 0;
  margin-block-start: var(--space-2);
}

.waitlist-turnstile:not(:empty) {
  min-height: 65px;
}

.waitlist-helper,
.waitlist-privacy,
.waitlist-error {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin-block: 0;
}

.waitlist-error {
  color: var(--warn);
  margin-block-start: var(--space-2);
}

/*
 * Reply-card state machine.
 *
 * `.reply-card-state--ready` wraps the eyebrow + form so they hide
 * together when the submit succeeds. The success state has its own
 * eyebrow + italic confirmation line + muted helper, mirroring the
 * voice of the confirmation email so the two surfaces feel like one
 * editorial act. The page reflows slightly on submit (the success
 * block is shorter than the form by a line of input + a button) —
 * that's an intentional, deliberate state change, not jitter.
 */
.reply-card-state {
  display: block;
}

.reply-card-state[hidden] {
  display: none;
}

.waitlist-success-line {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-style: italic;
  font-variation-settings: 'opsz' 32, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 1.125rem;
  line-height: 1.5;
  text-align: start;
  margin-block: 0 var(--space-4);
  color: var(--ink);
}

.waitlist-success-helper {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin-block: 0;
}

.waitlist-success-helper a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.waitlist-success-helper a:hover {
  text-decoration-thickness: 2px;
}

.is-fading {
  opacity: 0;
  transition: opacity var(--motion-base);
}

.is-faded-in {
  opacity: 1;
  transition: opacity var(--motion-base);
}

/* ---- colophon footer ------------------------------------------------- */

/*
 * Three lines of muted Fraunces, centred, with a hairline rule above.
 * `margin-block-start: auto` makes the colophon absorb leftover
 * space inside .page's flex column so it sticks to the bottom of
 * short pages without re-introducing the hero-eats-the-page bug.
 */
.colophon {
  text-align: center;
  margin-block-start: auto;
  padding-block: var(--space-7) var(--space-3);
  border-block-start: 1px solid var(--hairline);
}

.colophon-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  margin: 0 0 var(--space-5);
  padding: 0;
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 0.875rem;
}

.colophon-caption {
  font-variation-settings: 'opsz' 32, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 1rem;
  margin: 0 0 var(--space-2);
  color: var(--ink);
}

.colophon-meta {
  font-variation-settings: 'opsz' 14, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.005em;
}

/* ---- /privacy prose -------------------------------------------------- */

/*
 * Prose width matches the page column's reading-width. The privacy
 * page wears the same column as the landing page, so the wordmark,
 * folio, prose, and colophon all sit on the same vertical axis.
 */
.prose {
  margin: 0 auto;
  max-width: var(--column-text);
  padding-block-end: var(--space-7);
}

.prose-title {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-variation-settings: 'opsz' 72, 'wght' 500, 'SOFT' 0, 'WONK' 0;
  font-size: clamp(1.625rem, 3.5vw + 0.5rem, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-block: 0 var(--space-5);
  color: var(--ink);
}

.prose-title--secondary {
  margin-block-start: var(--space-8);
}

.prose-lede {
  font-variation-settings: 'opsz' 32, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 1.125rem;
  line-height: 1.6;
  margin-block: 0 var(--space-5);
}

.prose p {
  font-variation-settings: 'opsz' 32, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  font-size: 1rem;
  line-height: 1.6;
  margin-block: 0 var(--space-5);
}

.prose-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-block-start: var(--space-7);
}

/* ---- reduced-motion -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    /*
     * Degrade transitions to opacity-only at the fast tier; the page
     * has no transforms or scroll-driven animations of its own, so
     * this clears everything except the form's success crossfade.
     */
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: var(--motion-fast) !important;
    transition-property: opacity !important;
    transform: none !important;
  }
}
