/* =========================================================================
   Anita's Health & Beauty — Oral Wellness Quiz
   Mobile-first, no build step.

   Palette + type are kept congruent with the ProDentim vendor sales /
   checkout pages the funnel hands off to:
     - structural green  #007953   (vendor "dark-green-bg")
     - deep green        #224f34   (vendor footer / badges)
     - medium green      #4cae85   (vendor package accent)
     - pale green tint   #e6f1e2   (vendor soft sections)
     - CTA button        #ffe456 -> #ffd700 gold gradient, dark text
       (vendor "BUY NOW" button)
     - body text         #272727 on white
     - typeface          Mulish   (vendor loads it as "Muli")
   ========================================================================= */

/* ----------  Design tokens  ---------- */
:root {
  /* Brand / structural greens (from the vendor page) */
  --green-900: #17351f;
  --green-800: #224f34;   /* deep green — footer */
  --green-700: #007953;   /* primary structural green */
  --green-600: #05663f;   /* hover / active on green */
  --green-500: #4cae85;   /* medium green accent */
  --green-100: #e6f1e2;   /* pale green tint */
  --green-050: #f2f8f1;   /* barely-there wash */

  /* CTA — matches the vendor "BUY NOW" gold button */
  --cta-top:    #ffe456;
  --cta-bottom: #ffd700;
  --cta-top-h:  #ffec7d;
  --cta-bot-h:  #ffdf33;
  --cta-border: #e6b400;
  --cta-text:   #1f1c05;   /* near-black label (>=12:1 on gold) */

  --ink:       #272727;   /* vendor body text */
  --ink-soft:  #4c4c4c;   /* secondary text (>=7:1 on white) */
  --ink-faint: #6b6b6b;   /* meta text on larger sizes */

  --surface:   #ffffff;
  --page:      #ffffff;
  --line:      #e0e7e0;
  --line-soft: #eef3ed;

  --focus:     #1b4dc1;   /* focus ring — distinct from green + gold */

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(23, 53, 31, .06);
  --shadow:    0 6px 22px rgba(23, 53, 31, .09);
  --shadow-cta: 0 6px 16px rgba(214, 170, 0, .32);

  --maxw: 34rem;             /* ~544px reading column */
  --tap: 3.25rem;            /* 52px minimum tap target */

  --font-sans: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ----------  Reset  ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;          /* 17px base */
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--green-600); text-underline-offset: 2px; }
a:hover { color: var(--green-700); }

/* ----------  Layout helpers  ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main.wrap {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}
main:focus { outline: none; }

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

.skip-link {
  position: absolute;
  left: 0; top: 0;
  transform: translateY(-120%);
  background: var(--surface);
  color: var(--green-700);
  padding: .7rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
  z-index: 20;
  transition: transform .15s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); outline: 3px solid var(--focus); }

/* ----------  Header  ---------- */
.site-header {
  padding: 1.15rem 0 .9rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; text-decoration: none; }
.brand__logo {
  width: auto;
  height: 2.9rem;               /* ~46px lockup */
}
@media (min-width: 30rem) {
  .brand__logo { height: 3.3rem; }
}

/* ----------  Screens  ---------- */
.screen { animation: screen-in .32s var(--ease) both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------  Typography  ---------- */
.eyebrow {
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: .6rem;
}

.display {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-size: clamp(1.8rem, 7.2vw, 2.4rem);
  margin-bottom: .85rem;
}
.display--result { font-size: clamp(1.85rem, 7.6vw, 2.5rem); }

.lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

h2 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.005em; font-weight: 700; }

/* ----------  Intro screen  ---------- */
.screen--intro { padding-top: .5rem; }

.reassure {
  list-style: none;
  padding: 1.15rem 1.15rem 1.15rem 1.1rem;
  margin: 0 0 1.75rem;
  display: grid;
  gap: .6rem;
  background: var(--green-100);
  border-radius: var(--radius);
}
.reassure li {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}
.reassure__icon {
  flex: none;
  width: 1.45rem; height: 1.45rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--green-700);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
}

