:root {
  --page: #F8F6F4;
  --panel: #F3EEE6;
  --ink: #232B24;
  --muted: #6E6960;
  --eyebrow: #8A7250;
  --accent: #EBE2D5;
  --accent2: #FFF6C4;
  --hl-bg: #FFF6C4;
  --hl-color: #232B24;
  --about-bg: radial-gradient(120% 120% at 15% 12%, #FFF6C4 0%, #E4DCF7 60%, #C3B4EE 100%);
  --about-border: rgba(43, 39, 36, 0.08);

  --title-font: 'Manrope', sans-serif;
  --title-weight: 500;
  --title-spacing: -0.035em;
  --card-title-weight: 500;
  --body-font: 'Albert Sans', sans-serif;
  --body-weight: 300;

  /* --tau-font was used by the disabled Cyrillic-lookalike letterform
     treatment below (.tau-char / .cap-n). Left out of :root on purpose
     now that nothing references it. */
}

* { box-sizing: border-box; }

h1, h2, h3, p { margin: 0; }

html { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--page);
  font-family: var(--body-font);
  font-weight: var(--body-weight);
  color: var(--ink);
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.nav-bar {
  width: min(1080px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(35, 43, 36, 0.08);
  box-shadow: 0 8px 32px rgba(35, 43, 36, 0.06);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

nav.links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 16px;
  padding: 10px 25px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { background: var(--ink); color: #FFFFFF; }

.btn-outline-lg {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 18px;
  padding: 17px 43px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline-lg:hover { background: var(--ink); color: #FFFFFF; }

.btn-solid {
  display: inline-block;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 17px;
  padding: 15px 40px;
  border-radius: 999px;
  cursor: pointer;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
  padding: 190px 40px 120px;
}

.hero-title {
  font-family: var(--title-font);
  font-size: clamp(48px, 9vw, 108px);
  font-weight: var(--title-weight);
  line-height: 1.05;
  letter-spacing: var(--title-spacing);
  color: var(--ink);
  max-width: 1060px;
  text-wrap: balance;
}
.drop-cap { font-size: 0.7273em; font-weight: 800; }

/* Disabled: .tau-char and .cap-n supported a brand letterform treatment
   (literal Cyrillic-lookalike characters substituted for "t"/"b", plus a
   mid-word capital "N" for "n") that was implemented incorrectly, as a
   text-content hack rather than a font feature. Rolled back to plain
   Latin text sitewide. Not deleted so intent/history is visible if this
   is revisited. A correct version should use OpenType stylistic-alternate
   glyphs via font-feature-settings (once the chosen typeface supports
   it), not character substitution. No markup currently references these.
.tau-char { font-family: var(--tau-font); }
.cap-n { font-size: 0.7273em; font-weight: 800; }
*/
.highlight {
  background: var(--hl-bg);
  color: var(--hl-color);
  padding: 0.02em 0.18em;
  border-radius: 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.cursive {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
}

.hero-sub {
  font-family: var(--body-font);
  font-size: 24px;
  font-weight: var(--body-weight);
  color: var(--muted);
  max-width: 580px;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 18px; align-items: center; margin-top: 8px; }

/* Waitlist — the button is replaced in place by a native email form on
   click, which posts to FormSubmit.co; see initInlineWaitlist() in
   main.js. */
.waitlist-slot { display: flex; flex-direction: column; align-items: center; }
.waitlist-slot.is-active { width: min(420px, 100%); }

.waitlist-form {
  display: flex;
  align-items: center;
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid rgba(35, 43, 36, 0.15);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  gap: 8px;
  box-shadow: 0 20px 50px rgba(35, 43, 36, 0.08);
}
.waitlist-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--ink);
}
.waitlist-input::placeholder { color: var(--muted); }
.waitlist-submit {
  flex: none;
  padding: 12px 24px;
  font-size: 15px;
}

.waitlist-status {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.waitlist-status.is-error { color: #C0392B; }
.waitlist-status--done {
  font-family: var(--title-font);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 0;
}

.about .waitlist-status { color: rgba(255, 255, 255, 0.85); }
.about .waitlist-status--done { color: #FFFFFF; }

.hero-visual { position: relative; width: min(1080px, 100%); margin-top: 170px; }

.hero-image {
  width: 100%;
  height: 580px;
  max-height: 60vh;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  background: #F2F0EA;
}
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(35, 43, 36, 0.07);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(35, 43, 36, 0.14);
  text-align: left;
}

.float-card--score {
  top: 48px;
  left: -24px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.score-ring { position: relative; width: 56px; height: 56px; flex: none; }
.score-ring svg circle:last-child { stroke: var(--accent2); }
.score-ring .score-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.float-card--score .title { font-size: 19px; font-weight: 600; }
.float-card--score .subtitle { font-size: 17px; font-weight: 400; color: var(--muted); }

.float-card--sleep {
  bottom: 56px;
  right: -28px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 210px;
}
.sleep-row { display: flex; justify-content: space-between; align-items: baseline; }
.sleep-label { font-size: 17px; font-weight: 500; color: var(--muted); }
.sleep-status { font-size: 17px; font-weight: 600; color: var(--eyebrow); }
.sleep-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.sleep-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.sleep-bars span { flex: 1; border-radius: 2px; background: #EDEAE2; }
.sleep-bars span.on { background: var(--accent2); }
.sleep-bars span.half { background: var(--accent2); opacity: 0.5; }

.float-card--dose {
  top: -22px;
  right: 120px;
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: 0 18px 44px rgba(35, 43, 36, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dose-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent2); }
.float-card--dose .title { font-size: 18px; font-weight: 600; }

/* Care section */
.care {
  padding: 260px 64px 200px;
  display: flex;
  flex-direction: column;
  gap: 110px;
  align-items: center;
}
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.eyebrow {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.section-title {
  font-family: var(--title-font);
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: var(--title-weight);
  color: var(--ink);
  letter-spacing: var(--title-spacing);
  max-width: 720px;
  line-height: 1.08;
  text-wrap: balance;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1120px;
  width: 100%;
}
.card {
  background: var(--panel);
  border: 1px solid rgba(35, 43, 36, 0.06);
  border-radius: 28px;
  padding: 48px 38px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(35, 43, 36, 0.06);
}
.card-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent2); }
.card-title {
  font-family: 'Manrope', sans-serif;
  font-weight: var(--card-title-weight);
  font-size: 24px;
  letter-spacing: -0.02em;
}
.card-copy {
  font-family: var(--body-font);
  font-size: 21px;
  font-weight: var(--body-weight);
  color: var(--muted);
  line-height: 1.65;
  text-wrap: balance;
}

/* Shop */
.shop {
  padding: 0 64px 240px;
  display: flex;
  justify-content: center;
}
.shop-inner {
  max-width: 1120px;
  width: 100%;
  display: flex;
  gap: 90px;
  align-items: center;
}
.shop-stage {
  flex: 1.1;
  position: relative;
  align-self: stretch;
  min-height: 520px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease;
  overflow: hidden;
  background: #EDEBE6;
}
.shop-collar {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  box-shadow: 0 30px 80px rgba(35, 43, 36, 0.22);
  transition: background 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-device {
  width: 118px;
  height: 118px;
  border-radius: 34px;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.25), 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: background 0.4s ease;
}
.shop-render-label {
  position: absolute;
  bottom: 22px;
  font-family: monospace;
  font-size: 12px;
  color: rgba(35, 43, 36, 0.35);
}
.stage-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--eyebrow);
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
}

.shop-media { flex: 1.1; display: flex; flex-direction: column; gap: 16px; }
.thumb-row { display: flex; gap: 14px; }
.thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--panel);
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-shape { width: 40%; height: 40%; border-radius: 50%; }

.shop-details { flex: 1; display: flex; flex-direction: column; gap: 26px; }
.shop-heading { display: flex; flex-direction: column; gap: 10px; }
.shop-title {
  font-family: var(--title-font);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: var(--title-weight);
  color: var(--ink);
  letter-spacing: var(--title-spacing);
  line-height: 1.08;
}
.shop-copy {
  font-family: var(--body-font);
  font-size: 22px;
  font-weight: var(--body-weight);
  color: var(--muted);
  line-height: 1.55;
  max-width: 440px;
}

.picker-group { display: flex; flex-direction: column; gap: 14px; }
.picker-label { font-family: var(--body-font); font-size: 15px; font-weight: 600; color: var(--ink); }
.picker-label .value { color: var(--muted); font-weight: 400; }

.swatches { display: flex; gap: 16px; }
.swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(35, 43, 36, 0.12);
  transition: box-shadow 0.2s ease;
  border: none;
  padding: 0;
}
.swatch.selected { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--ink); }

.finishes { display: flex; gap: 14px; }
.finish {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(35, 43, 36, 0.15) inset;
  transition: box-shadow 0.2s ease;
  border: none;
  background: none;
}
.finish.selected { box-shadow: 0 0 0 2px var(--ink) inset; }
.finish-swatch { width: 26px; height: 26px; border-radius: 50%; }
.finish-label { font-family: var(--body-font); font-size: 15px; font-weight: 500; color: var(--ink); }

.shop-cta { display: flex; align-items: center; gap: 22px; margin-top: 6px; }
.shop-cta .btn-solid { width: 100%; text-align: center; }

/* Shop page (dedicated) */
.shop-page-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 170px 40px 60px;
}

.type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.type-option {
  text-align: left;
  background: none;
  cursor: pointer;
  border: 1.5px solid rgba(35, 43, 36, 0.15);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.type-option.selected { border-color: var(--ink); border-width: 2px; }
.type-option-name { font-family: var(--body-font); font-weight: 700; font-size: 15px; color: var(--ink); }
.type-option-desc { font-family: var(--body-font); font-size: 13px; color: var(--muted); }

.size-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.sizing-guide-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--eyebrow);
  cursor: pointer;
}
.sizing-guide-link:hover { color: var(--ink); }

.size-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.size-option {
  text-align: center;
  background: none;
  cursor: pointer;
  border: 1.5px solid rgba(35, 43, 36, 0.15);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.size-option.selected { border-color: var(--ink); border-width: 2px; }
.size-option-name { font-family: var(--body-font); font-weight: 700; font-size: 14px; color: var(--ink); }
.size-option-range { font-family: var(--body-font); font-size: 11px; color: var(--muted); }

.sizing-guide-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 14px;
}
.sizing-guide-panel.open { display: flex; }
.sizing-guide-panel .row { display: flex; justify-content: space-between; color: var(--muted); }
.sizing-guide-panel .row strong { color: var(--ink); font-weight: 600; }

.feature-section {
  padding: 0 64px 200px;
  display: flex;
  justify-content: center;
}
.feature-grid {
  max-width: 1120px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.feature-card {
  background: var(--panel);
  border: 1px solid rgba(35, 43, 36, 0.06);
  border-radius: 24px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--accent2); }
.feature-title { font-family: 'Manrope', sans-serif; font-weight: var(--card-title-weight); font-size: 18px; }
.feature-copy { font-family: var(--body-font); font-size: 15px; color: var(--muted); line-height: 1.55; }

/* About */
.about-wrap { display: flex; justify-content: center; padding: 0 24px 160px; }
.about {
  width: min(1120px, 100%);
  background-color: #C3B4EE;
  background-image: url('../assets/images/gradient-b.png');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--about-border);
  border-radius: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
  padding: 150px 60px;
}
.about-title {
  font-family: var(--title-font);
  font-size: clamp(34px, 5vw, 60px);
  font-weight: var(--title-weight);
  color: #FFFFFF;
  letter-spacing: var(--title-spacing);
  line-height: 1.08;
  text-wrap: balance;
}
.about .btn-outline-lg { color: #FFFFFF; border-color: #FFFFFF; }
.about .btn-outline-lg:hover { background: rgba(255, 255, 255, 0.15); color: #FFFFFF; }

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 64px 60px;
  font-size: 16px;
  font-weight: 400;
  color: #8A857C;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: #8A857C; }
.footer-links a:hover { color: var(--ink); }

/* Responsive */

/* Tablet */
@media (max-width: 900px) {
  .care { padding: 160px 32px 120px; gap: 70px; }
  .card-grid { grid-template-columns: 1fr; }
  .shop { padding: 0 32px 160px; }
  .shop-inner { flex-direction: column; gap: 50px; align-items: stretch; }
  .shop-media { width: 100%; }
  .shop-stage { width: 100%; min-height: 400px; }
  .about { padding: 90px 32px; }
  .hero { padding: 150px 24px 90px; }
  .hero-visual { margin-top: 190px; }
  .feature-section { padding: 0 32px 140px; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* Mobile: collapse nav into a dropdown menu, stack hero badges */
@media (max-width: 760px) {
  header { top: 12px; padding: 0 16px; }
  .nav-bar {
    padding: 12px 16px;
    flex-wrap: wrap;
    position: relative;
    border-radius: 24px;
  }
  .nav-toggle { display: flex; }
  nav.links {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(35, 43, 36, 0.08);
  }
  nav.links.open { display: flex; }
  nav.links a {
    padding: 10px 6px;
    font-size: 16px;
  }
  nav.links .btn-outline {
    text-align: center;
    margin-top: 6px;
  }

  .hero { padding: 130px 20px 70px; gap: 24px; }
  .hero-sub { font-size: 19px; }
  .hero-visual { margin-top: 70px; }
  .hero-image { height: 380px; max-height: none; }
  .float-card { position: static; width: 100%; }
  .hero-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .float-card--sleep { min-width: 0; }

  .care { padding: 100px 20px 90px; gap: 48px; }
  .section-title { font-size: clamp(28px, 8vw, 40px); }

  .shop { padding: 0 20px 110px; }
  .shop-page-hero { padding: 130px 20px 40px; }
  .shop-title { font-size: clamp(28px, 8vw, 40px); }
  .shop-copy { font-size: 18px; max-width: none; }
  .thumb-row { gap: 10px; }
  .type-options { grid-template-columns: 1fr; }
  .size-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .size-option { padding: 10px 4px; }
  .size-option-range { font-size: 10px; }

  .feature-section { padding: 0 20px 100px; }
  .feature-grid { grid-template-columns: 1fr; gap: 16px; }

  .about-wrap { padding: 0 16px 100px; }
  .about { padding: 70px 24px; border-radius: 28px; gap: 22px; }

  footer { flex-direction: column; gap: 20px; padding: 40px 24px 60px; text-align: center; }
}

/* Small phones */
@media (max-width: 380px) {
  .hero-title { font-size: clamp(38px, 12vw, 56px); }
  .card { padding: 36px 26px; }
  .card-copy { font-size: 18px; }
  .size-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
