/* MeloBee — melobee.org */

:root {
  --honey: #FFC629;
  --honey-deep: #E8A400;
  --ink: #000000;
  --wing: #BFE7F3;
  --petal: #F4D9DC;
  --paper: #FFFDF6;
  --paper-dim: #F6F1E2;
  --text: #1F1B12;
  --muted: #6B6352;

  --display: "Baloo Bhaijaan 2", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Baloo Bhaijaan 2", "Segoe UI", system-ui, sans-serif;

  --line: 3px;
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --wrap: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

html[lang="ar"] { --body: "Baloo Bhaijaan 2", "Segoe UI", Tahoma, system-ui, sans-serif; }
html[lang="ar"] body { font-size: 1.125rem; line-height: 1.75; }
html[lang="ar"] .btn, html[lang="ar"] .chip { padding-block: 0.6rem 0.75rem; }
html[lang="ar"] .wordmark { letter-spacing: -0.03em; }

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.35rem; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
  outline: var(--line) solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

.lede {
  font-size: 1.2rem;
  max-width: 34em;
  margin: 0.75rem 0 2rem;
  color: var(--text);
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  z-index: 100;
}
.skip:focus { top: 1rem; }

/* Buttons — the sticker look: thick outline, solid offset shadow */

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.8rem 1.25rem;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-lg { font-size: 1.25rem; padding: 1rem 1.6rem; }
.btn-honey { background: var(--honey); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--honey); }
.btn-paper { background: var(--paper); color: var(--ink); }

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--paper);
  border-bottom: var(--line) solid var(--ink);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 1.25rem;
  margin-inline-start: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}
.nav-links a { text-decoration: none; padding: 0.25rem 0; border-bottom: 3px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--honey); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 1rem; }
.nav-cta { display: flex; gap: 0.6rem; }

/* Language dropdown */
.lang { position: relative; font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem 0.45rem 0.8rem;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; flex: none; }
.lang .chev { width: 14px; height: 14px; transition: transform 150ms ease; }
.lang[open] .chev { transform: rotate(180deg); }
.lang ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  min-width: 11rem;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 5px 5px 0 var(--ink);
  z-index: 60;
}
.lang li a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.lang li a:hover { background: var(--wing); }
.lang li a[aria-current="page"] { background: var(--honey); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta .btn-ink { display: none; }
  .nav { gap: 0.75rem; padding-inline: 1rem; }
  .nav-end { gap: 0.6rem; }
}
@media (max-width: 420px) {
  .nav-brand span { display: none; }
}

/* Hero — the wordmark is the memorable thing; everything else stays quiet */

.hero {
  position: relative;
  background: var(--honey);
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(5rem, 10vw, 8rem);
  overflow: hidden;
}
.wordmark {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  font-size: clamp(4.5rem, 17vw, 14rem);
  letter-spacing: -0.03em;
  line-height: 0.85;
  color: var(--ink);
}
.wm-text { display: inline-block; }
.wm-bee {
  width: 1.05em;
  height: 1.05em;
  margin: 0 -0.08em 0.02em -0.04em;
  transform-origin: 50% 90%;
}
.hero-lede {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  max-width: 30em;
  margin: 1.5rem auto 2rem;
  color: var(--ink);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(30px, 6vw, 80px);
}

/* One orchestrated moment: the bee lands into place as the B */
@media (prefers-reduced-motion: no-preference) {
  .wm-bee { animation: land 1100ms cubic-bezier(.22,1,.36,1) both; }
  .wm-text { animation: settle 700ms ease-out both; }
  .wm-text:first-child { animation-delay: 150ms; }
  .wm-text:last-child { animation-delay: 300ms; }
  @keyframes land {
    0%   { transform: translate(-60vw, -40vh) rotate(-25deg) scale(0.6); opacity: 0; }
    60%  { transform: translate(0.1em, -0.15em) rotate(6deg) scale(1.05); opacity: 1; }
    100% { transform: none; opacity: 1; }
  }
  @keyframes settle {
    from { opacity: 0; transform: translateY(0.12em); }
    to   { opacity: 1; transform: none; }
  }
}

