/* CLARITY — medical advocacy platform design system.
   Deep teal + warm cream + amber accents. Medical premium, not cold-clinical. */

:root {
  --ink: #0E1F2A;
  --ink-2: #223540;
  --ink-dim: #57687A;
  --ink-faint: #8A9BAB;
  --ink-line: #D6DEE4;
  --ink-line-2: #EAEEF2;

  --paper: #FBFAF5;
  --paper-2: #F2EFE6;
  --paper-3: #E7E2D2;

  /* CLARITY BRAND — deep medical teal */
  --teal: #144E51;
  --teal-2: #206C6F;
  --teal-soft: #DDEBEA;
  --teal-mist: #EEF5F4;

  --amber: #E39F3E;   /* signal / guidance / hope */
  --amber-soft: #F8E5C0;

  --emerald: #3B8264; /* good outcomes */
  --emerald-soft: #D6E9DB;

  --coral: #E4573D;   /* critical / red flag */
  --coral-soft: #F9DED5;

  --f-serif: 'Fraunces', Georgia, serif;
  --f-sans: 'Inter Tight', Inter, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--f-sans); color: var(--ink); background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 40px; }
.wrap-medium { max-width: 960px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap, .wrap-narrow, .wrap-medium { padding: 0 22px; } }

h1, h2, h3, h4 { font-family: var(--f-sans); font-weight: 800; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 0.4em; }
h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--ink-2); }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-2); }
.serif { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -0.025em; }
.chapter, .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--teal); font-weight: 700; margin-bottom: 18px;
}
.chapter::before { content: ''; display: inline-block; width: 26px; height: 2px; background: var(--amber); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; background: var(--teal); color: var(--paper);
  font-family: var(--f-sans); font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em;
  border: 2px solid var(--teal); border-radius: 100px;
  text-decoration: none; cursor: pointer; transition: all 0.16s ease;
}
.btn:hover { background: var(--teal-2); border-color: var(--teal-2); color: var(--paper); transform: translateY(-1px); }
.btn.btn-ghost { background: transparent; color: var(--teal); }
.btn.btn-ghost:hover { background: var(--teal-mist); color: var(--teal); }
.btn.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.btn-amber:hover { background: #C88A2C; border-color: #C88A2C; color: var(--ink); }
.btn.btn-lg { padding: 20px 34px; font-size: 1.1rem; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(251,250,245,0.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--ink-line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 40px; max-width: 1360px; margin: 0 auto; }
@media (max-width: 720px) { .nav-inner { padding: 14px 22px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-sans); font-weight: 900; letter-spacing: -0.02em; font-size: 1.1rem; }
.brand-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); position: relative; display: inline-flex; align-items: center; justify-content: center; }
.brand-mark::after {
  content: ''; width: 14px; height: 14px; border: 2px solid var(--amber); border-top: 2px solid transparent; border-right: 2px solid transparent; border-radius: 50%; transform: rotate(-45deg);
}
.brand strong { color: var(--teal); font-weight: 900; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-family: var(--f-sans); font-size: 0.93rem; font-weight: 700; color: var(--ink-2); text-decoration: none; letter-spacing: -0.01em; }
.nav-links a:hover { color: var(--teal); }
.nav-links a.btn { color: var(--paper) !important; padding: 11px 20px; font-size: 0.86rem; }
.nav-links a.btn:hover { color: var(--paper) !important; }
@media (max-width: 960px) { .nav-links a:not(.btn) { display: none; } }

/* HERO */
.hero { padding: 80px 0 60px; background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 55%, var(--teal-mist) 100%); position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 34px; } }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--amber-soft); color: var(--teal); font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; border-radius: 100px; margin-bottom: 22px; }
.hero .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.hero h1 .teal { color: var(--teal); }
.hero h1 .amber { color: var(--amber); }
.hero .sub { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; margin: 20px 0 32px; line-height: 1.55; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-cta .fine { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }

/* Side card in hero */
.h-card { background: #fff; border: 1px solid var(--ink-line); border-radius: 20px; padding: 26px 28px; box-shadow: 0 24px 60px -30px rgba(20,78,81,0.35); }
.h-card h3 { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); margin: 0 0 16px; }
.h-card .stat { padding: 14px 0; border-bottom: 1px solid var(--ink-line-2); }
.h-card .stat:last-child { border-bottom: none; }
.h-card .stat .n { font-family: var(--f-sans); font-weight: 900; font-size: 2rem; color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.h-card .stat .l { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); margin-top: 6px; }

/* Section */
.section { padding: 80px 0; }
.section.soft { background: var(--paper-2); }
.section.dark { background: var(--teal); color: var(--paper); }
.section.dark h2, .section.dark h3 { color: var(--paper); }
.section.dark p { color: rgba(255,255,255,0.86); }
.section.dark .chapter { color: var(--amber); }
.section.dark .chapter::before { background: var(--amber); }
.section-head { max-width: 780px; margin-bottom: 44px; }
.section-head p.lead { font-size: 1.1rem; color: var(--ink-dim); line-height: 1.55; }
.section.dark .section-head p.lead { color: rgba(255,255,255,0.75); }

/* Tool tile */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 820px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card { background: #fff; border: 1px solid var(--ink-line); border-radius: 20px; padding: 30px 30px 28px; text-decoration: none; color: var(--ink); transition: all 0.18s ease; display: flex; flex-direction: column; gap: 14px; min-height: 240px; position: relative; overflow: hidden; }
.tool-card::after { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at center, var(--amber-soft) 0%, transparent 70%); opacity: 0.55; pointer-events: none; }
.tool-card:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 30px 60px -30px rgba(20,78,81,0.28); }
.tool-card .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--teal-soft); color: var(--teal); font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; border-radius: 100px; align-self: flex-start; }
.tool-card .tag.hot { background: var(--coral-soft); color: var(--coral); }
.tool-card h3 { font-size: 1.55rem; font-weight: 900; letter-spacing: -0.02em; margin: 0; }
.tool-card p { font-size: 0.98rem; color: var(--ink-dim); line-height: 1.55; margin: 0; }
.tool-card .cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); font-weight: 800; }

