/* TUMA home page sections (owner: site-sections): hero, lineup, how it works, safety,
   parents, reserve CTA band, plus the reveal / idle motion states driven by motion.js.
   Tokens only (tokens.css). No new raw colors.
   Motion: every animation and hover transform lives inside
   @media (prefers-reduced-motion: no-preference); the reveal-hidden state exists only once
   motion.js has put .motion-ready on <html>, so the page is complete without JS. */

/* ==========================================================================
   Shared bits
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 2.25rem;
  padding: var(--s-1) var(--s-4) var(--s-1) var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.25;
  box-shadow: var(--sh-1);
}
.chip .icon {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.3rem;
  border-radius: var(--r-pill);
}
.chip-coral .icon { background: var(--brand-1-soft); color: var(--brand-1); }
.chip-violet .icon { background: var(--brand-2-soft); color: var(--brand-2); }
.chip-teal .icon { background: var(--brand-3-soft); color: var(--brand-3); }

.icon-well {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  border-radius: var(--r-md);
}
.icon-well .icon { width: 1.6rem; height: 1.6rem; }
.icon-well-coral { background: var(--brand-1-soft); color: var(--brand-1); }
.icon-well-violet { background: var(--brand-2-soft); color: var(--brand-2); }
.icon-well-teal { background: var(--brand-3-soft); color: var(--brand-3); }

/* Inline art: the SVGs carry a viewBox only, so width comes from CSS and the height from
   aspect-ratio (no layout shift while fonts load). */
.hero-scene svg,
.lineup-art svg,
.parents-frame svg { display: block; width: 100%; height: auto; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--s-7) var(--s-8);
  background: var(--grad-hero);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.hero-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-blob { position: absolute; display: block; }
.hero-blob svg { width: 100%; height: 100%; }
.hero-blob-1 { width: 26rem; height: 26rem; top: -11rem; left: -10rem; color: var(--brand-1); opacity: 0.35; }
.hero-blob-2 { width: 20rem; height: 20rem; bottom: -7rem; left: 38%; color: var(--brand-3); opacity: 0.45; }
.hero-blob-3 { width: 30rem; height: 30rem; top: -6rem; right: -10rem; color: var(--brand-2); opacity: 0.45; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "art" "copy";
  gap: var(--s-5);
  align-items: center;
}
.hero-copy { grid-area: copy; min-width: 0; }
.hero-art { grid-area: art; position: relative; min-width: 0; justify-self: center; width: 100%; max-width: 22rem; }

.hero-copy > * + * { margin-top: var(--s-4); }
.hero-title { font-size: var(--fs-4xl); max-width: 15ch; }
.hero-lead { max-width: 34rem; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); padding-top: var(--s-2); }
.hero-actions .btn { white-space: normal; }
.hero-secondary { color: var(--brand-2); }
.hero-secondary:hover { color: var(--brand-2); background: var(--surface); }
.hero-secondary-icon { display: inline-flex; transform: rotate(0deg); transition: transform var(--dur-2) var(--ease-bounce); }
.hero-secondary-icon .icon { width: 1.15rem; height: 1.15rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); padding-top: var(--s-3); }

/* the art */
.hero-art-stage { position: relative; }
.hero-halo {
  position: absolute;
  inset: 8% 6% 4%;
  border-radius: 50%;
  background: var(--surface);
  opacity: 0.55;
  filter: blur(28px);
}
.hero-scene { position: relative; aspect-ratio: 640 / 480; }
.hero-scene svg { aspect-ratio: 640 / 480; }

.badge-prices {
  position: absolute;
  right: -0.25rem;
  bottom: 4%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  box-shadow: var(--sh-2);
  transform: rotate(-4deg);
}
.badge-prices .icon { width: 1.1rem; height: 1.1rem; }

@media (min-width: 560px) {
  .hero-art { max-width: 28rem; }
}

@media (min-width: 900px) {
  .hero { padding-block: var(--s-8) var(--s-9); }
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas: "copy art";
    gap: var(--s-7);
  }
  .hero-art { max-width: 36rem; }
  .badge-prices { right: 2%; bottom: 8%; font-size: var(--fs-base); padding: var(--s-3) var(--s-5); }
}

/* ==========================================================================
   Section rhythm and backgrounds
   ========================================================================== */
.lineup .section-head,
.how .section-head,
.safety .section-head { margin-bottom: var(--s-7); }
.how,
.parents { background: var(--bg-soft); }
.how { border-radius: var(--r-xl); }
.parents { border-radius: var(--r-xl); }
/* the FAQ (site-chrome) sits between parents and the CTA band on --bg */

