/* ============================================================================
   VeraCita - PURPOSE-BUILT MOBILE PAGE (m.html)
   ----------------------------------------------------------------------------
   Mobile-first and standalone: this file does NOT extend the desktop section
   CSS, it replaces it. m.html loads only tokens.css + cream-theme.css (for the
   brand palette and the shared theme cookie) and then this.

   Written 2026-08-03 as a TEST version, to be compared against the overlay
   approach (css/mobile.css) before Andy decides which one ships.
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--vc-text-primary);
  background: var(--vc-bg-body);
  overflow-x: clip;
  /* room for the sticky buy bar so it never covers the last line of content */
  padding-bottom: 84px;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--vc-accent); }

.wrap { padding-left: 20px; padding-right: 20px; }

/* Never let a long DOI/URL push the page sideways */
p, li, h1, h2, h3, a, td { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- header */
.m-head {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--vc-bg-base);
  border-bottom: 1px solid var(--vc-border-subtle);
}

.m-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; margin-right: auto; }
.m-logo img { width: 30px; height: 30px; }
.m-logo span { font-family: var(--font-display); font-size: 19px; font-weight: 600; }

.m-iconbtn {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: var(--r-md);
  color: var(--vc-text-secondary); cursor: pointer;
}
.m-iconbtn:active { background: var(--vc-bg-surface); }

/* ------------------------------------------------------------ menu sheet */
.m-sheet {
  position: fixed; inset: 0; z-index: 90;
  background: var(--vc-bg-base);
  transform: translateY(100%);
  transition: transform .28s ease;
  overflow-y: auto;
  padding: 16px 20px 40px;
  visibility: hidden;
}
.m-sheet.open { transform: translateY(0); visibility: visible; }
.m-sheet-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.m-sheet a {
  display: block; padding: 15px 0;
  border-bottom: 1px solid var(--vc-border-subtle);
  color: var(--vc-text-primary); text-decoration: none;
  font-size: 18px;
}
.m-sheet .m-sheet-cta { margin-top: 22px; border: 0; }

/* ------------------------------------------------------------------ type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: 1.15; }
h1 { font-size: 34px; letter-spacing: -0.02em; }
h2 { font-size: 25px; letter-spacing: -0.01em; }
h3 { font-family: var(--font-body); font-size: 17px; font-weight: 600; line-height: 1.35; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--vc-accent); margin: 0 0 10px;
}

.lede { color: var(--vc-text-secondary); margin: 12px 0 0; }

section { padding: 44px 0; }
section + section { border-top: 1px solid var(--vc-border-subtle); }

/* ------------------------------------------------------------------ hero */
.m-hero { padding-top: 34px; padding-bottom: 38px; }
.m-hero h1 .accent { color: var(--vc-accent); display: block; }
.m-hero .lede { font-size: 17px; margin-top: 14px; }

.m-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.m-chip {
  font-size: 12.5px; color: var(--vc-text-secondary);
  background: var(--vc-bg-surface); border: 1px solid var(--vc-border-subtle);
  border-radius: var(--r-full); padding: 6px 11px;
}

