/* ============================================================
   Square Care Network — landing / waitlist page
   ============================================================ */

:root {
  /* the five brand colors — everything else on the page is a tint or shade of these */
  --cream: #FAF6EF;
  --beige: #E8D8C3;
  --sand: #C9B79C;
  --brown: #5C4636;
  --sage: #9CAF88;

  --bg: var(--cream);
  --bg2: var(--beige);
  --card: #ffffff;
  --ink: var(--brown);
  --ink-soft: #8a7660;
  --line: #ecdfc9;
  --brown-dark: #46352a;
  --sage-dark: #7e9468;
  --sage-tint: #eef2e6;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(70, 53, 42, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .logo {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(rgba(250, 246, 239, 0.92), rgba(250, 246, 239, 0));
  pointer-events: none;
}
.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.topbar .logo, .topbar .btn { pointer-events: auto; }
.logo {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo b { font-weight: 700; }
.logo-icon { width: 26px; height: 26px; flex-shrink: 0; }

/* ---------- svg icon defaults ---------- */
svg.card-icon, svg.join-icon, svg.success-icon, svg.badge-icon, svg.inline-heart, svg.urgent-icon { display: inline-block; }
.card-icon { width: 50px; height: 50px; margin-bottom: 14px; }
.pillar:hover .card-icon { transform: scale(1.08); transition: transform 0.25s ease; }

/* ---------- buttons ---------- */
.btn {
  border: 0;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn.tiny { padding: 9px 18px; font-size: 0.85rem; background: var(--brown); color: var(--cream); }
.btn.primary {
  background: var(--brown);
  color: var(--cream);
  padding: 15px 28px;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(70, 53, 42, 0.28);
}
.btn.primary:hover { background: var(--brown-dark); }
.btn.primary.big { padding: 17px 34px; font-size: 1.08rem; }
.btn.ghost { background: transparent; color: var(--ink-soft); padding: 15px 20px; }

/* ============================================================
   HERO — full-screen film; the baby wakes up on its own
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

/* the sleeping line — floats over the top of the film, drifts away on wake */
.hero-copy {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 76px);
  left: 0; right: 0;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.hero.awake .hero-copy {
  opacity: 0;
  transform: translateY(-14px);
}
.hero-title {
  font-size: clamp(1.8rem, 5.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: pre-line; /* the typed text carries its own line break */
  min-height: 2.3em;     /* reserve both lines so typing doesn't shift layout */
  text-shadow:
    0 0 22px rgba(250, 246, 239, 0.95),
    0 2px 32px rgba(250, 246, 239, 0.85);
}
.hero-sub {
  color: var(--brown);
  font-size: clamp(1rem, 2.7vw, 1.25rem);
  font-weight: 600;
  margin-top: 10px;
  min-height: 1.5em;
  text-shadow: 0 0 16px rgba(250, 246, 239, 0.95);
}

/* the typing caret */
.caret {
  display: inline-block;
  width: 0.09em;
  height: 1em;
  margin-left: 0.08em;
  vertical-align: -0.08em;
  background: var(--sage-dark);
  border-radius: 2px;
  animation: caretblink 1s steps(2, start) infinite;
}
@keyframes caretblink { 50% { opacity: 0; } }

/* text that rises out of the film once the baby is awake */
.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 26px 22px calc(env(safe-area-inset-bottom) + 86px);
  background: linear-gradient(180deg, rgba(35, 18, 30, 0) 52%, rgba(35, 18, 30, 0.66) 100%);
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
}
.hero.awake .stage-overlay { opacity: 1; }
.stage-overlay h2 {
  color: #fff;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-shadow: 0 2px 18px rgba(35, 18, 30, 0.5);
  transform: translateY(14px);
  transition: transform 1.1s ease;
}
.stage-overlay em { font-style: normal; color: #cfe3ba; }
.stage-overlay p {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.6vw, 1.2rem);
  margin-top: 10px;
  text-shadow: 0 1px 10px rgba(35, 18, 30, 0.55);
  transform: translateY(14px);
  transition: transform 1.1s ease;
}
.hero.awake .stage-overlay h2,
.hero.awake .stage-overlay p { transform: translateY(0); }

/* the baby — real footage filling the whole hero */
.baby-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #f3e2d3;
}
#baby-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
/* faint warm vignette so the film blends with the page's ivory world */
.baby-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(250, 246, 239, 0.35);
}

/* scroll hint — appears over the film once the baby is awake */
.scroll-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 3;
  opacity: 0;
  transition: opacity 1s ease 0.5s;
  animation: hintbob 1.8s ease-in-out infinite;
  text-shadow: 0 1px 8px rgba(35, 18, 30, 0.5);
  pointer-events: none;
}
.hero.awake .scroll-hint { opacity: 1; }
.hint-chevron { font-size: 1.5rem; line-height: 0.6; color: #cfe3ba; }
@keyframes hintbob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.content { position: relative; z-index: 4; background: var(--bg); }

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4.4vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  padding: 0 24px;
}
.section-title em { font-style: italic; color: var(--sage-dark); }
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 10px;
  padding: 0 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* urgent matching banner */
.urgent { background: var(--brown); }
.urgent-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  text-align: center;
}
.urgent-icon { width: 20px; height: 20px; flex-shrink: 0; }
.urgent-inner span { color: var(--cream); font-weight: 500; font-size: 0.92rem; }
.urgent-inner span b { color: var(--sage); font-weight: 700; }
.urgent-link {
  background: transparent;
  border: 0;
  color: var(--sage);
  font-weight: 700;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px;
}
.urgent-link:hover { color: var(--cream); }