/* ==========================================================================
   Lineup
   ========================================================================== */
.lineup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
}
.lineup-card { display: flex; }
.lineup-card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: transform var(--dur-3) var(--ease-bounce), box-shadow var(--dur-3) var(--ease-out);
}
.lineup-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: var(--s-5) var(--s-6) var(--s-3);
  background: var(--brand-1-soft);
}
.lineup-card-bunny .lineup-art { background: var(--brand-2-soft); }
.lineup-card-spark .lineup-art { background: var(--brand-3-soft); }
.lineup-art-blob {
  position: absolute;
  z-index: -1;
  width: min(72%, 13rem);
  aspect-ratio: 1;
  border-radius: 46% 54% 52% 48% / 52% 44% 56% 48%;
  background: var(--surface);
  opacity: 0.6;
}
.lineup-art svg { max-width: 14rem; aspect-ratio: 1; }
.lineup-card-spark .lineup-art svg { max-width: 17rem; aspect-ratio: 320 / 240; }
/* TUMA Plush: the bear and the bunny side by side, slightly overlapping */
.lineup-duo { display: flex; align-items: flex-end; justify-content: center; width: 100%; }
.lineup-duo svg { width: 50%; max-width: 11.5rem; aspect-ratio: 1; }
.lineup-duo svg + svg { margin-left: -4%; }

.lineup-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-5) var(--s-5);
}
.lineup-name { font-size: var(--fs-2xl); }
.lineup-tagline { color: var(--text-muted); }
.lineup-flag {
  position: absolute;
  bottom: var(--s-3);
  left: 50%;
  width: max-content;
  max-width: calc(100% - 2 * var(--s-4));
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  box-shadow: var(--sh-1);
  gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--brand-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
}
.lineup-card-spark .lineup-art { padding-bottom: var(--s-8); }
.lineup-flag .icon { width: 1.1rem; height: 1.1rem; }
.lineup-bullets { display: grid; gap: var(--s-2); }
.lineup-bullets li { display: flex; gap: var(--s-2); align-items: flex-start; line-height: 1.45; }
.lineup-bullets .icon {
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.12rem;
  padding: 0.2rem;
  border-radius: var(--r-pill);
  background: var(--brand-3-soft);
  color: var(--brand-3);
  stroke-width: 3;
}
.lineup-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--border);
}
.lineup-price { font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); }
/* TUMA Spark colors: two decorative swatches (always outlined, so they read in both themes) */
.lineup-colors { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); font-size: var(--fs-sm); }
.lineup-colors-label { font-weight: 700; color: var(--text-muted); }
.lineup-color-list { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.lineup-color-list li { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.swatch { width: 1.1rem; height: 1.1rem; border-radius: var(--r-pill); border: 2px solid var(--text); }
.swatch-orange { background: #ff9a3c; }
.swatch-green { background: #3fcf8e; }
.lineup-colors-soon { color: var(--text-muted); }
.lineup-variants { display: grid; gap: var(--s-2); }
.lineup-variants-label { font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); }
.lineup-variant-buttons { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* two cards side by side from 700 px */
@media (min-width: 700px) {
  .lineup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
}
@media (min-width: 1040px) {
  .lineup-art { min-height: 19.5rem; }
}

/* ==========================================================================
   How it works
   ========================================================================== */
.how { margin-inline: clamp(0px, 1.5vw, var(--s-4)); }
.how-track { position: relative; }
.how-path { display: none; }
.how-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  counter-reset: none;
}
.how-step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--s-4);
  row-gap: var(--s-1);
  align-items: start;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-1);
}
.how-badge { grid-row: 1 / span 2; position: relative; width: 4rem; height: 4rem; }
.how-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 38% 62% 55% 45% / 50% 45% 55% 50%;
  background: var(--brand-2-soft);
  color: var(--brand-2);
}
.how-step-2 .how-icon { background: var(--brand-1-soft); color: var(--brand-1); }
.how-step-3 .how-icon { background: var(--brand-3-soft); color: var(--brand-3); }
.how-step-4 .how-icon { background: var(--brand-1-soft); color: var(--brand-1); }
.how-icon .icon { width: 1.75rem; height: 1.75rem; }
.how-num {
  position: absolute;
  top: -0.4rem;
  right: -0.5rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--surface);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1;
}
.how-step-title { font-size: var(--fs-lg); align-self: end; }
.how-step-text { color: var(--text-muted); }

