/* ===== SOLUNA SLEEP — GLOBAL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --cream:      #F5EDE0;
  --cream-dark: #EDE0CC;
  --gold:       #B8860B;
  --gold-light: #D4930A;
  --gold-deep:  #8B6508;
  --gold-pale:  #FDF3DC;
  --terra:      #C4673A;
  --terra-soft: #D9896A;
  --charcoal:   #2D2824;
  --ink:        #1A1614;
  --muted:      #7A7168;
  --sage:       #7A9E7E;
  --sage-light: #B2CEB5;
  --white:      #FDFAF5;
  --card-bg:    #FAF5EC;
  --border:     #E2D5BF;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink);
  line-height: 1.25;
}

/* ===== NAV ===== */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}
.nav-logo-svg {
  width: 40px;
  height: 40px;
}
/* Navbar logo — SVG has true transparency, no clipping needed */
.logo-circle-wrap {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(184,134,11,0.2));
}
.logo-circle-wrap img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}
/* Hero logo — mix-blend-mode:multiply blends any white pixels into the cream bg */
/* filter removed from wrapper — it blocks mix-blend-mode on children */
.hero-logo-wrap {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.hero-logo-wrap img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.nav-logo-tag {
  font-size: 0.62rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--charcoal);
}
@media (max-width: 720px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 24px 20px; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
}

/* ===== LAYOUT ===== */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 780px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ===== MAIN CARD ===== */
.main-card {
  background: var(--white);
  border-radius: 24px;
  padding: 40px 40px 48px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}
@media (max-width: 560px) { .main-card { padding: 28px 20px 36px; } }

.eyebrow {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1.5px solid var(--gold-light);
  border-radius: 99px;
  padding: 4px 14px;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
}

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--white);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}
.sidebar-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.83rem;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav li a:hover { background: var(--gold-pale); color: var(--gold); }
.sidebar-nav li a.active { background: var(--gold-pale); color: var(--gold); font-weight: 500; }
.sidebar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

/* ===== AD PLACEHOLDER ===== */
.ad-wrap {
  background: var(--cream-dark);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--border);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}
.ad-wrap ins { display: block; }

/* ===== CALCULATOR FORMS ===== */
.calc-form { margin: 28px 0; }
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-end;
}
.form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.form-group label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.form-group input,
.form-group select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.calc-btn {
  background: var(--gold);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.calc-btn:hover { background: var(--gold-deep); color: var(--white); transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }

/* ===== RESULTS ===== */
.results { display: none; margin-top: 28px; }
.results.show { display: block; }
.results-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.result-card {
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
}
.result-card.best {
  background: linear-gradient(135deg, var(--gold-pale) 0%, #FDEFD4 100%);
  border-color: var(--gold);
  box-shadow: 0 4px 18px rgba(201,168,76,0.18);
}
.result-cycles {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}
.result-time {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--ink);
  font-weight: 700;
}
.result-duration {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
}
.result-best-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--white);
  border-radius: 99px;
  padding: 3px 10px;
  margin-top: 8px;
}
.result-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
  border-left: 3px solid var(--gold-light);
}

/* ===== HOMEPAGE HERO ===== */
.hero {
  text-align: center;
  padding: 60px 20px 48px;
  background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(184,134,11,0.13);
  /* Center using margin:auto — immune to scrollbar-width offset */
  top: 50%;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(184,134,11,0.10);
  top: 50%;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-logo {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.hero-tagline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--muted);
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 32px;
  text-align: center;
  width: 100%;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}
.stars-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 20px 0;
  opacity: 0.35;
}
.stars-row svg { width: 14px; height: 14px; fill: var(--gold); }

/* ===== CARD GRID (homepage) ===== */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 32px 0;
}
.calc-card {
  display: block;
  text-decoration: none;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.calc-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(201,168,76,0.14);
  transform: translateY(-2px);
}
.calc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.calc-card h2 {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}
.calc-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  font-family: 'Inter', sans-serif;
}
.calc-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 14px;
  letter-spacing: 0.04em;
  font-family: 'Inter', sans-serif;
}

/* ===== FAQ ===== */
.faq { margin-top: 40px; }
.faq h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--ink);
}
.faq-item {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.faq-q::after {
  content: '+';
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  font-family: 'Inter', sans-serif;
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* ===== DIVIDER ===== */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0;
  color: var(--gold-light);
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.ornament-divider span {
  font-size: 0.9rem;
  color: var(--gold-light);
  flex-shrink: 0;
}

/* ===== FOOTER ===== */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
}

/* ===== CIRCADIAN WHEEL ===== */
.wheel-wrap {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}
.wheel-wrap svg { max-width: 520px; width: 100%; height: auto; }

/* ===== INFO PAGE ===== */
.info-section { margin-bottom: 32px; }
.info-section h2 { font-size: 1.25rem; margin-bottom: 12px; }
.info-section p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  font-family: 'Inter', sans-serif;
  margin-bottom: 10px;
}
.info-section ul {
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 2;
  font-family: 'Inter', sans-serif;
}

/* ===== BEDTIME TABLE ===== */
.bedtime-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: 'Inter', sans-serif;
}
.bedtime-table th {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.bedtime-table td {
  padding: 13px 14px;
  font-size: 0.88rem;
  color: var(--charcoal);
  border-bottom: 1px solid var(--border);
}
.bedtime-table tr:hover td { background: var(--gold-pale); }
.bedtime-table .time-col {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
}
.badge-gold { background: var(--gold-pale); color: var(--gold); border: 1px solid var(--gold-light); }
.badge-sage { background: #EBF3EC; color: var(--sage); border: 1px solid var(--sage-light); }
.badge-terra { background: #FDEEE8; color: var(--terra); border: 1px solid #EDBB9E; }
