/* Home page only (M1). Loaded through the page's `styles` front matter, after site.css and v2.css.
   Ported from the approved mockup (docs/mockups/phase-1/mock.css). Rules: docs/DESIGN-GUIDE.md sections 5 to 7. */

/* ---- the hero visual A/B test (D37) ----
   Both visuals are in the HTML so search engines see every caption. functions/_middleware.js puts data-variant="A" or "B" on <html>;
   A is shown when the attribute is missing (no middleware, bots, link previews). */
.demo.hero-b { display: none; }
html[data-variant="B"] .mock.hero-a { display: none; }
html[data-variant="B"] .demo.hero-b { display: flex; }

/* ---- hero, narrow desktops (900 to 1199): keep the hero from overflowing ---- */
@media (min-width: 900px) and (max-width: 1199px) {
  :root { --pad: 40px; }
  .hero h1 { font-size: 46px; }
  .hero .container { gap: 36px; }
  .mock, .demo { width: 430px; }
  .hero-text { min-width: 0; }
}

/* ---- hero B: the auto-advancing demo (js/hero-demo.js, DESIGN-GUIDE section 6) ---- */
.demo { flex-direction: column; gap: 12px; width: 100%; min-width: 0; }
@media (min-width: 900px) { .demo { width: 560px; flex-shrink: 0; } }
@media (min-width: 900px) and (max-width: 1199px) { .demo { width: 430px; } }
.demo-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-steps button { font: inherit; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--alt); border: 1px solid var(--border); color: var(--muted); cursor: pointer; }
.demo-steps button.on { background: var(--primary-soft); border-color: var(--alert-border); color: var(--primary-dark); }
/* a fixed frame: every stage sits in the same grid cell, so the frame is as tall as the tallest stage and nothing bounces */
.demo-panels { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; padding: 8px; margin: -8px; }
.demo-panel { grid-area: 1 / 1; visibility: hidden; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; min-width: 0; will-change: transform; }
.demo-panel.on { visibility: visible; }
.demo-media { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.demo-panel .cap-line { margin: 0; text-align: center; }
.demo-panels.slide .demo-panel { transition: transform .55s cubic-bezier(.45, 0, .2, 1); }
@media (prefers-reduced-motion: reduce) { .demo-panels.slide .demo-panel { transition: none; } }
.demo-center { display: flex; justify-content: center; }
.demo .phone-w { max-width: 380px; margin-inline: auto; }
.demo .shot { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .07); }
.demo .shot img { display: block; width: 100%; height: auto; }
.demo-grid { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
@media (min-width: 600px) { .demo-grid { flex-direction: row; align-items: center; } .demo-grid > .card { flex: 1; min-width: 0; } }
.demo-arrow { display: flex; justify-content: center; color: var(--primary); }
.demo-arrow .icon { width: 30px; height: 30px; transform: rotate(-90deg); }
@media (min-width: 600px) { .demo-arrow .icon { transform: none; } }
.doc-head { display: flex; gap: 8px; align-items: center; font: 600 14px var(--font-head); margin-bottom: 12px; }
.doc-head .icon { width: 17px; height: 17px; }
.ln { height: 8px; border-radius: 4px; background: #E5E9F0; margin: 9px 0; }
.ln.w1 { width: 92%; } .ln.w2 { width: 78%; } .ln.w3 { width: 60%; } .ln.w4 { width: 85%; }
.ln.hl { background: #BFD3FB; box-shadow: 0 0 0 4px #EAF1FF; }
.ex-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ex-row:last-child { border-bottom: 0; }
.ex-row span { color: var(--muted); }
.ex-row strong { font-family: var(--font-head); }
.ms { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ms div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--green-soft); border: 1px solid var(--green-border); }
.ms div:nth-child(n+2) { background: var(--alt); border-color: var(--border); }

/* ---- the pain: four tiles (four across, two by two on tablets, stacked on phones) ---- */
.symptoms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 600px) { .symptoms.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .symptoms.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.symptom { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.symptom q { font: 700 18px/1.35 var(--font-head); quotes: none; }
.symptom p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* ---- what the product helps with: five uniform cards, 3 plus 2 on desktop ---- */
.feat-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 700px) { .feat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feat-cards.five .feat-card:last-child { grid-column: 1 / -1; } }
@media (min-width: 900px) {
  .feat-cards.five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .feat-cards.five .feat-card { grid-column: span 2; }
  .feat-cards.five .feat-card:nth-child(n+4) { grid-column: span 3; }
}
.feat-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--text); min-width: 0; }
.feat-card:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(37, 99, 235, .1); color: var(--text); }
.feat-card h3 { font: 700 18px var(--font-head); margin: 0; }
.feat-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; flex: 1; }
.feat-card .more { font-weight: 700; color: var(--primary); font-size: 15px; }
.feat-card > .icon { width: 26px; height: 26px; color: var(--primary); }

/* ---- how it works: four steps (four across, two by two on tablets, stacked on phones) ---- */
.steps { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---- links under a section, early-access box ---- */
.more-row { margin-top: 20px; }
.cta-link { color: #fff; font-weight: 600; }
.cta-link:hover { color: #fff; }
.cta > * { min-width: 0; }

/* Home page: full-width grids (see the content-column rule at the end of site.css). */
.section>.container>*{max-width:none}
.section>.container>.faq{max-width:880px}
