*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #52BEB0;
  --primary-fg: #fff;
  --primary-10: rgba(82,190,176,0.1);
  --primary-20: rgba(82,190,176,0.2);
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --fg: #0F172A;
  --muted: #64748B;
  --faint: #94A3B8;
  --border: #E2E8F0;
  --orange: #F97316;
  --orange-10: rgba(249,115,22,0.1);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }
body {
  font-family: var(--sans); color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; line-height: 1.55;
}
::selection { background: var(--primary); color: white; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  border-radius: 0.75rem; padding: 11px 26px; border: none;
  cursor: pointer; transition: all 0.15s ease;
}
.btn-primary { background: var(--primary); color: var(--fg); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 16px var(--primary-20); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--fg); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 15px 36px; font-size: 16px; border-radius: 1rem; }
.btn-dark { background: var(--fg); color: white; }
.btn-dark:hover { background: #334155; }

/* ── Card ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px -2px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

/* ── Tag ── */
.tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--primary); margin-bottom: 14px;
}

/* ── NAV ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248,250,252,0.88); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: 'Pacifico', cursive; font-size: 26px; color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.btn { color: var(--fg); }
.nav-links a.btn:hover { color: var(--fg); }

/* ── HERO ── */
.hero { padding: 150px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(80px); opacity: 0.5;
}
.hero::before { width: 500px; height: 500px; background: var(--primary-10); top: -100px; left: -120px; }
.hero::after { width: 400px; height: 400px; background: var(--orange-10); top: 40px; right: -140px; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(40px, 5.8vw, 72px);
  font-weight: 400; line-height: 1.08; letter-spacing: -0.015em;
  max-width: 740px; margin: 0 auto;
}
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 520px; margin: 24px auto 0; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

/* ── App preview ── */
.app-preview { margin-top: 64px; position: relative; max-width: 860px; margin-left: auto; margin-right: auto; }
.preview-window {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
}
.preview-bar { height: 40px; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; padding: 0 14px; }
.preview-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.preview-body { display: grid; grid-template-columns: 180px 1fr; min-height: 320px; }
.preview-sidebar { border-right: 1px solid var(--border); padding: 16px 12px; }
.preview-nav-item { padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.preview-nav-item.active { background: var(--primary-10); color: var(--primary); font-weight: 600; }
.preview-nav-item .nav-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.preview-content { padding: 20px 24px; }
.preview-content .greeting { font-size: 18px; font-weight: 700; }
.preview-content .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mini-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--bg); }
.mini-card .mc-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.mini-card .mc-value { font-size: 22px; font-weight: 700; margin-top: 4px; color: var(--fg); }
.mini-card .mc-value.teal { color: var(--primary); }
.mini-banner { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--orange-10); border: 1px solid rgba(249,115,22,0.2); display: flex; align-items: center; gap: 10px; }
.mini-banner .mb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: blink 1.5s ease-in-out infinite; }
.mini-banner .mb-text { font-size: 11px; font-weight: 600; color: #C2410C; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.float-badge { position: absolute; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; animation: bob 4s ease-in-out infinite; z-index: 2; }
.float-badge .fb-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--primary-10); display: flex; align-items: center; justify-content: center; }
.fb-1 { top: 20px; right: -40px; animation-delay: 0s; }
.fb-2 { bottom: 40px; left: -36px; animation-delay: -1.5s; }
.fb-3 { top: 60px; left: -20px; animation-delay: -3s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── STATS ── */
.stats { padding: 60px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-row { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat .val { font-family: var(--serif); font-size: 44px; color: var(--fg); }
.stat .val em { font-style: italic; color: var(--primary); }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── FEATURES ── */
.features { padding: 100px 0 0; }
.features-head { max-width: 480px; }
.features-head h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 400; line-height: 1.12; }
.features-head h2 em { font-style: italic; color: var(--primary); }
.features-head p { color: var(--muted); margin-top: 14px; font-size: 16px; line-height: 1.7; }

/* ── Bento grid ── */
.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(180px, auto); gap: 12px; }
.bento-cell { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; overflow: hidden; position: relative; transition: border-color 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.bento-cell:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(82,190,176,0.08); }
.bento-cell h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.bento-cell p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.b-wide { grid-column: span 4; }
.b-narrow { grid-column: span 2; }
.b-half { grid-column: span 3; }
.b-third { grid-column: span 2; }
.bento-mock { margin-top: auto; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg); height: 150px; }
.mock-inner { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 14px; }

