/* ---------- Fonts ---------- */

@font-face {
  font-family: "Fixel Display";
  src: url("assets/fonts/FixelDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fixel Display";
  src: url("assets/fonts/FixelDisplay-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fixel Display";
  src: url("assets/fonts/FixelDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Self-hosted (latin subsets) — no Google Fonts round-trip */
@font-face {
  font-family: "Albert Sans";
  src: url("assets/fonts/AlbertSans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Code";
  src: url("assets/fonts/GoogleSansCode.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Covered By Your Grace";
  src: url("assets/fonts/CoveredByYourGrace.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --panel-bg: #fbf8e4;
  --panel-border: rgba(223, 208, 166, 0.7);
  --panel-border-parent: rgba(140, 142, 223, 0.5);

  --headline: #003c35;
  --headline-parent: #f7f5e7;
  --body-color: #3c555a;
  --dock-label: #3c3113;
  --ink: #2b2a2f;

  --pink: #d11ba4;
  --child-pink: #d21ca4;
  --badge-blue: #104fdc;
  --clock-teal: #0a9183;
  --terminal-teal: #1dc3b2;

  --grad-cta: linear-gradient(-48.356deg, #ff8342 4.82%, #d11ba4 59.91%);
  --grad-switch: linear-gradient(267.85deg, #ff8342 26.28%, #d11ba4 84.81%);
  --grad-tile-pink: linear-gradient(45.477deg, #d055b1 0%, #ea82d0 83.34%);
  --grad-card-draw: linear-gradient(148.67deg, #ffe0f8 40.14%, #ffbdf0 97.61%);
  --grad-card-write: linear-gradient(27.94deg, #c7d8ff 63.74%, #9fbcff 99.46%);
  --grad-panel-parent: linear-gradient(188.44deg, #14153b 43.03%, #3c3d59 89.65%);

  --font-mono: "Google Sans Code", "SF Mono", Menlo, monospace;
  --font-display: "Fixel Display", "Albert Sans", sans-serif;
  --font-body: "Albert Sans", system-ui, sans-serif;
  --font-logo: "Labil Grotesk", "Albert Sans", sans-serif;
  --font-story: "Cooper Md BT", "Cooper BT", "Iowan Old Style", Georgia, serif;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  row-gap: 84px;
  padding: 18px 18px 72px;
  background: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Grid items default to min-width:auto (min-content floor); a single
   fixed-width illustration inside a section would widen the whole track
   and overflow the page — let sections shrink to the track instead */
body > * {
  min-width: 0;
}

button {
  font: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  /* imgs carry intrinsic width/height attrs (CLS); when CSS sets only one
     axis, the other must follow the aspect ratio, not the attribute */
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

/* ---------- Hero panel ---------- */

.hero {
  position: relative;
  width: min(1410px, 100%);
  height: 745px;
  background: var(--panel-bg);
  border: 6px solid var(--panel-border);
  border-radius: 42px;
  overflow: hidden;
  animation: hero-in 0.7s ease both;
  transition: border-color 0.5s ease;
}

.hero[data-mode="parent"] {
  border-color: var(--panel-border-parent);
}

@keyframes hero-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dark parent theme fades in over the cream panel */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--grad-panel-parent);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.hero[data-mode="parent"]::before {
  opacity: 1;
}

/* Elements that belong to only one mode */
.only-kid,
.only-parent {
  transition: opacity 0.45s ease, visibility 0.45s;
}

.hero[data-mode="parent"] .only-kid,
.hero[data-mode="kid"] .only-parent {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Paired assets that crossfade between modes (logo mark) */
.swap-parent {
  opacity: 0;
}

.hero[data-mode="parent"] .swap-kid { opacity: 0; }
.hero[data-mode="parent"] .swap-parent { opacity: 1; }

.swap-kid,
.swap-parent {
  transition: opacity 0.45s ease;
}

/* ---------- Meadow strip (bottom of the panel) ---------- */

.meadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 332px;
  z-index: 2;
  pointer-events: none;
}

.meadow__layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  transition: opacity 0.5s ease;
}

.meadow__layer--day {
  background-image: url("assets/figma/meadow-day.webp");
  background-size: 100% auto;
  background-position: top center;
  transform: scaleX(-1);
}

.meadow__layer--night {
  background-image: url("assets/figma/meadow-night.webp");
  background-size: cover;
  background-position: bottom center;
  opacity: 0;
}

/* soft moonlight pooling on the hills */
.meadow__layer--night::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 260px 130px at 60% 60%, rgba(173, 196, 255, 0.26), transparent 70%);
  mix-blend-mode: screen;
}

.hero[data-mode="parent"] .meadow__layer--day { opacity: 0; }
.hero[data-mode="parent"] .meadow__layer--night { opacity: 1; }

/* ---------- Header ---------- */

.hero__header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 4;
  pointer-events: none;
}

.logo {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  pointer-events: auto;
  transition: transform 0.3s ease;
}

.logo__mark {
  position: relative;
  width: 34.5px;
  height: 30px;
}

.logo__mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.logo__wordmark {
  font-family: var(--font-logo);
  font-weight: 500;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.25px;
  color: #39274e;
  transition: color 0.5s ease;
}

.hero[data-mode="parent"] .logo__wordmark {
  color: #fff;
}

.nav {
  position: absolute;
  top: 41px;
  right: 38px;
  display: flex;
  align-items: center;
  gap: 24px;
  pointer-events: auto;
}

.nav__link--ext {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav__ext {
  width: 9px;
  height: 9px;
  opacity: 0.55;
}

.nav__link {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.18px;
  line-height: 1.3;
  color: var(--headline);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav__link:hover {
  opacity: 0.7;
}

.hero[data-mode="parent"] .nav .nav__link {
  color: #fff;
}

/* ---------- App dock ---------- */

.dock {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.dock__row {
  display: flex;
  align-items: flex-start;
  gap: 26px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7.8px;
  -webkit-tap-highlight-color: transparent;
}

.app__tile {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.app__tile--pink { background: var(--grad-tile-pink); }

.app__tile--ghost {
  overflow: visible;
}

.app__art {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
  pointer-events: none;
}

/* Alphabet block art bleeds past the tile */
.app__art--block {
  width: 135%;
  height: 135%;
}

/* Fishing: golden frame behind, fish in front */
.app__art--frame {
  width: 96px;
  height: 96px;
}

.app__art--fish {
  width: 120%;
  height: 120%;
}

.app__art--photo {
  width: 150%;
  height: 150%;
}

.app__art--chloe {
  width: 185%;
  height: 185%;
}

.app__art--full {
  position: absolute;
  inset: 0;
  transform: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* inner glow on the tiles */
.app__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 2.6px -2.6px 3.5px 0 rgba(255, 255, 255, 0.35);
}

.app__labels {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app__label {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.3px;
  text-align: center;
  color: var(--dock-label);
  transition: transform 0.25s ease, color 0.5s ease;
}

.app__sub {
  font-weight: 400;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.3px;
  text-align: center;
  color: var(--dock-label);
  opacity: 0.6;
  transition: color 0.5s ease;
}

.hero[data-mode="parent"] .app__label,
.hero[data-mode="parent"] .app__sub {
  color: #fff;
}

.app:hover .app__tile {
  transform: translateY(-5px) scale(1.07) rotate(-2deg);
  box-shadow: 0 12px 24px rgba(60, 49, 19, 0.2);
}

.app:hover .app__labels {
  transform: translateY(-2px);
}

.app__labels {
  transition: transform 0.25s ease;
}

.app:active .app__tile {
  transform: translateY(-1px) scale(0.94);
}

.app:focus-visible .app__tile {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.app.is-launching .app__tile {
  animation: jelly 0.55s ease;
}

@keyframes jelly {
  0% { transform: scale(1); }
  25% { transform: scale(0.88, 1.1); }
  50% { transform: scale(1.08, 0.92); }
  75% { transform: scale(0.97, 1.03); }
  100% { transform: scale(1); }
}

/* click sparkles (spawned by script.js) */
.sparkle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  animation: sparkle-fly 0.6s ease-out forwards;
}

@keyframes sparkle-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ---------- Center content ---------- */

.hero__center {
  position: absolute;
  left: 50%;
  top: 125px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: min(706px, calc(100% - 48px));
}

/* Switcher */

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

.switcher__option {
  font-size: 30px;
  line-height: 1.3;
  transition: color 0.4s ease, opacity 0.25s ease;
}

.switcher__option--child {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.3px;
  width: 97px;
  text-align: right;
  color: var(--child-pink);
}

.switcher__option--parent {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.9px;
  color: var(--headline);
  opacity: 0.5;
}

.hero[data-mode="parent"] .switcher__option--child {
  color: #fff;
  opacity: 0.3;
}

.hero[data-mode="parent"] .switcher__option--parent {
  color: #fff;
  opacity: 1;
}

.switcher__option:hover {
  opacity: 0.75;
}

.hero[data-mode="kid"] .switcher__option--child:hover,
.hero[data-mode="parent"] .switcher__option--parent:hover {
  opacity: 1;
}

.switcher__option:focus-visible,
.switcher__track:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 8px;
}

.switcher__track {
  position: relative;
  width: 94px;
  height: 52px;
  padding: 6px;
  border-radius: 56px;
  background: var(--grad-switch);
  transition: filter 0.25s ease;
}

.switcher__track:hover {
  filter: brightness(1.06);
}

.switcher__knob {
  position: relative;
  z-index: 1;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero[data-mode="parent"] .switcher__knob {
  transform: translateX(42px);
}

/* Copy */

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Title and sub crossfade to their new text on mode switch */

.hero__title.is-swapping,
.hero__sub.is-swapping {
  opacity: 0;
  transform: translateY(8px);
}

.hero__title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--headline);
  max-width: 694px;
}

.hero__sub {
  margin: 0;
  font-size: 18px;
  line-height: 1.38;
  letter-spacing: -0.18px;
  color: var(--body-color);
  max-width: 527px;
}

.hero__title,
.hero__sub {
  transition: color 0.5s ease, opacity 0.18s ease, transform 0.18s ease;
}

.hero[data-mode="parent"] .hero__title {
  color: var(--headline-parent);
}

.hero[data-mode="parent"] .hero__sub {
  color: #fff;
}

/* CTA */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 20px 36px;
  border-radius: 18px;
  background: var(--grad-cta);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.44px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(209, 27, 164, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px rgba(209, 27, 164, 0.35);
}

.cta:active {
  transform: translateY(0) scale(0.97);
}

/* ---------- Floating cards ---------- */

.float-card {
  position: absolute;
  z-index: 1;
}

.float-card__body {
  border: 2px solid rgba(255, 255, 255, 0.45);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s ease;
}

.float-card__head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 17px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6.4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.badge--draw { color: var(--pink); }
.badge--write { color: var(--badge-blue); }

.badge__icon {
  width: 20px;
  height: 20px;
}

.badge__icon--tilt {
  transform: rotate(2deg);
}

/* Draw card — top right */

.float-card--draw {
  top: 115px;
  right: -17px;
  transform: rotate(-7deg);
  animation: bob-a 7s ease-in-out infinite;
}

.float-card--draw .float-card__body {
  width: 311px;
  height: 286px;
  padding: 32px 31px;
  border-radius: 20px;
  background: var(--grad-card-draw);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.draw-card__grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 13px));
  width: 682px;
  height: 342px;
  max-width: none;
  pointer-events: none;
}

.draw-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22.5px;
  line-height: 1.14;
  letter-spacing: -0.23px;
  color: var(--ink);
  max-width: 166px;
}

.draw-card__dino {
  position: absolute;
  left: 32px;
  top: 124px;
  width: 324px;
  height: 174px;
  max-width: none;
  pointer-events: none;
}

/* Write card — under the draw card */

.float-card--write {
  top: 389px;
  right: 54px;
  transform: rotate(5.06deg);
  animation: bob-b 9s ease-in-out infinite;
}

.float-card--write .float-card__body {
  width: 313px;
  padding: 25px 26px;
  border-radius: 19px;
  background: var(--grad-card-write);
}

.write-card__story {
  margin: 0;
  font-family: var(--font-story);
  font-size: 21.5px;
  line-height: 1.14;
  letter-spacing: -0.22px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Timer card — top right (parent mode) */

.float-card--timer {
  top: 127px;
  right: -96px;
  transform: rotate(-12deg);
  animation: bob-a 7s ease-in-out infinite;
}

.float-card--timer .float-card__body {
  width: 328px;
  height: 208px;
  padding: 32px;
  border-radius: 17px;
  border-color: #fff;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.timer-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.25px;
  color: #353149;
  max-width: 208px;
}

.timer-card__clock {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 54px;
  line-height: 1.14;
  letter-spacing: -0.54px;
  color: var(--clock-teal);
  font-variant-numeric: tabular-nums;
}

/* Terminal card — under the timer (parent mode) */

.float-card--terminal {
  top: 383px;
  right: -64px;
  transform: rotate(4.24deg);
  animation: bob-b 9s ease-in-out infinite;
}

.float-card--terminal .float-card__body {
  width: 410px;
  border: none;
  border-radius: 19px;
  background: #424267;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 9.6px;
  height: 48.6px;
  padding-left: 20px;
  border-bottom: 1.2px solid rgba(230, 230, 241, 0.2);
}

.terminal__dot {
  width: 11.9px;
  height: 11.9px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__line {
  margin: 0;
  padding: 9.6px 19.2px 28.8px;
  font-family: var(--font-mono);
  font-size: 21.6px;
  line-height: 1.3;
  color: #fff;
  min-height: 66px;
}

.terminal__user {
  color: var(--terminal-teal);
}

.terminal__caret {
  display: inline-block;
  width: 11px;
  height: 22px;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: #fff;
  animation: caret-blink 1.05s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes bob-a {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes bob-b {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 9px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1360px) {
  .float-card--draw { right: -60px; }
  .float-card--timer { right: -130px; }
}

@media (max-width: 1240px) {
  .float-card {
    display: none;
  }
}

@media (max-width: 1140px) {
  .hero {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* on stacked layout, inactive-mode elements must leave the flow entirely */
  .hero[data-mode="parent"] .only-kid,
  .hero[data-mode="kid"] .only-parent {
    display: none;
  }

  .hero__header {
    position: static;
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 32px 24px 0;
    pointer-events: auto;
    width: 100%;
  }

  .logo,
  .nav {
    position: static;
    transform: none;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__center {
    position: static;
    order: 2;
    transform: none;
    margin: 40px auto 0;
    gap: 32px;
  }

  .dock {
    position: static;
    order: 3;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    margin: 44px 24px 0;
  }

  .dock__row {
    display: contents;
  }

  .meadow {
    position: relative;
    inset: auto;
    order: 4;
    width: 100%;
    height: clamp(200px, 42vw, 340px);
    margin-top: 32px;
  }

  .meadow__layer--day,
  .meadow__layer--night {
    background-size: cover;
    background-position: bottom center;
  }
}

@media (max-width: 560px) {
  .switcher__option {
    font-size: 22px;
  }

  .switcher__option--child {
    width: 71px;
  }

  .switcher__track {
    width: 76px;
    height: 42px;
  }

  .switcher__knob {
    width: 30px;
    height: 30px;
  }

  .hero[data-mode="parent"] .switcher__knob {
    transform: translateX(34px);
  }

  .hero__sub {
    font-size: 16px;
  }

  .cta {
    font-size: 19px;
    padding: 15px 28px;
  }

  .app__tile {
    width: 64px;
    height: 64px;
  }

  .app__art--frame {
    width: 77px;
    height: 77px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Floating top bar ---------- */

.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  width: min(1180px, calc(100vw - 28px));
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 14px 14px 14px 30px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(43, 42, 47, 0.08);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(20, 16, 40, 0.04), 0 14px 40px rgba(30, 24, 60, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.topbar__logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.topbar__logo:hover {
  transform: scale(1.03);
}

.topbar__mark {
  width: 28px;
  height: 24.5px;
}

.topbar__wordmark {
  font-family: var(--font-logo);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.2px;
  color: #39274e;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.topbar__nav .nav__link {
  font-size: 15.5px;
}

.topbar__cta {
  padding: 12px 24px;
  border-radius: 14px;
  background: var(--grad-cta);
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.2px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(209, 27, 164, 0.28);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.topbar__cta:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 8px 20px rgba(209, 27, 164, 0.35);
}

.topbar__cta:active {
  transform: scale(0.97);
}

@media (max-width: 560px) {
  .topbar__nav {
    display: none;
  }

  .topbar {
    padding-left: 20px;
  }
}

/* ================= Features section ================= */

.features {
  width: min(1216px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.features__head {
  width: min(802px, 100%);
  margin: 0 auto 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.features__title {
  margin: 0;
  font-weight: 600;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -1.26px;
  color: #008c7e;
}

.features__sub {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: var(--body-color);
}

.feat {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
}

.feat__title {
  margin: 0;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.56px;
  color: var(--headline);
}

.feat__title--lg {
  font-size: 32px;
  letter-spacing: -0.64px;
}

.feat__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.16px;
  color: var(--body-color);
}

/* ---------- Desktop card ---------- */

.feat--desktop {
  background: #f7f5e7;
  height: 510px;
  display: flex;
}

.feat-desktop__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.feat-desktop__copy {
  padding: 60px 70px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.profiles {
  flex: 1;
  padding: 26px 36px 0;
}

.profiles__label {
  margin: 0 0 21px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.18px;
  color: var(--pink);
  rotate: -1deg;
}

.profiles__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pcard {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 72px;
  border: 5px solid transparent;
  border-radius: 18px;
  background: #fff;
  filter: drop-shadow(4px 9px 15px rgba(203, 201, 181, 0.5));
  text-align: left;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.pcard:hover {
  transform: translateY(-2px);
}

.pcard.is-active {
  background: #f7f5e7;
  filter: none;
}

.pcard--kenji.is-active { border-color: #235fe8; }
.pcard--ava.is-active { border-color: #f66e56; }
.pcard--diego.is-active { border-color: #539e1e; }
.pcard--chloe.is-active { border-color: #d11ba4; }

.pcard__media {
  align-self: stretch;
  width: 72px;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, width 0.3s ease;
}

.pcard.is-active .pcard__media {
  width: 78px;
}

.pcard--kenji.is-active .pcard__media { background: #dce6ff; }
.pcard--ava.is-active .pcard__media { background: #ffe3de; }
.pcard--diego.is-active .pcard__media { background: #ddf1cf; }
.pcard--chloe.is-active .pcard__media { background: #ffe9fa; }

.pcard__tile {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(45.48deg, #94d268 0%, #70ac45 83.34%);
}

.pcard__tile img {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 160%;
  height: 160%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.pcard__tile--diego img { width: 200%; height: 200%; top: 58%; }
.pcard__tile--chloe img { width: 195%; height: 195%; top: 53%; }

.pcard__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 12px;
  min-width: 0;
}

.pcard__name {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.16px;
}

.pcard__name--kenji { color: #235fe8; }
.pcard__name--ava { color: #f66e56; }
.pcard__name--diego { color: #539e1e; }
.pcard__name--chloe { color: #d11ba4; }

.pcard__info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: -0.12px;
  color: var(--body-color);
  white-space: nowrap;
}

.pcard__flag {
  width: 16px;
  height: 12px;
  border-radius: 3px;
  border: 0.5px solid #cdcdcd;
  background: #fff;
  object-fit: cover;
}

/* Desktop stage (monitor illustration) */

.feat-desktop__stage {
  position: relative;
  width: 706px;
  flex-shrink: 0;
}

.stage__stand {
  position: absolute;
  left: 248px;
  top: 463px;
  width: 200px;
  height: 99px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stage__stand.is-on {
  opacity: 1;
}

/* Per-kid screens crossfade inside the monitor */
.kidscreen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.kidscreen.is-on {
  opacity: 1;
  pointer-events: auto;
}

.kidscreen__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage__screen {
  position: absolute;
  left: 23px;
  top: 50%;
  translate: 0 -50%;
  width: 649px;
  height: 395px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(186.59deg, #25b2fa 6.23%, #c8f4ff 66.6%);
}

.stage__island {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 989px;
  height: 572px;
  max-width: none;
  transform: translate(calc(-50% + 17px), calc(-50% - 43px)) rotate(-1deg);
  object-fit: cover;
}

.stage__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(255.98deg, rgba(170, 214, 255, 0) 37.59%, rgba(170, 214, 255, 0.6) 73.17%);
}

.stage__dock {
  position: absolute;
  left: 9px;
  top: 50%;
  translate: 0 -50%;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 17px;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.stage__icon {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.7px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(45.48deg, #08359b 0%, #447dfc 83.34%);
  box-shadow: 6.5px 6px 17px rgba(0, 0, 0, 0.2), inset 1.3px -1.3px 3px #efc9fd;
}

.stage__icon--r1 { rotate: -1deg; }
.stage__icon--r2 { rotate: -2deg; }
.stage__icon--r3 { rotate: -3deg; }

.stage__icon img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.stage__icon--kenji img { width: 160%; height: 160%; top: 56%; }
.stage__icon--book img { width: 134%; height: 134%; }
.stage__icon--fish img { width: 122%; height: 122%; }
.stage__icon--abc img { width: 149%; height: 149%; }

.stage__divider {
  width: 57px;
  height: 2px;
}

/* Quiz app window */

.quiz {
  position: absolute;
  left: 161px;
  top: 52px;
  width: 410px;
  height: 280px;
  background: #ffebf9;
  border: 3px solid var(--headline);
  border-radius: 16px;
  rotate: -1deg;
  box-shadow: 0 4.5px 0 var(--headline);
}

.quiz__cat {
  position: absolute;
  left: 50%;
  top: -48px;
  translate: -50% 0;
  width: 110px;
  height: 110px;
  rotate: 11deg;
  animation: cat-sway 9s ease-in-out infinite;
}

@keyframes cat-sway {
  0%, 100% { rotate: 8deg; }
  50% { rotate: 14deg; }
}

.quiz__sound {
  position: absolute;
  left: 35px;
  top: 13px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f6cbe9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz__sound img {
  width: 19px;
  height: 19px;
}

.quiz__again {
  position: absolute;
  left: calc(50% + 141px);
  top: 16px;
  translate: -50% 0;
  height: 32px;
  padding: 0 15px;
  border-radius: 32px;
  background: #f6cbe9;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: 10px;
  color: var(--headline);
  white-space: nowrap;
}

.quiz__again img {
  width: 11px;
  height: 11px;
}

.quiz__q {
  position: absolute;
  left: 50%;
  top: 80px;
  translate: -50% 0;
  margin: 0;
  font-weight: 600;
  font-size: 17.7px;
  line-height: 1.1;
  letter-spacing: -0.53px;
  color: var(--headline);
  white-space: nowrap;
}

.quiz__slots {
  position: absolute;
  left: 50%;
  top: calc(50% + 1px);
  translate: -50% -50%;
  display: flex;
  gap: 10px;
}

.quiz__slots span {
  width: 60px;
  height: 53px;
  background: #fff;
  border: 2.4px dashed #dda3cc;
  border-radius: 13px;
}

.quiz__keys {
  position: absolute;
  left: 50%;
  top: calc(50% + 74px);
  translate: -50% -50%;
  display: flex;
  gap: 8px;
}

.quiz__keys button {
  padding: 11px 16px;
  border-radius: 14.5px;
  background: #ad2284;
  box-shadow: 0 4.1px 0 #650047;
  color: #fff;
  font-weight: 600;
  font-size: 28.6px;
  line-height: 1.1;
  letter-spacing: -0.86px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.quiz__keys button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #650047;
}

/* ---------- Three feature cards ---------- */

.feat-row {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.feat-row .feat {
  flex: 1;
  min-width: 0;
  height: 428px;
  display: flex;
  flex-direction: column;
}

.feat--ai { background: #defede; }
.feat--play { background: #dbeaff; }
.feat--store { background: #ffe4f7; }

.feat__info {
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.feat__art {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* Trusted AI collage (flattened from Figma) */

.tai-wrap {
  position: relative;
  width: 354px;
  height: 256px;
  margin: -22px auto 0;
  /* the card is a fixed 428px (206px art space); scale the whole wrap so the
     collage fits without clipping — the overlay animation scales with it */
  zoom: 0.84;
}

.tai-wrap img {
  display: block;
  width: 100%;
}

/* One 5.2s story loop: comets feed KIDS AI, the shield pulses,
   a spark runs the line to tada.computer. Positions from the Figma node. */

.tai-glow {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 14px 5px rgba(0, 140, 126, 0.35);
  opacity: 0;
  pointer-events: none;
  animation: tai-comet 5.2s cubic-bezier(0.45, 0, 0.35, 1) infinite;
}

.tai-glow--1 { left: 65px; top: 69px; --tx: 86px; --ty: 55px; }
.tai-glow--2 { left: 100px; top: 123px; --tx: 50px; --ty: 2px; animation-delay: 0.18s; }
.tai-glow--3 { left: 66px; top: 178px; --tx: 85px; --ty: -50px; animation-delay: 0.36s; }

@keyframes tai-comet {
  0% { opacity: 0; translate: 0 0; scale: 0.5; }
  7% { opacity: 1; scale: 1; }
  26% { opacity: 1; }
  32% { opacity: 0; translate: var(--tx) var(--ty); scale: 0.7; }
  100% { opacity: 0; translate: var(--tx) var(--ty); scale: 0.7; }
}

.tai-pulse {
  position: absolute;
  left: 150px;
  top: 89px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 116, 183, 0.55) 0%, rgba(255, 116, 183, 0) 68%);
  opacity: 0;
  pointer-events: none;
  animation: tai-pulse 5.2s ease-in-out infinite;
}

@keyframes tai-pulse {
  0%, 30% { opacity: 0; scale: 0.5; }
  38% { opacity: 1; scale: 1; }
  50% { opacity: 0; scale: 1.3; }
  100% { opacity: 0; scale: 1.3; }
}

.tai-spark {
  position: absolute;
  left: 228px;
  top: 129px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8bd8;
  box-shadow: 0 0 10px 3px rgba(209, 27, 164, 0.5);
  opacity: 0;
  pointer-events: none;
  animation: tai-sparkrun 5.2s cubic-bezier(0.45, 0, 0.35, 1) infinite;
}

@keyframes tai-sparkrun {
  0%, 44% { opacity: 0; translate: 0 0; }
  49% { opacity: 1; }
  60% { opacity: 1; }
  64% { opacity: 0; translate: 33px 0; }
  100% { opacity: 0; translate: 33px 0; }
}

.tai-flash {
  position: absolute;
  left: 263px;
  top: 88px;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  pointer-events: none;
  animation: tai-flash 5.2s ease-in-out infinite;
}

@keyframes tai-flash {
  0%, 60% { opacity: 0; scale: 0.6; }
  67% { opacity: 1; scale: 1; }
  80% { opacity: 0; scale: 1.25; }
  100% { opacity: 0; scale: 1.25; }
}

/* Play and create collage */

.play__vinyl {
  position: absolute;
  left: calc(50% - 139px);
  top: calc(50% - 1px);
  translate: -50% -50%;
  width: 316px;
  max-width: none;
  rotate: -8deg;
  filter: drop-shadow(10px 9.5px 27px rgba(138, 163, 200, 0.5));
}

.play__frame {
  position: absolute;
  left: calc(50% + 115px);
  top: calc(50% - 38px);
  translate: -50% -50%;
  width: 383px;
  max-width: none;
  rotate: 3deg;
  filter: drop-shadow(10px 9.5px 27px rgba(138, 163, 200, 0.5));
}

.play__sticker {
  position: absolute;
  left: calc(50% + 115px);
  top: calc(50% - 33px);
  translate: -50% -50%;
  width: 140px;
  height: 93px;
  background: #ffcef4;
  rotate: 3deg;
  mix-blend-mode: multiply;
}

.play__scribble {
  position: absolute;
  left: 50%;
  top: 12px;
  translate: -50% 0;
  rotate: 4deg;
  font-family: "Covered By Your Grace", cursive;
  font-size: 25.9px;
  line-height: 0.83;
  letter-spacing: -0.26px;
  color: var(--pink);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.play__emoji {
  position: absolute;
  line-height: 1;
}

.play__emoji--rocket {
  left: 50%;
  top: 42px;
  translate: -50% 0;
  rotate: 40deg;
  font-size: 40px;
}

.play__emoji--earth {
  right: 4px;
  top: 12px;
  rotate: 28deg;
  font-size: 23.5px;
}

.play__emoji--planet {
  left: 2px;
  top: 15px;
  rotate: -3deg;
  font-size: 31.8px;
}

.play__dot {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play__dot img {
  width: 20px;
  height: 20px;
}

.play__dot--a {
  left: calc(50% + 22px);
  top: calc(50% - 111px);
  translate: -50% -50%;
}

.play__dot--b {
  left: calc(50% - 116px);
  top: calc(50% - 80px);
  translate: -50% -50%;
}

.play__more {
  position: absolute;
  left: calc(50% + 70px);
  top: calc(50% + 68px);
  translate: -50% -50%;
  rotate: 3deg;
  padding: 12px 20px;
  border-radius: 999px;
  background: #2a84ff;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.36px;
  white-space: nowrap;
}

.play__more img {
  width: 20px;
  height: 20px;
}

/* TadaStore window */

.store {
  position: absolute;
  left: calc(50% + 36px);
  top: calc(50% + 13px);
  translate: -50% -50%;
  width: 382px;
  height: 270px;
  background: #fff;
  border: 6.3px solid rgba(247, 171, 225, 0.5);
  border-radius: 24px;
}

.store__dots {
  position: absolute;
  left: 20px;
  top: 21px;
  display: flex;
  gap: 8px;
}

.store__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d8d7dd;
}

.store__dot--red { background: #ff5f57; }

.store__title {
  position: absolute;
  left: 50%;
  top: 15px;
  translate: -50% 0;
  margin: 0;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--headline);
}

.store__items {
  position: absolute;
  left: 40px;
  top: 65px;
  display: flex;
  gap: 20px;
}

.sitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.sitem__icon {
  position: relative;
  width: 92px;
  height: 92px;
  margin-bottom: 6px;
  border-radius: 18px;
  overflow: hidden;
  border: 1.1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(45.48deg, #08359b 0%, #447dfc 83.34%);
  box-shadow: inset 3px -3px 4px rgba(255, 255, 255, 0.35);
}

.sitem__icon img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.sitem__icon--book img { width: 100%; height: 100%; }
.sitem__icon--fish img { width: 122%; height: 122%; }
.sitem__icon--skate img { width: 150%; height: 150%; rotate: -1deg; }

.sitem__name {
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.25;
  letter-spacing: -0.25px;
  color: var(--dock-label);
}

.sitem__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border: 1px solid rgba(50, 149, 83, 0.45);
  border-radius: 50px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.25;
  letter-spacing: -0.25px;
  color: #329553;
}

.sitem__btn--installed {
  padding: 7px 17px;
  border: none;
  background: #329553;
  color: #fff;
}

.sitem__btn img {
  width: 9px;
  height: 7px;
}

/* ---------- Code card ---------- */

.feat--code {
  background: #f0f0f0;
  height: 445px;
  display: flex;
  gap: 24px;
}

.feat-code__stage {
  width: 628px;
  height: 100%;
  padding: 16px;
  flex-shrink: 0;
}

.code-panel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(187.5deg, #25b2fa 6.23%, #c8f4ff 66.61%);
}

.code-editor {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 43.5px), calc(-50% + 42.7px));
  width: 587px;
  height: 417px;
  background: #181720;
  border-radius: 16px;
  box-shadow: 0 5px 12px rgba(28, 61, 78, 0.1);
}

.code-editor__bar {
  position: relative;
  height: 45px;
  border-bottom: 1px solid #2c2b3c;
}

.code-editor__dots {
  position: absolute;
  left: 26px;
  top: 50%;
  translate: 0 -50%;
  display: flex;
  gap: 8px;
}

.code-editor__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3942;
}

.code-editor__dot--red { background: #ff5f57; }

.code-editor__file {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.12px;
  color: #fff;
  text-transform: lowercase;
  white-space: nowrap;
}

.code-editor__file span { color: #838096; }

.code-editor__code {
  margin: 0;
  padding: 22px 26px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13.2px;
  line-height: 1.3;
  letter-spacing: -0.13px;
  color: #fff;
  text-transform: lowercase;
  white-space: pre-wrap;
}

.c-com { color: #838096; }
.c-kw { color: #cf83ff; }
.c-var { color: #ff8342; }
.c-fn { color: #6ad0ff; }
.c-str { color: #6affb0; }

.code-panel__user {
  position: absolute;
  left: 21px;
  bottom: 21px;
  width: 92px;
  height: 93px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.8);
  background: #fff;
  overflow: hidden;
}

.code-panel__user img {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 152%;
  height: 152%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.feat-code__info {
  flex: 1;
  min-width: 0;
  padding: 64px 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.feat-code__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feat-code__titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feat__text--left {
  text-align: left;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 20px;
  border-radius: 30px;
  background: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.48px;
  white-space: nowrap;
}

.chip--blue { color: #235fe8; }
.chip--pink { color: var(--pink); }
.chip--green { color: #329553; }
.chip--orange { color: #e7553b; }

.tokens-btn {
  padding: 18px 34px;
  border: 2px solid #ff8342;
  border-radius: 18px;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.44px;
  color: #d11ca4;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.tokens-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 131, 66, 0.25);
}

/* ---------- Features responsive ---------- */

@media (max-width: 1240px) {
  .feat--desktop {
    flex-direction: column;
    height: auto;
  }

  .feat-desktop__info {
    padding-bottom: 36px;
  }

  .feat-desktop__stage {
    width: 706px;
    max-width: 100%;
    height: 510px;
    margin: 0 auto;
  }

  .feat-row {
    flex-direction: column;
  }

  .feat-row .feat {
    width: 100%;
  }

  .feat--code {
    flex-direction: column;
    height: auto;
  }

  .feat-code__stage {
    width: 100%;
    max-width: 628px;
    height: 445px;
  }

  .feat-code__info {
    padding: 8px 32px 40px;
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .features__title {
    font-size: 32px;
    letter-spacing: -0.8px;
  }

  .features__sub {
    font-size: 17px;
  }

  .feat-desktop__copy {
    padding: 40px 24px 0;
  }

  .profiles {
    padding: 26px 20px 0;
  }

  .profiles__grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pcard {
    width: min(300px, 100%);
  }

  .feat-desktop__stage {
    /* 706px x 0.47 = 332px: fits the 354px mobile track; 0.52 widened the
       body grid track and caused 16px of page-wide horizontal overflow */
    zoom: 0.47;
  }

  .feat-code__stage {
    height: 340px;
  }

  .code-editor {
    transform: translate(calc(-50% + 20px), calc(-50% + 60px)) scale(0.8);
  }

  .store {
    left: 50%;
    width: min(382px, 96%);
  }

  .store__items {
    left: 50%;
    translate: -50% 0;
  }
}

@media (max-width: 760px) {
  .feat-row .feat {
    height: auto;
  }

  .feat__art--ai {
    min-height: 0;
  }

  .tai-wrap {
    margin-top: -10px;
    zoom: 1; /* stacked cards are auto-height — full-size collage fits */
  }

  .feat__art--play {
    flex: none;
    height: 310px;
    zoom: 0.85;
  }

  .play__frame { top: calc(50% - 10px); }
  .play__sticker { top: calc(50% - 5px); }
  .play__vinyl { top: calc(50% + 10px); }
  .play__more { top: calc(50% + 90px); }

  .feat__art--store {
    flex: none;
    height: 262px;
  }

  .store {
    top: calc(50% + 24px);
  }
}

/* ================= Apps section ================= */

.apps {
  width: min(1216px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 52px;
}

.apps__top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.apps__title {
  margin: 0;
  font-weight: 600;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -1.26px;
  color: #008c7e;
  text-align: center;
}

.apps__strip {
  width: min(976px, 100%);
  background: #f7f5e7;
  border-radius: 32px;
  padding: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apps__group {
  display: flex;
  align-items: center;
  gap: 19px;
}

.apps__group {
  filter: grayscale(1);
  opacity: 0.4;
  cursor: pointer;
  transition: filter 0.45s ease, opacity 0.45s ease;
}

.apps__group:not(.is-on):hover {
  opacity: 0.65;
}

.apps__group.is-on {
  filter: none;
  opacity: 1;
}

.apps__divider {
  width: 1px;
  align-self: stretch;
  background: rgba(60, 49, 19, 0.12);
}

.aicon {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 19px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2.2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(45.48deg, #08359b 0%, #447dfc 83.34%);
  box-shadow: 8px 7.5px 21.6px rgba(0, 0, 0, 0.2), inset 1.6px -1.6px 3.8px #efc9fd;
}

.aicon img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.aicon--piano img { width: 115%; height: 115%; }
.aicon--fish img { width: 120%; height: 120%; }
.aicon--frame img { width: 120%; height: 120%; }
.aicon--book img { width: 100%; height: 100%; }
.aicon--abc img { width: 125%; height: 125%; }

.aicon--teal {
  background: linear-gradient(231.93deg, #00ffc9 13.73%, #00abfc 84.77%);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 3.5px 9.8px 16.8px rgba(0, 0, 0, 0.15);
}

.aicon--plus {
  border: none;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.aicon--plus img {
  left: -16.7%;
  top: -8.8%;
  transform: none;
  width: 142%;
  height: 142%;
  object-fit: fill;
}

.apps__cards {
  display: flex;
  align-items: stretch;
  gap: 32px;
  width: 100%;
}

.acard {
  flex: 1;
  min-width: 0;
  padding: 36px 40px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.acard[data-appgroup] {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.35s ease, background-color 0.35s ease, transform 0.25s ease;
}

.acard[data-appgroup]:not(.is-on):hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.acard.is-on {
  opacity: 1;
  background: rgba(247, 245, 231, 0.8);
  cursor: default;
}

.acard__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acard__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acard__icon {
  width: 32px;
  height: 32px;
}

.acard__icon--lock {
  width: 22px;
}

.acard__title {
  margin: 0;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.26px;
  color: var(--headline);
}

.acard.is-on .acard__title {
  color: #008c7e;
}

.acard__sub {
  margin: 0;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.31;
  color: var(--headline);
}

.acard__rule {
  height: 1px;
  width: 100%;
  background: rgba(0, 60, 53, 0.12);
}

.acard__body {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--body-color);
  opacity: 0.6;
}

.acard.is-on .acard__body {
  opacity: 1;
}

@media (max-width: 1040px) {
  .aicon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }

  .apps__group {
    gap: 12px;
  }
}

@media (max-width: 1240px) {
  .apps__cards {
    flex-direction: column;
  }

  .acard {
    padding: 32px;
  }
}

@media (max-width: 760px) {
  .apps__title {
    font-size: 32px;
    letter-spacing: -0.8px;
  }

  .apps__strip {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .apps__divider {
    display: none;
  }
}

/* ================= Curriculum Brain section ================= */

.brain {
  position: relative;
  width: min(1408px, 100%);
  height: 973px;
  border-radius: 32px;
  overflow: hidden;
  background:
    url("assets/figma/bg-pixel-night.webp") top center / cover no-repeat,
    linear-gradient(190.23deg, #14153b 43.03%, #3c3d59 89.65%);
}

.brain__head {
  position: absolute;
  left: 50%;
  top: 100px;
  translate: -50% 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  width: 100%;
}

.brain__eyebrow {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #ff8342;
}

.brain__soon,
.soon-pill {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--grad-cta);
  color: #fff;
}

.brain__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -1.26px;
  color: #f9f7ec;
}

.brain__sub {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: #fff;
  opacity: 0.85;
  max-width: 695px;
}

.brain__board {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Dashed connectors */

.brain__arrow {
  position: absolute;
  max-width: none;
}

.brain__arrow--group { left: 300px; top: 455px; width: 51px; height: 139px; }
.brain__arrow--h1 { left: 555px; top: 368px; width: 108px; height: 11px; }
.brain__arrow--h2 { left: 744px; top: 368px; width: 264px; height: 11px; }
.brain__arrow--curve { left: 744px; top: 373px; width: 264px; height: 329px; }

/* Terminal */

.brain__terminal {
  position: absolute;
  left: 96px;
  top: 308px;
  width: 459px;
  background: #30303e;
  border-radius: 24px;
  overflow: hidden;
}

.brain__terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40.5px;
  padding-left: 17px;
  border-bottom: 1px solid rgba(230, 230, 241, 0.2);
}

.brain__dot {
  width: 9.9px;
  height: 9.9px;
  border-radius: 50%;
}

.brain__dot--red { background: #ff5f57; }
.brain__dot--yellow { background: #febc2e; }
.brain__dot--green { background: #28c840; }

.brain__terminal-text {
  margin: 0;
  padding: 8px 25px 24px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.3;
  color: #fff;
}

.brain__terminal-text span {
  color: #ee6dce;
}

/* Curriculum Brain core box */

.brain__core {
  position: absolute;
  left: 186px;
  top: 589px;
  width: 280px;
  padding: 40px 32px;
  background: #30303e;
  border: 2px solid #ff8342;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.brain__core-icon {
  width: 80px;
  height: 80px;
}

.brain__core-label {
  margin: 0;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: #f7f5e7;
}

/* Word Match app */

.brain__app {
  position: absolute;
  left: 657px;
  top: 322px;
  width: 94px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
}

.brain__app-tile {
  position: relative;
  width: 93px;
  height: 93px;
  border-radius: 23px;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(231.93deg, #00ffc9 13.73%, #00abfc 84.77%);
  box-shadow: 4.1px 11.5px 19.7px rgba(0, 0, 0, 0.15);
}

.brain__app-tile img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 128%;
  height: 128%;
  object-fit: cover;
  max-width: none;
}

.brain__app-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}

/* App info + feature list */

.brain__info {
  position: absolute;
  left: 50%;
  top: 486px;
  translate: -50% 0;
  width: 274px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.brain__info-title {
  margin: 0;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.19;
  text-align: center;
  color: #fff;
}

.brain__features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}

.brain__feature {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 24px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
  color: #fff;
}

.brain__feature img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Kid result cards */

.brain__card {
  position: absolute;
  left: 1003px;
  width: 280px;
  height: 224px;
  padding: 32px 32px 40px;
  border-radius: 24px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.brain__card--kenji {
  top: 298px;
  background: rgba(234, 134, 244, 0.4);
}

.brain__card--chloe {
  top: 588px;
  background: rgba(88, 193, 88, 0.3);
}

.brain__card-photo {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #fff;
}

.brain__card-photo img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.brain__card-photo--kenji {
  right: -25px;
  top: -55px;
  rotate: 7deg;
  background: linear-gradient(45.48deg, #08359b 0%, #447dfc 83.34%);
}

.brain__card-photo--kenji img {
  width: 165%;
  height: 165%;
}

.brain__card-photo--chloe {
  right: -30px;
  bottom: -30px;
  rotate: 8deg;
  background: var(--grad-tile-pink);
}

.brain__card-photo--chloe img {
  width: 190%;
  height: 190%;
  top: 54%;
}

.brain__card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brain__card-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  color: #fff;
}

.brain__card-flag {
  width: 33px;
  height: 25px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #fff;
  object-fit: cover;
}

.brain__card-age {
  margin: 0;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.1;
  color: #fff;
}

.brain__card-rule {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.brain__card-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brain__card-level {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #fff;
}

.brain__stars {
  display: flex;
  gap: 4px;
}

.brain__stars i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid #fff;
  opacity: 0.4;
}

.brain__stars i.is-filled {
  background: #f66e56;
  border: none;
  opacity: 1;
}

.brain__card-note {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.1;
  color: #fff;
  opacity: 0.6;
}

@media (max-width: 1240px) {
  .brain {
    height: auto;
    padding: 64px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }

  .brain__head {
    position: static;
    translate: none;
  }

  .brain__title {
    font-size: 32px;
    letter-spacing: -0.8px;
    text-align: center;
  }

  .brain__sub {
    font-size: 18px;
  }

  .brain__board {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
  }

  .brain__arrow {
    display: none;
  }

  .brain__terminal,
  .brain__core,
  .brain__app,
  .brain__info,
  .brain__card {
    position: static;
    translate: none;
  }

  .brain__terminal {
    width: min(459px, 100%);
    order: 1;
  }

  .brain__core { order: 2; }
  .brain__app { order: 3; }
  .brain__card--kenji { order: 4; }
  .brain__card--chloe { order: 5; }
  .brain__info { order: 6; }

  .brain__card {
    height: auto;
  }

  .brain__card-photo--kenji { top: -25px; }
}

/* ================= FAQ section ================= */

.faq {
  width: min(850px, 100%);
  display: flex;
  flex-direction: column;
  gap: 46px;
}

.faq__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -1.26px;
  color: #008c7e;
  text-align: center;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qa {
  border: 1.5px solid transparent;
  border-radius: 18px;
  background: #f7f5e7;
  padding: 28px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.qa.is-open {
  background: #fff;
  border-color: #e4e3df;
}

.qa__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  text-align: left;
}

.qa__q {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.48px;
  color: var(--headline);
}

.qa__icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.qa__icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.25s ease;
}

.qa__minus { opacity: 0; }
.qa.is-open .qa__plus { opacity: 0; }
.qa.is-open .qa__minus { opacity: 1; }

.qa__a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, margin-top 0.35s ease;
}

.qa.is-open .qa__a {
  margin-top: 16px;
}

.qa__a p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.16px;
  color: var(--body-color);
}

@media (max-width: 760px) {
  .faq__title {
    font-size: 32px;
    letter-spacing: -0.8px;
  }

  .qa {
    padding: 20px;
  }

  .qa__q {
    font-size: 19px;
  }
}

/* ================= CTA footer ================= */

.ftr {
  position: relative;
  width: min(1408px, 100%);
}

.ftr__panel {
  position: relative;
  height: 654px;
  border-radius: 34px;
  overflow: hidden;
  background: #0b786b;
}

.ftr__grid {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  max-width: none;
  pointer-events: none;
}

.ftr__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 280px;
  background: linear-gradient(180deg, rgba(11, 120, 107, 0) 0%, #0b786b 95%);
  pointer-events: none;
}

.ftr__cta {
  position: absolute;
  left: 50%;
  top: 140px;
  translate: -50% 0;
  width: min(593px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ftr__form {
  margin-top: 48px;
}

.ftr__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -1.26px;
  color: #f7f5e7;
}

.ftr__sub {
  margin: 20px 0 0;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: #fff;
}

.ftr__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 4px 24px;
  background: #fff;
  border-radius: 21px;
}

.ftr__input {
  border: none;
  outline: none;
  width: 270px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.18px;
  color: var(--ink);
  background: none;
}

.ftr__input::placeholder {
  color: #818181;
}

.ftr__submit {
  padding: 18px 34px;
  border-radius: 16px;
  background: linear-gradient(-56.48deg, #ff8342 4.82%, #d11ba4 59.91%);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.4px;
  line-height: 1.3;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.ftr__submit:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 20px rgba(209, 27, 164, 0.35);
}

.ftr__bottom {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: min(1216px, calc(100% - 48px));
  padding: 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ftr__brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ftr__logo {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.ftr__logo img {
  width: 34.5px;
  height: 30px;
}

.ftr__logo span {
  font-family: var(--font-logo);
  font-weight: 500;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.25px;
  color: #fff;
}

.ftr__legal {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.14px;
  color: #fff;
  opacity: 0.6;
}

.ftr__contact {
  display: flex;
  align-items: center;
  gap: 32px;
}

.ftr__mail {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.18px;
  color: #fff;
  text-decoration: none;
}

.ftr__mail:hover {
  text-decoration: underline;
}

.ftr__github {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.18px;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.25s ease;
}

.ftr__github:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ftr__github img {
  width: 18px;
  height: 18px;
}

/* Floating tiles around the panel */

.ftile {
  position: absolute;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 15px 14px 40px rgba(0, 0, 0, 0.2);
  background: linear-gradient(45.48deg, #08359b 0%, #447dfc 83.34%);
}

.ftile img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  max-width: none;
}

.ftile--piano {
  left: 6.5%;
  top: -62px;
  width: 181px;
  height: 181px;
  border-radius: 34px;
  rotate: -15deg;
}

.ftile--piano img { width: 115%; height: 115%; }

.ftile--tada {
  left: 11.96%;
  top: 237px;
  width: 160px;
  height: 160px;
  border-radius: 27px;
  rotate: 15deg;
  background: linear-gradient(-76.18deg, #ff8342 4.82%, #d11ba4 59.91%);
}

.ftile--tada .ftile__mark {
  width: 84px;
  height: 73px;
  object-fit: contain;
}

.ftile--book {
  left: 77.81%;
  top: 275px;
  width: 147px;
  height: 147px;
  border-radius: 30px;
  rotate: 8deg;
}

.ftile--book img { width: 102%; height: 102%; }

.ftile--palette {
  left: 87.29%;
  top: 77px;
  width: 110px;
  height: 110px;
  border-radius: 22px;
  rotate: -15deg;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(231.93deg, #00ffc9 13.73%, #00abfc 84.77%);
  box-shadow: 5px 14px 24px rgba(0, 0, 0, 0.15);
}

.ftile--palette img { width: 154%; height: 115%; }

.ftr__wand {
  position: absolute;
  left: 70.71%;
  top: -135px;
  width: 233px;
  height: 433px;
  overflow: hidden;
  pointer-events: none;
}

.ftr__wand img {
  position: absolute;
  left: -121.25%;
  top: 0;
  height: 100%;
  width: 333%;
  max-width: none;
  object-fit: cover;
}

@media (max-width: 1240px) {
  .ftr__bottom {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px 0;
    text-align: center;
  }

  .ftr__panel {
    height: auto;
    padding-bottom: 240px;
  }

  .ftr__cta {
    /* relative + z-index, not static: the absolutely-positioned grid image
       paints above static content and was hiding the CTA on mobile */
    position: relative;
    left: auto;
    top: auto;
    z-index: 2;
    translate: none;
    margin: 90px auto 0;
  }

  .ftr__bottom {
    position: absolute;
    bottom: 0;
  }
}

@media (max-width: 900px) {
  .ftile,
  .ftr__wand {
    display: none;
  }
}

@media (max-width: 760px) {
  .ftr__title {
    font-size: 32px;
    letter-spacing: -0.8px;
  }

  .ftr__sub {
    font-size: 17px;
  }

  .ftr__form {
    flex-direction: column;
    width: min(360px, 100%);
    padding: 16px;
    gap: 10px;
    border-radius: 21px;
  }

  .ftr__input {
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }

  .ftr__submit {
    width: 100%;
  }

  .ftr__brand {
    flex-direction: column;
    gap: 12px;
  }

  .ftr__contact {
    flex-direction: column;
    gap: 16px;
  }
}

/* ================= Animation layer ================= */

/* Scroll reveal — gated behind body.anim so content is never hidden without JS */
body.anim .rv {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.65s ease, translate 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rv-delay, 0s);
}

body.anim .rv.in-view {
  opacity: 1;
  translate: 0 0;
}

body.anim .rv--cx {
  translate: -50% 26px;
}

body.anim .rv--cx.in-view {
  translate: -50% 0;
}

/* Bento idle motion */
@keyframes bob-center-a {
  0%, 100% { translate: -50% -50%; }
  50% { translate: -50% calc(-50% - 9px); }
}

@keyframes bob-center-b {
  0%, 100% { translate: -50% -50%; }
  50% { translate: -50% calc(-50% + 8px); }
}

.play__frame,
.play__sticker {
  animation: bob-center-a 7s ease-in-out infinite;
}

.play__vinyl {
  animation: bob-center-b 9s ease-in-out infinite;
}

.sitem__icon {
  transition: translate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sitem:hover .sitem__icon {
  translate: 0 -4px;
}

/* Create more button */
.play__more {
  gap: 6px;
  cursor: pointer;
  transition: scale 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.play__more img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.play__more:hover {
  scale: 1.06;
  box-shadow: 0 8px 18px rgba(42, 132, 255, 0.4);
}

.play__more:active {
  scale: 0.95;
}

/* Curriculum Brain infographic */
.brain__core {
  animation: core-glow 3.4s ease-in-out infinite;
}

@keyframes core-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 131, 66, 0); }
  50% { box-shadow: 0 0 30px 2px rgba(255, 131, 66, 0.32); }
}

.brain__app {
  animation: bob-a 6s ease-in-out infinite;
}

@keyframes tilt-a {
  0%, 100% { rotate: 7deg; }
  50% { rotate: 11deg; }
}

@keyframes tilt-b {
  0%, 100% { rotate: 8deg; }
  50% { rotate: 4deg; }
}

.brain__card-photo--kenji { animation: tilt-a 5.5s ease-in-out infinite; }
.brain__card-photo--chloe { animation: tilt-b 6.5s ease-in-out infinite; }

.brain__card {
  transition: scale 0.3s ease;
}

.brain__card:hover {
  scale: 1.02;
}

.brain__terminal-text {
  min-height: 91px;
}

/* Data pulses travelling along the connectors */
.brain__flow {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.55);
  opacity: 0;
  pointer-events: none;
}

.brain__flow--v {
  left: 301px;
  top: 468px;
  animation: flow-v 3.2s ease-in-out 0.2s infinite;
}

@keyframes flow-v {
  0% { opacity: 0; translate: 0 0; }
  12% { opacity: 1; }
  38% { opacity: 1; }
  52% { opacity: 0; translate: 0 108px; }
  100% { opacity: 0; translate: 0 108px; }
}

.brain__flow--h1 {
  left: 553px;
  top: 369px;
  animation: flow-h 3.2s ease-in-out 1.1s infinite;
  --flow-dist: 98px;
}

.brain__flow--h2 {
  left: 744px;
  top: 369px;
  animation: flow-h 3.2s ease-in-out 1.9s infinite;
  --flow-dist: 250px;
}

@keyframes flow-h {
  0% { opacity: 0; translate: 0 0; }
  12% { opacity: 1; }
  38% { opacity: 1; }
  52% { opacity: 0; translate: var(--flow-dist) 0; }
  100% { opacity: 0; translate: var(--flow-dist) 0; }
}

@media (max-width: 1240px) {
  .brain__flow {
    display: none;
  }

  body.anim .rv--cx {
    translate: 0 26px;
  }

  body.anim .rv--cx.in-view {
    translate: 0 0;
  }
}

/* Get $100 free tokens → launching very soon */
.tokens-btn {
  position: relative;
}

.tokens-btn.is-soon {
  background: var(--grad-cta);
  border-color: transparent;
  color: #fff;
  animation: jelly 0.55s ease;
}