.disclaimer {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--ink-faint);
  margin-top: 1.5rem;
}
.disclaimer--intro {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius-sm);
  padding: .95rem 1.05rem;
  color: var(--ink-soft);
}
.disclaimer--result {
  font-size: .8125rem;
  margin-top: 1rem;
  text-align: center;
}

/* ----------  Buttons  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: var(--tap);
  padding: .95rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .12s var(--ease), background-color .15s var(--ease),
              border-color .15s var(--ease), box-shadow .15s var(--ease),
              filter .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn--block { width: 100%; }

/* Primary CTA = vendor gold "BUY NOW" button */
.btn--primary {
  background-image: linear-gradient(180deg, var(--cta-top) 0%, var(--cta-bottom) 100%);
  color: var(--cta-text);
  border: 1px solid var(--cta-border);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), var(--shadow-cta);
  letter-spacing: .01em;
}
.btn--primary:hover {
  background-image: linear-gradient(180deg, var(--cta-top-h) 0%, var(--cta-bot-h) 100%);
}
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--green-700);
  border-color: var(--line);
  font-weight: 700;
}
.btn--ghost:hover { background: var(--green-050); border-color: var(--green-500); }
.btn--ghost:active { transform: translateY(1px); }

.btn:focus-visible,
.option:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ----------  Progress  ---------- */
.progress { margin-bottom: 1.5rem; }
.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}
.progress__label {
  font-size: .875rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.progress__percent {
  font-size: .8125rem;
  font-weight: 800;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.progress__track {
  height: .5rem;
  background: var(--green-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  border-radius: 999px;
  transition: width .4s var(--ease);
}
.progress--done .progress__label { color: var(--green-700); }

/* ----------  Question card  ---------- */
.qcard {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}
.qcard__question {
  font-weight: 800;
  font-size: clamp(1.35rem, 5.4vw, 1.65rem);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.qcard__question:focus { outline: none; }
.qcard__hint {
  font-size: .9375rem;
  color: var(--ink-faint);
  margin: .5rem 0 1.15rem;
}

/* ----------  Options  ---------- */
.options { display: grid; gap: .75rem; }

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  min-height: var(--tap);
  padding: 1rem 1.1rem;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), border-color .15s var(--ease),
              background-color .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.option:hover { border-color: var(--green-500); }
.option:active { transform: scale(.99); }

.option__marker {
  flex: none;
  width: 1.5rem; height: 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.option[aria-pressed="true"] {
  border-color: var(--green-700);
  background: var(--green-100);
  box-shadow: 0 0 0 1.5px var(--green-700) inset;
}
.option[aria-pressed="true"] .option__marker {
  border-color: var(--green-700);
  background:
    radial-gradient(circle at center, #fff 0 32%, transparent 34%),
    var(--green-700);
}

/* ----------  Quiz nav  ---------- */
.quiz-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.quiz-nav__note {
  font-size: .8125rem;
  color: var(--ink-faint);
}

/* ----------  Result  ----------
   Mobile-first + deliberately tight so the CTA sits high on the page.
   Spacing is loosened again at >= 40rem.
*/
#screen-result .progress { margin-bottom: .9rem; }
#screen-result .progress__track { display: none; }        /* keep the "Quiz complete" label, drop the bar on mobile */
.progress--done .progress__label::before { content: "\2713\00a0"; }

.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green-700);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.1rem 1.35rem;
  box-shadow: var(--shadow);
}
#screen-result .display--result { margin-bottom: .3rem; }
.result-score {
  font-size: .9rem;
  color: var(--ink-soft);
  margin-bottom: .8rem;
}
.result-score strong { color: var(--green-700); }

.result-body p { margin-bottom: .55rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.result-body p:last-child { margin-bottom: 0; }

/* Primary CTA block — sits directly under the short summary */
.result-cta { margin-top: 1rem; }

.btn--cta {
  min-height: 3.5rem;
  font-size: 1.09375rem;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 8px 20px rgba(214, 170, 0, .38);
}

.result-disclosure {
  font-size: .75rem;
  line-height: 1.5;
  color: var(--ink-faint);
  margin-top: .6rem;
}

/* "See why we gave you this result" — collapsed accordion */
.result-why {
  margin-top: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.result-why > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--green-700);
}
.result-why > summary::-webkit-details-marker { display: none; }
.result-why > summary::after {
  content: "";
  flex: none;
  width: .5rem; height: .5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.result-why[open] > summary::after { transform: rotate(-135deg); }
.result-why > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: var(--radius); }
.result-why ul {
  margin: 0;
  padding: 0 1rem 1rem 2.1rem;
  color: var(--ink-soft);
}
.result-why li { margin-bottom: .5rem; font-size: .9375rem; line-height: 1.45; }
.result-why li:last-child { margin-bottom: 0; }

.btn--retake {
  margin-top: 1.1rem;
  min-height: 2.75rem;
  font-size: .9375rem;
  font-weight: 700;
  opacity: .9;
}

/* Sticky mobile CTA (result screen only) */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(23, 53, 31, .12);
  animation: sticky-cta-in .24s var(--ease) both;
}
.sticky-cta__inner { max-width: var(--maxw); margin-inline: auto; }
.sticky-cta .btn { margin: 0; }
.sticky-cta .btn--cta {
  min-height: 3rem;
  font-size: 1rem;
  line-height: 1.25;
}
@keyframes sticky-cta-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
body.has-sticky-cta #screen-result { padding-bottom: 7rem; }

/* Email capture form removed from this funnel — its CSS (.lead-capture,
   .lead-form, .field, .consents, .check, .lead-form__legal/status) was
   removed with it since none of those selectors match anything in the DOM
   any more. */

.btn:disabled { opacity: .65; cursor: progress; }

/* ----------  Footer  ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 2rem 0 2.5rem;
  background: var(--green-800);
  color: #eaf3ea;
}
.site-footer .wrap { text-align: center; }
.site-footer__brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .4rem;
}
.site-footer__disclaimer {
  font-size: .8125rem;
  color: #cfe2cf;
  max-width: 28rem;
  margin: 0 auto .8rem;
  line-height: 1.5;
}
.site-footer__links {
  font-size: .875rem;
  display: flex;
  gap: .6rem;
  justify-content: center;
  align-items: center;
  margin-bottom: .6rem;
  font-weight: 700;
}
.site-footer__links a { color: #fff; text-decoration: underline; }
.site-footer__links a:hover { color: #eaf3ea; }
.site-footer__links span { color: #6a9c7f; }
.site-footer__copy { font-size: .75rem; color: #a9c8ac; }

/* ----------  Legal pages (privacy / terms)  ---------- */
.legal { padding-top: 1.75rem; padding-bottom: 3rem; }
.legal .display { margin-bottom: .35rem; }
.legal__updated {
  font-size: .875rem;
  color: var(--ink-faint);
  margin-bottom: 1.75rem;
}
.legal h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin: 2rem 0 .6rem;
}
.legal h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.25rem 0 .4rem;
}
.legal p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}
.legal li { margin-bottom: .6rem; }
.legal a { color: var(--green-700); }
.legal__back {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 700;
}

/* ----------  Reduced motion  ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ----------  Larger screens (still one column)  ---------- */
@media (min-width: 40rem) {
  body { font-size: 1.09375rem; }
  main.wrap { padding-top: 2.5rem; }
  .result-card { padding: 2rem 1.9rem; }

  /* The mobile tightening was deliberate — relax it a little on wider screens. */
  #screen-result .progress { margin-bottom: 1.5rem; }
  #screen-result .progress__track { display: block; }
  .progress--done .progress__label::before { content: none; }
  #screen-result .display--result { margin-bottom: .5rem; }
  .result-score { font-size: .95rem; margin-bottom: 1.1rem; }
  .result-body p { margin-bottom: .8rem; }
  .result-cta { margin-top: 1.35rem; }

  /* No sticky bar on non-mobile. */
  .sticky-cta { display: none !important; }
  body.has-sticky-cta #screen-result { padding-bottom: 0; }
}
