/* ============================================================
   BrainWrite — shared site styles (multi-page)
   Senior-accessible, professional healthcare aesthetic.
   ============================================================ */

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

:root {
  /* Core palette — trustworthy healthcare blue + warm accent */
  --navy:      #082F49;   /* deepest ink */
  --ink:       #0C4A6E;   /* primary text (AAA on white) */
  --ink-soft:  #35617C;   /* secondary text (>4.5:1 on white) */
  --sky:       #0EA5E9;
  --sky-deep:  #0369A1;
  --sky-soft:  #E0F2FE;
  --sky-tint:  #F0F9FF;
  --teal:      #0E7490;   /* wellness secondary */
  --teal-soft: #CFF3F5;
  --coral:     #F97316;   /* CTA / warmth */
  --coral-deep:#EA580C;
  --coral-soft:#FFEDD5;
  --gold:      #D97706;
  --good:      #15803D;
  --paper:     #FFFFFF;
  --mist:      #F6FAFD;   /* alt section bg */
  --line:      #D6E6F2;
  --line-soft: #E8F1F8;

  --shadow-sm: 0 2px 8px rgba(8,47,73,0.06);
  --shadow:    0 12px 30px rgba(8,47,73,0.10);
  --shadow-lg: 0 28px 60px rgba(8,47,73,0.16);
  --ring:      0 0 0 4px rgba(14,165,233,0.18);

  --r-sm: 12px; --r: 18px; --r-lg: 26px; --r-xl: 34px;
  --maxw: 1160px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Raleway', system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Lora', Georgia, serif; color: var(--ink); line-height: 1.18; letter-spacing: -0.01em; }
img { max-width: 100%; display: block; }
a { color: var(--sky-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* Accessibility skip link */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 12px 20px; z-index: 3000; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 18px;
  border: none; border-radius: 999px; cursor: pointer; text-decoration: none;
  padding: 14px 30px; min-height: 54px;
  transition: background .2s, transform .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-sky { background: linear-gradient(135deg, var(--sky), var(--sky-deep)); color: #fff; box-shadow: var(--shadow); }
.btn-sky:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--sky); color: var(--sky-deep); }
.btn-lg { font-size: 20px; padding: 18px 38px; min-height: 62px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ── Eyebrow / labels ──────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--sky-soft); color: var(--sky-deep);
  font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px;
}
.eyebrow svg { width: 18px; height: 18px; }
.kicker { color: var(--coral-deep); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }

/* ── Navigation ────────────────────────────────────────── */
.site-nav { position: sticky; top: 0; z-index: 200; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand-name { font-family: 'Lora', serif; font-size: 24px; font-weight: 700; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; padding: 6px 2px; position: relative; }
.nav-links a.navlink:hover { color: var(--sky-deep); }
.nav-links a.navlink.active { color: var(--sky-deep); }
.nav-links a.navlink.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; border-radius: 3px; background: var(--coral); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 32px; height: 32px; stroke: var(--ink); }

/* ── Sections ──────────────────────────────────────────── */
section { padding: 92px 0; }
.mist { background: var(--mist); }
.tint { background: var(--sky-tint); }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; margin: 12px 0 16px; }
.section-head p { font-size: 20px; color: var(--ink-soft); }

/* ── Trust bar ─────────────────────────────────────────── */
.trustbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; padding: 22px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.trustbar div { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-weight: 600; font-size: 16px; }
.trustbar svg { width: 22px; height: 22px; stroke: var(--good); fill: none; stroke-width: 2; }

