/* Homepage sections. Mobile-first (designed at 390px). Shares tokens and components (.device, .btn-accent) with style.css
   and the landing pages. Rhythm: dark hero, white, soft, white, dark, soft, white, soft, dark. */

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

/* ---------- Section system ---------- */
.hm-section { padding: var(--space-section) 0; background: var(--paper); }
.hm-soft { background: var(--surface-soft); }
.hm-head { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.hm-head h2 { text-wrap: balance; }
.hm-section h2 { font-size: clamp(26px, 6.4vw, 38px); }
.hm-text-link { color: var(--ink-soft); font-weight: 600; text-underline-offset: 4px; }
.hm-section a:focus-visible, .hm-search :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Hero: same glow as the scanner landing page (wording, layout and phones unchanged) ---------- */
.hero {
    background:
        radial-gradient(760px 420px at 88% 38%, rgba(78, 205, 196, 0.30), transparent 68%),
        radial-gradient(520px 300px at 0% 0%, rgba(78, 205, 196, 0.12), transparent 70%),
        var(--ink);
}

/* ---------- Discover search ---------- */
.hm-search { display: flex; align-items: center; gap: 4px; max-width: 640px; margin: 0 auto; padding: 6px 6px 6px 18px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-pill); box-shadow: var(--shadow-lift); transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.hm-search:focus-within { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.35), var(--shadow-lift); }
.hm-search svg { flex: none; width: 20px; height: 20px; color: var(--ink-soft); }
.hm-search input { flex: 1; min-width: 0; height: 48px; padding: 0 8px; border: 0; background: transparent; font: 16px/1.2 var(--font-body); color: var(--text-main); outline: none; }   /* 16px: iOS does not zoom the page on focus */
.hm-search input::placeholder { color: #7a8c89; }
.hm-search input::-webkit-search-cancel-button { display: none; }
.hm-search button { flex: none; height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius-pill); background: var(--ink); color: #fff; font: 700 16px var(--font-body); cursor: pointer; transition: background 0.2s ease; }
.hm-search button:hover { background: var(--ink-soft); }




/* ---------- Comparison preview ---------- */
.hm-compare-card { max-width: 1060px; margin: 0 auto; padding: 24px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 36px rgba(13, 59, 55, 0.07); }
.hm-compare-body { display: grid; gap: 28px; }
.hm-pal-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 800; }
.hm-pal-brand img { flex: none; }
.hm-pal-tag { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: var(--radius-pill); background: #e6f5ee; color: #176144; font-size: 12px; font-weight: 600; }
.hm-pal-summary h3 { max-width: 420px; margin: 20px 0 14px; color: var(--ink); font-family: var(--font-display); font-size: clamp(24px, 4vw, 30px); line-height: 1.2; text-wrap: balance; }
.hm-pal-summary > p { max-width: 440px; margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-muted); }
.hm-compare-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hm-compare-cta .btn, .hm-download-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; width: 100%; padding: 13px 20px; border-radius: var(--radius-pill); text-decoration: none; font-size: 14px; font-weight: 600; }
.hm-download-btn { color: var(--ink); background: white; border: 1px solid #adc8c0; transition: background .2s, border-color .2s; }
.hm-download-btn:hover { background: #edf7f2; border-color: #176144; }
.hm-other-options { padding-top: 24px; border-top: 1px solid var(--border); }
.hm-options-label { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.hm-option { display: flex; align-items: flex-start; gap: 14px; }
.hm-option + .hm-option { margin-top: 22px; }
.hm-option-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #edf7f2; color: #176144; }
.hm-option-icon svg { width: 22px; height: 22px; }
.hm-option h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.4; color: var(--ink); }
.hm-option p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.hm-guide-links { display: grid; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.hm-guide-links a { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 82px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: #f4faf7; color: var(--ink); text-decoration: none; transition: background .2s, border-color .2s; }
.hm-guide-links a:hover { background: #e5f3eb; border-color: #7baf99; }
.hm-guide-label { font-size: 16px; font-weight: 700; line-height: 1.4; }
.hm-guide-description { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.hm-compare-note { margin: 20px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.hero-stats-note { margin: -14px 0 20px; font-size: 12px; line-height: 1.5; color: #bdd3cf; }
@media (min-width: 600px) { .hm-compare-cta .btn, .hm-download-btn { width: auto; } .hm-guide-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .hm-compare-body { grid-template-columns: 1.1fr 1fr; gap: 36px; } .hm-other-options { padding: 0 0 0 36px; border-top: 0; border-left: 1px solid var(--border); } }
@media (prefers-reduced-motion: reduce) { .hm-guide-links a, .hm-download-btn { transition: none; } }

/* ---------- Reviews, FAQ, final CTA: existing markup and scripts, new look ---------- */
.testimonials { background: var(--paper); padding: var(--space-section) 0; }
.faq-section { background: var(--surface-soft); padding: var(--space-section) 0; }
.final-cta { background: radial-gradient(520px 300px at 50% 0%, rgba(78, 205, 196, 0.18), transparent 70%), linear-gradient(135deg, var(--ink), var(--ink-deep)); padding: 64px 0; }
.testimonials .section-header, .faq-section .section-header { margin-bottom: 32px; }

@media (min-width: 821px) {
  .hm-section, .testimonials, .faq-section { padding: var(--space-section-lg) 0; }
  .hm-head { margin-bottom: 44px; }
  .hm-compare-card { padding: 34px 36px; }
  .hm-compare-cta .btn { width: auto; }
  .final-cta { padding: 88px 0; }
}
@media (prefers-reduced-motion: reduce) { .hm-search, .hm-search button { transition: none; } }

/* ---------- Ticker under the hero (moved here from discover.css) ---------- */
.ticker a.verdict-chip { text-decoration: none; transition: transform .15s, box-shadow .15s; }
.ticker a.verdict-chip:hover, .ticker a.verdict-chip:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.ticker { position: relative; }
.ticker-cta { position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 0 72px 0 max(16px, calc((100vw - 1200px) / 2 + 16px)); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; background: linear-gradient(90deg, #0d3b37 0%, #0d3b37 82%, rgba(13, 59, 55, 0) 100%); }
.ticker-cta svg { animation: tickerNudge 1.6s ease-in-out infinite; }
.ticker-cta:hover span { text-decoration: underline; }
.ticker-cta-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ecdc4; box-shadow: 0 0 0 0 rgba(78, 205, 196, .7); animation: tickerPulse 1.8s ease-out infinite; }
@keyframes tickerNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes tickerPulse { 0% { box-shadow: 0 0 0 0 rgba(78, 205, 196, .7); } 70% { box-shadow: 0 0 0 9px rgba(78, 205, 196, 0); } 100% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0); } }
.ticker a.verdict-chip { cursor: pointer; padding-right: 10px; gap: 8px; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 2px 8px rgba(0,0,0,.18); transition: transform .18s, background .18s, color .18s, box-shadow .18s; }
.ticker .chip-go { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(13, 59, 55, .1); transition: transform .18s, background .18s; }
.ticker a.verdict-chip:hover, .ticker a.verdict-chip:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.35); color: #fff; }
.ticker a.verdict-safe:hover, .ticker a.verdict-safe:focus-visible { background: #2fa79e; }
.ticker a.verdict-trigger:hover, .ticker a.verdict-trigger:focus-visible { background: #e5484d; }
.ticker a.verdict-chip:hover .verdict-dot, .ticker a.verdict-chip:focus-visible .verdict-dot { background: #fff; }
.ticker a.verdict-chip:hover .chip-go, .ticker a.verdict-chip:focus-visible .chip-go { background: rgba(255,255,255,.28); transform: translateX(3px); }
@media (max-width: 640px) { .ticker-cta { padding-left: 14px; padding-right: 48px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .ticker-cta svg, .ticker-cta-dot { animation: none; } }

/* Discover block: the improved search box sits between the original header and the tiles. */
.discover-promo .hm-search { margin: 26px auto 24px; }

/* Inline links inside the restored "How it works" and feature cards (same look as before the redesign). */
.step-desc a, .feature-card p a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Maintain readable contrast on the existing pale section backgrounds. */
.eyebrow, .why-ibspal-content .accent, .testimonial-verified { color: #176144; }
