/* =========================================================
   AI Kids Teacher — Homepage styles
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-400: #60a5fa;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --yellow-400: #facc15;
  --yellow-300: #fde047;
  --yellow-100: #fef9c3;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-100: #ede9fe;
  --pink-400: #f472b6;
  --pink-100: #fce7f3;
  --green-400: #34d399;
  --green-100: #d1fae5;
  --orange-100: #ffedd5;

  --ink: #1e2a5a;
  --ink-soft: #55608a;
  --white: #ffffff;

  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 36px;
  --shadow-sm: 0 4px 14px rgba(37, 99, 235, .10);
  --shadow: 0 14px 36px rgba(37, 99, 235, .16);
  --shadow-lg: 0 24px 60px rgba(30, 58, 138, .22);

  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #cfe6ff 0%, #e9f3ff 38%, #f6f2ff 70%, #fff8e6 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.1; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 4px solid var(--yellow-400);
  outline-offset: 3px;
  border-radius: 12px;
}

/* ---------- Decorative sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 100px;
  opacity: .8;
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, .08));
  animation: drift 40s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud--1 { width: 160px; height: 46px; top: 16%; left: -180px; }
.cloud--1::before { width: 70px; height: 70px; top: -36px; left: 26px; }
.cloud--1::after  { width: 50px; height: 50px; top: -22px; left: 82px; }
.cloud--2 { width: 120px; height: 36px; top: 46%; left: -150px; animation-duration: 55s; animation-delay: -20s; opacity: .6; }
.cloud--2::before { width: 54px; height: 54px; top: -28px; left: 18px; }
.cloud--2::after  { width: 40px; height: 40px; top: -18px; left: 60px; }
.cloud--3 { width: 200px; height: 56px; top: 74%; left: -220px; animation-duration: 65s; animation-delay: -38s; opacity: .55; }
.cloud--3::before { width: 86px; height: 86px; top: -44px; left: 34px; }
.cloud--3::after  { width: 60px; height: 60px; top: -28px; left: 106px; }
@keyframes drift { to { transform: translateX(calc(100vw + 260px)); } }

.star { position: absolute; color: var(--yellow-400); font-size: 22px; animation: twinkle 3s ease-in-out infinite; }
.star--1 { top: 14%; left: 8%; }
.star--2 { top: 28%; right: 6%; color: var(--purple-400); animation-delay: .8s; }
.star--3 { top: 62%; left: 4%; font-size: 16px; animation-delay: 1.6s; }
.star--4 { top: 84%; right: 10%; color: var(--pink-400); animation-delay: 2.2s; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: .9; } 50% { transform: scale(1.4) rotate(20deg); opacity: .5; } }

.bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(167,139,250,.25));
  animation: floaty 8s ease-in-out infinite;
}
.bubble--1 { width: 26px; height: 26px; top: 36%; left: 46%; }
.bubble--2 { width: 16px; height: 16px; top: 70%; left: 82%; animation-delay: 2s; }
.bubble--3 { width: 34px; height: 34px; top: 90%; left: 30%; animation-delay: 4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-24px); } }

header, main, footer { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800; font-size: 1rem;
  background: var(--white); color: var(--blue-700);
  box-shadow: var(--shadow-sm);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.btn:hover  { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.97); }

.btn--primary {
  color: var(--white);
  background: linear-gradient(180deg, #4f8bff 0%, var(--blue-600) 100%);
  box-shadow: 0 8px 0 var(--blue-900), 0 16px 30px rgba(37, 99, 235, .35);
}
.btn--primary:hover  { box-shadow: 0 10px 0 var(--blue-900), 0 20px 36px rgba(37, 99, 235, .4); }
.btn--primary:active { box-shadow: 0 3px 0 var(--blue-900), 0 8px 18px rgba(37, 99, 235, .3); transform: translateY(5px); }

.btn--ghost {
  background: rgba(255,255,255,.75);
  color: var(--purple-500);
  box-shadow: 0 6px 0 #ddd6fe, 0 12px 24px rgba(139, 92, 246, .18);
}
.btn--ghost:active { transform: translateY(4px); box-shadow: 0 2px 0 #ddd6fe; }

.btn--parent {
  background: linear-gradient(180deg, var(--yellow-300), var(--yellow-400));
  color: #713f12;
  box-shadow: 0 5px 0 #ca8a04, 0 10px 20px rgba(202, 138, 4, .25);
}
.btn--parent:active { transform: translateY(3px); box-shadow: 0 2px 0 #ca8a04; }

.btn--light { background: var(--blue-50); color: var(--blue-700); box-shadow: none; }
.btn--small { min-height: 42px; padding: 8px 16px; font-size: .95rem; background: var(--blue-50); box-shadow: none; }
.btn--xl { min-height: 72px; padding: 16px 34px; font-size: 1.35rem; }
.btn--block { width: 100%; }
.btn__icon { font-size: 1.4em; line-height: 1; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.8);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 8px 24px rgba(30, 58, 138, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header__actions { display: flex; align-items: center; gap: 12px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue-900); }
.logo__badge {
  width: 52px; height: 52px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--blue-400), var(--blue-600));
  box-shadow: 0 6px 16px rgba(37, 99, 235, .35), inset 0 2px 0 rgba(255,255,255,.4);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.logo:hover .logo__badge { transform: rotate(-10deg) scale(1.08); }
.logo__badge svg { width: 40px; height: 40px; }
.logo__text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.logo__text b { color: var(--purple-500); }

.lang {
  display: inline-flex; padding: 5px; gap: 4px;
  background: var(--blue-50); border-radius: 999px;
  box-shadow: inset 0 2px 6px rgba(37, 99, 235, .08);
}
.lang__btn {
  border: 0; background: transparent;
  padding: 9px 16px; border-radius: 999px;
  font-weight: 800; font-size: .95rem; color: var(--ink-soft);
  min-height: 42px;
  transition: background .2s, color .2s, transform .2s;
}
.lang__btn:hover { color: var(--blue-700); }
.lang__btn.is-active { background: var(--white); color: var(--blue-700); box-shadow: var(--shadow-sm); }
.lang__btn { display: inline-flex; align-items: center; gap: 7px; }
.lang__flag { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(30, 42, 90, .15); flex: none; }
.lang__code { display: none; }
@media (max-width: 1180px) {
  .lang__name { display: none; }
  .lang__code { display: inline; font-size: .8rem; letter-spacing: .02em; }
  .lang__btn { padding: 9px 11px; }
}
@media (max-width: 520px) {
  .lang__code { display: none; }
  .lang { gap: 2px; padding: 4px; }
  .lang__btn { padding: 8px 8px; }
}

.voice-link {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-50); font-size: 1.25rem; text-decoration: none;
  box-shadow: inset 0 2px 6px rgba(37, 99, 235, .08);
  transition: transform .2s;
}
.voice-link:hover { transform: scale(1.08); }
@media (max-width: 400px) { .voice-link { width: 38px; height: 38px; font-size: 1.05rem; } }

/* Speech bar (shown while Bipi talks) */
.sbar {
  position: fixed; left: 16px; bottom: 16px; z-index: 115;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--white); box-shadow: var(--shadow-lg);
  border: 2px solid var(--blue-100);
  max-width: calc(100vw - 32px);
}
.sbar[hidden] { display: none; }
.sbar__btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--blue-50); font-size: 1.05rem; cursor: pointer;
}
.sbar__btn:hover { background: var(--blue-100); }
.sbar__src {
  font-weight: 800; font-size: .85rem; color: var(--ink-soft); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.sbar.is-fallback { border-color: #f59e0b; background: #fffbeb; }
.sbar.is-fallback .sbar__src { color: #92400e; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 0; position: relative; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 32px;
  padding-bottom: 80px;
}
.hero__tag {
  display: inline-block;
  padding: 8px 16px; border-radius: 999px;
  background: var(--white); color: var(--purple-500);
  font-weight: 800; box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  font-weight: 800;
  color: var(--blue-900);
  background: linear-gradient(90deg, var(--blue-700), var(--purple-500) 60%, #ec4899);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 6px;
}
.hero__subtitle {
  margin-top: 16px;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--ink-soft);
  max-width: 34ch;
  line-height: 1.5;
}
.hero__buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.hero__perks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__perks li {
  background: rgba(255,255,255,.7); border-radius: 999px;
  padding: 8px 14px; font-weight: 800; font-size: .95rem; color: var(--ink-soft);
}

.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 80px; color: rgba(255,255,255,.65); }
.hero__wave svg { width: 100%; height: 100%; }

/* ---------- Robot ---------- */
.hero__robot { display: flex; justify-content: center; }
.robot-stage {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1 / 1.08;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.robot-stage::before {
  content: ""; position: absolute; inset: 8% 4% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(191,219,254,.6) 45%, rgba(196,181,253,0) 70%);
  z-index: -1;
}
.robot {
  border: 0; background: none; padding: 0;
  width: 82%;
  animation: hover-bob 4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.robot__svg { width: 100%; height: auto; overflow: visible; }
@keyframes hover-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.robot__shadow { animation: shadow-pulse 4s ease-in-out infinite; transform-origin: 160px 388px; }
@keyframes shadow-pulse { 0%, 100% { transform: scale(1); opacity: .15; } 50% { transform: scale(.85); opacity: .08; } }

.robot__arm-right { transform-origin: 226px 258px; animation: wave 2.4s ease-in-out infinite; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(-14deg); }
  20% { transform: rotate(10deg); }
  30% { transform: rotate(-12deg); }
  40% { transform: rotate(8deg); }
  50% { transform: rotate(-4deg); }
}
.robot__antenna { transform-origin: 160px 70px; animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(6deg); } 75% { transform: rotate(-6deg); } }
.robot__bulb { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(250,204,21,0)); } 50% { filter: drop-shadow(0 0 10px rgba(250,204,21,.95)); } }