/* Schedule */
.mock-days { display: flex; gap: 6px; }
.mock-day { flex: 1; height: 44px; border-radius: 8px; border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 8px; font-weight: 600; color: var(--muted); background: var(--card); }
.mock-day .d-num { font-size: 13px; font-weight: 700; color: var(--fg); margin-top: 1px; }
.mock-day.sel { background: var(--primary); color: white; border-color: var(--primary); }
.mock-day.sel .d-num { color: white; }
.mock-times { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.mock-time { padding: 5px 9px; border-radius: 6px; font-size: 9px; font-weight: 600; border: 1px solid var(--border); color: var(--muted); background: var(--card); }
.mock-time.sel { background: var(--primary); color: white; border-color: var(--primary); }

/* Video */
.mock-video { height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 1px; background: var(--border); }
.mock-vid-tile { background: #1E293B; position: relative; }
.mock-vid-tile .vid-avatar { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.mock-vid-bar { grid-column: span 2; background: #0F172A; padding: 8px; display: flex; justify-content: center; gap: 8px; }
.mock-vid-btn { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.mock-vid-btn.red { background: #DC2626; }

/* Chat */
.mock-bubble { padding: 6px 10px; border-radius: 10px; font-size: 9px; max-width: 80%; margin-bottom: 5px; line-height: 1.4; }
.mock-bubble.them { background: var(--border); color: var(--fg); border-bottom-left-radius: 3px; }
.mock-bubble.me { background: var(--primary); color: white; margin-left: auto; border-bottom-right-radius: 3px; }
.mock-typing { font-size: 9px; color: var(--muted); margin-top: 2px; }

/* Locations */
.mock-loc { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.mock-loc:last-child { border-bottom: none; }
.mock-loc .loc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.mock-loc .loc-name { font-size: 10px; font-weight: 600; }
.mock-loc .loc-sub { font-size: 8px; color: var(--muted); }

/* EHR */
.ehr-section { margin-bottom: 8px; }
.ehr-section:last-child { margin-bottom: 0; }
.ehr-label { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.ehr-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ehr-tag { padding: 2px 7px; border-radius: 5px; font-size: 9px; font-weight: 600; background: var(--border); color: var(--fg); }
.ehr-tag.teal { background: var(--primary-10); color: var(--primary); }
.ehr-tag.red { background: rgba(220,38,38,0.1); color: #DC2626; }

/* Roles */
.role-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.role-row:last-child { border-bottom: none; }
.role-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-10); color: var(--primary); font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.role-info { flex: 1; }
.role-name { font-size: 10px; font-weight: 600; }
.role-pills { display: flex; gap: 3px; margin-top: 2px; }
.role-pill { padding: 1px 5px; border-radius: 3px; font-size: 7px; font-weight: 600; background: var(--border); color: var(--muted); }
.role-pill.active { background: var(--primary); color: white; }

/* Family */
.fam-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.fam-row:last-child { border-bottom: none; }
.fam-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--border); color: var(--muted); font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fam-avatar.me { background: var(--primary-10); color: var(--primary); }
.fam-name { flex: 1; font-size: 10px; font-weight: 600; }
.fam-badge { font-size: 7px; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: var(--border); color: var(--muted); }
.fam-badge.sel { background: var(--primary-10); color: var(--primary); }

/* Payment */
.pay-row { display: flex; justify-content: space-between; padding: 4px 0; }
.pay-label { font-size: 9px; color: var(--muted); }
.pay-amt { font-size: 12px; font-weight: 700; color: var(--fg); }
.pay-bar-wrap { height: 5px; border-radius: 3px; background: var(--border); margin-top: 8px; overflow: hidden; }
.pay-bar { height: 100%; border-radius: 3px; background: var(--primary); }
.pay-note { font-size: 8px; color: var(--muted); margin-top: 6px; text-align: center; }

/* Branding */
.mock-brand { text-align: center; }
.brand-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.brand-swatch { width: 22px; height: 22px; border-radius: 50%; }
.brand-domain { font-size: 10px; font-weight: 600; color: var(--fg); padding: 4px 10px; border: 1px solid var(--border); border-radius: 5px; display: inline-block; margin-bottom: 8px; }
.brand-logo-bar { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 8px; color: var(--muted); }
.brand-logo-placeholder { width: 24px; height: 16px; border-radius: 3px; background: var(--border); }

/* ── PRICING ── */
.pricing { padding: 100px 0; }
.pricing-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.pricing-text .tag { margin-bottom: 14px; }
.pricing-text h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 400; line-height: 1.12; }
.pricing-text h2 em { font-style: italic; color: var(--primary); }
.pricing-text p { color: var(--muted); margin-top: 14px; font-size: 15px; line-height: 1.7; max-width: 400px; }
.pricing-text .price-big { margin-top: 32px; display: flex; align-items: baseline; gap: 6px; }
.pricing-text .price-big .amt { font-family: var(--serif); font-size: 64px; color: var(--fg); }
.pricing-text .price-big .per { font-size: 16px; color: var(--muted); }
.pricing-text .extra { font-size: 14px; color: var(--muted); margin-top: 8px; }
.pricing-text .hero-actions { justify-content: flex-start; margin-top: 32px; }
.pricing-features { padding: 36px; list-style: none; }
.pricing-features .pf-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 20px; }
.pricing-features li { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; align-items: center; gap: 12px; }
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .check { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-10); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }

/* ── CTA ── */
.cta { padding: 100px 0; text-align: center; background: var(--fg); color: white; border-radius: 24px; margin: 0 clamp(20px, 4vw, 40px) 80px; position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; border-radius: 50%; background: var(--primary); opacity: 0.1; filter: blur(80px); }
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { font-family: var(--serif); font-size: clamp(30px, 4.5vw, 52px); font-weight: 400; line-height: 1.1; }
.cta h2 em { font-style: italic; color: var(--primary); }
.cta p { color: rgba(255,255,255,0.6); margin: 16px auto 0; max-width: 440px; font-size: 16px; }
.cta .btn { margin-top: 32px; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); padding: 32px 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer .logo { font-family: 'Pacifico', cursive; font-size: 20px; color: var(--primary); }
footer .flinks { display: flex; gap: 24px; }
footer .flinks a { font-size: 13px; color: var(--muted); transition: color 0.15s; }
footer .flinks a:hover { color: var(--fg); }
footer .copy { font-size: 12px; color: var(--faint); }

/* ── REVEAL ── */
.sr { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.sr.in { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .pricing-layout { grid-template-columns: 1fr; }
  .preview-body { grid-template-columns: 1fr; }
  .preview-sidebar { display: none; }
  .float-badge { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b-wide, .b-narrow, .b-half, .b-third { grid-column: span 2; }
}
@media (max-width: 600px) {
  .hero { padding: 120px 0 60px; }
  .nav-links a:not(.btn) { display: none; }
  .stats-row { gap: 24px; }
  .cta { border-radius: 16px; margin: 0 12px 40px; padding: 60px 20px; }
  .bento { grid-template-columns: 1fr; }
  .b-wide, .b-narrow, .b-half, .b-third { grid-column: span 1; }
}
