/* =====================================================================
   The Open-Door Finder — scoped stylesheet.
   Mirrors "The Mid-Year Coverage Playbook" PDF so the two read as one
   family: deep navy + warm cream + teal, with gold reserved for exactly
   two moments — the open-door reveal and the single primary CTA.
   Everything is namespaced under .odf so it never touches the main site CSS.
   ===================================================================== */

@import url("/fonts/fonts.css");

.odf {
  /* palette (sampled from the PDF) */
  --navy: #16304d;
  --navy-deep: #0f2237;
  --cream: #f7f4ee;
  --card: #fcfaf5;
  --ink: #1f2c3a;
  --muted: #6f6a61;
  --teal: #2f6f73;
  --teal-deep: #234f52;
  --gold: #bd8b40;
  --gold-soft: #d8b877;
  --rose: #b06a5f;
  --rose-bg: #f1e2dd;
  --line: rgba(22, 48, 77, 0.14);
  --line-soft: rgba(22, 48, 77, 0.08);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", system-ui, -apple-system, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 34, 55, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 34, 55, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 34, 55, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

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

.odf body, body.odf-body { margin: 0; }

/* ----- layout shell ----- */
.odf-shell { min-height: 100svh; display: flex; flex-direction: column; background: var(--cream); }
.odf-main { flex: 1; display: flex; flex-direction: column; }
.odf-wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 22px; }

/* ----- top chrome (minimal) ----- */
.odf-top { padding: 22px 22px 8px; }
.odf-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--navy); }
.odf-brand-img { height: 46px; width: 46px; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.odf-brand-text { display: flex; flex-direction: column; line-height: 1.04; }
.odf-brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--navy); }
.odf-brand-name span { color: var(--gold); }
.odf-brand-tagline { font-family: var(--sans); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* ----- progress line ----- */
.odf-progress { height: 3px; background: var(--line-soft); border-radius: 3px; overflow: hidden; margin: 14px 0 0; }
.odf-progress__bar { height: 100%; width: 0%; background: var(--teal); border-radius: 3px; transition: width 420ms var(--ease); }
.odf-progress__label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* ----- typography ----- */
.odf-eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal);
  margin: 0 0 14px;
}
.odf h1, .odf h2, .odf h3, .odf .odf-display { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.12; letter-spacing: -0.01em; }
.odf-question { font-size: clamp(1.7rem, 6vw, 2.5rem); margin: 0 0 6px; }
.odf-display { font-size: clamp(2rem, 7vw, 3rem); }
.odf-display em, .odf-question em { font-style: italic; color: var(--gold); font-weight: 600; }
.odf-lede { font-size: 1.06rem; color: var(--muted); margin: 14px 0 0; }

/* ----- screens (animated swap) ----- */
.odf-screen { display: none; }
.odf-screen.is-active { display: block; animation: odf-screen-in 420ms var(--ease) both; }
.odf-screen--center { flex: 1; display: none; }
.odf-screen--center.is-active { display: flex; flex-direction: column; justify-content: center; min-height: 70vh; }
@keyframes odf-screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.odf-section { padding: 28px 0 40px; }

/* ----- answer cards ----- */
.odf-options { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.odf-card {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 17px 18px; cursor: pointer; color: var(--ink);
  font-family: var(--sans); font-size: 1.02rem; line-height: 1.4;
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease);
}
.odf-card:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: var(--shadow-md); }
.odf-card:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.odf-card.is-selected { border-color: var(--teal); background: #f3f7f4; box-shadow: var(--shadow-md); }
.odf-card__tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; margin-top: 1px; transition: all 200ms var(--ease);
}
.odf-card.is-selected .odf-card__tick { background: var(--teal); border-color: var(--teal); }
.odf-card__tick svg { width: 12px; height: 12px; stroke: #fff; opacity: 0; transition: opacity 160ms; }
.odf-card.is-selected .odf-card__tick svg { opacity: 1; }
.odf-card__body strong { display: block; font-weight: 600; }
.odf-card__body small { color: var(--muted); font-size: 0.9rem; }

/* stepper (household size) */
.odf-stepper { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.odf-stepper button {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); font-size: 1.5rem; color: var(--navy); cursor: pointer;
  transition: all 200ms var(--ease);
}
.odf-stepper button:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.odf-stepper button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.odf-stepper__value { font-family: var(--serif); font-size: 2.6rem; color: var(--navy); min-width: 70px; text-align: center; }

/* select (state) */
.odf-select {
  width: 100%; margin-top: 26px; padding: 16px 18px; font-family: var(--sans); font-size: 1.05rem;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  appearance: none; cursor: pointer;
}
.odf-select:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-color: var(--teal); }

