/* WELLPOINT.tech components and layout. Colours/radii/fonts live in theme.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
.lead { font-size: 1.2rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 780px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-muted { background: var(--bg-muted); }
.section-dark { background: var(--dark); color: var(--dark-text); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .muted { color: var(--dark-muted); }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head p { color: var(--text-muted); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2;
  text-decoration: none !important; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; color: var(--primary); border-color: currentColor; }
.btn-secondary:hover { background: var(--primary-soft); }
.section-dark .btn-secondary { color: #fff; }
.section-dark .btn-secondary:hover { background: rgba(255,255,255,.1); }
.btn-sm { padding: 9px 16px; font-size: .95rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header + navigation */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,252,254,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { width: 150px; height: 30px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav-link { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; cursor: pointer; }
.nav-link:hover { background: var(--bg-muted); text-decoration: none; }
.nav-item.is-active > .nav-link, .nav-item.is-active > details > .nav-link { color: var(--primary); }
.nav-group { position: relative; }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav-sub { list-style: none; margin: 0; padding: 8px; }
.nav-sublink { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text); white-space: nowrap; }
.nav-sublink:hover { background: var(--bg-muted); text-decoration: none; }
.nav-sublink.is-active { color: var(--primary); }
.nav-item-cta { margin-left: 8px; }

/* Mobile nav (works without JS via <details>) */
.nav-toggle { list-style: none; display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; background: var(--surface); }
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle-bar { position: relative; width: 18px; height: 2px; background: currentColor; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle-bar::before { top: -6px; } .nav-toggle-bar::after { top: 6px; }
.nav-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px var(--gutter) 20px; }
.nav-mobile .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
.nav-mobile .nav-link { padding: 12px; font-size: 1.05rem; }
.nav-mobile .nav-sub { padding: 0 0 8px 12px; }
.nav-mobile .nav-item-cta { margin: 12px 0 0; }
.nav-mobile .nav-item-cta .btn { display: block; text-align: center; }
.nav-desktop { display: none; }
@media (min-width: 960px) {
  .nav-mobile { display: none; }
  .nav-desktop { display: block; }
  .nav-desktop .nav-sub { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 60; }
}

/* Breadcrumbs */
.breadcrumbs { font-size: .9rem; padding: 12px 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--text-muted); }

/* Hero */
.hero { padding: clamp(48px, 9vw, 112px) 0; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.hero-grid { display: grid; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 52ch; }
.hero-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.hero-media img { width: 100%; height: auto; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.1fr 1fr; } }

/* Cards */
.cards { display: grid; gap: 20px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { margin: -24px -24px 8px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--bg-muted); }
.card-media img { width: 100%; height: auto; }
.card-eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.card-title { margin: 0; font-size: 1.2rem; }
.card-text { margin: 0; color: var(--text-muted); flex: 1; }
.card-link { color: var(--primary); font-weight: 600; margin-top: 4px; }
.section-dark .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: var(--dark-text); }
.section-dark .card-text { color: var(--dark-muted); }
.section-dark .eyebrow, .section-dark .card-eyebrow { color: var(--accent); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { position: relative; padding: 20px 20px 20px 68px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps-4 { grid-template-columns: repeat(4, 1fr); } }

/* Feature list / principles */
.features { display: grid; gap: 24px; }
.feature h3 { margin-bottom: 4px; }
.feature p { margin: 0; color: var(--text-muted); }
.section-dark .feature p { color: var(--dark-muted); }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features-4 { grid-template-columns: repeat(4, 1fr); } }

/* Questions list */
.questions { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.questions li { padding: 16px 20px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.1rem; font-weight: 500; }
@media (min-width: 720px) { .questions { grid-template-columns: repeat(2, 1fr); } }

/* Flow diagram (text based) */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; list-style: none; padding: 0; margin: 0; }
.flow li { padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; }
.flow li + li::before { content: "\2192"; margin-right: 10px; color: var(--accent); }
.section-dark .flow li { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); }

/* Split (text + media) */
.split { display: grid; gap: clamp(24px, 5vw, 56px); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }
.split-media { border-radius: var(--radius); overflow: hidden; background: var(--bg-muted); }

/* Prose */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }

