/* ============================================================
   Infinite Dental Marketing — main.css
   All colors live in the :root token block below.
   Change a token once and the whole site follows.
   Dark theme applies automatically via prefers-color-scheme.
   ============================================================ */

:root {
  /* Light theme (default) */
  --bg: #FBF9F4;            /* page background — warm off-white */
  --surface: #F4F0E8;       /* soft cards, player background */
  --card: #FFFFFF;          /* raised cards */
  --hero: #EDF2F7;          /* hero tint — softened navy wash */
  --border: #E3DED2;
  --border-cool: #C9D6E2;

  --heading: #2E4A66;       /* softened navy */
  --text: #55534C;          /* warm charcoal, not black */
  --muted: #6B7684;
  --faint: #8A8578;
  --navy-soft: #5E7A96;

  --accent: #E08A63;        /* coral, pulled back 20% */
  --accent-deep: #C96F49;   /* hover / text-on-light coral */
  --accent-ink: #FDF6F1;    /* text on coral buttons */

  --radius: 10px;
  --radius-lg: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #212B36;
    --surface: #2A3542;
    --card: #26303C;
    --hero: #283645;
    --border: #35404C;
    --border-cool: #43596E;

    --heading: #DCE6EF;
    --text: #C7D3DF;
    --muted: #8A99A8;
    --faint: #7A8593;
    --navy-soft: #9AB0C4;

    --accent: #D97F58;
    --accent-deep: #E39A78;
    --accent-ink: #2A1508;
  }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: var(--radius); }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--muted); }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-soft);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

section { padding: 4rem 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-deep); text-decoration: none; }

.btn-ghost {
  border-color: var(--border-cool);
  color: var(--heading);
  background: transparent;
}
.btn-ghost:hover { background: var(--surface); text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  position: relative;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading);
}
.brand:hover { text-decoration: none; }

.site-nav { display: flex; gap: 1.4rem; align-items: center; }
.site-nav a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { color: var(--heading); text-decoration: none; }
.site-nav .nav-cta { color: var(--accent-ink); }
.site-nav .nav-cta:hover { color: var(--accent-ink); }

/* Mobile nav (pure CSS checkbox toggle, no JS needed) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }
.nav-toggle-label span {
  display: block; width: 22px; height: 2px;
  background: var(--heading); margin: 5px 0; border-radius: 2px;
}

@media (max-width: 720px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 24px 1.25rem;
    gap: 1rem;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--hero);
  text-align: center;
  padding: 4.5rem 0 3.5rem;
}

.hero h1 { max-width: 620px; margin-left: auto; margin-right: auto; }
.hero .sub { color: var(--navy-soft); max-width: 520px; margin: 0 auto 1.75rem; }

.demo-number {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.8rem;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--heading);
}
.demo-number:hover { text-decoration: none; border-color: var(--accent); }
.demo-number .phone-icon { color: var(--accent); font-size: 1.3em; line-height: 1; }

.hero .fine { font-size: 0.85rem; color: var(--navy-soft); margin-top: 0.9rem; }

/* ---------- Demo player ---------- */

.player {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.player-bar button {
  background: none;
  border: none;
  color: var(--navy-soft);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  font-family: var(--font-body);
  font-weight: 500;
}
.player-bar button:hover { color: var(--heading); }

.viz {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
  flex: 1;
  max-width: 140px;
}
.viz span {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  height: 30%;
  transition: height 0.08s linear;
}

/* CSS-only idle animation while muted (before Web Audio is allowed to run) */
.player.simulated .viz span { animation: pulse 1.1s ease-in-out infinite alternate; }
.player.simulated .viz span:nth-child(2n) { animation-duration: 0.8s; }
.player.simulated .viz span:nth-child(3n) { animation-duration: 1.4s; }
@keyframes pulse {
  from { height: 20%; }
  to   { height: 90%; }
}
@media (prefers-reduced-motion: reduce) {
  .player.simulated .viz span { animation: none; height: 50%; }
  html { scroll-behavior: auto; }
}

.player-meta { font-size: 0.8rem; color: var(--faint); }
.unmute { margin-left: auto; }

.transcript { max-height: 180px; overflow-y: auto; }
.transcript p {
  font-size: 0.92rem;
  margin: 0 0 0.4rem;
  opacity: 0.35;
  transition: opacity 0.3s;
}
.transcript p.live { opacity: 1; }
.transcript .who { font-weight: 600; }
.transcript .who-patient { color: var(--faint); }
.transcript .who-brooke { color: var(--accent-deep); }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
}

.stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--heading);
  display: block;
}
.stat .label { font-size: 0.9rem; color: var(--muted); }

/* ---------- Cards & grids ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  padding-left: 2.4rem;
  position: relative;
  margin-bottom: 1.1rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.1rem;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-list, .cross-list { list-style: none; padding: 0; margin: 0; }
.check-list li, .cross-list li { padding-left: 1.7rem; position: relative; margin-bottom: 0.6rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-deep); font-weight: 700; }
.cross-list li::before { content: "→"; position: absolute; left: 0; color: var(--navy-soft); font-weight: 700; }

/* ---------- Pricing ---------- */

.price-card {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  border: 2px solid var(--border-cool);
}

.price-card .price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--heading);
}
.price-card .per { font-size: 1rem; color: var(--muted); font-family: var(--font-body); font-weight: 400; }

.price-card ul { text-align: left; margin: 1.25rem 0; }

.badge {
  display: inline-block;
  background: var(--hero);
  color: var(--navy-soft);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* ---------- Blog ---------- */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.post-list h3 { margin-bottom: 0.25rem; }
.post-list .date { font-size: 0.85rem; color: var(--faint); }

.prose { max-width: 720px; margin: 0 auto; padding-top: 3rem; padding-bottom: 4rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose blockquote, .prose pre {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  overflow-x: auto;
}
.prose blockquote { border-left: 3px solid var(--accent); font-style: normal; }

.post-cta { margin-top: 3rem; text-align: center; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--hero);
  text-align: center;
}
.cta-band .actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- Utility ---------- */

.center { text-align: center; }
.tight { margin-bottom: 0.25rem; }
.section-head { max-width: 560px; margin: 0 auto 2.5rem; text-align: center; }
