/* =========================================================================
   Tree Traction — Free Zip Code Analysis funnel: shared design system.
   Ported 1:1 from the funnel landing page (free-zip-analysis.astro) so every
   downstream stage (VSL -> Qualify -> Strategy Call) reads as one continuous,
   branded experience. Linked by the three sub-pages under /free-zip-analysis/.
   The landing page keeps its own inline copy of these tokens; this file is the
   single source of truth for the stages that follow it.
   ========================================================================= */

:root {
  --tt-green: #28b270; --tt-green-deep: #1e9e60; --tt-green-bright: #16c047;
  --tt-forest: #2b604c; --tt-forest-deep: #1f4a3a; --tt-bark: #223030;
  --tt-bark-deep: #0c1813; --tt-mint: #ebfff7; --tt-gold: #efc867;
  --line: #e7e4dc; --snow: #ffffff; --cream: #ffffff; --cream-warm: #f4f6f2;
  --paper: #fbfaf7; --ink: #1f2c28; --ink-soft: #4f5b54; --ink-faint: #76817b;
  --highlight: #ffe486;
  --font-display: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sh-sm: 0 2px 10px rgba(20,40,30,0.06);
  --sh-md: 0 12px 34px rgba(20,40,30,0.10);
  --sh-lg: 0 28px 64px rgba(8,22,16,0.18);
  --radius: 16px;
  --maxw: 620px;
}

*, *::before, *::after { box-sizing: border-box; }
/* The [hidden] attribute must win over component display rules (e.g. flex/grid
   stages), so JS show/hide via .hidden always works. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-weight: 400; font-size: 17.5px;
  line-height: 1.64; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
mark { background: linear-gradient(transparent 10%, var(--highlight) 10% 90%, transparent 90%); color: inherit; padding: 0 3px; border-radius: 2px; }
strong { font-weight: 700; color: var(--tt-bark); }

/* Dark variant: VSL + Strategy-call pages live on the deep-forest background. */
body.fz-dark {
  color: var(--tt-mint);
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(40,178,112,0.16), transparent 70%),
    linear-gradient(180deg, var(--tt-bark-deep) 0%, #0e2118 46%, #0a1610 100%);
  min-height: 100dvh;
}
body.fz-dark strong { color: #fff; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.wrap--wide { max-width: 860px; }
.wrap--xwide { max-width: 1140px; }

/* ---------- Top bar (logo + phone), reused across the post-landing stages ---------- */
.fz-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 0; }
.fz-topbar__logo { height: 29px; width: auto; }
.fz-topbar__phone {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; font-size: 14.5px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18); color: var(--tt-mint);
  transition: border-color 0.15s ease;
}
.fz-topbar__phone svg { width: 17px; height: 17px; color: var(--tt-green-bright); }
.fz-topbar__phone:hover { border-color: rgba(255,255,255,0.42); }
/* Light context (qualify page) inverts the phone chip */
.fz-topbar--light .fz-topbar__phone { color: var(--tt-bark); border-color: var(--line); }
.fz-topbar--light .fz-topbar__phone svg { color: var(--tt-green-deep); }
.fz-topbar--light .fz-topbar__phone:hover { border-color: var(--tt-green-deep); }
@media (max-width: 560px) { .fz-topbar__phone span { display: none; } .fz-topbar__phone { padding: 9px; } }

