/*
 * Ridgeway Insurance — shared design system.
 * One stylesheet for every page: palette, typography, layout primitives,
 * and the component classes (header, footer, cards, buttons, forms,
 * pricing tiers, accordion, wizard) used across the site.
 */

:root {
  color-scheme: light;
  --navy: #0b1f3a;
  --navy-2: #123a63;
  --teal: #0f9d76;
  --teal-light: #e6f6ef;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --border: rgba(11, 31, 58, 0.1);
  --text: #17233d;
  --muted: #5b6b85;
  --danger: #c94a4a;
  --danger-light: #fbeaea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.06);
  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: inherit; color: var(--navy); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy-2); text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-size: .95rem; font-weight: 600; padding: .65rem 1.3rem; transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); border-color: var(--navy-2); }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.02rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Header / nav ────────────────────────────────────────────────────── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 2rem; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name-accent { color: var(--teal); font-weight: 700; }
.site-nav { display: flex; gap: 1.6rem; margin-left: .5rem; flex: 1; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .92rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--navy); border-color: var(--teal); }
.btn-nav-cta { margin-left: auto; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; color: var(--navy); cursor: pointer; }
.site-nav-mobile { display: none; flex-direction: column; gap: .25rem; padding: 8px 24px 16px; border-top: 1px solid var(--border); }
.site-nav-mobile a { padding: .6rem 0; color: var(--text); font-weight: 600; }
.site-nav-mobile a.active { color: var(--teal); }

@media (max-width: 760px) {
  .site-nav, .btn-nav-cta { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .site-nav-mobile:not([hidden]) { display: flex; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: #cfd8e8; margin-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 2rem; padding: 48px 24px 28px; }
.site-footer .brand { color: #fff; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.footer-col a, .site-footer address { display: block; color: #b7c2d9; padding: .25rem 0; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 24px 28px; font-size: .82rem; color: #93a1bf; }
.footer-bottom p { margin: 0 0 .3rem; }

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 48px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-actions { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; }
.hero-card h3 { margin-bottom: 1rem; }
.feature-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.feature-list li:last-child { border-bottom: none; }
.feature-list .dot { width: 22px; height: 22px; border-radius: 999px; background: var(--teal-light); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: .8rem; flex: none; }

@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }

/* ── Trust bar ───────────────────────────────────────────────────────── */
.trust-bar { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 28px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.trust-grid strong { display: block; font-size: 1.5rem; color: var(--navy); }
.trust-grid span { color: var(--muted); font-size: .85rem; }
@media (max-width: 760px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Cards / grids ───────────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-head { max-width: 640px; margin: 0 auto 2.2rem; text-align: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-light); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: .9rem; }
.card-link { display: inline-flex; margin-top: .8rem; font-weight: 700; color: var(--navy-2); }
.card-link::after { content: '→'; margin-left: .35rem; }

.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; counter-reset: step; }
@media (max-width: 900px) { .steps-3 { grid-template-columns: 1fr; } }
.step-card { position: relative; padding-top: .5rem; }
.step-card .step-num { width: 36px; height: 36px; border-radius: 999px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .9rem; }

.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial p { font-size: .95rem; }
.stars { color: #f5a524; letter-spacing: .1em; margin-bottom: .5rem; display: block; }
.testimonial-author { font-weight: 700; color: var(--navy); font-size: .9rem; }
.testimonial-loc { color: var(--muted); font-size: .82rem; }

.cta-banner { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 2.6rem; text-align: center; margin: 0 24px; }
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner .btn-primary { background: #fff; color: var(--navy); }
.cta-banner .btn-primary:hover { background: var(--teal-light); }

/* ── Pricing tiers ───────────────────────────────────────────────────── */
.product-block { padding: 48px 0; border-top: 1px solid var(--border); }
.product-block:first-of-type { border-top: none; }
.product-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.coverage-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1.5rem; margin-bottom: 1.8rem; }
.coverage-list li { display: flex; gap: .6rem; font-size: .92rem; }
.coverage-list li::before { content: '✓'; color: var(--teal); font-weight: 700; }
@media (max-width: 700px) { .coverage-list { grid-template-columns: 1fr; } }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.tier.featured { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-light); }
.tier-badge { align-self: flex-start; background: var(--teal-light); color: var(--teal); font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; margin-bottom: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.tier-price { font-size: 1.9rem; color: var(--navy); font-weight: 700; margin: .2rem 0 1rem; }
.tier-price span { font-size: .9rem; color: var(--muted); font-weight: 500; }
.tier ul { margin-bottom: 1.4rem; flex: 1; }
.tier li { padding: .35rem 0; font-size: .88rem; display: flex; gap: .5rem; }
.tier li::before { content: '✓'; color: var(--teal); font-weight: 700; }

/* ── Values / leadership (about page) ────────────────────────────────── */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
.avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .avatar-grid { grid-template-columns: 1fr; } }
.avatar-circle {
  width: 56px; height: 56px; border-radius: 999px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .9rem;
}
.person-role { color: var(--teal); font-size: .85rem; font-weight: 600; margin-bottom: .5rem; }

.legal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; font-size: .88rem; color: var(--muted); }

/* ── FAQ accordion ───────────────────────────────────────────────────── */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .7rem; padding: 0 1.2rem; }
.faq-item summary { cursor: pointer; padding: 1rem 0; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--teal); font-size: 1.3rem; font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding-bottom: 1rem; color: var(--muted); margin: 0; }

