/* OWNABLE brand world — LIGHT (cream ground, white tiles, espresso ink, gold accents).
   Dark evergreen ground, cream type, kraft tag + gold ticket — the same system as the ad
   creative, so the ad and the funnel read as one product.

   Tokens are the LOCKED palette, sampled off the approved renders (brands/nestworth/design.md):
     field #23503f · ink #16352a · cream #ede6d0 · kraft #c6a06a · gold #e4be55
   Type: Montserrat 700/800 (display, the Relief-family wordmark type) + Inter (UI).

   🔴 The stage image blends via its OWN sky: the top of scene-stage-*.jpg is baked to #FAF5EA
      (the evergreen ground). NO CSS overlay may sit on the image — an overlay fade cuts off
      the top of the picture and was rejected. If the theme ground changes, regenerate the
      asset with the new hex instead of adding an overlay. */

:root {
  --nw-field: #FAF5EA;        /* Ownable ground: warm cream. Light world, locked 2026-08-29. */
  --nw-field-deep: #F1E8D5;   /* tinted cards (recap) */
  --nw-field-hi: #FFFDF6;     /* top glow */
  --nw-ink: #2B2013;          /* espresso */
  --nw-cream: #FFFFFF;        /* tile surface */
  --nw-cream-hi: #FFFFFF;
  --nw-cream-lo: #E7DCC4;     /* tile borders */
  --nw-kraft: #C6A06A;
  --nw-kraft-lo: #A8834F;
  --nw-gold: #E8B23A;
  --nw-gold-lo: #C9971F;
  --nw-gold-deep: #9A741A;    /* small gold type on cream needs this depth */

  --ff-radius: 14px;
  --ff-scene-w: 3168;
  --ff-scene-h: 1344;

  /* icon chip */
  --nw-chip-bg: rgba(198, 160, 106, .18);
  --nw-chip-line: rgba(168, 131, 79, .38);
  --nw-chip-ink: #6B4F2A;
}


* { box-sizing: border-box; }

html { background: var(--nw-field); }

body {
  margin: 0;
  min-height: 100svh;                 /* 100vh overflows under mobile browser chrome */
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -160px, var(--nw-field-hi) 0%, var(--nw-field) 55%) fixed,
    var(--nw-field);
  color: var(--nw-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 100svh; }

img[src=""] { display: none; }        /* empty src renders a broken-image icon otherwise */

/* ---------------- header ---------------- */
.ff-head {
  order: 0;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--nw-field) 84%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43, 32, 19, .14);
}
.ff-head-brand { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.ff-logo { width: 26px; height: 26px; object-fit: contain; }
.ff-wordmark { height: 20px; width: auto; display: block; }
.ff-brand-name {
  font-family: Montserrat, Inter, sans-serif; font-weight: 800; font-size: 19px;
  text-transform: lowercase; color: var(--nw-cream); letter-spacing: .1px;
}
/* the ReliefMax-style accent flourish: a gold tick rising off the wordmark's tail */
.ff-brand-name::after {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 3px;
  border-radius: 999px; background: var(--nw-gold);
  box-shadow: 0 0 0 2.5px rgba(228, 190, 85, .28);
  vertical-align: super;
}
.ff-head-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(43, 32, 19, .10);
  border: 1px solid rgba(43, 32, 19, .22);
  font-size: 11.5px; font-weight: 600; color: var(--nw-ink);
  white-space: nowrap;
}
.ff-exit {
  background: none; border: 0; color: rgba(43, 32, 19, .55);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 4px;
}
.ff-exit:hover { color: var(--nw-ink); }

.ff-lock {
  width: 11px; height: 11px; flex: none; display: inline-block;
  background: currentColor;
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V11a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm0 2a3 3 0 0 1 3 3v3H9V6a3 3 0 0 1 3-3z'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V11a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm0 2a3 3 0 0 1 3 3v3H9V6a3 3 0 0 1 3-3z'/%3E%3C/svg%3E");
}

/* ---------------- main + progress ---------------- */
.ff-main {
  order: 1;
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: 18px 16px 8px;
  display: flex; flex-direction: column;
  flex: 1 1 auto;
}
.ffbar-wrap { margin-bottom: 20px; }
.ffbar {
  height: 6px; border-radius: 999px;
  background: rgba(43, 32, 19, .16);
  overflow: hidden;
}
.ffbar-fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--nw-kraft) 0%, var(--nw-gold) 100%);
  transition: width .3s ease;
}
.ffbar-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 7px;
}
.ffbar-step {
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--nw-gold-deep);
}
.ffbar-sec {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: rgba(43, 32, 19, .62);
}

