/* ==========================================================================
   HeyDad brand system
   Palette + wordmark taken from the HeyDad brand guide:
   Brown #2A2119, Yellow #FFD640, Sand #EBE8DB
   ========================================================================== */

:root {
  --brown: #2A2119;
  --brown-soft: #4a3f34;
  --yellow: #FFD640;
  --yellow-deep: #E8BE1E;
  --sand: #EBE8DB;
  --sand-light: #F7F5EE;
  --white: #FFFFFF;
  --text-body: #2A2119;
  --text-muted: #6b6153;
  --success: #4a7a5a;
  --danger: #b3452e;

  --font-display: 'Baloo 2', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 30px rgba(42, 33, 25, 0.08);
  --shadow-card: 0 4px 16px rgba(42, 33, 25, 0.06);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--sand-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--brown);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; color: var(--text-body); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-soft);
  opacity: 0.7;
  margin-bottom: 10px;
  display: block;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---- Logo ---- */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img { height: 32px; width: auto; display: block; }
.logo-img--lg { height: 48px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--yellow);
  color: var(--brown);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { box-shadow: var(--shadow-soft); }
.btn-dark {
  background: var(--brown);
  color: var(--yellow);
}
.btn-dark:hover { background: #3a3025; }
.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 1.5px solid var(--brown);
}
.btn-outline:hover { background: var(--brown); color: var(--yellow); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---- Nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 238, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(42, 33, 25, 0.08);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a { text-decoration: none; font-weight: 600; color: var(--brown-soft); font-size: 0.95rem; }
.nav-links a:hover { color: var(--brown); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---- Hero ---- */
.hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--sand-light) 0%, var(--sand) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { margin-top: 14px; font-size: 0.9rem; color: var(--text-muted); }
.hero-art {
  background: var(--brown);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-art::before {
  content: '';
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border: 2px dashed rgba(255, 214, 64, 0.45);
  border-radius: 50%;
}
.hero-art-icon { width: 34%; height: auto; position: relative; }

/* ---- Sections ---- */
section { padding: 72px 0; }
.section-sand { background: var(--sand); }
.section-brown { background: var(--brown); color: var(--sand-light); }
.section-brown h2, .section-brown h3 { color: var(--white); }
.section-brown p { color: rgba(235, 232, 219, 0.8); }
.section-head { max-width: 680px; margin-bottom: 44px; }

/* ---- Stat cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--brown);
  margin-bottom: 6px;
}
.stat-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

/* ---- Feature cards ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.feature-card .icon-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.badge-soon {
  position: absolute; top: 20px; right: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--brown-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---- Segments ---- */
.segment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .segment-grid { grid-template-columns: 1fr; } }
.segment-card {
  background: var(--sand-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.segment-photo {
  height: 160px;
  background-size: cover;
  background-position: center;
}
.segment-card .segment-body { padding: 22px; }
.segment-card h3 { margin-bottom: 8px; }
.segment-card p { font-size: 0.95rem; }

/* ---- How it works (steps) ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step-card { position: relative; padding-left: 8px; }
.step-number {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brown);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--brown);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: var(--white);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(235, 232, 219, 0.85); }
@media (max-width: 600px) { .cta-band { padding: 36px 22px; } }

/* ---- Footer ---- */
footer {
  background: var(--brown);
  color: rgba(235, 232, 219, 0.7);
  padding: 48px 0 28px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.footer-links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: rgba(235, 232, 219, 0.75); font-size: 0.9rem; }
.footer-links a:hover { color: var(--yellow); }
.footer-bottom { font-size: 0.82rem; opacity: 0.7; border-top: 1px solid rgba(235,232,219,0.15); padding-top: 20px; }

/* ---- Forms (auth + dashboard) ---- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 40px 36px;
}
.auth-card .logo { margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--brown-soft);
}
.field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(42, 33, 25, 0.15);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--sand-light);
}
.field input:not([type="checkbox"]):not([type="radio"]):focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--yellow-deep);
  background: var(--white);
}
.field input[type="checkbox"], .field input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brown);
}
.field label.field-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}
.field-checkbox-label a { color: var(--brown); font-weight: 600; }
.auth-toggle { text-align: center; margin-top: 18px; font-size: 0.92rem; color: var(--text-muted); }
.auth-toggle a { font-weight: 700; color: var(--brown); text-decoration: underline; cursor: pointer; }
.form-msg { font-size: 0.9rem; margin-top: 4px; min-height: 1.2em; }
.form-msg.error { color: var(--danger); }
.form-msg.success { color: var(--success); }

/* ---- Dashboard ---- */
.dash-shell { min-height: 100vh; background: var(--sand-light); }
.dash-header {
  background: var(--white);
  border-bottom: 1px solid rgba(42,33,25,0.08);
}
.dash-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
.dash-main { padding: 40px 0 80px; }
.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 24px;
}
.card h3 { margin-bottom: 6px; }
.card .card-sub { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }

.recorder {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.record-btn {
  width: 76px; height: 76px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}
.record-btn.is-recording { animation: pulse 1.4s infinite; background: #8a2f1e; }
.record-btn:hover { transform: scale(1.04); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(179, 69, 46, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(179, 69, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(179, 69, 46, 0); }
}
.record-status { font-weight: 600; color: var(--brown-soft); }
.record-timer { font-family: var(--font-display); font-size: 1.4rem; color: var(--brown); }

.consent-box {
  background: var(--sand-light);
  border: 1.5px dashed rgba(42,33,25,0.2);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.consent-box label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--brown); cursor: pointer; }
.consent-box input[type="checkbox"] { margin-top: 3px; }

.recording-list { list-style: none; margin: 0; padding: 0; }
.recording-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(42,33,25,0.08);
}
.recording-list li:last-child { border-bottom: none; }
.recording-meta { font-size: 0.85rem; color: var(--text-muted); }

.invite-row { display: flex; gap: 10px; margin-bottom: 12px; }
.invite-row select { flex: 0 0 110px; }
.invite-row input { flex: 1; }
.family-list { list-style: none; padding: 0; margin: 0; }
.family-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid rgba(42,33,25,0.06);
  font-size: 0.92rem;
}
.status-pill {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 999px;
}
.status-pill.pending { background: #f4e6c8; color: #8a5a1e; }
.status-pill.sent { background: #dbe9f7; color: #2c5c8a; }
.status-pill.accepted { background: #dcefe0; color: #2f6b41; }

.hidden { display: none !important; }

/* ---- Grid-3 (loop / live-today) ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---- Loop connectors ---- */
.loop-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
}
.loop-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--yellow-deep);
  font-family: var(--font-display);
}
@media (max-width: 860px) {
  .loop-grid { grid-template-columns: 1fr; }
  .loop-arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* ---- Live badge ---- */
.badge-live {
  position: absolute; top: 20px; right: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--brown);
  color: var(--yellow);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---- Inline "Coming Soon" badge (for sections without a card wrapper) ---- */
.badge-soon-inline {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--brown-soft);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---- Pills (mission / gamification chips) ---- */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 214, 64, 0.12);
  border: 1px solid rgba(255, 214, 64, 0.35);
  color: var(--sand-light);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 999px;
}

/* ---- Tagline statement (heartstring line) ---- */
.tagline-statement,
.section-brown p.tagline-statement {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.35;
  color: var(--yellow);
  max-width: 640px;
  margin: 20px auto 8px;
}

/* ---- Trust grid ---- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 720px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow-card);
}
.trust-card .icon-badge { margin-bottom: 0; flex: 0 0 auto; }
.trust-card p { margin: 0; }