/* nav buttons */
.odf-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; }
.odf-back {
  background: none; border: none; color: var(--muted); font-family: var(--sans); font-size: 0.92rem;
  cursor: pointer; padding: 8px 4px; display: inline-flex; align-items: center; gap: 6px;
}
.odf-back:hover { color: var(--navy); }
.odf-back[hidden] { visibility: hidden; }
.odf-btn {
  font-family: var(--sans); font-weight: 600; font-size: 1rem; border-radius: var(--r-sm);
  padding: 14px 26px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease);
}
.odf-btn--primary { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(189, 139, 64, 0.32); }
.odf-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(189, 139, 64, 0.4); }
.odf-btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.odf-btn--ghost:hover { border-color: var(--navy); transform: translateY(-2px); }
.odf-btn--navy { background: var(--navy); color: #fff; }
.odf-btn--navy:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.odf-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.odf-btn[disabled] { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }

/* reassurance pill on intro */
.odf-reassure { display: inline-flex; align-items: center; gap: 9px; margin-top: 28px; color: var(--teal-deep); font-size: 0.95rem; }
.odf-reassure svg { width: 18px; height: 18px; }

/* =====================================================================
   Thinking state — a gold line that settles from waver to calm.
   Echoes the PDF cover lines and the blog hero motif.
   ===================================================================== */
.odf-thinking { align-items: center; text-align: center; gap: 26px; }
.odf-thinking__wave { width: min(420px, 80vw); height: 70px; }
.odf-thinking__wave path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.odf-thinking__wave .odf-wave-live { transform-box: fill-box; transform-origin: center; animation: odf-settle 2.1s var(--ease) forwards; }
@keyframes odf-settle {
  0% { transform: scaleY(1); opacity: 0.9; }
  70% { transform: scaleY(0.12); opacity: 1; }
  100% { transform: scaleY(0.04); opacity: 1; }
}
.odf-thinking__text { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); }
.odf-thinking__sub { color: var(--muted); font-size: 0.95rem; margin-top: -14px; }

/* =====================================================================
   Reveal — the result opens like a door. Gold appears here.
   ===================================================================== */
