/* ===== Fonts ===== */
@font-face {
  font-family: "Bumper Sticker";
  src: url("../assets/fonts/bumper_sticker-webfont.woff2") format("woff2"),
       url("../assets/fonts/bumper_sticker-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== Tokens ===== */
:root {
  --purple-900: #150a3b;
  --purple-800: #352865;
  --purple-700: #422f88;
  --purple-600: #5943a8;
  --purple-500: #5b499e;
  --purple-400: #6c51cb;
  --hero-bg: #503892; /* matches the background baked into the hero frames */
  --lavender-200: #d7cbff;
  --lavender-100: #f1edff;
  --card-bg: #f5f2ff;
  --yellow: #fdc311;
  --pink: #ff93be;
  --magenta: #c545df;
  --white: #ffffff;
  --grey-placeholder: #e3e0ef;
  --lyrics-card: #d4cee7;

  --font-display: "Bumper Sticker", system-ui, sans-serif;
  --font-body: "PT Sans", Arial, sans-serif;

  --container-w: 87.5rem; /* 1400px */
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--purple-900);
  background: var(--purple-500);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 2vw + 0.5rem, 4.4rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-600);
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.5vw + 0.8rem, 1.25rem);
  padding: 0.75rem 2.5rem;
  border-radius: 1.5rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover,
.btn:focus-visible { background: var(--purple-700); transform: translateY(-2px); }

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.5rem);
  flex-wrap: wrap;
}
.nav a {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(0.95rem, 0.6vw + 0.7rem, 1.5rem);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--yellow); }

.brand__logo { width: clamp(4.5rem, 4vw + 2rem, 6.7rem); height: auto; }

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--hero-bg);
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero__topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: clamp(1.25rem, 3vw, 3.5rem);
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.social-row {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1vw, 1rem);
}
.social-row img {
  display: block;
  width: clamp(2.6rem, 2.8vw, 3.6rem);
  height: clamp(2.6rem, 2.8vw, 3.6rem);
  border-radius: 28%;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.social-row a:hover img { transform: translateY(-2px); filter: brightness(1.15); }

.hero__content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.hero__text {
  flex: 1 1 22rem;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hero__text h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(2.1rem, 4vw + 0.5rem, 4rem);
  line-height: 1.1;
  text-transform: uppercase;
}
.hero__text .hl-yellow { display: block; color: var(--yellow); }
.hero__text .hl-pink { color: var(--pink); }
.hero__text p {
  color: var(--white);
  font-size: clamp(1rem, 0.6vw + 0.75rem, 1.25rem);
  line-height: 1.5;
}

.hero__stage {
  position: relative;
  flex: 1 1 28rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  max-width: 44rem;
}
.hero__video-wrap {
  position: relative;
  width: min(100%, 44rem);
  aspect-ratio: 1116 / 622;
  border-radius: 1rem;
  overflow: hidden;
  z-index: 1;
  transform-origin: center;
  will-change: transform; /* scales to 130% on scroll, see main.js */
}
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--hero-bg);
}
/* Trees are 507px tall on the 1440px Figma frame (35.2vw), capped there. */
.hero__tree {
  position: absolute;
  bottom: clamp(1rem, 4.6vw, 4.1rem);
  height: clamp(12rem, 35.2vw, 31.6875rem);
  width: auto;
  pointer-events: none;
  z-index: 3;
  transform-origin: bottom center;
  will-change: transform; /* shrinks and rises on scroll, see main.js */
}
.hero__tree--left { left: -2.9vw; }
.hero__tree--right { right: -2.4vw; }

/* ===== Videos / Youtube ===== */
.videos {
  position: relative;
  background: linear-gradient(to bottom, var(--lavender-200), var(--lavender-100));
  overflow: hidden;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}
/* Hero purple laid over the lavender gradient; main.js fades it out
   (--purple-fade 1 -> 0) as the section scrolls into view. */
.videos::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-bg);
  opacity: var(--purple-fade, 1);
  pointer-events: none;
}

.videos__grid {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1.4vw, 1.3rem);
  padding-block: 1rem;
  user-select: none;
}
.videos__row {
  display: flex;
  gap: clamp(0.6rem, 1.4vw, 1.3rem);
  width: max-content;
}
.videos__row--2 { margin-left: clamp(1rem, 4vw, 4.5rem); }
.videos__row--3 { margin-left: clamp(2rem, 8vw, 9rem); }
.videos__row--4 { margin-left: clamp(3rem, 12vw, 13.5rem); }

