/* ============================================================
   Twice Upon a Time — pre-launch site styles
   Warm, playful children's-book brand. Mobile-first, vanilla CSS.
   Palette: cream / coral / teal / golden
   ============================================================ */

:root {
  --cream: #FDF8EF;
  --cream-2: #F7EDDA;
  --cream-3: #F1E3CB;
  --ink: #37312A;
  --ink-soft: #6E6459;
  --coral: #E76F51;
  --coral-deep: #BC4E33;
  --teal: #2A9D8F;
  --teal-deep: #1D766B;
  --gold: #E9A93C;
  --gold-soft: #F7DFAE;
  --white: #FFFFFF;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(55, 49, 42, 0.10);
  --shadow-sm: 0 4px 14px rgba(55, 49, 42, 0.08);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --max-w: 1080px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-deep); }
a:hover { color: var(--coral-deep); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
p { margin-bottom: 1rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: min(var(--max-w), 100% - 2.5rem); margin-inline: auto; }
section { padding: 3.5rem 0; }
.section-alt { background: var(--cream-2); border-block: 1px solid var(--cream-3); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 248, 239, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--cream-3);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; font-weight: bold; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.nav-toggle {
  display: none; background: none; border: 2px solid var(--cream-3); border-radius: 10px;
  padding: 0.45rem 0.65rem; font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.site-nav ul { display: flex; align-items: center; gap: 0.25rem; list-style: none; padding: 0; }
.site-nav a {
  display: block; padding: 0.55rem 0.8rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.98rem;
}
.site-nav a:hover { background: var(--cream-2); color: var(--coral-deep); }
.site-nav a[aria-current="page"] { background: var(--teal); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.85rem 1.7rem; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 18px rgba(231, 111, 81, 0.35); }
.btn-primary:hover { color: #fff; background: var(--coral-deep); }
.btn-secondary { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(42, 157, 143, 0.3); }
.btn-secondary:hover { color: #fff; background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--cream-3); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral-deep); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.92rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 5.5rem; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-eyebrow {
  display: inline-block; background: var(--gold-soft); color: #7A5410; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 0.4rem 1rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }
.hero-note { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.9rem; }
.hero-art { position: relative; }
.cloud { position: absolute; opacity: 0.9; }
.star { position: absolute; }

/* Placeholder for future book art — clearly labeled, never a fake cover */
.art-placeholder {
  border: 3px dashed var(--cream-3); border-radius: var(--radius);
  background: var(--white); padding: 3rem 2rem; text-align: center; color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.art-placeholder .art-icon { font-size: 2.6rem; margin-bottom: 0.6rem; }
.art-placeholder strong { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin-bottom: 0.3rem; }
.art-placeholder p { font-size: 0.95rem; margin: 0; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.4rem; margin-top: 2rem; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 1.8rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--cream-3);
}
.card .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 0.9rem;
}
.card:nth-child(2) .step-num { background: var(--coral); }
.card:nth-child(3) .step-num { background: var(--gold); }
.card p:last-child { margin-bottom: 0; }
.card-icon { font-size: 2rem; margin-bottom: 0.7rem; }

/* ---------- Feature band ---------- */
.band {
  border-radius: var(--radius); padding: 2.5rem;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff; box-shadow: var(--shadow); margin: 1rem 0;
}
.band h2, .band h3 { color: #fff; }
.band p { color: rgba(255,255,255,0.92); }
.band a { color: var(--gold-soft); font-weight: 700; }
.band-coral { background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%); }

/* ---------- Waitlist / forms ---------- */
.waitlist { text-align: center; max-width: 40rem; margin: 0 auto; }
.waitlist-form { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.waitlist-form label { position: absolute; left: -9999px; }
.waitlist-form input[type="email"] {
  flex: 1; padding: 0.85rem 1.2rem; border-radius: 999px; border: 2px solid var(--cream-3);
  font-size: 1rem; font-family: inherit; background: #fff; min-width: 0;
}
.waitlist-form input[type="email"]:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(42,157,143,0.2); }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.7rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; margin: 2rem auto 0; text-align: left; }
.faq details {
  background: var(--white); border: 1px solid var(--cream-3); border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem; margin-bottom: 0.8rem; box-shadow: var(--shadow-sm);
}
.faq summary { font-weight: 700; cursor: pointer; font-family: var(--font-display); font-size: 1.08rem; }
.faq summary::marker { color: var(--coral); }
.faq details p { margin: 0.7rem 0 0; color: var(--ink-soft); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.88rem; color: var(--ink-soft); padding: 1.2rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--cream-3); }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding: 3rem 0 1rem; }
.page-hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 38rem; }

/* ---------- Two-column ---------- */
.split { display: grid; gap: 2.2rem; align-items: start; margin-top: 2rem; }

/* ---------- Checklist / ticks ---------- */
.ticks { list-style: none; padding: 0; margin: 1rem 0; }
.ticks li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 800; }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; }
.post-meta { font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 0.5rem; }
.post-body { max-width: 44rem; margin: 0 auto; }
.post-body h2 { margin-top: 2.2rem; }
.post-body ul, .post-body ol { margin: 0 0 1rem 1.4rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body blockquote {
  border-left: 4px solid var(--gold); background: var(--white); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.4rem; margin: 1.6rem 0; font-style: italic; color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #EDE6DA; margin-top: 3rem; padding: 3rem 0 2rem; }
.site-footer a { color: var(--gold-soft); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin-bottom: 0.4rem; }
.footer-tag { font-size: 0.95rem; color: #CFC4B4; max-width: 22rem; }
.footer-nav h3 { color: #fff; font-size: 1rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.8rem; }
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav li { margin-bottom: 0.45rem; }
.footer-bottom { border-top: 1px solid #4A443C; margin-top: 2.2rem; padding-top: 1.4rem; font-size: 0.85rem; color: #A99E8E; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.kicker { color: var(--coral-deep); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; margin-bottom: 0.5rem; }
.divider-wave { display: block; width: 100%; height: 60px; margin-bottom: -1px; }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.6rem 0 1rem; }
  .site-nav a { padding: 0.7rem 0.4rem; }
  .header-inner { flex-wrap: wrap; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form .btn { width: 100%; }
  section { padding: 2.5rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