/* Facts table */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 34%; color: var(--text-muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* CTA */
.cta-box { text-align: center; padding: clamp(32px, 5vw, 56px); background: var(--primary-soft); border-radius: var(--radius); }
.cta-box h2 { margin-bottom: .3em; }
.cta-box p { color: var(--text-muted); max-width: 52ch; margin: 0 auto 1.2em; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 640px; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form input[type="text"], .form input[type="email"], .form textarea, .form select {
  width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--primary); outline: 3px solid var(--primary-soft); }
.form .hint { font-size: .9rem; color: var(--text-muted); margin: 4px 0 0; }
.form .error { color: var(--err); font-size: .95rem; margin: 6px 0 0; }
.form .is-invalid { border-color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.notice-ok { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-line); }
.notice-err { background: var(--err-bg); color: var(--err-text); border: 1px solid var(--err-line); }

/* Footer */
.site-footer { background: var(--dark); color: var(--dark-muted); padding: clamp(40px, 6vw, 72px) 0 32px; margin-top: 0; }
.footer-grid { display: grid; gap: 32px; }
.footer-brand p { margin: 12px 0 0; max-width: 40ch; }
.footer-note { color: var(--dark-text); font-weight: 600; }
.footer-heading { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--dark-text); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 24px; font-size: .9rem; }
.footer-bottom p { margin: 0 0 8px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; } }

/* Consent banner */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15,27,45,.08); }
.consent-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.consent p { margin: 0; max-width: 60ch; }
.consent-actions { display: flex; gap: 10px; }

/* Utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.grid-2 { display: grid; gap: 24px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .85rem; font-weight: 600; }

/* Articles */
.article-head { padding: clamp(40px, 7vw, 80px) 0 0; }
.article-head h1 { max-width: 20ch; }
.prose h2 { margin-top: 1.8em; }
.prose ul, .prose ol { margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- Motion, media and texture (progressive; respects prefers-reduced-motion) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; } .reveal-d2 { transition-delay: .2s; } .reveal-d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* subtle textures */
.pattern-dots { background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.pattern-grid { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; background-position: center; }
.section-muted.pattern-dots { background-color: var(--bg-muted); }
.card { background: linear-gradient(160deg, var(--surface) 0%, var(--surface) 70%, var(--bg-muted) 100%); }
.card-photo { padding: 0; overflow: hidden; }
.card-photo .card-media { margin: 0; border-radius: 0; }
.card-photo .card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.section-dark { background: radial-gradient(1200px 500px at 85% -10%, rgba(11,95,255,.35), transparent 60%), radial-gradient(800px 400px at 0% 110%, rgba(15,181,200,.25), transparent 60%), var(--dark); }
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; z-index: 0; position: absolute; inset: -20% -10% auto auto; width: 60%; height: 140%; background: radial-gradient(closest-side, var(--primary-soft), transparent 70%); opacity: .8; pointer-events: none; }
.hero::after { content: ""; z-index: 0; position: absolute; left: -10%; bottom: -30%; width: 40%; height: 80%; background: radial-gradient(closest-side, var(--accent-soft), transparent 70%); pointer-events: none; }
.hero > .container { position: relative; z-index: 1; }

/* video */
.video-box { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark); box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.video-box video, .video-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-box .video-caption { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(15,27,45,.65); color: #fff; font-size: .8rem; backdrop-filter: blur(4px); }
.hero-video { padding: 0; }
.hero-video .hero-grid { align-items: stretch; }
@media (min-width: 860px) { .hero-video .video-box { aspect-ratio: auto; min-height: 420px; height: 100%; } }

/* live chart */
.livechart { width: 100%; }
.livechart svg { width: 100%; height: auto; display: block; }
.lc-grid { stroke: var(--line); stroke-width: 1; }
.lc-axis { fill: var(--text-muted); font-size: 11px; font-family: var(--font); }
.lc-bar { fill: var(--primary); opacity: .9; }
.lc-bar-live { fill: var(--accent); }
.section-dark .lc-grid { stroke: rgba(255,255,255,.12); }
.section-dark .lc-axis { fill: var(--dark-muted); }
.chart-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.chart-panel-head strong { font-size: 1.05rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,.5); } 50% { box-shadow: 0 0 0 6px rgba(46,204,113,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-size: 2rem; line-height: 1.1; color: var(--primary); letter-spacing: -.02em; }
.stat > span { color: var(--text-muted); font-size: .95rem; }
.section-dark .stat { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.section-dark .stat b { color: #fff; } .section-dark .stat > span { color: var(--dark-muted); }

/* photo strip */
.strip { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.strip figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-muted); }
.strip img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.strip figcaption { font-size: .85rem; color: var(--text-muted); padding: 8px 10px; }
@media (min-width: 720px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery figcaption { font-size: .9rem; color: var(--text-muted); padding: 8px 4px 0; }