/* Method / step diagram */
.method-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 26px; background: #fff; border: 1px solid var(--ink-line); border-radius: 20px; }
@media (max-width: 820px) { .method-strip { grid-template-columns: repeat(2, 1fr); } }
.method-strip .step { padding: 20px 16px; border: 1px dashed var(--ink-line-2); border-radius: 14px; }
.method-strip .step .n { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.2em; color: var(--amber); font-weight: 800; text-transform: uppercase; }
.method-strip .step h4 { font-size: 1.02rem; margin: 6px 0 4px; letter-spacing: -0.02em; }
.method-strip .step p { font-size: 0.82rem; color: var(--ink-dim); line-height: 1.45; margin: 0; }

/* Marquee */
.marquee { overflow: hidden; padding: 22px 0; background: var(--teal); color: var(--paper); }
.marquee-row { display: flex; gap: 40px; white-space: nowrap; animation: mrq 28s linear infinite; font-family: var(--f-sans); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; text-transform: uppercase; }
.marquee-row .dot { color: var(--amber); }
.marquee-row .serif { font-weight: 400; color: var(--amber); text-transform: none; font-size: 1.2rem; }
@keyframes mrq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Quote band */
.q-band { padding: 60px 0; background: var(--paper-2); }
.q-band blockquote { font-family: var(--f-serif); font-weight: 400; font-style: italic; font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1.3; color: var(--ink); margin: 0; max-width: 780px; }
.q-band .attr { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); font-weight: 700; margin-top: 24px; }

/* Callouts */
.callout { background: var(--paper-2); border-left: 4px solid var(--teal); padding: 22px 28px; border-radius: 6px; margin: 24px 0; }
.callout.critical { border-left-color: var(--coral); background: var(--coral-soft); }
.callout.good { border-left-color: var(--emerald); background: var(--emerald-soft); }
.callout.warn { border-left-color: var(--amber); background: var(--amber-soft); }
.callout h4 { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }

/* Footer */
.footer { background: var(--ink); color: var(--paper); padding: 70px 0 34px; }
.footer a { color: rgba(255,255,255,0.72); text-decoration: none; }
.footer a:hover { color: var(--amber); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: rgba(255,255,255,0.72); font-size: 0.9rem; line-height: 1.55; max-width: 34ch; margin-top: 12px; }
.footer-col h4 { color: var(--paper); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.2em; font-family: var(--f-mono); font-weight: 800; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; font-size: 0.94rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); }

/* ==========================================================================
   POLISH UPGRADE — richer hero, warm accents, subtle motion, trust band,
   press strip, testimonial band, refined tool card hover
   ========================================================================== */

/* Add sage-green as a calming secondary + warmer amber gradient stops */
:root {
  --sage: #7EA88F;
  --sage-soft: #E3EFE6;
  --amber-2: #F0B457;
  --cream-warm: #FEF6E4;
}

/* Better body rhythm */
body { font-feature-settings: "ss01","ss02","cv01"; }

/* Nav — subtle glass polish */
.nav { box-shadow: 0 1px 0 rgba(20,78,81,0.04); }
.brand:hover .brand-mark { transform: rotate(8deg); }
.brand-mark { transition: transform 0.3s ease; }

/* Button micro-interactions */
.btn { position: relative; overflow: hidden; box-shadow: 0 6px 20px -8px rgba(20,78,81,0.35); }
.btn:hover { box-shadow: 0 14px 32px -12px rgba(20,78,81,0.5); }
.btn.btn-lg { box-shadow: 0 10px 28px -10px rgba(20,78,81,0.4); }
.btn.btn-amber { box-shadow: 0 10px 28px -10px rgba(227,159,62,0.55); }

/* HERO — richer background */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(227,159,62,0.14), transparent 60%),
    radial-gradient(900px 500px at 10% 100%, rgba(20,78,81,0.08), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--cream-warm) 100%);
}
.hero h1 { font-weight: 900; letter-spacing: -0.035em; }
.hero h1 .teal { position: relative; }
.hero h1 .teal::after {
  content: ''; position: absolute; left: 0; bottom: 8%; height: 20%; width: 100%;
  background: var(--amber-soft); z-index: -1; border-radius: 4px;
  opacity: 0.65;
}
.hero .pill { box-shadow: 0 2px 8px -2px rgba(227,159,62,0.35); }

