/* slumbercard.com — landing page styles. Brand tokens mirror pwa/demo/. */

:root {
  --night:      #1f1c39;
  --twilight:   #6030a0;
  --lavender:   #a78bfa;
  --moonlight:  #fef3c7;
  --card:       #fffaf0;
  --mist:       #f5f3fb;

  --text:       #1a1a1a;
  --muted:      #5a5a6a;
  --rule:       #e5e7eb;

  --good:       #16a34a;
  --caution:    #d97706;
  --alert:      #dc2626;

  --max-w:      1080px;
  --gutter:     24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--twilight); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--night);
  color: #fff;
  height: 76px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.topbar .brand img { height: 44px; display: block; }
.topbar .topnav { display: flex; gap: 22px; font-size: 13px; font-weight: 500; }
.topbar .topnav a { color: rgba(255, 255, 255, 0.78); }
.topbar .topnav a:hover { color: #fff; text-decoration: none; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--night) 0%, var(--twilight) 100%);
  color: #fff;
  padding: 96px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--lavender);
  opacity: 0.25;
  pointer-events: none;
}
.hero::before { top: 220px; transform: scaleY(40); transform-origin: 50% 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(167,139,250,0.18) 0%, transparent 60%);
  height: 1px;
}
.hero-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: none;
  color: var(--moonlight);
  margin-bottom: 22px;
}
.hero .sub {
  font-size: 19px;
  line-height: 1.55;
  color: rgba(254, 243, 199, 0.82);
  max-width: 880px;
  margin-bottom: 36px;
  text-wrap: pretty;
}
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--moonlight);
  color: var(--night);
}
.btn-primary:hover { background: #fff8d6; box-shadow: 0 6px 18px rgba(254, 243, 199, 0.22); }
.btn-secondary {
  background: transparent;
  color: var(--moonlight);
  border-color: var(--moonlight);
}
.btn-secondary:hover { background: rgba(254, 243, 199, 0.08); }
.hero .trust {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 22px;
  color: rgba(254, 243, 199, 0.92);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(254, 243, 199, 0.18);
  max-width: none;
}
.hero .trust span { display: inline-flex; align-items: center; gap: 12px; }

/* ── Section primitives ────────────────────────────────────── */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section h2 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--night);
  margin-bottom: 14px;
  max-width: none;
}
.section .lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 880px;
  margin-bottom: 44px;
  text-wrap: pretty;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--twilight);
  margin-bottom: 12px;
}
.section.alt { background: var(--mist); }

/* ── Why slumbercard (3 columns) ───────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.why-col {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.why-col.brand {
  background: var(--mist);
  border-color: var(--lavender);
  box-shadow: 0 4px 24px rgba(96, 48, 160, 0.06);
}
.why-col .why-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.why-col.brand .why-eyebrow { color: var(--twilight); }
.why-col h3 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--night);
  margin-bottom: 14px;
  text-wrap: balance;
}
.why-col p { text-wrap: pretty; }
.why-col .rule {
  width: 48px;
  height: 3px;
  border-radius: 1.5px;
  margin-bottom: 18px;
}
.why-col .rule.alert    { background: var(--alert); }
.why-col .rule.caution  { background: var(--caution); }
.why-col .rule.good     { background: var(--good); }
.why-col p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Product tour ───────────────────────────────────────────── */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 80px;
}
.feature:last-child { margin-bottom: 0; }
.feature.reverse .feature-media { order: 2; }
.feature-media {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(31, 28, 57, 0.08);
}
.feature-media img,
.feature-media svg { display: block; width: 100%; height: auto; }
.feature-text h3 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--night);
  margin-bottom: 14px;
  text-wrap: balance;
}
.feature-text p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.feature-text p + p { margin-top: 12px; }

/* ── Architecture ──────────────────────────────────────────── */
.arch-section { background: var(--night); color: #fff; padding: 88px 0; }
.arch-section h2 { color: var(--moonlight); }
.arch-section .lede { color: rgba(254, 243, 199, 0.72); }
.arch-section .eyebrow { color: var(--lavender); }
.arch-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 32px 0 56px;
}
.arch-points .arch-point {
  padding: 18px 22px;
  background: rgba(167, 139, 250, 0.08);
  border-left: 3px solid var(--lavender);
  border-radius: 0 6px 6px 0;
}
.arch-points .arch-point strong {
  display: block;
  color: var(--moonlight);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.arch-points .arch-point span {
  display: block;
  color: rgba(254, 243, 199, 0.72);
  font-size: 13.5px;
  line-height: 1.5;
  text-wrap: pretty;
}
.arch-diagram {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  margin-top: 24px;
}
.arch-diagram img,
.arch-diagram svg { display: block; width: 100%; height: auto; }
@media (max-width: 880px) {
  .arch-points { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Hardware preview ──────────────────────────────────────── */
.hw {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hw-illust {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hw-illust .placeholder {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ── Demo CTA ───────────────────────────────────────────────── */
.demo-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.demo-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.demo-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--night);
  margin-bottom: 10px;
  text-wrap: balance;
}
.demo-card p {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 18px;
  flex: 1;
  text-wrap: pretty;
}
.demo-card .btn { align-self: flex-start; padding: 10px 20px; font-size: 14px; }

/* ── For clinicians ─────────────────────────────────────────── */
.clinical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 36px;
}
.clinical-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px 28px;
}
.clinical-card.doctors    { border-top: 3px solid var(--good); }
.clinical-card.resellers  { border-top: 3px solid var(--twilight); }
.clinical-card .clinical-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.clinical-card.doctors    .clinical-eyebrow { color: var(--good); }
.clinical-card.resellers  .clinical-eyebrow { color: var(--twilight); }
.clinical-card h3 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--night);
  margin-bottom: 14px;
  text-wrap: balance;
}
.clinical-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.clinical {
  background: var(--mist);
  border-radius: 10px;
  padding: 28px 32px;
  border-left: 4px solid var(--lavender);
}
.clinical p { font-size: 14.5px; color: var(--text); margin-bottom: 12px; max-width: 880px; text-wrap: pretty; }
.clinical p:last-child { margin-bottom: 0; }
.clinical .disclaimer { font-size: 13px; color: var(--muted); }
@media (max-width: 880px) {
  .clinical-grid { grid-template-columns: 1fr; }
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq details {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  font-size: 16px;
  font-weight: 600;
  color: var(--night);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  text-wrap: balance;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
  text-wrap: pretty;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--night);
  color: rgba(254, 243, 199, 0.62);
  padding: 36px 0;
  font-size: 13px;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer a { color: rgba(254, 243, 199, 0.78); }
.footer a:hover { color: var(--moonlight); }
.footer .sep { color: rgba(254, 243, 199, 0.32); margin: 0 6px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 38px; }
  .hero .sub { font-size: 17px; }
  .section { padding: 56px 0; }
  .section h2 { font-size: 28px; }
  .why-grid { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 28px; margin-bottom: 56px; }
  .feature.reverse .feature-media { order: 0; }
  .hw { grid-template-columns: 1fr; }
  .demo-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-wave { animation: none !important; }
}