/* offer */
.offer { padding: 60px 20px 20px; display: grid; place-items: center; }
.offer-card {
  max-width: 640px;
  text-align: center;
  background:
    radial-gradient(ellipse 120% 100% at 50% -30%, var(--sage-tint) 0%, #ffffff 60%);
  border: 2px solid var(--beige);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 44px 30px 34px;
  position: relative;
}
.offer-badge {
  position: absolute;
  top: -17px; left: 50%;
  transform: translateX(-50%);
  background: var(--brown);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(70, 53, 42, 0.35);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.badge-icon { width: 20px; height: 20px; }
.offer-card h2 { font-size: clamp(1.35rem, 4vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
.offer-card h2 b { color: var(--sage-dark); font-style: italic; }
.offer-card p { color: var(--ink-soft); font-weight: 500; margin: 12px 0 22px; line-height: 1.55; }
.offer-fine { font-size: 0.82rem !important; margin: 14px 0 0 !important; opacity: 0.8; }

/* four pillars */
.pillars { padding: 90px 20px 20px; max-width: 1040px; margin: 0 auto; }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 620px) { .pillars-grid { grid-template-columns: 1fr; } }
.pillar {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 26px 28px;
}
/* corner brackets — the "four corners" mark, echoed on every one of the four pillars */
.pillar::before, .pillar::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--sage);
  opacity: 0.8;
}
.pillar::before {
  top: 12px; left: 12px;
  border-right: 0; border-bottom: 0;
  border-radius: 6px 0 0 0;
}
.pillar::after {
  bottom: 12px; right: 12px;
  border-left: 0; border-top: 0;
  border-radius: 0 0 6px 0;
}
.pillar h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.005em; }
.pillar p { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; line-height: 1.6; }

/* ============================================================
   WAITLIST FORM
   ============================================================ */
.join { padding: 96px 20px 90px; display: grid; place-items: center; }
.join-card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(70, 53, 42, 0.16);
  padding: 38px 28px 32px;
}
.join-head { text-align: center; margin-bottom: 26px; }
.join-icon { width: 52px; height: 52px; margin-bottom: 8px; }
.join-head h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.join-head p { color: var(--ink-soft); font-weight: 500; margin-top: 6px; font-size: 0.95rem; }

.dots { display: flex; justify-content: center; gap: 7px; margin-top: 18px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.25s ease, transform 0.25s ease;
}
.dot.on { background: var(--sage-dark); transform: scale(1.25); }

.step h3 {
  font-size: 1.12rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}
.step { animation: stepin 0.35s ease; }
@keyframes stepin {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

.lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: #fffdfb;
  outline: none;
  -webkit-appearance: none;
}
input:focus { border-color: var(--sage-dark); background: #fff; }

.soft-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  margin-top: 14px;
}

.pick-grid { display: grid; gap: 12px; }
.pick-grid.two { grid-template-columns: 1fr 1fr; }
.pick-grid.four { grid-template-columns: 1fr 1fr; }
@media (min-width: 480px) { .pick-grid.four { grid-template-columns: repeat(4, 1fr); } }

.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 18px 10px 14px;
  background: #fffdfb;
  border: 2px solid var(--line);
  border-radius: 18px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.pick:hover { border-color: var(--sand); }
.pick:active { transform: scale(0.97); }
.pick.selected { border-color: var(--sage-dark); background: var(--sage-tint); }
.pick-icon { width: 52px; height: 52px; }
.pick-icon.expecting {
  position: relative;
  display: inline-block;
}
.pick-icon.expecting > svg:first-child { width: 100%; height: 100%; }
.pick-icon.expecting .mini-heart {
  position: absolute;
  top: -6px; right: -10px;
  width: 22px; height: 22px;
}
.baby-row { display: flex; align-items: center; justify-content: center; height: 40px; }
.baby-row svg { width: 30px; height: 30px; }
.baby-row svg + svg { margin-left: -10px; }
.pick-label { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.pick-sub { font-weight: 500; font-size: 0.76rem; color: var(--ink-soft); }

.form-error {
  text-align: center;
  color: #d64550;
  background: #fdeaec;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  margin-top: 16px;
}

.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.form-nav .btn.primary { flex: 1; }

/* success */
.success { text-align: center; padding: 12px 4px 4px; animation: stepin 0.4s ease; }
.success-icon { width: 72px; height: 72px; margin-bottom: 10px; }
.success h2 { font-size: 1.5rem; font-weight: 700; }
.success p { color: var(--ink-soft); font-weight: 500; line-height: 1.6; margin-top: 12px; }
.success b { color: var(--sage-dark); }

/* confetti — little svg hearts, bows and dots */
.confetti {
  position: fixed;
  top: -40px;
  z-index: 99;
  pointer-events: none;
  animation: fall linear forwards;
}
.confetti svg { display: block; width: 100%; height: 100%; }
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.7; }
}

/* footer */
.footer {
  text-align: center;
  padding: 40px 20px calc(env(safe-area-inset-bottom) + 40px);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.9rem;
}
.footer .logo { display: inline-flex; margin-bottom: 8px; color: var(--ink); }
.footer p { display: flex; align-items: center; justify-content: center; gap: 5px; }
.inline-heart { width: 18px; height: 18px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
