/* =========================================================
   Tilbo — landing page styles
   Warm, friendly, parent-kid aesthetic built around the
   magnetic-tile motif (translucent shapes + magnet dots).
   ========================================================= */

:root {
  /* Surfaces */
  --cream: #FFF8F0;
  --cream-2: #FFF1E4;
  --card: #FFFFFF;

  /* Ink (warm near-black, never cold slate) */
  --ink: #2E2937;
  --ink-soft: #6B6477;
  --ink-faint: #9A93A6;

  /* Magnetic-tile rainbow */
  --coral: #FF6B6B;
  --coral-deep: #F0453E;
  --tangerine: #FF9F43;
  --tangerine-deep: #F0612F;
  --sunny: #FFD15C;
  --sunny-deep: #F0A92C;
  --mint: #4ECB71;
  --mint-deep: #2FA855;
  --sky: #49B6FF;
  --sky-deep: #1F93E6;
  --grape: #A98BFF;
  --grape-deep: #8662F0;
  --pink: #FF8FB1;
  --pink-deep: #F26591;

  /* Primary action gradient (dark enough for white text) */
  --cta-grad: linear-gradient(135deg, #FF8A5B 0%, #F0453E 100%);

  --radius: 24px;
  --radius-lg: 34px;
  --shadow-sm: 0 4px 14px rgba(110, 80, 50, 0.08);
  --shadow-md: 0 18px 44px rgba(120, 80, 50, 0.12);
  --shadow-lg: 0 30px 70px rgba(120, 70, 40, 0.16);

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand__name { font-family: "Baloo 2", "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; line-height: 1.12; }
/* Tighten line-height a touch for CJK headings */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { line-height: 1.25; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Background decor ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.blob--coral { width: 460px; height: 460px; background: #FFC7B0; top: -160px; right: -120px; }
.blob--mint  { width: 420px; height: 420px; background: #C7F0D2; bottom: -180px; left: -140px; }
.blob--sky   { width: 360px; height: 360px; background: #C8E6FF; top: 40%; left: 55%; opacity: 0.35; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px clamp(20px, 5vw, 40px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: inline-flex; filter: drop-shadow(0 4px 8px rgba(240, 130, 60, 0.25)); }
.brand__name { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }

.header__right { display: flex; align-items: center; gap: 14px; }

/* Language toggle */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  background: #fff; border-radius: 999px; padding: 4px;
  box-shadow: var(--shadow-sm);
}
.lang-btn {
  border: 0; background: transparent; font-family: inherit;
  font-weight: 800; font-size: 14px; color: var(--ink-soft);
  padding: 6px 13px; border-radius: 999px; line-height: 1;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] { background: var(--cta-grad); color: #fff; }
.lang-btn:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
}
.pill--soft { background: #FFE9D3; color: var(--tangerine-deep); }
.pill__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint-deep);
  box-shadow: 0 0 0 0 rgba(47, 168, 85, 0.5); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 168, 85, 0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(47, 168, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 168, 85, 0); }
}

/* =========================================================
   Buttons & inputs
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; font-weight: 800; font-size: 17px;
  padding: 14px 26px; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; }
.btn--primary {
  background: var(--cta-grad); color: #fff; font-size: 18px;
  box-shadow: 0 10px 24px rgba(240, 69, 62, 0.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(240, 69, 62, 0.4); }
.btn--primary:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; box-shadow: 0 10px 24px rgba(240, 69, 62, 0.2); }
.btn--ghost {
  background: #fff; color: var(--ink); box-shadow: var(--shadow-sm);
  padding: 11px 20px; font-size: 16px;
}
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.header__cta { display: none; }

.input {
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  background: #fff; border: 2px solid #F0E2D2; border-radius: 999px;
  padding: 14px 22px; transition: border-color .18s, box-shadow .18s;
}
.input::placeholder { color: var(--ink-faint); font-weight: 600; }
.input:focus { outline: none; border-color: var(--tangerine); box-shadow: 0 0 0 4px rgba(255, 159, 67, 0.18); }
.input[aria-invalid="true"] { border-color: var(--coral-deep); box-shadow: 0 0 0 4px rgba(240, 69, 62, 0.15); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 6vw, 70px) clamp(20px, 5vw, 40px) clamp(40px, 7vw, 90px);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--tangerine-deep);
  font-weight: 800; font-size: 15px; padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.eyebrow svg { color: var(--sunny-deep); }
.hero__title {
  font-size: clamp(38px, 6vw, 62px); font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 20px; color: var(--ink);
}
.grad-text {
  background: linear-gradient(120deg, var(--tangerine-deep), var(--coral) 55%, var(--pink-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede {
  font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft);
  max-width: 30ch; margin: 0 0 30px;
}

/* Waitlist form */
.waitlist-form { max-width: 480px; }
.waitlist-form__row { display: flex; gap: 10px; }
.waitlist-form__hint {
  font-size: 14.5px; color: var(--ink-soft); margin: 12px 4px 0; transition: color .2s;
}
.waitlist-form__hint strong { color: var(--tangerine-deep); }
.waitlist-form.is-success .waitlist-form__hint { color: var(--mint-deep); font-weight: 700; }
.waitlist-form.is-error .waitlist-form__hint { color: var(--coral-deep); font-weight: 700; }
.waitlist-form--center { margin: 0 auto; }
.waitlist-form--center .waitlist-form__hint { text-align: center; }

.hero__meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 30px; }
.appstore-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 9px 18px;
}
.appstore-badge__text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore-badge__text small { font-size: 11px; opacity: 0.8; }
.appstore-badge__text strong { font-size: 18px; font-family: "Baloo 2", sans-serif; }
.device-line { font-size: 14px; font-weight: 700; color: var(--ink-faint); letter-spacing: 0.02em; }

/* Hero art / mascot */
.hero__art { display: flex; justify-content: center; }
.art-stage { position: relative; width: min(100%, 420px); aspect-ratio: 1; display: grid; place-items: center; }
.mascot { width: 88%; height: auto; filter: drop-shadow(0 24px 30px rgba(120, 70, 40, 0.18)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.mascot__face { animation: blink 6s infinite; transform-origin: center; }
@keyframes blink { 0%,94%,100% { opacity: 1; } 96% { opacity: 0.9; } }

.float-tile { position: absolute; filter: drop-shadow(0 10px 16px rgba(120, 70, 40, 0.14)); animation: drift 7s ease-in-out infinite; }
.float-tile--1 { top: 2%;  left: 0%;   animation-delay: 0s;   }
.float-tile--2 { top: 8%;  right: 2%;  animation-delay: .8s;  }
.float-tile--3 { bottom: 12%; left: -2%; animation-delay: 1.6s; }
.float-tile--4 { bottom: 2%;  right: 4%; animation-delay: 2.3s; }
@keyframes drift {
  0%,100% { transform: translateY(0) rotate(-4deg); }
  50%     { transform: translateY(-16px) rotate(6deg); }
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 40px);
}
.section__head { text-align: center; max-width: 660px; margin: 0 auto clamp(36px, 5vw, 56px); }
.kicker {
  display: inline-block; font-weight: 800; font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 14px;
}
.section__title {
  font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: -0.02em;
  margin: 0; color: var(--ink);
}

/* Value prop cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.5vw, 26px); }
.card {
  background: var(--card); border-radius: var(--radius); padding: 32px 28px;
  box-shadow: var(--shadow-sm); border: 1px solid #F6EADD;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 18px; margin-bottom: 20px; color: #fff;
}
.card__icon--coral { background: linear-gradient(135deg, #FF9F7E, var(--coral)); }
.card__icon--sky   { background: linear-gradient(135deg, #7BCBFF, var(--sky)); }
.card__icon--mint  { background: linear-gradient(135deg, #86E0A0, var(--mint)); }
.card__title { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.card__text { color: var(--ink-soft); margin: 0; font-size: 16px; }

/* Skill tag chips */
.skill-tags {
  list-style: none; padding: 0; margin: clamp(32px, 4vw, 48px) 0 0;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.chip {
  font-weight: 700; font-size: 15px; padding: 9px 18px; border-radius: 999px;
  border: 2px solid currentColor;
}
.chip--coral     { color: var(--coral-deep);     background: #FFE7E5; }
.chip--tangerine { color: var(--tangerine-deep); background: #FFEBD8; }
.chip--sunny     { color: var(--sunny-deep);     background: #FFF3D2; }
.chip--mint      { color: var(--mint-deep);      background: #DEF6E5; }
.chip--sky       { color: var(--sky-deep);       background: #DCEEFF; }
.chip--grape     { color: var(--grape-deep);     background: #ECE4FF; }

/* Steps */
.section--steps { }
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 32px);
  counter-reset: step;
}
.step {
  position: relative; background: var(--card); border-radius: var(--radius);
  padding: 36px 28px 30px; box-shadow: var(--shadow-sm); border: 1px solid #F6EADD;
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 16px;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px;
  color: #fff; background: var(--cta-grad);
  box-shadow: 0 8px 18px rgba(240, 69, 62, 0.28);
}
.step:nth-child(2) .step__num { background: linear-gradient(135deg, #7BCBFF, var(--sky-deep)); box-shadow: 0 8px 18px rgba(31, 147, 230, 0.28); }
.step:nth-child(3) .step__num { background: linear-gradient(135deg, #86E0A0, var(--mint-deep)); box-shadow: 0 8px 18px rgba(47, 168, 85, 0.28); }
.step__title { font-size: 21px; font-weight: 700; margin: 0 0 8px; }
.step__text { color: var(--ink-soft); margin: 0; font-size: 16px; }

/* Trust block */
.section--trust { }
.trust {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 56px);
  align-items: center;
  background: linear-gradient(135deg, #FFFDF9, var(--cream-2));
  border: 1px solid #F4E6D5; border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px); box-shadow: var(--shadow-sm);
}
.trust__art { display: flex; justify-content: center; }
.trust__art svg { filter: drop-shadow(0 14px 22px rgba(120, 80, 50, 0.16)); }
.trust__text { color: var(--ink-soft); font-size: 17px; margin: 16px 0 24px; max-width: 56ch; }
.trust__text em { color: var(--ink); font-style: normal; font-weight: 800; }
.trust__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.trust__list li { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--ink); }
.trust__list svg { color: var(--mint-deep); margin-top: 3px; flex-shrink: 0; }

/* =========================================================
   CTA card
   ========================================================= */
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(160deg, #FFF4E8 0%, #FFE9E2 100%);
  border: 1px solid #FBD9C6; border-radius: var(--radius-lg);
  padding: clamp(44px, 7vw, 80px) clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-md);
}
.cta-card__tiles { position: absolute; inset: 0; pointer-events: none; }
.mini-tile {
  position: absolute; width: 54px; height: 54px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 55%, transparent);
  border: 4px solid var(--c); transform: rotate(var(--r));
  opacity: 0.55;
}
.mini-tile--tri {
  border: 0; border-radius: 0; background: transparent;
  width: 0; height: 0; border-left: 30px solid transparent; border-right: 30px solid transparent;
  border-bottom: 52px solid color-mix(in srgb, var(--c) 60%, transparent);
}
.cta-card__tiles .mini-tile:nth-child(1) { top: 14%; left: 8%; }
.cta-card__tiles .mini-tile:nth-child(2) { top: 18%; right: 10%; }
.cta-card__tiles .mini-tile:nth-child(3) { bottom: 16%; left: 12%; }
.cta-card__tiles .mini-tile:nth-child(4) { bottom: 12%; right: 9%; }

.cta-card__title { position: relative; font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }
.cta-card__lede { position: relative; color: var(--ink-soft); font-size: 18px; max-width: 46ch; margin: 0 auto 30px; }
.cta-card .waitlist-form { position: relative; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  text-align: center; padding: clamp(40px, 6vw, 64px) 24px 48px;
  border-top: 1px solid #F2E4D4;
}
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand .brand__name { font-size: 22px; }
.footer__tagline { font-family: "Baloo 2", sans-serif; font-weight: 600; font-size: 18px; color: var(--coral); margin: 12px 0 8px; }
.footer__legal { font-size: 14px; color: var(--ink-faint); margin: 0; }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 12px; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .eyebrow { margin-top: 8px; }
  .waitlist-form { margin-left: auto; margin-right: auto; }
  .hero__meta { justify-content: center; }
  .hero__art { order: -1; }
  .art-stage { width: min(78%, 340px); }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; text-align: center; }
  .trust__list { text-align: left; max-width: 380px; margin: 0 auto; }
  .trust__text { margin-left: auto; margin-right: auto; }
  .header__cta { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .waitlist-form__row { flex-direction: column; }
  .btn--primary { width: 100%; }
  .pill { display: none; }
  .float-tile--1, .float-tile--4 { display: none; }
}

@media (min-width: 881px) {
  .header__cta { display: inline-flex; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