/* Side card upgrades */
.h-card {
  background: linear-gradient(155deg, #fff 0%, var(--cream-warm) 100%);
  border-color: transparent;
  box-shadow: 0 40px 80px -40px rgba(20,78,81,0.35), 0 8px 20px -12px rgba(227,159,62,0.25);
  position: relative;
}
.h-card::before {
  content: ''; position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--amber) 100%);
  border-radius: 24px; z-index: -1; opacity: 0.14;
}
.h-card .stat .n {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-2) 60%, var(--amber) 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tool cards — richer hover, better numbering */
.tool-card { transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), border-color 0.18s ease, box-shadow 0.22s ease; }
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -30px rgba(20,78,81,0.32), 0 12px 28px -18px rgba(227,159,62,0.28); }
.tool-card .tag { transition: all 0.18s ease; }
.tool-card:hover .tag { background: var(--teal); color: var(--paper); }
.tool-card:hover .cta { color: var(--amber); }
.tool-card .cta { transition: color 0.18s ease; }

/* Section headers — warmer serif emphasis */
.section-head h2 .serif { color: var(--teal-2); }
.chapter { font-weight: 800; }
.chapter::before { background: linear-gradient(90deg, var(--amber) 0%, var(--teal) 100%); height: 3px; border-radius: 100px; }

/* Method strip — softer, more premium */
.method-strip {
  background: linear-gradient(180deg, #fff 0%, var(--cream-warm) 100%);
  box-shadow: 0 30px 60px -30px rgba(20,78,81,0.2);
  border: 1px solid rgba(20,78,81,0.08);
}
.method-strip .step { transition: transform 0.15s ease, background 0.15s ease; border-radius: 14px; }
.method-strip .step:hover { background: var(--teal-mist); transform: translateY(-2px); border-color: var(--teal); }
.method-strip .step .n { background: linear-gradient(90deg, var(--amber) 0%, var(--amber-2) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Q band — quote polish */
.q-band {
  background:
    radial-gradient(800px 300px at 80% 100%, rgba(227,159,62,0.14), transparent 60%),
    linear-gradient(180deg, var(--paper-2) 0%, var(--paper-2) 100%);
}
.q-band blockquote::before {
  content: '"'; display: block; font-family: var(--f-serif);
  font-size: 5rem; line-height: 0.7; color: var(--amber);
  margin-bottom: 10px;
}

/* Marquee polish */
.marquee { border-top: 1px solid rgba(20,78,81,0.15); border-bottom: 1px solid rgba(20,78,81,0.15); }

/* Section.dark — richer gradient */
.section.dark {
  background:
    radial-gradient(1000px 400px at 80% -20%, rgba(227,159,62,0.18), transparent 60%),
    linear-gradient(160deg, var(--teal) 0%, #0F3E41 100%);
}

/* Press / trust strip */
.trust-strip {
  padding: 32px 0; background: var(--paper);
  border-top: 1px solid var(--ink-line-2); border-bottom: 1px solid var(--ink-line-2);
}
.trust-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; }
.trust-strip .label {
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; font-weight: 800; color: var(--ink-dim);
}
.trust-strip .logos { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; opacity: 0.72; }
.trust-strip .logo {
  font-family: var(--f-serif); font-style: italic; font-weight: 500; font-size: 1.05rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.trust-strip .logo.strong { font-family: var(--f-sans); font-weight: 900; letter-spacing: -0.03em; font-style: normal; }

/* Testimonial band */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* 3-tier pricing grid — collapses cleanly on mobile */
.pricing-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .pricing-3 { grid-template-columns: 1fr; gap: 16px; } }
.pricing-3 > * { min-width: 0; }

/* Prevent horizontal overflow anywhere on mobile */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }
.testi {
  background: #fff; border: 1px solid var(--ink-line); border-radius: 20px;
  padding: 28px 30px; position: relative; overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.testi:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(20,78,81,0.28); }
.testi::before {
  content: '"'; position: absolute; top: 10px; right: 26px;
  font-family: var(--f-serif); font-size: 5rem; line-height: 0.6;
  color: var(--amber); opacity: 0.35;
}
.testi p { font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; color: var(--ink); line-height: 1.55; margin-bottom: 20px; }
.testi .attr { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--ink-line-2); }
.testi .attr .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--teal) 0%, var(--amber) 100%); display: inline-flex; align-items: center; justify-content: center; color: var(--paper); font-weight: 900; font-size: 1rem; letter-spacing: -0.02em; }
.testi .attr .who { font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.testi .attr .who span { display: block; font-weight: 500; font-size: 0.82rem; color: var(--ink-dim); }

/* Reveal-on-scroll (subtle) */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { animation: reveal-up 0.7s cubic-bezier(0.2, 0.85, 0.3, 1) both; }

/* Footer polish */
.footer { background: linear-gradient(180deg, var(--ink) 0%, #050D14 100%); }
.footer .brand-mark { background: var(--amber); }