.robot__eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.robot__pupil { transition: transform .15s ease-out; }
.robot__heart { transform-box: fill-box; transform-origin: center; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }

.robot.is-happy { animation: jump .7s cubic-bezier(.34,1.56,.64,1); }
.robot.is-happy .robot__arm-right { animation: wave .7s ease-in-out 2; }
@keyframes jump { 0% { transform: translateY(0); } 40% { transform: translateY(-40px) rotate(-4deg); } 70% { transform: translateY(0) rotate(2deg); } 100% { transform: translateY(0); } }

.robot.is-talking .robot__mouth { animation: talk .26s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center top; }
@keyframes talk { from { transform: scaleY(1); } to { transform: scaleY(1.9); } }

.robot-name {
  margin-top: 6px;
  background: var(--white); border-radius: 999px;
  padding: 8px 18px; font-weight: 800; color: var(--blue-700);
  box-shadow: var(--shadow-sm);
}

.speech {
  position: absolute; top: 2%; left: -4%;
  max-width: 230px;
  background: var(--white);
  border-radius: 26px 26px 26px 6px;
  padding: 14px 18px;
  font-weight: 800; font-size: 1.05rem; color: var(--blue-900);
  box-shadow: var(--shadow);
  animation: pop-in .6s .4s cubic-bezier(.34,1.56,.64,1) both;
  z-index: 2;
}
.speech.is-bump { animation: pop-in .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.orbit {
  position: absolute; font-size: 2rem;
  width: 58px; height: 58px; display: grid; place-items: center;
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-sm);
  animation: floaty 5s ease-in-out infinite;
}
.orbit--1 { top: 30%; left: 0; }
.orbit--2 { top: 6%; right: 6%; animation-delay: 1s; }
.orbit--3 { bottom: 26%; right: -2%; animation-delay: 2s; }
.orbit--4 { bottom: 14%; left: 4%; animation-delay: 3s; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--cards { background: rgba(255,255,255,.65); }
.section__title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--blue-900);
}
.section__lead {
  text-align: center; margin-top: 10px;
  font-size: 1.2rem; font-weight: 700; color: var(--ink-soft);
}