.thumb {
  flex: 0 0 auto;
  width: clamp(10rem, 18vw, 22.1rem);
  aspect-ratio: 398.5 / 181.6;
  border-radius: 0.5rem;
  overflow: hidden;
  transform: skewX(18deg) scaleY(0.95);
  box-shadow: inset 0 -1rem 3.5rem var(--lavender-100);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: skewX(-18deg) scale(1.3);
}

.videos__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--purple-700) 0%, rgba(89, 67, 168, 0) 40%),
    linear-gradient(to bottom, var(--purple-600) 0%, rgba(89, 67, 168, 0) 65%);
  opacity: 0.55;
  pointer-events: none;
}

.videos__overlay {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: clamp(-9rem, -14vw, -6rem);
  will-change: transform; /* slides toward the viewport centre, see main.js */
}
.videos__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: 2rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  transition: transform 0.15s ease;
  position: relative;
}
.videos__card:hover,
.videos__card:focus-visible { transform: translateY(-3px); }
.play-badge {
  position: absolute;
  top: -2.3rem;
  width: clamp(3.5rem, 6vw, 5.6rem);
  height: clamp(3.5rem, 6vw, 5.6rem);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}
.play-badge img { width: 100%; height: 100%; object-fit: cover; }

.videos__platforms {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.videos__platforms p {
  color: var(--white);
  font-size: clamp(0.95rem, 0.5vw + 0.8rem, 1.25rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
.platform-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 1.6vw, 1.56rem);
}
.platform-row img {
  width: clamp(2.4rem, 3.4vw, 3.15rem);
  height: clamp(2.4rem, 3.4vw, 3.15rem);
  border-radius: 0.6rem;
  transition: transform 0.15s ease;
}
.platform-row a:hover img { transform: translateY(-3px); }

/* ===== Characters (Mumu & Teca) =====
   <1025px: simple stacked grid, no scroll-pin.
   >=1025px: section pins at viewport height while the user scrolls;
   the wide track pans horizontally and every element drifts gently
   up/down (parallax) — see characters-parallax.js. */
.characters {
  position: relative;
  background: linear-gradient(to bottom, var(--lavender-200), var(--lavender-100));
  overflow: hidden;
}
.characters-sticky { display: block; }
.characters-track {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  align-items: end;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  padding-block: clamp(3rem, 6vw, 5.5rem);
  padding-inline: clamp(1.25rem, 2vw + 0.5rem, 4.4rem);
  max-width: var(--container-w);
  margin-inline: auto;
}
.cloud {
  position: absolute;
  width: clamp(9rem, 16vw, 18rem);
  pointer-events: none;
}
.cloud--1 { top: 2%; left: -4%; }
.cloud--2 { top: 62%; right: 6%; }
.cloud--3 { top: 32%; right: 20%; }
.sun {
  position: absolute;
  top: 0;
  left: 50%;
  width: clamp(5.5rem, 9vw, 10.5rem);
  transform: translate(-50%, -30%);
  pointer-events: none;
}
.character img { width: 100%; height: auto; }
.character--mumu { grid-column: 1; max-width: 21rem; }
.character--teca { grid-column: 4; max-width: 15.5rem; }
.character__bio h2 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(1.9rem, 2.6vw + 0.5rem, 4.33rem);
  line-height: 1.1;
  text-transform: uppercase;
}
.character__bio p {
  margin-top: 0.75rem;
  font-size: clamp(0.95rem, 0.5vw + 0.8rem, 1.2rem);
  line-height: 1.5;
}
/* Titles and copy always sit above the clouds (and the characters). */
.character__bio { position: relative; z-index: 2; }
.character__bio--mumu { grid-column: 2; color: var(--purple-600); }
.character__bio--mumu p { color: var(--purple-900); }
.character__bio--teca { grid-column: 3; color: var(--magenta); }
.character__bio--teca p { color: var(--purple-900); }

