:root {
  --cream: #FBF4E6;
  --ink: #2B1E16;
  --coral: #F2735A;
  --mustard: #F2B83B;
  --blush: #F7C9B8;
  --sand: #E9DCC3;
  --white: #FFFFFF;
  --error: #A8321C;
  --link: #C24A30;
  --muted: #8A776A;
  --gutter: clamp(20px, 5vw, 64px);
  --display: 'Fredoka', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
}
a { color: var(--link); }
a:hover { color: var(--ink); }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 700; }
h2 { font-size: clamp(36px, 5vw, 52px); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.btn-dark { background: var(--ink); color: var(--cream); font-size: 15px; padding: 12px 20px; }
.btn-dark:hover { color: var(--cream); }
.btn-coral {
  background: var(--coral); color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 17px; padding: 14px 24px;
}
.btn-coral:hover { background: var(--mustard); color: var(--ink); }
.btn-coral:disabled { opacity: .7; cursor: wait; }
.btn-lg { padding: 16px 28px; border: none; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 26px;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-13 -13 126 126'%3E%3Cpath d='M0,0 H38 C28,-16 72,-16 62,0 H100 V38 C116,28 116,72 100,62 V100 H62 C72,84 28,84 38,100 H0 V62 C16,72 16,28 0,38 Z'/%3E%3C/svg%3E");
  width: 32px; height: 32px; background: var(--coral);
  -webkit-mask: var(--piece) center / contain no-repeat;
  mask: var(--piece) center / contain no-repeat;
  transform: rotate(-8deg);
}
.nav { display: flex; gap: 32px; font-weight: 700; font-size: 16px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--link); }
@media (max-width: 759px) { .nav { display: none; } }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(36px, 4vw, 56px);
  padding: clamp(16px, 3vw, 40px) var(--gutter) clamp(56px, 6vw, 80px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.badge {
  align-self: flex-start;
  background: var(--mustard);
  font-weight: 800; font-size: 14px;
  padding: 6px 14px; border-radius: 999px; letter-spacing: .02em;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
  line-height: .98; letter-spacing: -.01em; text-wrap: balance;
}
.lede {
  margin: 0; font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5; max-width: 500px; text-wrap: pretty;
}
.price-note { margin: 0; font-size: 15px; font-weight: 700; }

.hero-art { position: relative; height: clamp(340px, 52vw, 600px); }
.hero-art-back {
  position: absolute;
  inset: clamp(16px, 2.5vw, 30px) 0 0 clamp(20px, 3vw, 40px);
  background: var(--mustard); border-radius: 40px; transform: rotate(4deg);
}
.hero-art-frame {
  position: absolute;
  inset: 0 clamp(16px, 2.5vw, 30px) clamp(16px, 2.5vw, 30px) 0;
  border: 2px solid var(--ink); border-radius: 40px; overflow: hidden;
  background: var(--blush);
}

.hero-art-frame > svg,
.hero-art-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Signup card */
.signup-card {
  background: var(--white);
  border: 2px solid var(--ink); border-radius: 24px;
  padding: clamp(18px, 3vw, 24px);
  box-shadow: 6px 6px 0 var(--ink);
  scroll-margin-top: 24px;
}
#signup-form { display: flex; flex-direction: column; gap: 16px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 800; font-size: 14px; padding: 0; margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 10px 16px; border-radius: 999px;
  border: 2px solid var(--ink); cursor: pointer;
  background: var(--white); color: var(--ink);
}
.chips-sm .chip { font-size: 14px; padding: 8px 14px; }
.chip[aria-pressed="true"] { background: var(--mustard); }
.chip:focus-visible, .btn:focus-visible, input:focus-visible {
  outline: 3px solid var(--coral); outline-offset: 2px;
}

.email-row { display: flex; flex-wrap: wrap; gap: 10px; }
.email-row input {
  flex: 1 1 220px; min-width: 0;
  font-family: inherit; font-size: 17px;
  padding: 14px 18px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--cream); color: var(--ink);
  outline: none;
}
.email-row input::placeholder { color: var(--muted); }
.email-row .btn { flex: 1 1 auto; }
.form-error { margin: 0; font-size: 14px; font-weight: 700; color: var(--error); min-height: 1em; }
.form-error:empty { display: none; }

