/* ——— Mathy marketing page (/welcome) ———
   The app's "open look" (css/open.css): a sunny sky and a rainbow that belong to
   neither world, Fredoka for anything a kid would read, chunky white cards with a
   colored edge and a solid drop, and 3D pill buttons. Nunito carries the longer
   grown-up copy. */

:root {
  color-scheme: light;
  --ink: #4a2a5c;
  --ink-soft: #6f5885;
  --outline: #5b3a6e;
  --red: #f25a4a;
  --orange: #ff9a3d;
  --orange-deep: #e86a1a;
  --yellow: #f5b800;
  --green: #2fc296;
  --green-deep: #1f9c77;
  --blue: #3d8bff;
  --lilac: #a07cf5;
  --cream: #fffaf0;
  --card: #fff;
  --line: #efe4f4;
  --shadow: 0 18px 40px rgba(110, 90, 150, 0.16);
  --radius: 28px;
  --bounce: cubic-bezier(0.3, 1.6, 0.5, 1);
  --display: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.3px; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--lilac); outline-offset: 3px; border-radius: 12px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow-wrap { max-width: 820px; }
.center { text-align: center; }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }

/* ——— Buttons ——— */
.btn {
  --b: var(--orange);
  --d: var(--orange-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 600; text-decoration: none;
  border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; background: var(--b);
  box-shadow: 0 6px 0 var(--d), 0 12px 24px rgba(232, 106, 26, 0.25);
  transition: transform 0.15s var(--bounce), box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--d); }