/* ---------------- step ---------------- */
@keyframes ffStepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ff-anim { animation: ffStepIn .2s ease; }

.ff-eyebrow {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--nw-gold-deep); margin-bottom: 8px;
}
.ff-q {
  font-family: Montserrat, Inter, sans-serif;
  font-size: 25px; line-height: 1.22; font-weight: 700; letter-spacing: -0.01em;
  color: var(--nw-ink); margin: 0 0 8px;
}
.ff-sub { font-size: 14.5px; line-height: 1.45; color: rgba(43, 32, 19, .74); margin: 0 0 16px; }
.ff-promise { font-size: 13px; color: rgba(43, 32, 19, .6); margin: -6px 0 16px; }
.ff-why {
  font-size: 13px; line-height: 1.5; color: rgba(43, 32, 19, .72);
  background: rgba(43, 32, 19, .07);
  border-left: 2px solid var(--nw-kraft);
  padding: 10px 12px; border-radius: 0 8px 8px 0; margin: 0 0 16px;
}

/* ---------------- option tiles ---------------- */
.ff-opts { display: flex; flex-direction: column; gap: 10px; }
.ff-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 68px; padding: 12px 14px;
  text-align: left; cursor: pointer;
  background: var(--nw-cream);
  color: var(--nw-ink);
  border: 1.5px solid var(--nw-cream-lo);
  border-radius: var(--ff-radius);
  box-shadow: 0 4px 16px -8px rgba(43, 32, 19, .14);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  font-family: inherit;
}
.ff-opt:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(43, 32, 19, .22); }
.ff-opt.is-sel {
  border-color: var(--nw-gold);
  box-shadow: 0 0 0 3px rgba(228, 190, 85, .45), 0 8px 20px -10px rgba(43, 32, 19, .22);
}
.ff-chip {
  width: 42px; height: 42px; flex: none; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nw-chip-bg);
  border: 1px solid var(--nw-chip-line);
  color: var(--nw-chip-ink);
}
.ff-chip .material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-size: 21px; line-height: 1; font-weight: 400;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  letter-spacing: normal; white-space: nowrap; direction: ltr;
}
/* Selected inverts the chip: brand fill, contrast glyph. */
.ff-opt.is-sel .ff-chip { background: var(--nw-gold); border-color: var(--nw-gold-lo); color: var(--nw-ink); }
.ff-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ff-opt-label { font-size: 15.5px; font-weight: 700; color: var(--nw-ink); }
.ff-opt-explain { font-size: 12.8px; line-height: 1.35; color: rgba(22, 53, 42, .68); }
.ff-tag {
  margin-left: auto; flex: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--nw-ink); background: rgba(232, 178, 58, .45);
  border-radius: 999px; padding: 4px 8px;
}

 /* Square grid: used when a step has few, short options. Icon above label, two columns. */