/* ---------- Learning cards ---------- */
.cards {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  --c-bg: var(--blue-100); --c-accent: var(--blue-600);
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px;
  padding: 26px 18px 24px;
  border: 0; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--white) 0%, var(--c-bg) 100%);
  box-shadow: 0 8px 0 var(--c-shadow, #c7dbfb), var(--shadow);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
  top: -60px; right: -50px; background: var(--c-bg); opacity: .7;
}
.card:hover { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 14px 0 var(--c-shadow, #c7dbfb), var(--shadow-lg); }
.card:active { transform: translateY(2px) scale(.98); box-shadow: 0 3px 0 var(--c-shadow, #c7dbfb), var(--shadow-sm); }
.card__art {
  position: relative; z-index: 1;
  width: 120px; height: 100px;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.card:hover .card__art { transform: scale(1.12) rotate(-4deg); }
.card__art svg { width: 100%; height: 100%; font-family: var(--font-display); }
.card__title { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--c-accent); line-height: 1.15; }
.card__text { position: relative; z-index: 1; font-weight: 700; color: var(--ink-soft); font-size: .98rem; }
.card__go {
  position: relative; z-index: 1;
  margin-top: 8px;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-accent); color: var(--white); font-size: 1.3rem; font-weight: 900;
  transition: transform .25s;
}
.card:hover .card__go { transform: translateX(4px) scale(1.1); }

.card--blue   { --c-bg: var(--blue-100);   --c-accent: var(--blue-600);   --c-shadow: #bcd4fb; }
.card--purple { --c-bg: var(--purple-100); --c-accent: var(--purple-500); --c-shadow: #d9cffd; }
.card--pink   { --c-bg: var(--pink-100);   --c-accent: #db2777;           --c-shadow: #f9cfe4; }
.card--yellow { --c-bg: var(--yellow-100); --c-accent: #ca8a04;           --c-shadow: #f6e7a1; }
.card--green  { --c-bg: var(--green-100);  --c-accent: #059669;           --c-shadow: #b4ecd6; }
.card--orange { --c-bg: var(--orange-100); --c-accent: #ea580c;           --c-shadow: #fbd3ad; }

/* ---------- Today section ---------- */
.today {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  align-items: start;
}
.today__tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tile {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.tile:hover { transform: translateY(-6px); }
.tile__label {
  align-self: flex-start;
  font-weight: 900; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.tile--letter .tile__label { background: var(--blue-100); color: var(--blue-700); }
.tile--number .tile__label { background: var(--yellow-100); color: #a16207; }
.tile--color  .tile__label { background: #fef08a; color: #854d0e; }
.tile--animal .tile__label { background: var(--orange-100); color: #c2410c; }
.tile__art { width: 120px; height: 120px; }
.tile__art svg { width: 100%; height: 100%; }
.tile__text { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--blue-900); }
.spin-slow { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.plan {
  background: linear-gradient(180deg, #ffffff, #f5f3ff);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky; top: calc(var(--header-h) + 20px);
}
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan__title { font-size: 1.5rem; color: var(--purple-500); }
.plan__stars { font-size: 1.3rem; letter-spacing: 2px; white-space: nowrap; }
.plan__stars .off { filter: grayscale(1); opacity: .3; }
.plan__progress { height: 14px; background: var(--purple-100); border-radius: 999px; margin: 16px 0 18px; overflow: hidden; }
.plan__progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--yellow-400), var(--pink-400), var(--purple-500));
  border-radius: inherit;
  transition: width .5s cubic-bezier(.34,1.56,.64,1);
}
.plan__list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.task {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; min-height: 60px;
  border: 3px solid transparent; border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 800; font-size: 1.05rem; text-align: left;
  transition: transform .2s, border-color .2s, background .2s;
}
.task:hover { transform: translateX(4px); border-color: var(--purple-100); }
.task__check {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--purple-400);
  display: grid; place-items: center;
  transition: background .2s, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.task__emoji { font-size: 1.4rem; }
.task.is-done { background: var(--green-100); border-color: #a7f3d0; color: #065f46; }
.task.is-done .task__check { background: var(--green-400); border-color: var(--green-400); transform: scale(1.15); }
.task.is-done .task__check::after { content: "✓"; color: var(--white); font-weight: 900; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  background: linear-gradient(180deg, var(--blue-900), #172554);
  color: #c7d2fe;
  border-radius: 48px 48px 0 0;
  padding: 56px 0 24px;
}
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__col p { line-height: 1.6; max-width: 34ch; }
.footer h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 4px; }
.logo--footer { color: var(--white); }
.logo--footer .logo__text b { color: var(--yellow-400); }
.footer__link {
  border: 0; background: none; padding: 4px 0; text-align: left;
  color: #c7d2fe; font-weight: 700;
  transition: color .2s, transform .2s;
}
.footer__link:hover { color: var(--yellow-400); transform: translateX(4px); }
.footer__bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: .95rem;
}

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(30, 58, 138, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__box {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop-in .4s cubic-bezier(.34,1.56,.64,1);
}
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--blue-50); color: var(--blue-700);
  font-size: 1.1rem; font-weight: 900;
  transition: transform .2s, background .2s;
}
.modal__close:hover { transform: rotate(90deg); background: var(--blue-100); }
.modal__emoji { font-size: 3.6rem; line-height: 1; margin-bottom: 10px; }
.modal__title { font-size: 1.8rem; color: var(--blue-900); }
.modal__text { margin-top: 10px; font-weight: 700; color: var(--ink-soft); line-height: 1.55; }
.modal__list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; text-align: left; }
.modal__list li { background: var(--blue-50); border-radius: 16px; padding: 12px 16px; font-weight: 700; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }

.form { margin-top: 20px; display: grid; gap: 14px; text-align: left; }
.form__field { display: grid; gap: 6px; font-weight: 800; color: var(--ink-soft); }
.form__field input {
  font: inherit; font-weight: 700;
  padding: 14px 16px; min-height: 52px;
  border: 3px solid var(--blue-100); border-radius: 16px;
  outline: none; color: var(--ink);
  transition: border-color .2s;
}
.form__field input:focus { border-color: var(--blue-400); }
.form__msg { min-height: 1.2em; font-weight: 800; font-size: .95rem; }
.form__msg.is-error { color: #dc2626; }
.form__msg.is-ok { color: #059669; }

/* Free version (no server): hide what needs accounts or the server */
.is-static .server-only { display: none !important; }

/* ---------- Toast & confetti ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  transform: translate(-50%, calc(100% + 60px));
  visibility: hidden;
  background: var(--blue-900); color: var(--white);
  padding: 14px 22px; border-radius: 24px;
  width: max-content; line-height: 1.35;
  font-weight: 800; box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px); text-align: center;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), visibility 0s .4s;
}
.toast:empty { display: none; }
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform .4s cubic-bezier(.34,1.56,.64,1); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 110; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px;
  width: 12px; height: 16px; border-radius: 3px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Daily screen-time limit (js/progress.js) ---------- */
.limit {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 16px;
  background: linear-gradient(180deg, rgba(30,27,75,.88), rgba(76,29,149,.9));
  animation: fade .4s ease;
}
.limit__box {
  width: min(460px, 100%); text-align: center;
  background: #fff; border-radius: var(--radius-lg); padding: 34px 26px 28px;
  box-shadow: var(--shadow-lg);
}
.limit__bot { font-size: 4.4rem; line-height: 1; animation: floaty 4s ease-in-out infinite; }
.limit__title { margin-top: 12px; font-size: 2rem; color: var(--blue-900); }
.limit__text { margin: 10px 0 20px; font-weight: 800; color: var(--ink-soft); font-size: 1.15rem; line-height: 1.5; }
.limit__parent { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__text { order: 2; display: flex; flex-direction: column; align-items: center; }
  .hero__robot { order: 1; }
  .hero__buttons, .hero__perks { justify-content: center; }
  .robot-stage { width: min(360px, 90%); }
  .today { grid-template-columns: 1fr; }
  .plan { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .container { padding: 0 16px; }
  .logo__badge { width: 44px; height: 44px; border-radius: 14px; }
  .logo__badge svg { width: 34px; height: 34px; }
  .logo__text { font-size: 1.15rem; }
  .lang__btn { padding: 8px 10px; font-size: .85rem; }
  .btn--parent { padding: 10px 12px; }
  .btn--parent span:last-child { display: none; } /* icon-only on phones */
  .hero { padding-top: 24px; }
  .hero__buttons { flex-direction: column; width: 100%; }
  .hero__buttons .btn { width: 100%; }
  .btn--xl { min-height: 64px; font-size: 1.2rem; }
  .speech { left: 0; font-size: .95rem; max-width: 180px; }
  .orbit { width: 46px; height: 46px; font-size: 1.5rem; border-radius: 16px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card { padding: 20px 12px; }
  .card__art { width: 96px; height: 80px; }
  .card__title { font-size: 1.2rem; }
  .card__text { font-size: .88rem; }
  .section { padding: 52px 0; }
  .today__tiles { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tile { padding: 16px 12px; }
  .tile__art { width: 90px; height: 90px; }
  .tile__text { font-size: 1.1rem; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .logo__text { display: none; }
  .today__tiles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
