/* WaitStream public site.
 *
 * Design intent: this page is read by a practice owner or office manager between
 * patients, often on a phone. So: calm clinical palette, large readable type, short
 * line lengths, and no motion that competes with the one animated element that is
 * actually the product (the screen in the hero).
 *
 * No framework, no build step, no web fonts from a third party beyond one Google
 * Fonts call, no analytics. A marketing page that loads in 200ms on clinic wifi.
 */

:root {
  /* Clinical, not corporate-blue. Deep slate-teal reads as medical infrastructure;
     the warm sand keeps it from feeling like a hospital form. */
  --ink: #12211f;
  --ink-soft: #46605c;
  --ink-faint: #7d938f;
  --paper: #fbfaf7;
  --paper-2: #f2efe9;
  --surface: #ffffff;
  --line: #e2ddd4;
  --teal: #0f6b60;
  --teal-dark: #0a4d45;
  --teal-soft: #e6f1ef;
  --sand: #e8dcc8;
  --amber: #b4762a;
  --screen: #0b1412;

  --wrap: 1140px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(18, 33, 31, .06), 0 2px 8px rgba(18, 33, 31, .04);
  --shadow-md: 0 2px 6px rgba(18, 33, 31, .07), 0 12px 32px rgba(18, 33, 31, .08);
  --shadow-lg: 0 24px 60px rgba(18, 33, 31, .14);
}

*, *::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-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.021em;
  margin: 0 0 .5em;
  color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