/* --------------------------------------------------------------- buttons */
.btn-m {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 14px 18px;
  border: 0; border-radius: var(--r-md);
  font-family: var(--font-body); font-size: 16.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn-m + .btn-m { margin-top: 10px; }
.btn-m-primary { background: var(--vc-founder); color: #fff; }
.btn-m-primary:active { background: var(--vc-founder-hover); }
.btn-m-ghost {
  background: transparent; color: var(--vc-text-primary);
  border: 1px solid var(--vc-border-emphasis);
}
.m-cta-note { font-size: 13px; color: var(--vc-text-tertiary); text-align: center; margin: 10px 0 0; }

/* ----------------------------------------------------------------- cards */
.m-card {
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
}
.m-card + .m-card { margin-top: 12px; }
.m-card p { margin: 8px 0 0; font-size: 15.5px; color: var(--vc-text-secondary); }

/* stat cards (the stakes) */
.m-stat-num {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700; line-height: 1;
  color: var(--vc-accent); letter-spacing: -0.02em;
}
.m-stat-label { font-size: 15px; font-weight: 600; margin: 8px 0 0; }
.m-stamp {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--vc-text-tertiary);
  margin-top: 12px; display: block;
}

/* --------------------------------------------------------- verdict chips */
/* Same construction as .m-chip: theme-safe surface + subtle border, with
   only the text carrying the verdict color (amber/red have no -border
   token in the light theme, so borders stay neutral). */
.m-verdicts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.m-verdict {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .07em;
  background: var(--vc-bg-surface); border: 1px solid var(--vc-border-subtle);
  border-radius: var(--r-full); padding: 6px 11px;
}
.m-v-green { color: var(--vc-green); }
.m-v-amber { color: var(--vc-amber); }
.m-v-red   { color: var(--vc-red); }
.m-v-gray  { color: var(--vc-text-tertiary); }

/* ----------------------------------------------------------------- offer */
.m-offer {
  background: var(--vc-founder-subtle);
  border: 1px solid var(--vc-founder-border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
}
.m-price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.m-price b { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; }
.m-price span { font-size: 15px; color: var(--vc-text-secondary); }

.m-list { list-style: none; margin: 16px 0 0; padding: 0; }
.m-list li {
  position: relative; padding: 9px 0 9px 26px; font-size: 15.5px;
  border-top: 1px solid var(--vc-border-subtle);
}
.m-list li::before {
  content: ""; position: absolute; left: 4px; top: 16px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--vc-founder);
}

/* --------------------------------------------------------------- pricing */
.m-plan { border: 1px solid var(--vc-border-default); border-radius: var(--r-lg); padding: 20px; }
.m-plan + .m-plan { margin-top: 12px; }
.m-plan-best { border-color: var(--vc-founder-border); background: var(--vc-founder-subtle); }
.m-plan-name { font-size: 15px; font-weight: 600; }
.m-plan-rate { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin: 6px 0 2px; }
.m-plan-rate small { font-size: 14px; font-weight: 500; color: var(--vc-text-secondary); }

/* ------------------------------------------------------------------- faq */
.m-faq-q {
  width: 100%; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0; background: none; border: 0;
  border-bottom: 1px solid var(--vc-border-subtle);
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  color: var(--vc-text-primary); text-align: left; cursor: pointer;
}
.m-faq-q svg { flex: 0 0 auto; transition: transform .2s ease; }
.m-faq-item.open .m-faq-q svg { transform: rotate(180deg); }
.m-faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.m-faq-a p {
  margin: 0; padding: 4px 0 18px;
  font-size: 15.5px; color: var(--vc-text-secondary);
  border-bottom: 1px solid var(--vc-border-subtle);
}

/* ---------------------------------------------------------- sticky buybar */
.m-buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--vc-bg-base);
  border-top: 1px solid var(--vc-border-default);
}
.m-buybar-txt { flex: 1; min-width: 0; }
.m-buybar-txt b { display: block; font-size: 14.5px; font-weight: 600; }
.m-buybar-txt span { display: block; font-size: 12.5px; color: var(--vc-text-tertiary); }
.m-buybar .btn-m { width: auto; min-height: 46px; padding: 12px 20px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- footer */
.m-foot { padding: 34px 0 20px; color: var(--vc-text-tertiary); font-size: 14px; }
.m-foot-links { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0 0 12px; padding: 0; list-style: none; }
.m-foot-links a {
  color: var(--vc-text-secondary); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
}

/* ------------------------------------------------------------- checkout */
/* _checkout.js injects its own <style> at runtime, so these have to be
   stated here or the form inherits the desktop 15px. Anything under 16px
   makes iOS Safari zoom the viewport the moment a field is focused, which
   throws the buyer out of the layout mid-purchase. */
#checkoutModal input,
#checkoutModal select,
#checkoutModal textarea,
.checkout-dialog input,
.checkout-dialog select,
.checkout-dialog textarea {
  font-size: 16px;
}

.checkout-dialog {
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.checkout-close-btn {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* the fixed overlay must not add a horizontal scrollbar of its own */
#checkoutModal, .checkout-overlay { max-width: 100vw; overflow-x: clip; }

/* the logo is a link: give it a real touch target without moving the mark */
.m-logo { min-height: 44px; }

/* -------------------------------------------------------- wide-phone cap */
/* Tablets and any desktop that lands here still get a readable measure
   rather than a stretched line. */
@media (min-width: 620px) {
  .wrap, .m-head { max-width: 600px; margin-left: auto; margin-right: auto; }
  .m-buybar { justify-content: center; }
  h1 { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .m-sheet, .m-faq-a, .m-faq-q svg { transition: none; }
}