/* ── Report-card mockup (hero) ─────────────────────────── */
.report-mock { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 26px; }
.report-mock .rm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.report-mock .rm-title { font-family: 'Lora', serif; font-weight: 700; font-size: 20px; color: var(--ink); }
.report-mock .rm-score { font-family: 'Lora', serif; font-weight: 700; font-size: 40px; color: var(--sky-deep); line-height: 1; }
.report-mock .rm-badge { background: var(--good); color: #fff; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; }
.rm-metric { margin-bottom: 16px; }
.rm-metric .rm-label { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.rm-metric .rm-label span:last-child { color: var(--ink-soft); }
.rm-track { height: 10px; border-radius: 6px; background: var(--sky-soft); overflow: hidden; }
.rm-fill { height: 100%; border-radius: 6px; }

/* ── Cards ─────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.icon-badge { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.icon-badge svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 1.8; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num { position: absolute; top: -18px; left: 26px; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--sky), var(--sky-deep)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Lora', serif; font-weight: 700; font-size: 18px; box-shadow: var(--shadow-sm); }
.step .icon-badge { margin: 8px 0 18px; background: var(--sky-tint); }
.step .icon-badge svg { stroke: var(--sky-deep); }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { font-size: 17px; color: var(--ink-soft); }

/* Measures */
.measures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.measure { background: linear-gradient(180deg, #fff, var(--sky-tint)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px 30px; box-shadow: var(--shadow-sm); }
.measure .icon-badge { margin-bottom: 20px; }
.measure h3 { font-size: 24px; margin-bottom: 10px; }
.measure p { font-size: 17px; color: var(--ink-soft); }
.measure .mini-gauge { margin-top: 20px; height: 8px; border-radius: 6px; background: var(--sky-soft); overflow: hidden; }
.measure .mini-gauge span { display: block; height: 100%; border-radius: 6px; }

/* Feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .media { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); border: 8px solid #fff; }
.split h2 { font-size: clamp(28px,3.6vw,40px); margin-bottom: 18px; }
.split p { font-size: 19px; color: var(--ink-soft); margin-bottom: 16px; }
.checklist { list-style: none; display: grid; gap: 14px; margin-top: 8px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; color: var(--ink); }
.checklist svg { width: 26px; height: 26px; stroke: var(--good); fill: none; stroke-width: 2.2; flex-shrink: 0; margin-top: 2px; }

/* Testimonial */
.quote-card { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 48px; text-align: center; }
.quote-card .q-mark { font-family: 'Lora', serif; font-size: 72px; line-height: .5; color: var(--sky-soft); }
.quote-card blockquote { font-family: 'Lora', serif; font-size: clamp(22px, 3vw, 30px); color: var(--ink); font-style: italic; margin: 8px 0 28px; line-height: 1.4; }
.quote-who { display: flex; align-items: center; justify-content: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--sky-deep)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'Lora', serif; font-size: 20px; }
.quote-who .who-name { font-weight: 700; color: var(--ink); }
.quote-who .who-role { color: var(--ink-soft); font-size: 16px; }

/* Products */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: stretch; }
.product { display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--sky); }
.product.featured { border-color: var(--coral); }
.product-media { aspect-ratio: 3/2; background: linear-gradient(135deg, var(--sky-soft), var(--teal-soft)); display: flex; align-items: center; justify-content: center; position: relative; }
.product-media svg { width: 96px; height: 96px; stroke: var(--sky-deep); fill: none; stroke-width: 1.2; }
.product-flag { position: absolute; top: 14px; right: 14px; background: var(--coral); color: #fff; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.product-body { padding: 30px 26px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-size: 24px; margin-bottom: 8px; }
.product-desc { font-size: 16px; color: var(--ink-soft); margin-bottom: 18px; }
.product-list { list-style: none; margin-bottom: 22px; display: grid; gap: 10px; }
.product-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: var(--ink); }
.product-list svg { width: 22px; height: 22px; stroke: var(--good); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 2px; }
.product-price { font-family: 'Lora', serif; font-size: 34px; font-weight: 700; color: var(--ink); margin-top: auto; }
.product-price small { font-size: 16px; font-weight: 500; color: var(--ink-soft); font-family: 'Raleway', sans-serif; }
.product .btn { width: 100%; margin-top: 18px; }

/* Order form */
.order-card { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 44px; box-shadow: var(--shadow-lg); }
.order-card h2 { font-size: 30px; margin-bottom: 8px; }
.order-card > p { font-size: 18px; color: var(--ink-soft); margin-bottom: 28px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 700; font-size: 18px; margin-bottom: 8px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font-family: 'Raleway', sans-serif; font-size: 18px; color: var(--ink); padding: 15px 18px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; min-height: 56px; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: var(--ring); border-color: var(--sky); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.order-note { font-size: 15px; color: var(--ink-soft); margin-top: 10px; }

/* Page hero (interior pages) */
.page-hero { background: linear-gradient(180deg, var(--sky-tint), #fff); padding: 72px 0 40px; text-align: center; }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); margin: 14px 0 16px; }
.page-hero p { font-size: 21px; color: var(--ink-soft); max-width: 640px; margin: 0 auto; }

/* CTA band */
.cta-band { background: radial-gradient(120% 140% at 50% 0%, var(--sky-deep), var(--navy)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; }
.cta-band p { font-size: 21px; color: #D5EAF7; max-width: 620px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

/* Footer */
.site-footer { background: var(--navy); color: #CBE3F0; padding: 60px 0 40px; }
.foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 36px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.foot-brand span { font-family: 'Lora', serif; font-size: 22px; font-weight: 700; color: #fff; }
.foot-tag { color: #9FC6DE; font-size: 16px; margin-top: 12px; max-width: 280px; }
.foot-links { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col h4 { font-family: 'Raleway', sans-serif; color: #fff; font-size: 16px; margin-bottom: 14px; letter-spacing: .02em; }
.foot-col a { display: block; color: #A8CBE0; text-decoration: none; font-size: 16px; margin-bottom: 10px; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; font-size: 15px; color: #86AEC8; }
.foot-bottom .disclaimer { margin-top: 10px; max-width: 780px; }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* Hero layout */
.hero { padding: 84px 0 40px; background: linear-gradient(180deg, #fff 0%, var(--sky-tint) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); font-weight: 700; margin: 22px 0; }
.hero h1 .accent { color: var(--sky-deep); }
.hero-lead { font-size: 22px; color: var(--ink-soft); margin-bottom: 32px; max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-side { position: relative; }
.hero-photo { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); border: 8px solid #fff; aspect-ratio: 4/5; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-float { position: absolute; right: -14px; bottom: 26px; width: 300px; max-width: 78%; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero-side { max-width: 460px; margin: 0 auto; width: 100%; }
  .hero-float { position: static; width: 100%; max-width: 100%; margin-top: -60px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .measures, .products { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 78px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 16px; box-shadow: var(--shadow); }
  .nav-toggle { display: block; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .order-card, .quote-card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .product:hover, .step:hover { transform: none; }
}

/* ============================================================
   Premium polish layer — warm editorial finishing
   Brings back the original amber/serif warmth, layered depth,
   and a subtle dot-matrix-paper motif, without changing layout.
   ============================================================ */
:root {
  --amber:       #B45309;   /* text-safe warm accent */
  --amber-bright:#D97706;
  --amber-soft:  #FBEAD2;
  --cream:       #FBF6EE;
  --cream-line:  #ECE0CE;
  --gold-line:   linear-gradient(90deg, transparent, #D9A441, transparent);
}

/* Warm alternate section background */
.cream { background: var(--cream); }

/* Subtle dot-matrix texture — a quiet nod to the coded paper */
.dots { position: relative; }
.dots::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(12,74,110,0.055) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.dots > * { position: relative; z-index: 1; }

/* Editorial kicker with amber rule lines */
.kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--amber); }
.kicker::before { content: ''; width: 30px; height: 2px; background: var(--amber-bright); border-radius: 2px; }
.section-head .kicker::after { content: ''; width: 30px; height: 2px; background: var(--amber-bright); border-radius: 2px; }

/* Warm eyebrow (echoes original amber pill) */
.eyebrow { background: var(--amber-soft); color: var(--amber); }
.eyebrow svg { stroke: var(--amber-bright); }

/* Hero warmth + soft glow orbs for depth */
.hero { background: linear-gradient(180deg, #fff 0%, var(--cream) 100%); position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.hero::before { content: ''; position: absolute; width: 540px; height: 540px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(217,164,65,0.16), transparent 70%); pointer-events: none; z-index: 0; }
.hero::after { content: ''; position: absolute; width: 440px; height: 440px; left: -170px; bottom: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(14,165,233,0.10), transparent 70%); pointer-events: none; z-index: 0; }

/* Page hero warmth */
.page-hero { background: linear-gradient(180deg, var(--cream), #fff); }

/* Gold hairline accents for a crafted, premium feel */
.report-mock {
  border: 1px solid var(--line); border-top: 3px solid #D9A441;
}
.product.featured { position: relative; }
.product.featured::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gold-line); z-index: 2; }
.quote-card { border-top: 3px solid #D9A441; }
.quote-card .q-mark { color: var(--amber-soft); }

/* Decorative divider ornament */
.divider { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 auto 8px; max-width: 220px; }
.divider span { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-bright); flex-shrink: 0; }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; background: var(--cream-line); }

/* Editorial drop cap for lead paragraphs */
.dropcap::first-letter { font-family: 'Lora', serif; font-size: 3.4em; line-height: 0.86; float: left; color: var(--amber); font-weight: 700; padding: 8px 12px 0 0; }

/* Warmer trust bar — a small crafted card */
.trustbar { background: var(--cream); border: 1px solid var(--cream-line); border-radius: var(--r-lg); padding: 22px 30px; box-shadow: var(--shadow-sm); }

/* Slightly richer card depth */
.step, .measure { transition: transform .2s, box-shadow .2s, border-color .2s; }
.measure:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sky); }

/* Refined nav active underline keeps coral, add subtle weight */
.nav-links a.navlink.active { font-weight: 700; }
