/* ============================================================
   chunky.baby — Warm Peach/Terracotta & 3 AM Nursery Theme
   ============================================================ */

:root {
  --bg: #fdf8f3;
  --bg-tinted: #f5ebe1;
  --surface: #ffffff;
  --surface-alt: #fbf5ef;
  --border: #e8d9cb;
  --text: #2a211c;
  --text-muted: #68584e;
  --accent: #c05e3c;
  --accent-hover: #a14b2d;
  --accent-soft: #fae9e2;
  --alt: #3d7564;
  --alt-soft: #e3f2ec;
  --shadow: 0 10px 28px rgba(42, 33, 28, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "Hiragino Maru Gothic ProN", Quicksand, -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="night"] {
  --bg: #171210;
  --bg-tinted: #201916;
  --surface: #271f1b;
  --surface-alt: #312722;
  --border: #43352e;
  --text: #efe3d8;
  --text-muted: #b7a497;
  --accent: #e58a68;
  --accent-hover: #f0a184;
  --accent-soft: #3a241c;
  --alt: #77b5a1;
  --alt-soft: #1f332d;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.1rem;
}

.brand-dot {
  color: var(--accent);
}

.main-nav {
  display: none;
  gap: 1.25rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
}

.main-nav a:hover {
  color: var(--accent);
}

.night-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.night-toggle:hover {
  border-color: var(--accent);
}

/* Hero */
.hero {
  padding: 3.4rem 0 2.6rem;
  text-align: center;
}

.hero-inner {
  max-width: 700px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin: 0 auto 1.7rem;
  max-width: 580px;
  color: var(--text-muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.78rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="night"] .btn-primary {
  color: #1c100b;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* Sections */
.section {
  padding: 3.1rem 0;
}

.section-tinted {
  background: var(--bg-tinted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 640px;
}

/* Predictor */
.predictor-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.top-toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.segmented label {
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  padding: 0.38rem 0.85rem;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

.segmented input:checked + span {
  background: var(--accent);
  color: #fff;
}

[data-theme="night"] .segmented input:checked + span {
  color: #1c100b;
}

.field-group {
  margin-bottom: 1.25rem;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.field-row label,
.select-label {
  display: block;
  font-weight: 700;
  font-size: 0.94rem;
}

.select-label {
  margin-bottom: 0.4rem;
}

.field-val {
  font-weight: 800;
  color: var(--accent);
  font-size: 0.95rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.select-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
}

/* Results Card */
.vibe-badge-wrap {
  text-align: center;
  margin-bottom: 1.15rem;
}

.vibe-badge {
  display: inline-block;
  padding: 0.36rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
}

.percentile-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.pct-box {
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  text-align: center;
}

.pct-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pct-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin: 0.2rem 0 0.5rem;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.bar-fill-alt {
  background: var(--alt);
}

.now-size-box {
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--alt-soft);
  border: 1px solid color-mix(in srgb, var(--alt) 25%, transparent);
  text-align: center;
  margin-bottom: 1rem;
}

.now-size-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--alt);
}

.now-size-val {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin: 0.2rem 0 0.35rem;
}

.fit-advice {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.disclaimer-mini {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* Season Grid */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.season-card {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.season-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.season-name {
  font-weight: 800;
  font-size: 1rem;
}

.season-when {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.season-size {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0.25rem 0;
}

.season-detail {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.registry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.registry-strip p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Kit */
.affiliate-disclosure {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1rem;
}

.kit-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.kit-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.kit-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.kit-cat {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kit-badge {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.kit-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.03rem;
  line-height: 1.3;
}

.kit-card p {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.kit-card .btn {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

/* FAQ */
.faq-container {
  max-width: 780px;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.2rem;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

.footer-brand p,
.footer-legal p {
  margin: 0.35rem 0;
}

.sibling-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.sibling-links a:hover {
  text-decoration: underline;
}

.footer-meta {
  margin-top: 0.85rem !important;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }

  .predictor-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .footer-inner {
    grid-template-columns: 1fr 2fr;
  }
}
