/* ===========================================================================
   Balam-Bäbäm — landing page

   The palette is sampled directly from the channel logo (assets/logo.jpeg):
     #D06E47  terracotta   the fruit body        -> primary
     #F1A744  marigold     the wave              -> warm accent
     #EE9537  deep amber   the wave, darker      -> warm accent 2
     #959C56  olive        the green leaf        -> quiet accent
     #A36743  warm brown   mother-and-child mark -> brand ink
     #D6B685  cream        the baby              -> soft fill
   Ground is warm paper, never pure white, to sit with the films' paper and
   felt textures.
   =========================================================================== */

:root {
  /* brand */
  --terracotta:  #D06E47;
  --terracotta-d:#B75833;
  --marigold:    #F1A744;
  --amber:       #EE9537;
  --olive:       #959C56;
  --olive-d:     #6F7540;
  --brown:       #A36743;
  --cream:       #D6B685;

  /* surfaces */
  --ground:  #FBF7F1;
  --band:    #F6EDE2;
  --surface: #FFFFFF;
  --line:    #EADFD1;

  /* ink */
  --ink:     #2E2018;
  --ink-mid: #57443A;
  --ink-soft:#8A7466;

  --radius:   20px;
  --radius-s: 12px;
  --shadow:  0 1px 2px rgba(46,32,24,.05), 0 8px 26px -14px rgba(46,32,24,.22);
  --shadow-l:0 2px 6px rgba(46,32,24,.07), 0 26px 60px -24px rgba(46,32,24,.34);

  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', -apple-system,
          'Segoe UI', Roboto, system-ui, sans-serif;
  --wrap: 1120px;
}

/* Dark mode: same hues, re-weighted. Never a cold navy — it stays warm. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:  #1B1512;
    --band:    #241C17;
    --surface: #2A211B;
    --line:    #3A2E26;
    --ink:     #F3E9DF;
    --ink-mid: #CBB8A9;
    --ink-soft:#9C8878;
    --terracotta:  #E4855E;
    --terracotta-d:#F09B76;
    --olive:   #AEB570;
    --olive-d: #C2C888;
    --shadow:  0 1px 2px rgba(0,0,0,.4), 0 8px 26px -14px rgba(0,0,0,.7);
    --shadow-l:0 2px 6px rgba(0,0,0,.45), 0 26px 60px -24px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  --ground:#1B1512; --band:#241C17; --surface:#2A211B; --line:#3A2E26;
  --ink:#F3E9DF; --ink-mid:#CBB8A9; --ink-soft:#9C8878;
  --terracotta:#E4855E; --terracotta-d:#F09B76; --olive:#AEB570; --olive-d:#C2C888;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
p  { margin: 0; }

h1, h2, h3 { margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.2vw, 3.7rem); line-height: 1.05; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); line-height: 1.16; font-weight: 800; }
h3 { font-size: 1.06rem; line-height: 1.3;  font-weight: 700; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.c    { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--terracotta); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--olive-d); margin-bottom: .8rem;
}
.lede { font-size: 1.13rem; color: var(--ink-mid); line-height: 1.55; }
.lede-w { max-width: 40rem; margin-top: .9rem; }

/* ------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; white-space: nowrap;
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .5rem 1.05rem; font-size: .9rem; }

.btn-solid { background: var(--terracotta); color: #fff; box-shadow: var(--shadow); }
.btn-solid:hover { background: var(--terracotta-d); }

.btn-ghost { border-color: var(--terracotta); color: var(--terracotta-d); background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--terracotta) 10%, transparent); }

.btn-white { background: #fff; color: var(--terracotta-d); }
.btn-white-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-white-ghost:hover { background: rgba(255,255,255,.14); }

.ic { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9;
      stroke-linecap: round; stroke-linejoin: round; }

.row   { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.7rem; }
.row-c { justify-content: center; }

/* -------------------------------------------------------------- header --- */
.bar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.bar.stuck { border-bottom-color: var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
          min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand-name {
  font-weight: 800; font-size: 1.28rem; color: var(--brown);
  letter-spacing: -.025em; white-space: nowrap;
}

.bar-r { display: flex; align-items: center; gap: .75rem; }

.lang { display: inline-flex; gap: 2px; background: var(--band); padding: 3px; border-radius: 999px; }
.lang button {
  font: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .04em;
  padding: .34rem .62rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--terracotta); color: #fff; }

/* ---------------------------------------------------------------- hero --- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1rem, 2vw, 1.6rem); }
.hero-in {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.hero-copy .lede { margin-top: 1.1rem; max-width: 30rem; }

/* the fan: three films, three handmade mediums */
.fan {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: 430px;
}
.fan-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--band); box-shadow: var(--shadow-l);
  border: 4px solid var(--surface);
}
.fan-card img { width: 100%; height: 100%; object-fit: cover; }

.fan-c { position: relative; z-index: 3; width: 60%; aspect-ratio: 9/16; }
.fan-l, .fan-r {
  position: absolute; top: 50%; z-index: 1;
  width: 44%; aspect-ratio: 9/16;
}
.fan-l { left: 0;  transform: translateY(-50%) rotate(-7deg); }
.fan-r { right: 0; transform: translateY(-50%) rotate(7deg); }

