/* Yoyo Studio — mobile-first, RTL. Brand tokens live here only. */
:root {
  --navy: #0D2A4C;
  --burgundy: #5D1832;
  --gold: #CCA667;
  --cream: #F8F5EE;
  --paper: #FFFFFF;
  --gold-soft: #EFE4CC;
  --ink: #0D2A4C;
  --muted: #4A5B70;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(13, 42, 76, .06), 0 8px 24px rgba(13, 42, 76, .08);
  --wrap: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
p { margin: 0 0 .8em; }

.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--navy); color: var(--cream); padding: .5em 1em; z-index: 10; }
.skip:focus { inset-inline-start: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--cream);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; font-weight: 800; font-size: 19px; }
.brand img { width: 24px; height: auto; }
.brand span { direction: ltr; unicode-bidi: isolate; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 500; padding: 6px 10px; border-radius: 999px; font-size: 16px; }
.nav a[aria-current="page"] { background: var(--gold); color: var(--navy); font-weight: 700; }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 32px; }

/* Buttons & chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none;
}
.btn--primary { background: var(--burgundy); color: var(--cream); }
.btn--outline { background: var(--paper); color: var(--navy); border: 2px solid var(--navy); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--navy); font-size: 14px; font-weight: 500; }
.chip--gold { background: var(--gold); }
.link-arrow { font-weight: 700; white-space: nowrap; }
.link-arrow::after { content: " ←"; }

/* Hero */
.hero { text-align: center; padding: 28px 0 8px; }
.hero__title { font-size: 44px; font-weight: 800; direction: ltr; letter-spacing: -.5px; }
.hero__title::after { content: ""; display: block; width: 72px; height: 5px; border-radius: 3px; background: var(--gold); margin: 10px auto 0; }
.hero__lead { font-size: 19px; color: var(--muted); max-width: 32em; margin: 12px auto 18px; }
.hero-cast {
  list-style: none; margin: 0 auto 20px; padding: 0;
  display: flex; align-items: flex-end; justify-content: center;
  direction: ltr; max-width: 560px;
  border-bottom: 4px solid var(--gold);
}
.hero-cast__item { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.hero-cast__item img { max-height: 190px; width: auto; }
.hero-cast__item--captain { flex-grow: 1.35; justify-content: flex-start; }
.hero-cast__item--captain img { max-height: 200px; }
.hero-cast__item--sailor img { max-height: 140px; }

/* Sections */
.section { margin-top: 36px; }
.section__title { font-size: 26px; font-weight: 800; }
.section--soft { background: var(--paper); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* Apps */
.apps { display: grid; gap: 14px; }
.app-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  border-inline-start: 6px solid var(--gold);
}
.app-card__mascot { width: 72px; flex: none; }
.app-card__name { font-size: 22px; font-weight: 800; margin-bottom: .2em; }
.app-card__name[dir="ltr"] { text-align: right; }
.app-card__line { color: var(--muted); }
.app-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }

/* Video */
.video-card { background: var(--navy); color: var(--cream); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.video-card__name { font-size: 22px; color: var(--gold); }
.video-links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.video-links li { flex: 1 1 0; min-width: 96px; max-width: 180px; }
.video-links .btn { width: 100%; padding: 10px 8px; background: var(--cream); border-color: var(--cream); }

/* Page head */
.page-head { padding: 24px 0 4px; }
.page-head h1 { font-size: 36px; font-weight: 800; }
.toc { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--gold); color: var(--navy); text-decoration: none; font-weight: 500; }

/* Characters */
.chars { display: grid; gap: 18px; margin-top: 18px; }
.char { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); scroll-margin-top: 72px; }
.char__art {
  height: 260px; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px 0;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, var(--gold-soft) 0 60%, transparent 61%), var(--cream);
  border-bottom: 4px solid var(--gold);
  direction: ltr;
}
.char__art img { max-height: 100%; width: auto; }
/* The captain cutout ends in a straight edge on its left and bottom (the source art is cropped).
   It sits flush against the left side of the box so the edge reads as a frame, not a cut. */
.char__art--captain { justify-content: flex-start; padding-left: 0; }
.char__body { padding: 16px 18px 18px; }
.char__app { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--burgundy); text-transform: none; }
.char__name { font-size: 28px; font-weight: 800; }
.char__line { font-weight: 700; font-size: 18px; }
.char__story { color: var(--muted); margin: 0; }
.char__credit { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--gold); font-size: 15px; font-weight: 500; color: var(--burgundy); }

/* Comics */
.comics { margin-top: 18px; }
.comics__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.comic-tile { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.comic-tile img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; background: var(--cream); }
.comic-tile__num { font-size: 14px; color: var(--burgundy); font-weight: 700; margin: 0; }
.comic-tile__title { font-size: 20px; font-weight: 800; margin: 0; }
.comics__empty { text-align: center; background: var(--paper); border-radius: var(--radius); padding: 24px 16px; box-shadow: var(--shadow); }
.comics__empty img { width: 110px; margin: 0 auto 12px; }

.episode__panels { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.episode__panels img { width: 100%; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.episode__nav { display: flex; justify-content: space-between; gap: 8px; }

/* Footer */
.site-footer { background: var(--navy); color: var(--cream); text-align: center; padding: 24px 16px 32px; margin-top: 24px; }
.socials { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.socials a { color: var(--cream); font-weight: 700; text-decoration: none; }
.handle { color: var(--gold); margin: 0; }
.copy { font-size: 14px; opacity: .75; margin: 6px 0 0; }

/* Wider screens */

/* Character voice intro: round play/pause button + the spoken line */
.char__voice { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.voice-btn {
  flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--navy); color: var(--gold); cursor: pointer; display: inline-grid; place-items: center;
  box-shadow: 0 2px 0 rgba(13, 42, 76, .12); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background .15s ease, transform .15s ease;
}
.voice-btn svg { width: 22px; height: 22px; fill: currentColor; grid-area: 1 / 1; }
.voice-btn .voice-btn__play { margin-right: -2px; }
.voice-btn .voice-btn__pause { display: none; }
.voice-btn[aria-pressed="true"] { background: var(--burgundy); }
.voice-btn[aria-pressed="true"] .voice-btn__play { display: none; }
.voice-btn[aria-pressed="true"] .voice-btn__pause { display: block; }
.voice-btn.is-loading { opacity: .7; }
.voice-btn:active { transform: scale(.94); }
.voice-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.char__intro { margin: 0; font-size: 16px; font-weight: 500; color: var(--navy); line-height: 1.4; }
@media (hover: hover) { .voice-btn:hover { background: var(--burgundy); } }

@media (min-width: 720px) {
  .hero__title { font-size: 60px; }
  .hero-cast__item img { max-height: 240px; }
  .hero-cast__item--captain img { max-height: 250px; }
  .hero-cast__item--sailor img { max-height: 170px; }
  .apps { grid-template-columns: 1fr 1fr; }
  .chars { grid-template-columns: 1fr 1fr; }
  .comics__list { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