@media (min-width: 1025px) {
  /* Figma starts the hero copy at x=235 of 1440 (16.3vw), clear of the left
     tree: subtract the container's own left offset (centring + padding). */
  .hero__text {
    margin-left: max(0px, 16.3vw - max(0px, (100vw - var(--container-w)) / 2) - clamp(1.25rem, 2vw + 0.5rem, 4.4rem));
  }

  /* Track's natural aspect ratio from Figma: 2931 / 885.287.
     overflow must stay visible here: hidden overflow on an ancestor of a
     position:sticky element scopes its "stuck" calc to that ancestor
     instead of the viewport, which breaks the pin. The oversized track is
     clipped by .characters-sticky's own overflow:hidden instead. */
  .characters {
    overflow: visible;
    height: calc(100vh + max(0px, (100vh * 3.31083) - 100vw));
    height: calc(100dvh + max(0px, (100dvh * 3.31083) - 100vw));
  }
  .characters-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  .characters-track {
    display: block;
    flex-shrink: 0;
    max-width: none;
    margin-inline: 0;
    padding: 0;
    height: 100%;
    width: calc(100vh * 3.31083);
    width: calc(100dvh * 3.31083);
    will-change: transform;
  }
  .cloud,
  .sun,
  .character,
  .character__bio {
    position: absolute;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    max-width: none;
    will-change: transform;
  }
  .cloud--1 { top: 8.96%; left: 0%; width: 16.62%; }
  /* Teca, her cloud, the sun and the cloud to her left sit 4% further left
     than in Figma to make room for the wider bios. */
  .cloud--2 { top: 71.75%; left: 56.9%; width: 16.62%; }
  .cloud--3 { top: 35.96%; left: 43.36%; width: 16.62%; }
  .sun { top: 0%; left: 46.26%; width: 14.6%; transform: none; }
  .character--mumu { top: 39.68%; left: 3.86%; width: 22.19%; }
  .character--teca { top: 10.94%; left: 61.38%; width: 13.06%; transform: rotate(5.41deg); }
  .character__bio--mumu { top: 39.9%; left: 22%; width: 18%; }
  .character__bio--teca { top: 39.9%; left: 74.17%; width: 18%; }
  /* The track scales with the viewport height, so the bio type does too
     (Figma: 69px title / 24px copy on an 885px-tall track). */
  .character__bio h2 { font-size: clamp(2rem, 7.8vh, 4.33rem); }
  .character__bio p { font-size: clamp(0.95rem, 2.7vh, 1.5rem); }
}

/* ===== Coloring book ===== */
.coloring {
  position: relative;
  background: var(--yellow);
  padding-top: clamp(2.5rem, 6vw, 5rem);
}
.coloring__top {
  /* Wider gutters than .container (~160px at 1366px, as in Figma). */
  padding-inline: clamp(1.25rem, 15vw - 3rem, 10rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}
.coloring__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}
.coloring__text h2 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(2rem, 3vw + 0.5rem, 4.33rem);
  line-height: 1.1;
  color: var(--purple-900);
  text-transform: uppercase;
}
.coloring__previews {
  display: flex;
  gap: clamp(0.6rem, 1.4vw, 1.1rem);
  flex-wrap: wrap;
}
.coloring__previews li {
  width: clamp(5.5rem, 10vw, 9.6rem);
  aspect-ratio: 185 / 230;
  border-radius: 0.5rem;
  overflow: hidden;
}
.coloring__previews img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coloring__village {
  width: auto;
  max-width: 100%; /* never upscale past the image's own size */
  height: auto;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  background: linear-gradient(182deg, var(--purple-400) 26%, var(--purple-800) 95%);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.footer__stars {
  position: absolute;
  top: clamp(1.5rem, 4vw, 3.5rem);
  left: clamp(6rem, 12vw, 19rem);
  width: min(70%, 62rem);
  pointer-events: none;
}
.footer__star-big {
  position: absolute;
  top: clamp(1rem, 3vw, 2.2rem);
  left: clamp(1rem, 4vw, 4.3rem);
  width: clamp(6rem, 9vw, 11.6rem);
  pointer-events: none;
}
.footer__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: clamp(5.5rem, 9vw, 7.5rem);
}
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 1rem;
  color: var(--white);
  text-transform: uppercase;
}
.back-top img { width: 0.9rem; filter: brightness(0) invert(1); }
.back-top:hover { color: var(--yellow); }

/* ===== Lyrics pages (letras/) =====
   Same topbar and footer as the home page; the content sits in a lavender
   card (1305px wide on the 1440px Figma frame). */
.page-header { background: var(--purple-500); }
.page-header .hero__topbar { padding-bottom: clamp(1.5rem, 3vw, 2.6rem); }

