/* ═══════════════════════════════════════════════════════════════════════
   Tilia — Landing page styles
   Built on the Tilia Design System (cream + crimson, Heebo).
   English / LTR marketing surface for primary care physicians.
   ═══════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap");

:root {
  /* Brand */
  --primary: #970747;
  --primary-dark: #6b0533;
  --primary-light: #f2c4d8;
  --primary-faint: #fcf0f5;

  /* Surfaces */
  --bg: #e7ede6;
  --bg-2: #dce4db; /* slightly deeper tint for banding */
  --surface-white: #ffffff;
  --border: #d6cfb4;
  --divider: #e4dfc6;

  /* Text */
  --text: #2d1a12;
  --text-secondary: #7a6a58;
  --text-muted: #a89880;
  --text-on-primary: #ffffff;

  /* Semantic (used sparingly) */
  --success: #2e7d32;
  --warning: #e65100;
  --error: #c62828;

  --font-sans:
    "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Marketing type scale */
  --fs-hero: clamp(2.6rem, 6.4vw, 5.6rem);
  --fs-h1: clamp(2.1rem, 4.6vw, 3.9rem);
  --fs-h2: clamp(1.6rem, 3vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.6rem);
  --fs-lead: clamp(1.1rem, 1.6vw, 1.45rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.78rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(45, 26, 18, 0.07);
  --shadow-md: 0 6px 20px rgba(45, 26, 18, 0.1);
  --shadow-lg: 0 18px 48px rgba(45, 26, 18, 0.16);
  --shadow-xl: 0 30px 80px rgba(45, 26, 18, 0.22);

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ── Layout helpers ──────────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.section {
  position: relative;
  padding: clamp(72px, 11vh, 150px) 0;
}
.band-white {
  background: var(--surface-white);
}
.band-crimson {
  background: var(--primary);
  color: var(--text-on-primary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.band-crimson .eyebrow {
  color: var(--primary-light);
}
.band-crimson .eyebrow::before {
  background: var(--primary-light);
}

.headline {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: var(--fs-h1);
  color: var(--text);
  text-wrap: pretty;
}
.headline .mute {
  color: var(--text-muted);
}
.headline .accent {
  color: var(--primary);
}
.band-crimson .headline {
  color: #fff;
}
.band-crimson .headline .mute {
  color: var(--primary-light);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 46ch;
  font-weight: 500;
}
.band-crimson .lead {
  color: rgba(255, 255, 255, 0.82);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 700;
  padding: 15px 26px;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn .arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  background: var(--primary-faint);
}
.band-crimson .btn-primary {
  background: #fff;
  color: var(--primary);
}
.band-crimson .btn-primary:hover {
  background: var(--primary-faint);
}
.band-crimson .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.band-crimson .btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition:
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    padding 0.3s var(--ease);
  padding: 22px 0;
}
.nav.scrolled {
  background: rgba(231, 237, 230, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: 14px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand img {
  height: 34px;
  width: auto;
}
.brand .wordmark {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav .btn {
  padding: 11px 20px;
  font-size: var(--fs-sm);
}

/* ── Floating decorative motifs ──────────────────────────────────── */
.float {
  position: absolute;
  pointer-events: none;
  opacity: 0.9;
  will-change: transform;
  z-index: 0;
}
.blob {
  border-radius: 50%;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: clamp(140px, 20vh, 210px);
  padding-bottom: clamp(60px, 9vh, 120px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
}
.hero h1 .accent {
  color: var(--primary);
}
.hero h1 .mute {
  color: var(--text-muted);
}
.hero-sub {
  margin-top: 28px;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 40ch;
  font-weight: 500;
}
.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-meta {
  margin-top: 26px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 600;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

/* Hero card-shuffle stack */
.cardstack {
  position: relative;
  height: clamp(380px, 46vw, 520px);
}
.daycard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(330px, 78%);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  transform-origin: center;
  overflow: hidden;
  transition:
    transform 0.9s var(--ease),
    opacity 0.9s var(--ease);
}
.daycard .dc-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.daycard .dc-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex: none;
}
.daycard .dc-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.daycard .dc-time {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 600;
}
.daycard .dc-msg {
  font-size: 0.96rem;
  line-height: 1.45;
  color: var(--text);
}
.daycard .dc-tag {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-faint);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}
.daycard.is-staff .dc-av {
  background: var(--bg-2);
  color: var(--primary);
}

/* ── Generic reveal ──────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal[data-d="1"] {
  transition-delay: 0.08s;
}
.reveal[data-d="2"] {
  transition-delay: 0.16s;
}
.reveal[data-d="3"] {
  transition-delay: 0.24s;
}
.reveal[data-d="4"] {
  transition-delay: 0.32s;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
/* Non-painting context fallback: snap to end states so nothing stays hidden */
.no-tx *,
.no-tx *::before,
.no-tx *::after {
  transition: none !important;
  animation: none !important;
}
.no-tx .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Marquee ─────────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  animation: scrollx 38s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track .m-item {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  padding: 0 0;
}
.marquee-track .m-sep {
  color: var(--primary);
  margin: 0 28px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}
@keyframes scrollx {
  to {
    transform: translateX(-50%);
  }
}
.marquee--problem {
  padding: 26px 0;
  background: var(--text);
}
.marquee--problem .m-item {
  color: rgba(255, 255, 255, 0.92);
}
.marquee--problem .m-sep {
  color: var(--primary-light);
}

/* ── Value cards grid ────────────────────────────────────────────── */
.cards {
  display: grid;
  gap: 18px;
}
.cards.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card .ic {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--primary-faint);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.card .ic svg {
  width: 24px;
  height: 24px;
}
.card h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
}

/* ── Section header block ────────────────────────────────────────── */
.sec-head {
  max-width: 38ch;
}
.sec-head.center {
  margin: 0 auto;
  text-align: center;
  max-width: 50ch;
}
.sec-head .lead {
  margin-top: 34px;
}
.sec-head.center .lead {
  margin-left: auto;
  margin-right: auto;
}

/* Two-column feature layout: text left, cards/bullets right */
.feat-split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.feat-split .sec-head {
  margin-bottom: 0 !important;
  max-width: 42ch;
}
.prob-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.prob-list .card {
  padding: 6px 0;
}
@media (max-width: 940px) {
  .feat-split {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
  }
}

/* ── Evidence band ───────────────────────────────────────────────── */
.cocm-lead {
  max-width: 900px;
  text-align: center;
}
.cocm-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 60px;
}
.cocm-pillar {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.cocm-pillar .pi {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
}
.cocm-pillar .pi svg {
  width: 22px;
  height: 22px;
}
.cocm-pillar h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 9px;
  letter-spacing: -0.01em;
}
.cocm-pillar p {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 48px);
}
.stat .num {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.band-crimson .stat .num {
  color: #fff;
}
.stat .lbl {
  margin-top: 12px;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  font-weight: 500;
}
.band-crimson .stat .lbl {
  color: rgba(255, 255, 255, 0.8);
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px;
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--text);
}
.faq-q .pm {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  transition: all 0.3s var(--ease);
  color: var(--primary);
}
.faq-item.open .faq-q .pm {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease);
}
.faq-a-inner {
  padding: 0 4px 28px;
  color: var(--text-secondary);
  font-size: var(--fs-body);
  max-width: 64ch;
  line-height: 1.65;
}

/* ── Final CTA ───────────────────────────────────────────────────── */
.cta-card {
  background: var(--primary);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 80px);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-card .headline {
  color: #fff;
}
.cta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.cta-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
}
.cta-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
}
.cta-contact a:hover {
  color: #fff;
}
.cta-deco {
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 340px;
  opacity: 0.1;
  pointer-events: none;
  filter: brightness(0) invert(1);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer .brand .wordmark {
  color: #fff;
}
.footer-tag {
  max-width: 30ch;
  margin-top: 16px;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
  font-weight: 700;
}
.footer-col a {
  display: block;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 11px;
  transition: color 0.2s;
  white-space: nowrap;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
}
.footer-disc {
  max-width: 70ch;
  margin-top: 18px;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Founding photo framing ──────────────────────────────────────── */
.photo-frame {
  position: relative;
}
.founding-photo {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .cardstack {
    height: 420px;
    margin-top: 20px;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cocm-pillars {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}
@media (max-width: 640px) {
  .cards.cols-2 {
    grid-template-columns: 1fr;
  }
  .cocm-pillars {
    grid-template-columns: 1fr;
  }
  .hero-meta {
    gap: 14px;
  }
}