.ff-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* An odd count leaves an orphan square; stretch the last one across both columns. */
.ff-opts-grid .ff-opt-sq:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 84px; }
.ff-opt-sq {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 116px; padding: 14px 10px;
  text-align: center; cursor: pointer;
  background: var(--nw-cream); color: var(--nw-ink);
  border: 1.5px solid var(--nw-cream-lo);
  border-radius: 16px;
  box-shadow: 0 4px 16px -8px rgba(43, 32, 19, .12);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  font-family: inherit;
}
.ff-opt-sq:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(43, 32, 19, .18); }
.ff-opt-sq.is-sel {
  border-color: var(--nw-gold);
  box-shadow: 0 0 0 3px rgba(228, 190, 85, .45), 0 8px 20px -10px rgba(43, 32, 19, .18);
}
.ff-opt-sq .ff-chip { width: 46px; height: 46px; }
.ff-opt-sq .ff-chip .material-symbols-outlined { font-size: 23px; }
.ff-opt-sq .ff-opt-label { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.ff-opt-sq .ff-tag {
  margin: 0; font-size: 9.5px; padding: 3px 7px;
}

/* ---------------- inputs ---------------- */
.ff-field { display: flex; flex-direction: column; gap: 10px; }
.ff-input {
  width: 100%; height: 54px; padding: 0 15px;
  border-radius: var(--ff-radius);
  border: 1.5px solid var(--nw-cream-lo);
  background: var(--nw-cream); color: var(--nw-ink);
  font-size: 16px; font-family: inherit;   /* 16px stops iOS zoom-on-focus */
}
.ff-input::placeholder { color: rgba(22, 53, 42, .45); }
.ff-input:focus { outline: none; border-color: var(--nw-gold); box-shadow: 0 0 0 3px rgba(228, 190, 85, .4); }
.ff-echo { font-size: 12.5px; color: var(--nw-gold-deep); margin: 0; }
.ff-err { font-size: 12.5px; color: #B3402E; margin: 0; }

/* Global input styling hijacks checkboxes: radius makes them circles and a forced
   background erases the tick. Revert explicitly. */
.ff-consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; }
.ff-consent input[type="checkbox"] {
  all: revert; appearance: auto; -webkit-appearance: checkbox;
  width: 19px; height: 19px; flex: none; margin-top: 2px;
  accent-color: var(--nw-gold);
}
.ff-consent span { font-size: 11.8px; line-height: 1.5; color: rgba(43, 32, 19, .72); }
.ff-consent strong { color: var(--nw-ink); }

/* ---------------- CTA ---------------- */
.ff-cta {
  width: 100%; height: 54px; margin-top: 16px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--nw-gold); color: var(--nw-ink);
  font-family: inherit; font-size: 16px; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 10px 24px -12px var(--nw-gold);
  transition: transform .14s ease, box-shadow .14s ease;
}
.ff-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--nw-gold); }
a.ff-cta-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ff-back {
  display: block; margin: 14px auto 0;
  background: none; border: 0; cursor: pointer;
  color: rgba(43, 32, 19, .6); font-size: 13.5px; font-family: inherit;
}
.ff-back:hover { color: var(--nw-ink); }

/* ---------------- interstitial ---------------- */
.ff-info {
  background: rgba(43, 32, 19, .07);
  border: 1px solid rgba(43, 32, 19, .18);
  border-radius: var(--ff-radius); padding: 16px;
}
.ff-info-badge {
  display: inline-block; margin-bottom: 10px; padding: 5px 10px; border-radius: 999px;
  background: rgba(232, 178, 58, .18); color: var(--nw-gold-deep);
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.ff-info-list { margin: 0; padding-left: 18px; }
.ff-info-list li { font-size: 13.8px; line-height: 1.55; color: rgba(43, 32, 19, .88); margin-bottom: 9px; }
.ff-info-src { margin: 6px 0 0; font-size: 11.5px; color: rgba(43, 32, 19, .5); }

/* ---------------- analyze theater: the kraft eligibility ticket ---------------- */
.ff-ticket {
  background: var(--nw-cream); color: var(--nw-ink);
  border-radius: 10px 10px 0 0; padding: 0 0 6px;
  box-shadow: 0 12px 30px -14px rgba(43, 32, 19, .2);
  position: relative; overflow: hidden;
}
.ff-ticket-head {
  display: flex; align-items: center; gap: 8px;
  background: var(--nw-ink); color: var(--nw-cream);
  padding: 9px 13px; font-size: 11px; font-weight: 700; letter-spacing: .1em;
}
.ff-led {
  width: 8px; height: 8px; border-radius: 999px; background: var(--nw-gold);
  animation: ffBlink 1s steps(2, start) infinite;
}
@keyframes ffBlink { 50% { opacity: .25; } }
.ff-ticket-lines { list-style: none; margin: 0; padding: 12px 14px 4px; }
.ff-ticket-line {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--nw-ink);
  opacity: 0; transform: translateY(6px);
  margin-bottom: 10px;
}
.ff-ticket-line.is-print { opacity: 1; transform: none; transition: opacity .25s ease, transform .25s ease; }
.ff-ticket-dots { flex: 1 1 auto; border-bottom: 1.5px dotted rgba(43, 32, 19, .35); transform: translateY(-3px); }
.ff-ticket-ok { font-weight: 800; color: var(--nw-kraft-lo); opacity: 0; transition: opacity .2s ease; }
.ff-ticket-line.is-done .ff-ticket-ok { opacity: 1; color: #2f7d5b; }
.ff-ticket-tear {
  height: 10px;
  background:
    linear-gradient(135deg, var(--nw-cream) 50%, transparent 50%) 0 0 / 12px 12px repeat-x,
    linear-gradient(225deg, var(--nw-cream) 50%, transparent 50%) 0 0 / 12px 12px repeat-x;
}
.ff-loadbar {
  height: 8px; margin-top: 16px; border-radius: 999px;
  background: rgba(43, 32, 19, .16); overflow: hidden;
}
.ff-loadbar span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--nw-kraft), var(--nw-gold));
  transition: width .9s ease;
}