/* ---------- Eyebrow / kicker / section heads ---------- */
.eyebrow {
  display: inline; font-family: var(--font-display); font-weight: 800; font-size: 13.5px;
  line-height: 1.85; letter-spacing: 0.01em; color: #1a1205; background: var(--highlight);
  padding: 4px 9px; box-decoration-break: clone; -webkit-box-decoration-break: clone; border-radius: 3px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-weight: 800; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--tt-green-deep); margin: 0 0 14px;
}
.kicker::before, .kicker::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: rgba(22,192,71,0.45); }
.section { padding: 56px 0; }
.section--tint { background: var(--cream-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { text-align: center; margin: 0 0 32px; }
.section__h2 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(27px, 5.6vw, 38px);
  line-height: 1.1; letter-spacing: -0.015em; text-align: center; color: var(--tt-bark);
  margin: 0; text-wrap: balance;
}

/* ---------- Primary CTA ---------- */
.cta-block { text-align: center; margin: 34px 0 6px; }
.btn-cta {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; max-width: 430px; margin: 0 auto;
  padding: 18px 28px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #1ccb53 0%, var(--tt-green-bright) 50%, #11a83d 100%);
  color: #06210f;
  font-family: var(--font-display); font-weight: 800; font-size: 18.5px; letter-spacing: 0.01em;
  text-transform: uppercase; text-decoration: none; line-height: 1.1;
  box-shadow: 0 14px 30px rgba(22,192,71,0.36), inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform 0.08s ease, box-shadow 0.18s ease, filter 0.15s ease;
}
.btn-cta:hover { filter: brightness(1.04); box-shadow: 0 18px 38px rgba(22,192,71,0.46), inset 0 1px 0 rgba(255,255,255,0.45); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(1px); }
.btn-cta__sub { font-family: var(--font-body); font-weight: 500; font-size: 12.5px; text-transform: none; letter-spacing: 0.01em; opacity: 0.82; }
.cta-privacy { margin: 14px 0 0; font-size: 13px; color: var(--ink-faint); display: flex; align-items: center; justify-content: center; gap: 7px; }
.cta-privacy svg { width: 14px; height: 14px; color: var(--tt-green-deep); }
.fz-dark .cta-privacy { color: rgba(235,255,247,0.72); }
.fz-dark .cta-privacy svg { color: var(--tt-green-bright); }

/* ---------- Generic buttons (form nav, secondary actions) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 24px; font-family: var(--font-body); font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 2px solid transparent; border-radius: 10px;
  transition: background-color 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--tt-green-bright); color: var(--tt-bark); border-color: var(--tt-green-bright); }
.btn--primary:hover { background: var(--tt-green-deep); border-color: var(--tt-green-deep); color: var(--snow); }
.btn--primary:active { transform: translateY(1px); }
.btn--lg { min-height: 56px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--ghost-light { background: transparent; color: var(--tt-forest-deep); border-color: var(--line); }
.btn--ghost-light:hover { border-color: var(--tt-forest-deep); }

/* ---------- Multi-step form / stepper (used by the Qualify screen) ---------- */
.zip-form { margin: 0; display: flex; flex-direction: column; }
.zip-form__progress { position: relative; height: 6px; background: var(--cream-warm); border-radius: 3px; margin: 8px 0 28px; overflow: hidden; }
.zip-form__progress-bar { height: 100%; width: 14%; background: var(--tt-green); transition: width 0.3s cubic-bezier(.2,.8,.2,1), background-color 0.2s ease; border-radius: 3px; }
.zip-form__progress-label { position: absolute; right: 0; top: -22px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.zip-form__step { border: 0; padding: 0; margin: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.zip-form__step[hidden] { display: none; }
.zip-form__legend { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 5vw, 26px); letter-spacing: -0.01em; color: var(--tt-bark); margin: 0 0 8px; padding: 0; line-height: 1.12; }
.zip-form__sublabel { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 22px; line-height: 1.5; }
.zip-form__field { display: block; margin: 0 0 16px; }
.zip-form__field-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 6px; }
.zip-form__input {
  width: 100%; padding: 14px 14px; font: inherit; font-size: 16px; font-weight: 500;
  color: var(--tt-bark); background: var(--cream); border: 2px solid var(--line); border-radius: 10px;
  outline: none; transition: border-color 0.15s ease, background-color 0.15s ease; font-family: var(--font-body);
}
.zip-form__input::placeholder { color: rgba(15,31,21,0.35); }
.zip-form__input:focus-visible { border-color: var(--tt-green); background: var(--snow); }
.zip-form__input--big { font-size: 22px; font-weight: 700; letter-spacing: 0.06em; padding: 18px 16px; }
textarea.zip-form__input { min-height: 120px; resize: vertical; line-height: 1.5; }
.zip-form__hint { font-size: 12px; color: var(--ink-faint); margin: 14px 0 22px; line-height: 1.45; }
.zip-form__actions { margin-top: auto; padding-top: 8px; }
.zip-form__actions--split { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.zip-form__actions--split .btn--ghost-light { flex: 0 0 auto; }
.zip-form__actions--split .btn--primary { flex: 1 1 auto; }
.zip-form__back { background: transparent; border: 0; padding: 6px 0; margin-top: 16px; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink-faint); cursor: pointer; align-self: flex-start; }
.zip-form__back:hover { color: var(--tt-forest-deep); }

/* Choice tiles (single + multi select) */
.tile-grid { display: grid; gap: 10px; margin: 0 0 16px; }
.tile-grid--2col { grid-template-columns: 1fr 1fr; }
.tile {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  min-height: 56px; padding: 14px 16px; background: var(--cream); border: 2px solid var(--line);
  border-radius: 12px; cursor: pointer; text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 5px 14px rgba(0,0,0,0.10);
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.tile--center { justify-content: center; text-align: center; }
.tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.tile__label { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--tt-forest-deep); transition: color 0.16s ease; }
.tile__emoji { margin-right: 8px; font-size: 1.05em; line-height: 1; }
.tile__check { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: all 0.14s ease; }
.tile:hover { background: var(--snow); border-color: var(--tt-green); box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 10px 22px rgba(0,0,0,0.16); transform: translateY(-1px); }
.tile:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 10px rgba(0,0,0,0.10); }
.tile:has(input:checked) { background: rgba(22,192,71,0.12); border-color: var(--tt-green); box-shadow: 0 0 0 3px rgba(22,192,71,0.18), 0 6px 16px rgba(0,0,0,0.12); transform: none; }
.tile:has(input:checked) .tile__label { color: var(--tt-green-deep); }
.tile:has(input:checked) .tile__check { background: var(--tt-green); border-color: var(--tt-green); color: #fff; }
.tile:has(input:focus-visible) { outline: 2px solid var(--tt-green); outline-offset: 2px; }

.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.zip-form__secure { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; padding: 10px 12px; background: rgba(22,192,71,0.10); border: 1px solid rgba(22,192,71,0.35); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--tt-green-deep); line-height: 1.45; }
.zip-form__secure svg { width: 16px; height: 16px; color: var(--tt-green-deep); flex-shrink: 0; }
.zip-form__secure span { flex: 1; min-width: 0; }

/* ---------- Footer ---------- */
.foot { background: #081310; color: rgba(235,255,247,0.55); padding: 36px 0 44px; font-size: 12.5px; line-height: 1.6; }
.foot__brand { text-align: center; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(235,255,247,0.82); font-size: 14px; margin: 0 0 18px; }
.foot__disclaimer { color: rgba(235,255,247,0.4); font-size: 11.5px; line-height: 1.58; margin: 0 0 14px; }
.foot__links { text-align: center; display: flex; gap: 8px 16px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.foot__links a { color: rgba(235,255,247,0.62); text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1); }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* Sub-threshold ($0 to $350K) nurture panel + opt-in assurance line */
.zip-card__assurance { margin: 16px 0 2px; font-size: 12px; line-height: 1.45; color: var(--ink-faint); text-align: center; }
.zip-card__assurance strong { color: var(--tt-green-deep); font-weight: 700; }
.zip-form__not-fit { padding: 4px 0 0; }
.zip-form__not-fit-body { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 0 0 16px; }
.zip-form__not-fit-body strong { color: var(--tt-forest-deep); }
.zip-form__not-fit-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; align-items: flex-start; }