.odf-reveal { animation: odf-aperture 760ms var(--ease) both; }
@keyframes odf-aperture {
  0% { clip-path: inset(46% 0 46% 0); opacity: 0; }
  60% { opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}
.odf-mirror { font-family: var(--serif); font-size: clamp(1.4rem, 4.6vw, 1.95rem); color: var(--navy); line-height: 1.28; margin: 8px 0 0; }
.odf-door {
  position: relative; margin-top: 26px; padding: 24px 24px 24px 26px;
  background: linear-gradient(180deg, #fffdf8, #fbf4e6);
  border: 1px solid var(--gold-soft); border-left: 4px solid var(--gold); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.odf-door__eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.7rem; margin-bottom: 8px; }
.odf-door__text { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); line-height: 1.35; }

/* =====================================================================
   Gate
   ===================================================================== */
.odf-gate { margin-top: 30px; padding: 26px 22px; background: var(--navy); color: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.odf-gate__title { font-family: var(--serif); font-size: 1.5rem; color: #fff; margin: 0 0 6px; }
.odf-gate__sub { color: rgba(255, 255, 255, 0.72); font-size: 0.96rem; margin: 0 0 18px; }
.odf-toggle { display: inline-flex; background: rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.odf-toggle button { border: none; background: none; color: rgba(255, 255, 255, 0.7); font-family: var(--sans); font-size: 0.9rem; padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all 200ms var(--ease); }
.odf-toggle button.is-active { background: #fff; color: var(--navy); font-weight: 600; }
.odf-field { width: 100%; padding: 15px 16px; font-size: 1.05rem; font-family: var(--sans); border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: #fff; }
.odf-field::placeholder { color: rgba(255, 255, 255, 0.45); }
.odf-field:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.odf-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.66); line-height: 1.5; }
.odf-consent[hidden] { display: none; }
.odf-consent input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--gold); }
.odf-gate__cta { margin-top: 18px; width: 100%; justify-content: center; }
.odf-gate__err { color: #ffd7c9; font-size: 0.85rem; margin-top: 10px; min-height: 1.1em; }
.odf-gate__fine { color: rgba(255, 255, 255, 0.5); font-size: 0.74rem; margin-top: 14px; line-height: 1.5; }

/* =====================================================================
   Full readout
   ===================================================================== */
.odf-full { margin-top: 34px; }
.odf-block { margin-top: 30px; }
.odf-block__h { font-family: var(--serif); font-size: 1.35rem; color: var(--navy); margin: 0 0 14px; }
.odf-doors { display: flex; flex-direction: column; gap: 14px; }
.odf-door-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.odf-door-card.is-primary { border-color: var(--gold-soft); border-left: 4px solid var(--gold); background: linear-gradient(180deg, #fffdf8, #fbf6ea); }
.odf-door-card__label { font-weight: 600; color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.odf-pill { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.odf-pill--gold { background: #f4e6c8; color: #8a6420; }
.odf-pill--teal { background: #d7e7e4; color: var(--teal-deep); }
.odf-door-card__detail { color: var(--ink); font-size: 0.98rem; }
.odf-door-card__deadline { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

.odf-paths { display: flex; flex-direction: column; gap: 12px; }
.odf-path { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.odf-path:first-child { border-top: none; }
.odf-path__name { font-weight: 600; color: var(--navy); min-width: 116px; flex: none; }
.odf-path__line { color: var(--ink); font-size: 0.96rem; }

.odf-lever { background: var(--navy); color: #fff; border-radius: var(--r-md); padding: 22px 22px; }
.odf-lever .odf-eyebrow { color: var(--gold-soft); }
.odf-lever__text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; color: #fff; }

.odf-dates { display: flex; flex-direction: column; gap: 0; }
.odf-date { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.odf-date:first-child { border-top: none; }
.odf-date__label { color: var(--muted); }
.odf-date__value { color: var(--navy); font-weight: 600; text-align: right; }

/* primary CTA block (the gold moment, mirrors the PDF) */
.odf-cta {
  margin-top: 34px; background: linear-gradient(135deg, var(--gold) 0%, #a97632 100%);
  color: #fff; border-radius: var(--r-lg); padding: 30px 26px; box-shadow: var(--shadow-lg);
}
.odf-cta__eyebrow { font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.7rem; color: rgba(255, 255, 255, 0.85); }
.odf-cta__h { font-family: var(--serif); font-size: 1.7rem; color: #fff; margin: 8px 0 10px; }
.odf-cta__sub { color: rgba(255, 255, 255, 0.9); font-size: 0.98rem; margin: 0 0 20px; }
.odf-cta__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.odf-cta .odf-btn--navy { background: var(--navy-deep); }
.odf-cta__phone { color: #fff; text-decoration: none; font-weight: 600; font-size: 1.15rem; display: inline-flex; align-items: center; gap: 8px; }

.odf-handoff { margin-top: 26px; font-size: 1.02rem; color: var(--ink); }

/* secondary download line after capture */
.odf-deliver { margin-top: 22px; padding: 16px 18px; background: #eef4f2; border: 1px solid #cfe0db; border-radius: var(--r-md); display: flex; gap: 12px; align-items: center; font-size: 0.95rem; color: var(--teal-deep); }
.odf-deliver a { color: var(--teal-deep); font-weight: 600; }

/* heads-up note (muted rose, never alarm) */
.odf-note { margin-top: 20px; padding: 14px 16px; background: var(--rose-bg); border-left: 3px solid var(--rose); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 0.9rem; color: #7a4940; }

/* hexagon divider */
.odf-divider { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 40px 0 26px; color: var(--gold); }
.odf-divider::before, .odf-divider::after { content: ""; height: 1px; width: 70px; background: var(--line); }
.odf-divider svg { width: 18px; height: 20px; }

/* ----- footer / disclosures (mirrors PDF small print + Appendix D) ----- */
.odf-foot { background: var(--navy-deep); color: rgba(255, 255, 255, 0.62); margin-top: 50px; }
.odf-foot__in { max-width: 640px; margin: 0 auto; padding: 30px 22px 44px; }
.odf-foot__logo { display: flex; justify-content: center; margin-bottom: 18px; }
.odf-foot__logo img { width: 58px; height: 58px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.odf-foot__brand { color: #fff; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
.odf-foot__small { font-size: 0.76rem; line-height: 1.7; margin-top: 12px; }
.odf-foot__small a { color: var(--gold-soft); }

/* ----- responsive ----- */
@media (min-width: 720px) {
  .odf-wrap { padding: 0 28px; }
  .odf-section { padding: 40px 0 56px; }
  .odf-cta__row { gap: 18px; }
}

/* ----- accessibility: reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .odf-screen.is-active,
  .odf-reveal { animation: none; }
  .odf-thinking__wave .odf-wave-live { animation: none; transform: scaleY(0.04); }
  .odf-card, .odf-btn, .odf-stepper button { transition: none; }
  .odf-progress__bar { transition: none; }
}

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