/* Songs */

.songs { padding: clamp(3rem, 6vw, 5rem) 0; }

.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.75rem; }
.chip {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.45rem 1rem;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.chip.is-on { background: var(--ink); color: var(--honey); }

.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.75rem 1.5rem;
}
.song[hidden] { display: none; }
.song h3 { margin-top: 0.7rem; }
.song p { color: var(--muted); font-size: 0.95rem; margin: 0.15rem 0 0; }
.song-play {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.song-play:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.song-play img { width: 100%; height: 100%; object-fit: cover; }
.song-play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--honey) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23000'/%3E%3C/svg%3E") center/40% no-repeat;
  border: var(--line) solid var(--ink);
  transition: transform 120ms ease;
}
.song-play:hover::after { transform: scale(1.08); }
.song-play .len {
  position: absolute;
  inset-inline-end: 0.6rem; bottom: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
}
.song-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}
.song-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.song.is-playing { grid-column: 1 / -1; }
.song.is-playing .song-frame { max-width: 820px; margin-inline: auto; }
.song.is-playing h3, .song.is-playing p { text-align: center; }

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
  .song h3 { font-size: 1.05rem; margin-top: 0.5rem; }
  .song p { font-size: 0.85rem; }
  .song-play { border-radius: var(--r-sm); box-shadow: 4px 4px 0 var(--ink); }
  .song-play::after { width: 44px; height: 44px; }
  .song-play .len { font-size: 0.75rem; inset-inline-end: 0.4rem; bottom: 0.4rem; }
  .song.is-playing h3 { font-size: 1.35rem; }
}

.empty { color: var(--muted); }
.more { margin-top: 2.5rem; }

/* Calm */

.calm {
  background: var(--wing);
  border-top: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem 2.5rem;
  margin: 0;
}
.points dt {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink);
  padding-inline-start: 0.9rem;
  border-inline-start: 5px solid var(--ink);
}
.points dd { margin: 0.5rem 0 0; margin-inline-start: calc(0.9rem + 5px); }

/* Story */

.story { padding: clamp(3rem, 6vw, 5rem) 0; }
.story-wrap {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2.2fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.story-bee { margin: 0; position: sticky; top: 6rem; }
.story-bee img { width: min(100%, 320px); }
.story-text p { max-width: 36em; }
.story-text h2 { margin-bottom: 1rem; }
.sign { font-family: var(--display); font-weight: 700; color: var(--ink); }
@media (max-width: 680px) {
  .story-wrap { grid-template-columns: 1fr; }
  .story-bee { position: static; }
  .story-bee img { width: 150px; }
}

/* Teachers */

.teachers {
  background: var(--petal);
  border-top: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.teach-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  max-width: 800px;
}
.teach-card {
  text-decoration: none;
  display: block;
}
.teach-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 5px 5px 0 var(--ink);
}
.teach-title {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-top: 0.8rem;
  color: var(--ink);
}
.teach-card:hover .teach-title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px; }
.teach-sub { display: block; color: var(--muted); font-size: 0.95rem; }
.teach-note { margin-top: 2rem; max-width: 36em; }
.teach-note a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Follow */

.follow { padding: clamp(3rem, 6vw, 5rem) 0; }
.follow-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
  max-width: 800px;
}
.follow-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  background: var(--honey);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.follow-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.follow-card svg { width: 44px; height: 44px; grid-row: 1 / 3; color: var(--ink); }
.follow-name { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--ink); line-height: 1.1; }
.follow-sub { color: var(--text); font-size: 0.95rem; }

/* Footer */

.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 2rem 0;
}
.foot .nav-brand { color: var(--honey); font-size: 1.3rem; }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.foot-row p { margin: 0; color: #CFC8B4; }
.foot-links { margin-inline-start: auto; display: flex; gap: 1.25rem; }
.foot-links a { color: var(--paper); text-decoration: none; }
.foot-links a:hover { color: var(--honey); }
.foot :focus-visible { outline-color: var(--honey); }