h1 { font-size: clamp(2.05rem, 4.1vw, 3.05rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.18rem, 1.9vw, 1.4rem); }
p { margin: 0 0 1.1em; }
a { color: var(--teal); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
strong { font-weight: 650; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 .9em;
}
.lede { font-size: clamp(1.08rem, 1.6vw, 1.26rem); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* ---------------------------------------------------------------- header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .bar { display: flex; align-items: center; gap: 28px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo .mark { width: 30px; height: 30px; flex: 0 0 auto; }
nav.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
nav.site-nav a { padding: 8px 13px; border-radius: 8px; color: var(--ink-soft); font-weight: 550; font-size: .96rem; }
nav.site-nav a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
nav.site-nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
/* The nav link rule above is more specific than .btn-primary, which left the call to
   action rendering as muted text on the teal fill. Restate it for buttons in the nav. */
nav.site-nav a.btn-primary { color: #fff; }
nav.site-nav a.btn-primary:hover { color: #fff; background: var(--teal-dark); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 10px; font-weight: 650; font-size: 1rem;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); background: var(--surface); }
.btn-sm { padding: 9px 16px; font-size: .93rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 2rem; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 1rem; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 76px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1.12fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .55em; }
.hero h1 .accent {
  background: linear-gradient(180deg, transparent 62%, var(--sand) 62%, var(--sand) 92%, transparent 92%);
  padding: 0 .06em;
}
.hero-points { list-style: none; margin: 1.9rem 0 0; padding: 0; display: grid; gap: 12px; }
.hero-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.02rem; }
.hero-points svg { flex: 0 0 auto; margin-top: 4px; }

/* the waiting-room scene */
.scene-frame { position: relative; }
.scene-frame svg,
.scene-frame img { border-radius: var(--radius); box-shadow: var(--shadow-lg); background: var(--paper-2); }
.scene-frame img { width: 100%; height: auto; }
figure img { width: 100%; height: auto; }
.scene-caption { margin-top: 14px; font-size: .86rem; color: var(--ink-faint); text-align: center; }

/* Slides cycling inside the SVG screen. Four keyframe stops of 25% each, offset by
   one quarter per slide, so one slide is fully visible at a time with a soft cross-fade. */
.loop-slide { opacity: 0; animation: slideCycle 20s infinite; }
.loop-slide:nth-of-type(1) { animation-delay: 0s; }
.loop-slide:nth-of-type(2) { animation-delay: 5s; }
.loop-slide:nth-of-type(3) { animation-delay: 10s; }
.loop-slide:nth-of-type(4) { animation-delay: 15s; }
@keyframes slideCycle {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  22%  { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .loop-slide { opacity: 0; animation: none; }
  .loop-slide:nth-of-type(1) { opacity: 1; }
}

/* ---------------------------------------------------------------- sections */
section { padding: clamp(52px, 7vw, 96px) 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.ink { background: var(--ink); color: #e8efed; }
section.ink h2, section.ink h3 { color: #fff; }
section.ink .lede, section.ink .muted { color: #a9c0bb; }
section.ink a { color: #7fd0c3; }
.section-head { max-width: 72ch; margin-bottom: clamp(32px, 4vw, 52px); }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
section.alt .card { background: var(--paper); }
section.ink .card { background: #1b2e2b; border-color: #2c4441; }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 42px; height: 42px; margin-bottom: 18px; }

.steps { counter-reset: step; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem;
  font-family: "Fraunces", Georgia, serif;
}
.step h3 { font-size: 1.14rem; }
.step p { margin-bottom: 0; color: var(--ink-soft); font-size: .98rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 68px); align-items: center; }
.split.reverse > :first-child { order: 2; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; margin-top: 2.2rem; }
.stat .n { font-family: "Fraunces", Georgia, serif; font-size: 2.3rem; font-weight: 600; letter-spacing: -.02em; color: var(--teal); line-height: 1; }
section.ink .stat .n { color: #7fd0c3; }
.stat .l { font-size: .92rem; color: var(--ink-soft); margin-top: 6px; }

.checklist { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 13px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { flex: 0 0 auto; margin-top: 4px; }
.checklist .no svg { color: var(--amber); }

/* loop composition bar */
.loopbar { display: flex; height: 54px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin: 1.8rem 0 .8rem; }
.loopbar span { display: grid; place-items: center; font-size: .82rem; font-weight: 650; color: #fff; text-align: center; padding: 0 8px; }
.loopbar .clinic { background: var(--teal); flex: 70; }
.loopbar .sponsor { background: var(--amber); flex: 30; }
.loopbar-key { display: flex; gap: 20px; font-size: .88rem; color: var(--ink-soft); flex-wrap: wrap; }
.loopbar-key i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.07rem;
  list-style: none; position: relative; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 17px;
  font-size: 1.5rem; font-weight: 400; color: var(--teal); line-height: 1;
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 48px 22px 0; color: var(--ink-soft); }
.faq .answer p:last-child { margin-bottom: 0; }

/* contact */
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .94rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: .85rem; color: var(--ink-faint); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.note {
  border-left: 3px solid var(--teal); background: var(--teal-soft);
  padding: 16px 20px; border-radius: 0 9px 9px 0; font-size: .97rem; margin: 1.6rem 0;
}
section.ink .note { background: #1b2e2b; border-left-color: #7fd0c3; }

/* ---------------------------------------------------------------- footer */
footer.site { background: var(--ink); color: #9fb6b1; padding: 60px 0 34px; font-size: .94rem; }
footer.site a { color: #c9dbd7; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 42px; }
footer.site h4 { color: #fff; font-family: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 14px; font-weight: 700; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
footer.site .legal { border-top: 1px solid #2c4441; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; font-size: .86rem; color: #7f9a95; }
footer.site .legal p { margin: 0; max-width: 70ch; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .nav-toggle { display: block; }
  nav.site-nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px; gap: 2px;
    box-shadow: var(--shadow-md);
  }
  nav.site-nav.open { display: flex; }
  nav.site-nav a { padding: 13px; }
  .row2 { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr; gap: 28px; }
}

/* print: the page gets printed and handed to a practice partner */
@media print {
  header.site, footer.site, .btn-row, .nav-toggle { display: none; }
  body { background: #fff; font-size: 11pt; }
  section { padding: 18px 0; break-inside: avoid; }
  .faq details { display: block; }
  .faq .answer { display: block !important; }
}