.lyrics {
  background: var(--purple-500);
  padding: 0 clamp(1rem, 4.7vw, 4.2rem) clamp(3rem, 5.5vw, 5rem);
}
.lyrics__card {
  max-width: 81.5625rem;
  margin-inline: auto;
  background: var(--lyrics-card);
  border-radius: 1rem;
  padding: clamp(1.75rem, 4vw, 3.6rem) clamp(1.25rem, 5.2vw, 4.7rem) clamp(2.5rem, 5vw, 4.7rem);
}
.lyrics__title {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(2rem, 2vw + 1.2rem, 3rem);
  line-height: 1.1;
  color: var(--purple-900);
  text-transform: uppercase;
}
.lyrics__cover {
  width: min(100%, 22.75rem);
  height: auto;
}

/* List page: cover on the left, numbered titles with a button each. */
.lyrics-index {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(1.5rem, 3.75vw, 3.4rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
/* max-content: every row is as wide as the longest title, so the buttons
   line up in one column. */
.lyrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: max-content;
  max-width: 100%;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none; /* numbers are drawn by .lyrics-list__num */
}
.lyrics-list a {
  display: grid;
  grid-template-columns: 1.8em minmax(0, 1fr) 2rem;
  align-items: center;
  column-gap: 0.75rem;
  font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem);
  color: var(--purple-900);
}
.lyrics-list__num { text-align: right; }
.lyrics-list__go {
  width: 2rem;
  height: 2rem;
  transition: transform 0.15s ease;
}
.lyrics-list a:hover .lyrics-list__title,
.lyrics-list a:focus-visible .lyrics-list__title { text-decoration: underline; }
.lyrics-list a:hover .lyrics-list__go,
.lyrics-list a:focus-visible .lyrics-list__go { transform: translateX(3px); }

/* Song page: title and lyrics on the left, cover on the right. */
.lyric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr; /* the tall cover's extra height goes below the title */
  grid-template-areas:
    "title cover"
    "text  cover";
  align-items: start;
  column-gap: clamp(2rem, 6vw, 6rem);
}
.lyric .lyrics__title { grid-area: title; }
.lyric .lyrics__cover { grid-area: cover; }
.lyric__text {
  grid-area: text;
  margin-top: 1.875rem;
  max-width: 44.25rem;
  font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem);
  line-height: 1.35;
  color: var(--purple-900);
}
.lyric__text p + p { margin-top: 1.35em; }

@media (max-width: 768px) {
  .lyric {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "cover" "text";
  }
  .lyric .lyrics__cover { width: min(100%, 16rem); margin-top: 1.5rem; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero__content { justify-content: center; text-align: center; }
  .hero__text { align-items: center; }
  .characters-track {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "mumu teca-char"
      "mumu-bio teca-bio";
  }
  .character--mumu { grid-area: mumu; grid-column: auto; max-width: 16rem; justify-self: center; }
  .character--teca { grid-area: teca-char; grid-column: auto; max-width: 10rem; justify-self: center; margin-top: 0; }
  .character__bio--mumu { grid-area: mumu-bio; grid-column: auto; }
  .character__bio--teca { grid-area: teca-bio; grid-column: auto; }
  .sun { display: none; }
}

@media (max-width: 768px) {
  .hero__topbar { justify-content: space-between; }
  .nav--top { order: 3; width: 100%; justify-content: center; }
  .hero__tree { height: clamp(4rem, 15vw, 7rem); opacity: 0.85; }
  .videos__card { margin-top: 0; }
  .videos__overlay { margin-top: -4rem; }
  .coloring__top { flex-direction: column; align-items: flex-start; }
  .coloring__previews { width: 100%; }
  .footer__row { flex-direction: column; text-align: center; }
  .footer__stars { display: none; }
}

@media (max-width: 480px) {
  .characters-track { grid-template-columns: 1fr; grid-template-areas: "mumu" "mumu-bio" "teca-char" "teca-bio"; }
  .character--mumu, .character--teca { justify-self: center; }
  .cloud--2, .cloud--3 { display: none; }
  .coloring__previews li { width: clamp(4rem, 20vw, 6rem); }
  .hero__tree { height: clamp(3rem, 14vw, 5rem); }
  .hero__tree--left { left: 0; }
  .hero__tree--right { right: 0; }
}
