/* ============================================================
   Sleepolytics design system — shared foundation
   Static site (Cloudflare Pages). No build step, no fonts CDN.
   Other agents: extend here, don't redefine tokens.
   ============================================================ */

:root {
  --navy: #101d33;
  --navy2: #1a2b45;
  --bg: #f6f4ee;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #5d6b7d;
  --accent: #e8a33d;
  --accent2: #7fb6a4;
  --danger: #c0392b;
  --radius: 14px;

  --shadow: 0 10px 30px rgba(16, 29, 51, 0.08);
  --shadow-sm: 0 4px 14px rgba(16, 29, 51, 0.07);
  --border: #e7e2d6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -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: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  margin-top: 0;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--navy); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* ---------- layout ---------- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-tight { padding: 48px 0; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
}

.nav-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-logo:hover { color: #fff; }
.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover { color: #fff; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(232, 163, 61, 0.35);
}

.btn-primary:hover { background: #f0b355; color: var(--navy); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover { border-color: #fff; color: #fff; }

.btn-block {
  display: block;
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* small nav CTA */
.nav .btn { padding: 9px 20px; font-size: 0.9rem; }

/* ---------- hero ---------- */

.hero {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* subtle night-sky radial glow */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(232, 163, 61, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(127, 182, 164, 0.12), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 24px 96px;
  text-align: center;
}

.hero h1, .hero h2, .hero h3 { color: #fff; }

.hero p.lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero .kicker { color: var(--accent); }

/* ---------- cards / grids ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: 0.5em; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

/* ---------- stats strip ---------- */

.stats {
  background: var(--navy2);
  color: #fff;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
  padding: 30px 24px;
}

.stat-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- forms ---------- */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 7px;
  color: var(--navy);
}

input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.2);
}

textarea { resize: vertical; min-height: 110px; }

input[type="time"], input[type="date"], input[type="number"] {
  max-width: 260px;
}

/* ---------- badges / progress / alerts ---------- */

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(232, 163, 61, 0.16);
  color: #8a5c14;
  border: 1px solid rgba(232, 163, 61, 0.4);
}

.badge-green {
  background: rgba(127, 182, 164, 0.18);
  color: #2f6b5c;
  border-color: rgba(127, 182, 164, 0.45);
}

.progress {
  height: 12px;
  background: #e9e4d5;
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(127, 182, 164, 0.16);
  border: 1px solid rgba(127, 182, 164, 0.5);
  color: #2f6b5c;
  margin-bottom: 18px;
}

.alert-error {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.4);
  color: var(--danger);
}

/* ---------- tables ---------- */

table.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

table.table th, table.table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

table.table th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

table.table tr:last-child td { border-bottom: none; }

/* ---------- checklist ---------- */

ul.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

ul.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
}

ul.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(127, 182, 164, 0.2);
  color: #2f6b5c;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- footer ---------- */

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 32px;
  font-size: 0.92rem;
}

.footer a { color: rgba(255, 255, 255, 0.85); }
.footer a:hover { color: var(--accent); }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer .disclaimer {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 640px;
  margin-top: 18px;
}

/* ---------- helpers ---------- */

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 28px; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* testimonial stars */
.stars { color: var(--accent); letter-spacing: 2px; font-size: 0.95rem; }

/* step number circle (How it works) */
.step-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

/* price card */
.price-card {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.price-was {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1.3rem;
}

.price-now {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 52px 0; }
  .hero-inner { padding: 64px 20px 72px; }

  .nav-links a:not(.btn) { display: none; }

  table.table { display: block; overflow-x: auto; }
}