.btn-go { --b: var(--green); --d: var(--green-deep); box-shadow: 0 6px 0 var(--d), 0 12px 24px rgba(31, 156, 119, 0.28); }
.btn-soft { color: var(--ink); background: #fff; box-shadow: 0 6px 0 #e4d8ee, 0 12px 24px rgba(110, 90, 150, 0.12); }
.btn-sm { font-size: 16px; padding: 10px 20px; box-shadow: 0 4px 0 var(--d); }
.btn-lg { font-size: 21px; padding: 17px 30px; }
.btn-block { width: 100%; font-size: 19px; padding: 15px 20px; }

/* ——— Logo: the rainbow letters from the preview card ——— */
.logo { display: inline-flex; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; text-decoration: none; letter-spacing: 1px; }
.logo span { display: inline-block; text-shadow: 0 3px 0 rgba(110, 90, 150, 0.18); }
.logo span:nth-child(1) { color: #f25a4a; transform: rotate(-6deg); }
.logo span:nth-child(2) { color: #ff9a3d; transform: translateY(-3px) rotate(4deg); }
.logo span:nth-child(3) { color: #f5b800; transform: rotate(-3deg); }
.logo span:nth-child(4) { color: #2fc296; transform: translateY(-3px) rotate(5deg); }
.logo span:nth-child(5) { color: #3d8bff; transform: translateY(2px) rotate(-4deg); }
.logo.small { font-size: 28px; }

/* ——— Nav ——— */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(255, 250, 240, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(110, 90, 150, 0.08); }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-family: var(--display); font-weight: 500; font-size: 17px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { margin-left: 4px; white-space: nowrap; }
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ——— Hero ——— */
.hero { position: relative; padding: 40px 0 56px; overflow: hidden; }
.sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #fff3cc 0%, #e8f5ff 62%, var(--cream) 100%); }
.rainbow {
  position: absolute; width: 1100px; height: 1100px; right: -380px; top: -520px; border-radius: 50%;
  background: radial-gradient(circle, transparent 54%,
    rgba(255, 110, 140, 0.26) 54.4% 57.4%, rgba(255, 165, 90, 0.24) 57.4% 60.4%,
    rgba(255, 215, 90, 0.26) 60.4% 63.4%, rgba(100, 210, 160, 0.22) 63.4% 66.4%,
    rgba(110, 180, 255, 0.22) 66.4% 69.4%, rgba(170, 130, 255, 0.22) 69.4% 72.4%, transparent 72.8%);
}
.cloud { position: absolute; filter: drop-shadow(0 6px 0 rgba(140, 180, 215, 0.28)); }
.cloud path { fill: #fff; }
.c1 { width: 170px; left: 3%; top: 64%; animation: drift 26s ease-in-out infinite alternate; }
.c2 { width: 120px; left: 44%; top: 6%; opacity: 0.9; animation: drift 32s ease-in-out infinite alternate-reverse; }
.c3 { width: 140px; right: 4%; top: 72%; animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(60px); } }

.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; background: #fff;
  font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--ink-soft);
  box-shadow: 0 4px 0 #f0e2c4;
}
.hero h1 { font-size: clamp(42px, 6vw, 72px); margin: 22px 0 20px; }
.hero h1 em {
  font-style: normal; color: var(--orange-deep);
  background: linear-gradient(transparent 62%, #ffe27a 62% 90%, transparent 90%);
}
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-soft); max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0 18px; }
.fine { font-size: 14px; color: var(--ink-soft); }

.hero-art { position: relative; aspect-ratio: 1 / 0.86; }
.hero-art .tablet { position: absolute; left: 0; right: 9%; top: 10%; transform: rotate(-2deg); }
.hero-phone { position: absolute; right: 0; bottom: -2%; width: 30%; transform: rotate(4deg); }
.buddy { position: absolute; filter: drop-shadow(0 10px 0 rgba(110, 90, 150, 0.14)); }
.buddy-sprinkles { width: 25%; left: -8%; bottom: -8%; transform: rotate(-6deg); animation: bob 3.4s ease-in-out infinite; }
.buddy-zippy { width: 26%; right: 20%; top: -10%; transform: rotate(5deg); animation: bob 3s ease-in-out -1.2s infinite; }
@keyframes bob { 50% { translate: 0 -10px; } }
.fact {
  position: absolute; padding: 6px 14px 8px; border-radius: 16px; background: #fff;
  border: 4px solid var(--c); box-shadow: 0 6px 0 var(--c);
  font-family: var(--display); font-weight: 700; font-size: clamp(16px, 1.8vw, 24px); white-space: nowrap;
  animation: bob 4s ease-in-out infinite;
}
.f1 { --c: var(--blue); left: 2%; top: 0; transform: rotate(-8deg); }
.f2 { --c: var(--green); left: 48%; bottom: 2%; transform: rotate(6deg); animation-delay: -1.5s; }
.f3 { --c: var(--lilac); right: -2%; top: 26%; transform: rotate(8deg); animation-delay: -2.4s; }
.gem { position: absolute; font-size: 30px; animation: bob 2.6s ease-in-out infinite; }
.g1 { left: 34%; top: 2%; }
.g2 { right: 34%; bottom: -4%; animation-delay: -1s; }

/* Device frames around the real screenshots */
.tablet, .phone {
  background: #2f2342; padding: 10px; border-radius: 26px;
  box-shadow: 0 0 0 3px #4a3a60 inset, var(--shadow);
}
.tablet img { border-radius: 17px; width: 100%; height: auto; }
.phone { padding: 8px; border-radius: 30px; }
.phone img { border-radius: 23px; width: 100%; height: auto; }
.tablet.small { padding: 7px; border-radius: 18px; }
.tablet.small img { border-radius: 12px; }
.phone.small { padding: 6px; border-radius: 22px; }
.phone.small img { border-radius: 17px; }

.stats {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stats li {
  background: #fff; border-radius: 22px; padding: 18px 20px; box-shadow: 0 5px 0 #f0e2c4;
  display: flex; flex-direction: column; gap: 2px;
}
.stats b { font-family: var(--display); font-size: 36px; line-height: 1.1; }
.stats li:nth-child(1) b { color: var(--orange-deep); }
.stats li:nth-child(2) b { color: var(--green-deep); }
.stats li:nth-child(3) b { color: var(--blue); }
.stats li:nth-child(4) b { color: var(--lilac); }
.stats span { font-size: 15px; color: var(--ink-soft); line-height: 1.35; }

/* ——— The world switch ——— */
.switch-bar { position: sticky; top: 66px; z-index: 20; display: flex; justify-content: center; padding: 6px 0; pointer-events: none; }
.world-switch {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 4px; padding: 6px;
  background: #fff; border-radius: 999px; box-shadow: 0 6px 0 #ecdff3, 0 10px 26px rgba(110, 90, 150, 0.14);
  font-family: var(--display);
}
.switch-label { font-size: 14px; color: var(--ink-soft); padding: 0 8px 0 12px; }
.world-switch button {
  border: 0; background: transparent; border-radius: 999px; padding: 9px 16px; cursor: pointer;
  font: 600 16px var(--display); color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.world-switch button[aria-checked='true'] { color: #fff; background: var(--wc, #e85d9e); }
.world-switch button[data-world='town'] { --wc: #3d8bff; }
html[data-world='town'] .eyebrow { box-shadow: 0 4px 0 #d8e6f8; }

/* ——— Sections ——— */
.section { padding: clamp(64px, 9vw, 110px) 0; position: relative; }
.tint-sun { background: #fff3d6; }
.tint-lilac { background: #f3ecff; }
.tint-mint { background: #e6f8ef; }
.tint-sky { background: #e6f2ff; }
.kicker {
  font-family: var(--display); font-weight: 600; font-size: 16px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--orange-deep); margin-bottom: 12px;
}
.section h2 { font-size: clamp(32px, 4.4vw, 52px); margin-bottom: 18px; }
.sub { font-size: 19px; color: var(--ink-soft); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 36px; }
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font: 700 14px var(--display);
}

/* ——— Try it ——— */
.try-grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: 56px; align-items: center; }
.try-card {
  background: #fff; border-radius: 32px; padding: 26px; border: 5px solid #ffd6a8; box-shadow: 0 10px 0 #ffd6a8, var(--shadow);
  position: relative; overflow: hidden;
}
html[data-world='town'] .try-card { border-color: #bcd8ff; box-shadow: 0 10px 0 #bcd8ff, var(--shadow); }
.try-top { display: flex; align-items: center; gap: 12px; }
.try-buddy { width: 82px; flex: none; transition: transform 0.3s var(--bounce); }
.try-buddy.joy { transform: translateY(-8px) rotate(-6deg) scale(1.06); }
.try-bubble {
  flex: 1; position: relative; background: #f7f1fb; border-radius: 18px; padding: 10px 14px;
  font: 600 17px var(--display);
}
.try-gems {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(#fff2b8, #ffe07a); box-shadow: 0 4px 0 #e5b53a; font: 700 18px var(--display);
}
.try-gems.pop { animation: pop 0.4s var(--bounce); }
@keyframes pop { 50% { transform: scale(1.25); } }
.try-q { text-align: center; font: 700 clamp(52px, 7vw, 76px) var(--display); margin: 22px 0 8px; letter-spacing: 1px; }
.q-box {
  display: inline-grid; place-items: center; min-width: 1.3em; padding: 0 6px; border-radius: 18px;
  border: 4px dashed var(--lilac); color: var(--lilac);
}
.q-box.right { border-style: solid; border-color: var(--green); color: var(--green); }
.try-help { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 12px; text-align: center; font: 500 17px var(--display); color: var(--ink-soft); }
.tenframes { display: flex; gap: 10px; }
.tenframe { display: grid; grid-template-columns: repeat(5, 22px); gap: 4px; padding: 6px; border-radius: 10px; background: #f6f0fb; border: 3px solid #d9c9ea; }
.tenframe i { width: 22px; height: 22px; border-radius: 50%; background: #eadff5; }
.tenframe i.a { background: #ff8fb8; }
.tenframe i.b { background: #7fc3ff; }
.try-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.try-choices button {
  font: 700 30px var(--display); color: var(--ink); padding: 14px 0; border-radius: 20px; cursor: pointer;
  border: 0; background: var(--bg); box-shadow: 0 6px 0 var(--sh);
  transition: transform 0.12s var(--bounce);
}
.try-choices button:nth-child(1) { --bg: #ffe0ee; --sh: #f5a9c9; }
.try-choices button:nth-child(2) { --bg: #fff1c4; --sh: #ecc75c; }
.try-choices button:nth-child(3) { --bg: #d9f6ea; --sh: #87d8b6; }
.try-choices button:nth-child(4) { --bg: #e0eeff; --sh: #98c2f5; }
.try-choices button:hover { transform: translateY(-2px); }
.try-choices button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sh); }
.try-choices button.miss { opacity: 0.35; text-decoration: line-through; pointer-events: none; }
.try-card.shake { animation: shake 0.4s; }
@keyframes shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
.fly { position: absolute; font-size: 28px; pointer-events: none; animation: fly 0.9s ease-out forwards; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) scale(0.6) rotate(40deg); opacity: 0; } }

/* ——— Steps ——— */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step {
  position: relative; background: #fff; border-radius: var(--radius); padding: 26px 24px 28px;
  box-shadow: 0 6px 0 #f0e2c4; display: flex; flex-direction: column;
}
.step-n {
  position: absolute; top: -18px; left: 22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font: 700 22px var(--display); color: #fff;
  background: var(--orange); box-shadow: 0 4px 0 var(--orange-deep);
}
.step:nth-child(2) .step-n { background: var(--blue); box-shadow: 0 4px 0 #2a6fd6; }
.step:nth-child(3) .step-n { background: var(--green); box-shadow: 0 4px 0 var(--green-deep); }
.step .tablet, .step .phone { margin: 8px 0 22px; }
.step .phone { width: 42%; margin-left: auto; margin-right: auto; height: 216px; overflow: hidden; }
.step .tablet { height: 216px; overflow: hidden; display: flex; align-items: center; }
.step h3 { font-size: 26px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 17px; }

/* ——— Worlds ——— */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; }
.world {
  position: relative; border-radius: 34px; padding: 34px 30px 30px; overflow: hidden;
  border: 5px solid var(--edge); box-shadow: 0 10px 0 var(--edge);
}
.world.palace { --edge: #f7b6d4; background: linear-gradient(180deg, #ffe7f3, #f4ebff); }
.world.town { --edge: #a9cdf7; background: linear-gradient(180deg, #e4f1ff, #e8f8ec); }
.world-buddy { position: absolute; right: 18px; top: 14px; width: 120px; filter: drop-shadow(0 8px 0 rgba(110, 90, 150, 0.12)); }
.world h3 { font-size: 32px; padding-right: 120px; }
.world-tag { font: 500 18px var(--display); color: var(--ink-soft); margin: 4px 0 18px; }
.world ul { margin: 0 0 24px; padding-left: 20px; display: grid; gap: 6px; font-size: 17px; }
.world .tablet { margin-top: auto; }

/* ——— Paint studio ——— */
.paint-grid { display: grid; grid-template-columns: 0.95fr 1fr; gap: 56px; align-items: center; }
.paint-stage {
  background: #fff; border-radius: 32px; padding: 24px; box-shadow: 0 8px 0 #dccbf6, var(--shadow);
  display: grid; gap: 16px;
}
.paint-art {
  height: 300px; display: grid; place-items: center; border-radius: 22px;
  background: linear-gradient(#fdf3ff 0 72%, #f1e1d0 72%);
}
html[data-world='town'] .paint-art { background: linear-gradient(#eef4fb 0 72%, #d8dde6 72%); }
.paint-art svg { max-width: 82%; max-height: 270px; }
.paint-parts, .paint-pots, .paint-pats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.paint-parts button, .paint-pats button {
  font: 600 15px var(--display); color: var(--ink); border: 0; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; background: #f4eefa; box-shadow: 0 3px 0 #e2d6ee;
}
.paint-parts button[aria-checked='true'], .paint-pats button[aria-checked='true'] { background: var(--lilac); color: #fff; box-shadow: 0 3px 0 #7d58d6; }
.paint-pots button {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 3px solid #fff;
  background: var(--sw); box-shadow: 0 0 0 2px #e0d4ec, 0 3px 0 2px #e0d4ec;
  transition: transform 0.15s var(--bounce);
}
.paint-pots button:hover { transform: scale(1.12); }
.paint-pots button[aria-checked='true'] { box-shadow: 0 0 0 3px var(--ink), 0 3px 0 3px var(--ink); transform: scale(1.1); }

/* ——— Learning ——— */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.feature {
  background: #fff; border-radius: 26px; padding: 26px; border: 4px solid color-mix(in srgb, var(--c) 35%, #fff);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 35%, #fff);
}
.f-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; font-size: 30px;
  background: color-mix(in srgb, var(--c) 16%, #fff); margin-bottom: 14px;
}
.feature h3 { font-size: 23px; margin-bottom: 8px; }
.feature p { font-size: 16.5px; color: var(--ink-soft); }

.ladder { margin-top: 72px; }
.ladder h3 { font-size: 28px; margin-bottom: 28px; }
.ladder-row { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; position: relative; }
.ladder-row::before {
  content: ''; position: absolute; left: 6%; right: 6%; top: 38px; height: 8px; border-radius: 8px; z-index: 0;
  background: repeating-linear-gradient(90deg, #f1dcc4 0 22px, transparent 22px 32px);
}
.ladder-row li { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.l-icon {
  width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; font-size: 38px;
  background: #fff; border: 5px solid var(--c); box-shadow: 0 6px 0 var(--c); margin-bottom: 8px;
}
.ladder-row b { font: 600 17px var(--display); line-height: 1.15; }
.ladder-row small { font-size: 13.5px; color: var(--ink-soft); line-height: 1.3; }

/* ——— Bank ——— */
.bank-grid { display: grid; grid-template-columns: 1.2fr 0.6fr; gap: 64px; align-items: center; }
.bank-calc { margin-top: 26px; background: #fff; border-radius: 26px; padding: 24px; box-shadow: 0 6px 0 #bfe9d3; }
.bank-calc label { font: 600 20px var(--display); }
.bank-calc input[type='range'] { width: 100%; margin: 14px 0 18px; accent-color: var(--green); height: 28px; }
.jars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.jar {
  display: flex; flex-direction: column; align-items: center; padding: 14px 8px; border-radius: 20px;
  background: #f0fbf5; border: 3px solid #bfe9d3; font-family: var(--display);
}
.jar span { font-size: 30px; }
.jar b { font-size: 16px; font-weight: 500; color: var(--ink-soft); }
.jar em { font-style: normal; font-weight: 700; font-size: 34px; color: var(--green-deep); line-height: 1.1; }
.jar em::before { content: '💎 '; font-size: 22px; }
.jar small { font-size: 14px; font-weight: 600; color: var(--green-deep); }
.phone.tall { max-width: 300px; justify-self: center; width: 100%; }

/* ——— Tabs ——— */
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 40px 0 36px; }
.tabs button {
  font: 600 18px var(--display); color: var(--ink-soft); cursor: pointer;
  padding: 12px 22px; border-radius: 999px; border: 0; background: #fff; box-shadow: 0 4px 0 #ece1f2;
}
.tabs button[aria-selected='true'] { color: #fff; background: var(--ink); box-shadow: 0 4px 0 #2e1a3b; }
.panel-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 48px; align-items: center; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cards li { background: #fff; border-radius: 22px; padding: 20px 22px; box-shadow: 0 5px 0 #efe4f4; font-size: 16.5px; color: var(--ink-soft); }
.cards li b { display: block; font: 600 19px var(--display); color: var(--ink); margin-bottom: 4px; }
.cards li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tall-tab { align-self: center; }
#grownups { background: linear-gradient(180deg, var(--cream), #fbf4ff); }

/* ——— Promises ——— */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.promises div {
  background: #fff; border-radius: 24px; padding: 24px 18px; text-align: center; box-shadow: 0 5px 0 #c9e0fa;
  display: flex; flex-direction: column; gap: 4px;
}
.promises span { font-size: 34px; }
.promises b { font: 600 21px var(--display); }
.promises small { font-size: 15px; color: var(--ink-soft); }

/* ——— The Village ———
   A Plus feature (a future family plan), free during early access: the badge
   says so wherever the Village is named. */
.tint-meadow { background: #eaf7e2; }
.plus-badge {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: 2px; margin-left: 8px;
  padding: 3px 11px; border-radius: 999px; white-space: nowrap;
  font: 600 13px var(--display); letter-spacing: 0.4px; text-transform: none;
  color: #6a3fc7; background: linear-gradient(#f3ebff, #e6d8ff); box-shadow: 0 3px 0 #cdb8f4;
}
.village-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.village-art { position: relative; padding: 0 0 56px 0; }
.village-art .tablet { margin-right: 12%; }
.village-phone { position: absolute; right: 0; bottom: 0; width: 30%; transform: rotate(4deg); }
.neighbors {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.neighbors li {
  background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: 0 5px 0 #d6edc9;
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
}
.neighbors span { grid-row: span 2; font-size: 34px; line-height: 1; }
.neighbors b { font: 600 18px var(--display); }
.neighbors small { font-size: 15px; color: var(--ink-soft); line-height: 1.3; }
.plan .plus-tick small { display: block; font-size: 15px; color: var(--ink-soft); }
.plan .plus-tick .plus-badge { margin-left: 6px; }
@media (max-width: 1000px) {
  .village-grid { grid-template-columns: 1fr; }
  .village-art { max-width: 640px; width: 100%; margin: 0 auto; }
  .neighbors { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .neighbors { gap: 10px; margin-top: 36px; }
  .neighbors li { grid-template-columns: 1fr; padding: 12px 14px; row-gap: 2px; }
  .neighbors span { grid-row: auto; font-size: 28px; }
  .neighbors b { font-size: 16px; }
  .neighbors small { font-size: 14px; }
  .plus-badge { margin: 8px 0 0; }
  .kicker .plus-badge { display: flex; width: fit-content; }
}

/* ——— Story ——— */
.story { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; max-width: 980px; }
.story-buddies { position: relative; height: 200px; }
.story-buddies img { position: absolute; width: 130px; }
.story-buddies img:first-child { left: 0; bottom: 0; transform: rotate(-6deg); }
.story-buddies img:last-child { right: 0; top: 0; transform: rotate(5deg); }
blockquote { margin: 0; }
blockquote p { font: 500 clamp(21px, 2.4vw, 27px)/1.45 var(--display); }
blockquote footer { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }

/* ——— Pricing ——— */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 28px; margin-top: 44px; }
.plan { background: #fff; border-radius: 30px; padding: 32px 30px; box-shadow: 0 8px 0 #f0e2c4; display: flex; flex-direction: column; }
.plan.featured { border: 5px solid var(--green); box-shadow: 0 8px 0 var(--green-deep), var(--shadow); }
.plan-badge {
  align-self: flex-start; font: 600 14px var(--display); text-transform: uppercase; letter-spacing: 1px;
  color: #fff; background: var(--green); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.plan-badge.soft { background: var(--lilac); }
.plan h3 { font-size: 30px; }
.price { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 4px; }
.price b { font: 700 56px var(--display); }
.price span { color: var(--ink-soft); }
.plan .ticks { margin-bottom: 28px; flex: 1; align-content: start; }

/* ——— FAQ ——— */
.faq { margin-top: 36px; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 20px; box-shadow: 0 4px 0 #efe4f4; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; position: relative;
  font: 600 20px var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #f4eefa; color: var(--lilac); font-size: 22px; transition: rotate 0.2s;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 24px 22px; color: var(--ink-soft); font-size: 17px; }

/* ——— Final CTA ——— */
.final {
  padding: 80px 0; color: #fff; text-align: center;
  background: linear-gradient(135deg, #ff9a3d 0%, #f25a7a 35%, #a07cf5 70%, #3d8bff 100%);
}
.final-inner { display: grid; grid-template-columns: 180px 1fr 180px; align-items: center; gap: 24px; }
.final h2 { font-size: clamp(34px, 4.6vw, 56px); text-shadow: 0 4px 0 rgba(70, 30, 90, 0.2); }
.final p { font-size: 20px; margin: 12px 0 28px; opacity: 0.95; }
.final .btn { box-shadow: 0 6px 0 var(--d), 0 14px 30px rgba(40, 20, 60, 0.3); }
.final-buddy { width: 170px; filter: drop-shadow(0 10px 0 rgba(60, 20, 80, 0.18)); animation: bob 3.2s ease-in-out infinite; }
.final-buddy.r { animation-delay: -1.4s; }

/* ——— Footer ——— */
.foot { padding: 36px 0 48px; background: var(--cream); }
.foot-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot p { color: var(--ink-soft); font-size: 15px; }
.foot nav { margin-left: auto; display: flex; gap: 20px; font: 500 16px var(--display); }
.foot nav a { text-decoration: none; color: var(--ink-soft); }

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

/* ——— Responsive ——— */
@media (max-width: 1000px) {
  .hero-grid, .try-grid, .paint-grid, .bank-grid, .panel-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 640px; width: 100%; margin: 20px auto 0; }
  .features { grid-template-columns: 1fr 1fr; }
  .ladder-row { grid-template-columns: repeat(4, 1fr); row-gap: 28px; }
  .ladder-row::before { display: none; }
  .stats, .promises { grid-template-columns: 1fr 1fr; }
  .paint-grid .paint-stage { order: 2; }
  .panel-grid .phone, .panel-grid .tablet { max-width: 420px; justify-self: center; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .steps, .worlds, .features, .cards { grid-template-columns: 1fr; }
  .ladder-row { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .story-buddies { width: 220px; height: 150px; margin: 0 auto; }
  .story-buddies img { width: 100px; }
  .final-inner { grid-template-columns: 1fr; }
  .final-buddy { display: none; }
  .world-buddy { width: 84px; }
  .world h3 { padding-right: 80px; font-size: 27px; }
  .switch-label { display: none; }
  .world-switch button { padding: 8px 12px; font-size: 15px; }
  .try-choices button { font-size: 26px; }
  .btn-lg { font-size: 19px; padding: 15px 24px; }
  .stats b { font-size: 30px; }
  .foot nav { margin-left: 0; flex-wrap: wrap; }
}

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

/* ——— Privacy and terms (/privacy, /terms) ——— */
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 6px; }
.legal h2 { font-size: 26px; margin: 34px 0 10px; }
.legal p, .legal li { font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.legal ul { padding-left: 22px; display: grid; gap: 8px; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 12px; }
.legal .updated { font-size: 15px; margin-bottom: 26px; }
.legal a { color: var(--lilac-deep, #7b5bd6); }

/* ——— "Grown-ups: Sign in" in the nav: opens the app and starts Google sign-in (js/main.js ?signin=google) ——— */
.nav-signin {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid #dadce0; background: #fff; color: #3c4043;
  font: 600 15px var(--display); text-decoration: none; white-space: nowrap;
}
.nav-signin:hover { box-shadow: 0 2px 8px rgba(60, 64, 67, 0.15); }
.g-mark { width: 18px; height: 18px; flex: none; }
@media (max-width: 1080px) {
  .nav-signin { margin-left: auto; }
  .nav .nav-signin + .btn { margin-left: 4px; }
}
@media (max-width: 1180px) {
  .nav { gap: 18px; }
  .nav-links { gap: 16px; font-size: 16px; }
  .nav-signin-who { display: none; }
}