/* ---------------- recap ---------------- */
.ff-recap {
  background: var(--nw-field-deep);
  border: 1px solid rgba(43, 32, 19, .18);
  border-radius: var(--ff-radius); padding: 6px 14px;
}
.ff-recap-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid rgba(43, 32, 19, .1);
}
.ff-recap-row:last-child { border-bottom: 0; }
.ff-recap-k {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(43, 32, 19, .55); flex: 1 1 auto;
}
.ff-recap-v { font-size: 13.5px; font-weight: 600; color: var(--nw-ink); text-align: right; flex: 0 1 auto; }

/* ---------------- finish spinner ---------------- */
.ff-thanks { text-align: center; }
.ff-spin {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 999px;
  border: 4px solid rgba(43, 32, 19, .18);
  border-top-color: var(--nw-gold);
  animation: ffSpin .8s linear infinite;
}
@keyframes ffSpin { to { transform: rotate(360deg); } }
.ff-legal-inline { margin-top: 14px; }

/* ---------------- exit popup ---------------- */
.ff-exitpop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(43, 32, 19, .38);
}
.ff-exitcard {
  position: relative;
  width: 100%; max-width: 380px; padding: 22px;
  background: #FFFFFF; border: 1px solid var(--nw-cream-lo);
  border-radius: 16px;
}
.ff-exitcard-x { position: absolute; top: 10px; right: 12px; }
.ff-exitcard h2 { font-family: Montserrat, Inter, sans-serif; font-weight: 800; font-size: 20px; margin: 0 0 8px; color: var(--nw-ink); }
.ff-exitcard p { font-size: 13.5px; line-height: 1.5; color: rgba(43, 32, 19, .75); margin: 0; }



/* ---------------- footer ---------------- */
.ff-foot {
  order: 3;
  width: 100%; max-width: 560px; margin: 10px auto 0;
  padding: 16px 16px 22px;
}
.ff-foot-line {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 8px; font-size: 11.5px; font-weight: 600; color: rgba(43, 32, 19, .7);
}
.ff-legal { margin: 0; font-size: 10.8px; line-height: 1.5; color: rgba(43, 32, 19, .45); }

/* ---------------- the 21:9 mobile stage ---------------- */
/* Lives IN the flex flow with order, and margin-top:auto so it owns the space left under the
   content. Never behind the tiles, never below the fold. Desktop never shows it. */
.ff-scene {
  order: 2;
  position: relative;
  margin-top: auto;
  width: 100%;
  /* The stage box is ALWAYS 21:9, whatever the asset is. The shipped scene-*.jpg files are
     currently 1920x1080 (16:9), so without this the rendered band is ~211px tall on a 375px
     phone while the footer only reserves ~169px, and the scene overruns the content it is
     supposed to sit under. Declaring the ratio here makes the geometry correct with today's
     art (object-fit crops it) and still correct when true 21:9 art replaces it. */
  aspect-ratio: var(--ff-scene-w) / var(--ff-scene-h);
  overflow: hidden;
  pointer-events: none;
}
.ff-scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }

@media (min-width: 768px) {
  .ff-scene { display: none !important; }
  .ff-q { font-size: 30px; }
}

@media (max-width: 767px) {
  /* Compact the vertical rhythm so the stage keeps a real band on short screens. */
  .ff-main { padding-top: 14px; }
  .ff-q { font-size: 24px; }
  .ff-opt { min-height: 62px; padding: 10px 12px; }
  .ff-opts { gap: 8px; }
  /* NOTE: no reserved margin under the footer here. The stage is IN the flex flow (header 0,
     main 1, scene 2, footer 3) with margin-top:auto, so the footer already sits clear of it
     structurally. Adding the reserved band as well double-counts and leaves ~169px of dead
     scroll under the legal text. */
  .ff-foot { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Trust line: pinned to the bottom of the content zone, floating just above the stage.
   Fixed position on every step (spatial consistency); quiet tone so it reassures without
   competing with the answers. Specificity beats .ff-foot-line's own margin. */
.ff-main .ff-trust-inline {
  margin: auto 0 0;
  padding: 26px 0 6px;
  justify-content: center;
  color: rgba(43, 32, 19, .55);
  font-weight: 600;
}