/* ── Forms ───────────────────────────────────────────────────────────── */
form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 1.1rem; color: var(--navy); }
form input, form select, form textarea {
  display: block; width: 100%; margin-top: .4rem; padding: .65rem .8rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: .95rem; font-family: inherit; background: var(--surface); color: var(--text);
}
form input:focus, form select:focus, form textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
form input[type="range"] { padding: 0; }
output { font-weight: 700; color: var(--navy); }

.notice { border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .9rem; margin-top: 1rem; }
.notice-warn { background: var(--danger-light); color: var(--danger); }
.notice-ok { background: var(--teal-light); color: var(--teal); }

.badge-verified { display: inline-flex; align-items: center; gap: .4rem; background: var(--teal-light); color: var(--teal); font-weight: 700; font-size: .82rem; padding: .3rem .7rem; border-radius: 999px; }

/* ── Quote wizard ────────────────────────────────────────────────────── */
.quote-main { padding: 48px 0 80px; }
.quote-shell { max-width: 640px; }
.quote-progress { display: flex; gap: .5rem; margin-bottom: 2.2rem; }
.quote-progress .step { flex: 1; text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding-bottom: .6rem; border-bottom: 3px solid var(--border); }
.quote-progress .step span { display: block; width: 26px; height: 26px; line-height: 26px; border-radius: 999px; background: var(--border); color: var(--navy); margin: 0 auto .4rem; font-size: .8rem; }
.quote-progress .step.active, .quote-progress .step.done { color: var(--navy); border-color: var(--teal); }
.quote-progress .step.active span, .quote-progress .step.done span { background: var(--teal); color: #fff; }
.quote-step { animation: fade-in .25s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.squiryl-card { text-align: center; padding: 2rem 1.6rem; }
.status-line { margin-top: 1rem; }
#review-card { margin-bottom: 1.6rem; }
#review-card h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1rem 0 .3rem; }
#review-card h4:first-child { margin-top: 0; }
#review-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1rem; margin: 0; }
#review-card dt { color: var(--muted); font-size: .85rem; }
#review-card dd { margin: 0; font-weight: 600; }

/* ── Confirmation page ───────────────────────────────────────────────── */
.confirmation-main { padding: 56px 0 80px; max-width: 640px; }
.confirmation-card { padding: 2rem; }
.confirmation-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--teal); font-weight: 700; }
.confirmation-price { font-size: 2.2rem; color: var(--navy); font-weight: 700; margin: .2rem 0 1.2rem; }
.confirmation-price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.next-steps li { display: flex; gap: .7rem; padding: .5rem 0; font-size: .92rem; }
.next-steps li::before { content: '→'; color: var(--teal); font-weight: 700; }
.confirmation-empty { text-align: center; padding: 80px 0; }