@media (min-width: 960px) {
  .how-track { padding-top: var(--s-2); }
  .how-path {
    display: block;
    position: absolute;
    top: calc(var(--s-2) + 0.5rem);
    left: 12.5%;
    width: 75%;
    height: 5rem;
    color: var(--brand-2);
    opacity: 0.55;
    pointer-events: none;
  }
  .how-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
  .how-step {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    justify-items: center;
    align-content: start;
    row-gap: var(--s-3);
    padding: 0;
    background: none;
    box-shadow: none;
    text-align: center;
  }
  .how-badge { grid-row: auto; width: 5.5rem; height: 5.5rem; margin-bottom: var(--s-2); }
  .how-icon { width: 5.5rem; height: 5.5rem; box-shadow: 0 0 0 6px var(--bg-soft), var(--sh-2); }
  .how-icon .icon { width: 2.25rem; height: 2.25rem; }
  .how-num { width: 2rem; height: 2rem; top: -0.25rem; right: -0.25rem; border-color: var(--bg-soft); }
  .how-step-title { font-size: var(--fs-xl); align-self: start; }
  .how-step-text { max-width: 16rem; }
  /* the badges zig-zag along the wavy path */
  .how-step-2 .how-badge, .how-step-4 .how-badge { transform: translateY(0.75rem); }
}

/* ==========================================================================
   Safety
   ========================================================================== */
.safety-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
}
.safety-tile {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.safety-tile-title { font-size: var(--fs-lg); margin-bottom: var(--s-1); }
.safety-tile-text { color: var(--text-muted); }

@media (min-width: 680px) {
  .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
}
@media (min-width: 1040px) {
  .safety-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .safety-tile { flex-direction: column; padding: var(--s-6); }
}

/* ==========================================================================
   Voices
   ========================================================================== */
.voice-groups { display: grid; gap: var(--s-6); grid-template-columns: minmax(0, 1fr); }
.voice-lang { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.voice-list { display: grid; gap: var(--s-3); }
.voice-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.voice-name { font-weight: 700; }
.voice-card audio { flex: 1 1 14rem; min-width: 0; max-width: 100%; height: 2.5rem; }
.voices-note { margin-top: var(--s-6); font-size: var(--fs-sm); }
@media (min-width: 900px) {
  .voice-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
}

/* ==========================================================================
   Parents
   ========================================================================== */
.parents { margin-inline: clamp(0px, 1.5vw, var(--s-4)); overflow: hidden; }
.parents-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  align-items: center;
}
.parents-copy > * + * { margin-top: var(--s-4); }
.parents-features { display: grid; gap: var(--s-3); padding-top: var(--s-2); }
.parents-features li { display: flex; gap: var(--s-3); align-items: flex-start; font-weight: 600; }
.check-dot {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--brand-2-soft);
  color: var(--brand-2);
}
.check-dot .icon { width: 1rem; height: 1rem; stroke-width: 3; }
.parents-login { padding-top: var(--s-3); }
.parents-login .btn { white-space: normal; }

.parents-art { position: relative; isolation: isolate; min-width: 0; }
.parents-blob {
  position: absolute;
  z-index: -1;
  inset: -12% -8% -10% -6%;
  color: var(--brand-2);
  opacity: 0.35;
}
.parents-blob svg { width: 100%; height: 100%; }
/* the art draws its own device frame: no extra card around it */
.parents-frame { filter: drop-shadow(0 18px 32px rgb(39 30 61 / 0.14)); }
.parents-frame svg { aspect-ratio: 480 / 320; }

@media (min-width: 900px) {
  .parents-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-8); }
}

/* ==========================================================================
   Reserve CTA band
   ========================================================================== */
.cta { padding-block: var(--s-6) var(--s-9); }
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--s-7) var(--s-5);
  border-radius: var(--r-xl);
  background: var(--grad-cta);
  color: var(--on-brand);
  text-align: center;
  box-shadow: var(--sh-3);
}
.cta-blob { position: absolute; z-index: -1; color: var(--on-brand); opacity: 0.18; pointer-events: none; }
.cta-blob svg { width: 100%; height: 100%; }
.cta-blob-1 { width: 18rem; height: 18rem; top: -8rem; left: -6rem; }
.cta-blob-2 { width: 22rem; height: 22rem; bottom: -12rem; right: -7rem; }
.cta-content { position: relative; max-width: 40rem; margin-inline: auto; }
.cta-content > * + * { margin-top: var(--s-4); }
.cta-title { font-size: var(--fs-3xl); color: var(--on-brand); }
.cta-subtitle { font-size: var(--fs-lg); color: var(--on-brand); }
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-3);
}
.btn-cta {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--sh-2);
  white-space: normal;
}
.btn-cta:hover { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-3); }
.cta-note {
  display: inline-flex;
  align-items: center;
  max-width: 26rem;
  text-align: left;
  gap: var(--s-2);
  font-weight: 700;
  color: var(--on-brand);
}
.cta-note .icon { width: 1.25rem; height: 1.25rem; }

