/* ============================================================
   Specialty Medical Equipment — "Clinical Calm" chat experience.
   A theme-able, premium, accessible healthtech surface (NOT the dark
   LeadParley neon). Light, airy, big readable type, soft tinted depth,
   per-brand accent. Themes set --accent / --accent-2 / --tint on <body>.
   Display: Bricolage Grotesque · Body: General Sans
   ============================================================ */

:root {
  --ink: #10202b;
  --ink-soft: #46606f;
  --ink-faint: #7d94a1;
  --bg: #f4f8fb;
  --card: #ffffff;
  --line: #e4edf2;
  --line-2: #d2e0e8;
  --accent: #0e9f8e;        /* themed */
  --accent-2: #14c4ad;      /* themed */
  --accent-ink: #053b35;    /* themed (text on accent) */
  --tint: 14, 159, 142;     /* themed rgb for glows */
  --good: #1ea672;
  --shadow: 0 24px 60px -28px rgba(16, 40, 55, 0.28);
  --shadow-sm: 0 10px 30px -16px rgba(16, 40, 55, 0.22);
  --r: 18px;
  --r-lg: 28px;
  --display: "Bricolage Grotesque", "Clash Display", Georgia, serif;
  --body: "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ---- themes ---- */
body.theme-cgm {
  --accent: #0e9f8e; --accent-2: #16c4ac; --accent-ink: #04332d; --tint: 16, 196, 172;
}
body.theme-cpap {
  --accent: #2f6bff; --accent-2: #4aa8ff; --accent-ink: #06224f; --tint: 74, 168, 255;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(60% 50% at 85% -5%, rgba(var(--tint), 0.16), transparent 70%),
    radial-gradient(45% 40% at -5% 10%, rgba(var(--tint), 0.10), transparent 70%);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
a { color: var(--accent); text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ---- top bar ---- */
.bar { padding: 20px 0; }
.bar-in { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); }
.brand .dot { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; font-size: 16px; box-shadow: 0 6px 18px -6px rgba(var(--tint), 0.7); }
.bar .phone { font-weight: 600; color: var(--ink); font-size: 15px; }
.bar .phone span { color: var(--ink-faint); font-weight: 500; }

/* ---- hero + chat ---- */
.hero { padding: 26px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent); background: rgba(var(--tint), 0.12); border: 1px solid rgba(var(--tint), 0.3); padding: 7px 14px; border-radius: 999px; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); margin: 20px 0 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { color: var(--ink-soft); font-size: clamp(17px, 2vw, 21px); margin: 20px 0 0; max-width: 30ch; }
.checks { margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; align-items: center; gap: 12px; font-size: 16.5px; color: var(--ink); }
.check .c { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(var(--tint), 0.14); color: var(--accent); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.trust { margin-top: 28px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; color: var(--ink-faint); font-size: 13px; font-weight: 600; }
.trust b { color: var(--ink-soft); }

/* ---- chat card ---- */
.chat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; max-height: 600px; }
.chat-head { display: flex; align-items: center; gap: 13px; padding: 18px 20px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.chat-head .ava { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,0.22); display: grid; place-items: center; font-size: 20px; backdrop-filter: blur(6px); }
.chat-head .who { font-family: var(--display); font-weight: 700; font-size: 17px; }
.chat-head .sub { font-size: 13px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.chat-head .sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b9ffd9; box-shadow: 0 0 8px #b9ffd9; }
.chat-body { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 300px; background:
  radial-gradient(50% 30% at 50% 0%, rgba(var(--tint), 0.05), transparent 70%); }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 16px; font-size: 16px; line-height: 1.5; animation: rise .4s cubic-bezier(.2,.8,.2,1); }
.msg.bot { align-self: flex-start; background: #eef4f7; color: var(--ink); border-bottom-left-radius: 5px; }
.msg.user { align-self: flex-end; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 500; border-bottom-right-radius: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { font-size: 15.5px; font-weight: 600; padding: 11px 18px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; color: var(--accent); cursor: pointer; transition: transform .12s, border-color .15s, background .15s; }
.chip:hover { border-color: var(--accent); background: rgba(var(--tint), 0.06); transform: translateY(-1px); }
.composer { display: flex; gap: 9px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.composer input { flex: 1; padding: 13px 15px; border: 1.5px solid var(--line-2); border-radius: 13px; font: inherit; font-size: 16px; }
.composer input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--tint), 0.18); }
.composer button, .cta { border: none; cursor: pointer; font-family: var(--body); font-weight: 700; font-size: 16px; color: var(--accent-ink); background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-radius: 13px; padding: 13px 20px; box-shadow: 0 10px 24px -10px rgba(var(--tint), 0.8); transition: transform .14s, box-shadow .2s; }
.composer button:hover, .cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(var(--tint), 0.9); }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; background: #eef4f7; border-radius: 16px; border-bottom-left-radius: 5px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.endnote { align-self: center; color: var(--ink-faint); font-size: 13px; padding: 6px; }
.callbtn { align-self: stretch; text-align: center; text-decoration: none; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
@keyframes blink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

/* ---- reveal ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; } .reveal:nth-child(3) { transition-delay: .16s; }

/* ---- reassurance strip ---- */
.strip { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feat h3 { font-size: 19px; margin: 0 0 6px; }
.feat p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.feat .ic { font-size: 24px; margin-bottom: 8px; }

footer { padding: 30px 0; color: var(--ink-faint); font-size: 13px; text-align: center; line-height: 1.6; }
footer .legal { max-width: 70ch; margin: 0 auto; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero .lede { max-width: none; }
  .strip-grid { grid-template-columns: 1fr; gap: 18px; }
  .chat { max-height: 540px; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .msg { animation: none; } }