.fan-note {
  margin: 1.15rem 0 0; text-align: center;
  font-size: .84rem; font-weight: 700; color: var(--olive-d); letter-spacing: .01em;
}

/* ------------------------------------------------------------- players --- */
.player { position: relative; width: 100%; height: 100%; background: var(--band); }
.player img, .player video { width: 100%; height: 100%; object-fit: cover; }

.play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.94); color: var(--terracotta);
  display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(46,32,24,.3);
  transition: transform .18s ease, background-color .18s ease;
}
.play svg { width: 30px; height: 30px; fill: currentColor; margin-left: 3px; }
.play:hover { transform: scale(1.08); background: #fff; }
.player.on .play { display: none; }

/* ------------------------------------------------------- bands + tears --- */
.band { background: var(--band); }

/* Torn-paper edges between sections, echoing the films' cut-paper look.
   The strip is painted in the band colour and masked to a ragged silhouette,
   so the page ground shows through the tear. */
.tear {
  height: 26px;
  background: var(--band);
  -webkit-mask: var(--tear-mask);
          mask: var(--tear-mask);
}
.tear-up { transform: scaleY(-1); }
:root {
  --tear-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V9c58-6 96 6 152 3s78-11 133-8 92 12 148 9 84-12 139-9 96 11 152 8 88-10 143-7 94 10 150 7 96-9 143-6v20z' fill='%23000'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

section.why, section.who, section.films, section.promise, section.topics {
  padding-block: clamp(3.2rem, 7vw, 5.2rem);
}

/* ----------------------------------------------------------------- why --- */
.prose { max-width: 38rem; margin: 1.6rem auto 0; display: grid; gap: 1.05rem; }
.prose p { font-size: 1.08rem; color: var(--ink-mid); }
.prose em { font-style: normal; color: var(--terracotta-d); font-weight: 700; }
.prose-end { font-weight: 700; color: var(--ink); }

/* ----------------------------------------------------------------- who --- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
/* the source frames are 9:16; crop them to a landscape band.
   `flex: none` matters — without it the flex column stretches the image and
   aspect-ratio is ignored. */
.card img {
  flex: none;
  width: 100%; height: 200px;
  object-fit: cover; object-position: center 30%;
}
.card h3 { margin: 1.15rem 1.25rem .4rem; }
.card p  { margin: 0 1.25rem 1.4rem; font-size: .95rem; color: var(--ink-mid); line-height: 1.5; }

/* --------------------------------------------------------------- films --- */
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
/* height:auto matters — the base .player sets height:100% for the hero fan,
   where the parent carries the aspect ratio. Here the ratio is on .player
   itself, and leaving height:100% makes it swallow the row and push the
   caption outside its grid cell. */
.reels .player {
  height: auto; aspect-ratio: 9/16;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.cap { margin-top: .85rem; font-size: .94rem; color: var(--ink-mid); line-height: 1.45; }

/* ------------------------------------------------------------- promise --- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; margin-top: 2.4rem; }
.grid4 li { text-align: center; }
.tick {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto .85rem;
  border-radius: 50%; background: color-mix(in srgb, var(--terracotta) 13%, transparent);
}
.tick svg { width: 23px; height: 23px; fill: none; stroke: var(--terracotta);
            stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.grid4 h3 { margin-bottom: .45rem; }
.grid4 p  { font-size: .93rem; color: var(--ink-mid); line-height: 1.5; }

/* -------------------------------------------------------------- topics --- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2rem; }
.chips li {
  background: var(--band); color: var(--brown);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1.05rem; font-size: .93rem; font-weight: 700;
}
/* -------------------------------------------------------------- follow --- */
.follow {
  background: var(--terracotta); color: #fff; text-align: center;
  padding-block: clamp(3rem, 6vw, 4.4rem);
}
.follow h2 { color: #fff; }
.follow p  { margin-top: .7rem; color: rgba(255,255,255,.9); font-size: 1.05rem; }

/* -------------------------------------------------------------- footer --- */
.foot { background: var(--ground); padding-block: 2.8rem 3.4rem; text-align: center; }
.foot img  { width: 36px; height: auto; margin: 0 auto 1rem; opacity: .9; }
.foot .disc { font-size: .95rem; font-weight: 700; color: var(--ink-mid); }
.foot .cred { margin-top: .5rem; font-size: .85rem; color: var(--ink-soft); }

/* ------------------------------------------------------------ responsive - */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .row { justify-content: center; }
  .fan { min-height: 380px; margin-top: .8rem; }
  .cards, .reels { grid-template-columns: repeat(2, 1fr); }
  .cards li:last-child { grid-column: 1 / -1; max-width: 22rem; margin-inline: auto; width: 100%; }
  .grid4 { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.4rem; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .brand-name { font-size: 1.06rem; }
  .brand img { width: 34px; }
  .bar-in { min-height: 60px; gap: .5rem; }
  .lang button { padding: .3rem .5rem; font-size: .72rem; }
  .fan { min-height: 340px; }
  .fan-c { width: 58%; }
  .fan-l, .fan-r { width: 40%; }
  .cards, .reels { grid-template-columns: 1fr; max-width: 22rem; margin-inline: auto; }
  .cards li:last-child { max-width: none; }
  .grid4 { grid-template-columns: 1fr; gap: 1.9rem; }
  .btn { padding: .78rem 1.3rem; }
}