@media (min-width: 700px) {
  .cta-band { padding: var(--s-8) var(--s-7); }
}

/* ==========================================================================
   Very narrow screens (320 px)
   ========================================================================== */
@media (max-width: 380px) {
  .hero-actions .btn { width: 100%; }
  .lineup-body, .safety-tile, .how-step { padding: var(--s-4); }
  .safety-tile { gap: var(--s-3); }
  .icon-well { width: 2.75rem; height: 2.75rem; }
  .lineup-foot .btn { width: 100%; }
  .cta-band { padding-inline: var(--s-4); }
}

/* ==========================================================================
   Motion (reduced-motion users get none of this)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* reveal on scroll: hidden only after motion.js marked the page ready */
  .motion-ready [data-reveal] {
    transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out);
  }
  .motion-ready [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transform: translateY(12px);
  }

  /* product cards lift and tilt a little on hover */
  @media (hover: hover) {
    .lineup-card-inner:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: var(--sh-3); }
    .lineup-card:nth-child(2) .lineup-card-inner:hover { transform: translateY(-6px) rotate(0.6deg); }
    .safety-tile { transition: transform var(--dur-3) var(--ease-bounce); }
    .safety-tile:hover { transform: translateY(-3px); }
    .hero-secondary:hover .hero-secondary-icon { transform: translateY(2px); }
  }

  /* hero: breathing mascots, floating Spark, glowing buttons, twinkling sparkles, drifting
     blobs. The art groups carry transform="" attributes, so only the individual translate /
     scale / opacity properties are animated (a CSS transform would replace the attribute). */
  .hero-scene .art-bear,
  .hero-scene .art-bunny,
  .hero-scene .art-float { transform-box: fill-box; transform-origin: 50% 100%; }
  .hero-scene .art-bear { animation: tuma-breathe 5s ease-in-out infinite; }
  .hero-scene .art-bunny { animation: tuma-breathe 5s ease-in-out -2.5s infinite; }
  .hero-scene .art-float { animation: tuma-float 4s ease-in-out infinite; }
  .hero-scene .art-glow { animation: tuma-glow 2.6s ease-in-out infinite; }
  .hero-scene .art-sparkle { animation: tuma-twinkle 3.2s ease-in-out infinite; }
  .hero-scene .art-sparkle:nth-of-type(2n) { animation-delay: -1.1s; }
  .hero-scene .art-sparkle:nth-of-type(3n) { animation-delay: -2.1s; }
  .hero-blob-1 { animation: tuma-drift 18s ease-in-out infinite; }
  .hero-blob-2 { animation: tuma-drift 22s ease-in-out infinite reverse; }
  .hero-blob-3 { animation: tuma-drift 26s ease-in-out infinite; }
  .badge-prices { animation: tuma-wobble 6s ease-in-out infinite; }

  /* lineup: the mascot's sparkles light up when its card is hovered */
  @media (hover: hover) {
    .lineup-art .art-sparkle { transition: opacity var(--dur-3) var(--ease-out); }
    .lineup-card-inner:hover .art-sparkle { animation: tuma-twinkle 1.6s ease-in-out infinite; }
  }

  /* motion.js pauses the hero loops while the hero is off screen */
  .hero.is-offscreen *,
  .hero.is-offscreen { animation-play-state: paused; }
}

@keyframes tuma-breathe {
  0%, 100% { translate: 0 0; scale: 1; }
  50% { translate: 0 -6px; scale: 1.015 1.03; }
}
@keyframes tuma-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes tuma-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes tuma-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes tuma-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1.5rem, 1rem) rotate(8deg); }
}
@keyframes tuma-wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(-1deg) translateY(-3px); }
}

/* print: everything visible, no decoration */
@media print {
  .hero-deco, .cta-blob, .parents-blob, .how-path { display: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