.done-title { font-family: var(--display); font-weight: 700; font-size: 30px; }
.done-msg { font-size: 17px; line-height: 1.5; }

/* Shared grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

/* How it works */
.how {
  background: var(--mustard);
  padding: clamp(56px, 7vw, 80px) var(--gutter);
  display: flex; flex-direction: column; gap: 40px;
}
.step {
  background: var(--cream);
  border: 2px solid var(--ink); border-radius: 28px;
  padding: 32px; display: flex; flex-direction: column; gap: 12px;
  font-size: 17px; line-height: 1.5;
}
.step-num {
  font-family: var(--display); font-weight: 700;
  font-size: 56px; color: var(--coral); line-height: 1;
}
.step-title { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; }

/* Themes */
.themes {
  padding: clamp(56px, 7vw, 88px) var(--gutter);
  display: flex; flex-direction: column; gap: 40px;
}
.themes-head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 16px 32px;
}
.themes-head span { font-size: 18px; max-width: 380px; line-height: 1.5; }
.theme-tile {
  border: 2px solid var(--ink); border-radius: 28px; overflow: hidden;
  display: flex; flex-direction: column;
}
.theme-art {
  height: 220px; border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  /* Placeholder art: a faint interlocking jigsaw grid behind a big emoji */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,0 H38 C28,-16 72,-16 62,0 H100 V38 C116,28 116,72 100,62 V100 H62 C72,84 28,84 38,100 H0 V62 C16,72 16,28 0,38 Z' fill='none' stroke='%232B1E16' stroke-opacity='.14' stroke-width='4'/%3E%3C/svg%3E");
  background-size: 64px 64px;
  background-position: center;
}
.theme-space .theme-art {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0,0 H38 C28,-16 72,-16 62,0 H100 V38 C116,28 116,72 100,62 V100 H62 C72,84 28,84 38,100 H0 V62 C16,72 16,28 0,38 Z' fill='none' stroke='%23FBF4E6' stroke-opacity='.16' stroke-width='4'/%3E%3C/svg%3E");
}
.theme-art img { width: 100%; height: 100%; object-fit: cover; }
.theme-emoji { font-size: 88px; line-height: 1; filter: drop-shadow(4px 4px 0 rgba(43, 30, 22, .18)); }
.theme-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.theme-name { font-family: var(--display); font-weight: 600; font-size: 26px; }

.age-levels { padding-top: 8px; }
.age-levels > div {
  display: flex; gap: 16px; align-items: baseline;
  border-top: 2px solid var(--ink); padding-top: 16px; font-size: 16px;
}
.age-levels strong { font-family: var(--display); font-weight: 700; font-size: 22px; white-space: nowrap; }

/* FAQ */
.faq {
  background: var(--blush);
  padding: clamp(56px, 7vw, 88px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.faq h2 { line-height: 1; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--cream);
  border: 2px solid var(--ink); border-radius: 20px; padding: 20px 24px;
}
.faq summary {
  list-style: none; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 21px;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 12px 0 0; font-size: 17px; line-height: 1.55; }

/* Footer */
.site-footer {
  background: var(--ink); color: var(--cream);
  padding: clamp(40px, 5vw, 56px) var(--gutter);
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
}
.footer-title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 40px); }
.footer-legal {
  flex-basis: 100%;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  font-size: 14px; opacity: .8;
}
.footer-legal a { color: var(--cream); }
.footer-legal a:hover { color: var(--mustard); }

/* Simple pages: thanks, privacy, 404 */
.page-simple { min-height: 100vh; display: flex; flex-direction: column; }
.simple-main {
  flex: 1;
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(56px, 7vw, 88px);
  display: flex; flex-direction: column; gap: 24px;
}
.thanks-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.thanks-card .done-msg { margin: 0; }
.thanks-share-label { margin: 12px 0 0; font-weight: 800; font-size: 15px; }
.share-status { margin: 0; font-size: 14px; font-weight: 700; min-height: 1em; }
.back-link { font-weight: 700; }

.legal { line-height: 1.6; font-size: 17px; }
.legal h1 { font-size: clamp(40px, 6vw, 56px); line-height: 1; }
.legal h2 { font-size: 26px; margin-top: 16px; }
.legal p, .legal ul { margin: 0; }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal-updated { font-weight: 700; opacity: .7; }
