/* Last One Up: flat, warm, rounded. Day at the top, night at the bottom. */

@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #F4EBDC;
  --navy: #153750;
  --mustard: #E18717;
  --sage: #60886D;
  --show-sage: #8FA68A;
  --clay: #D98C6A;
  --gold: #E8B04B;
  --sky: #BFD8DC;
  --line: #4A3B32;
  --night: #1C2333;
  --night-sage: #3C4A44;
  --paper: #F8F7F2;       /* matches the character art's own paper */

  --clay-tint: #F6DFD3;
  --sage-tint: #E1E8DB;
  --gold-tint: #F8E8C4;

  --stroke: 3px;
  --radius: 28px;
  --heading: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--line);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 1.5rem;
}

p { margin: 0; }

a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: var(--stroke) solid var(--line);
  outline-offset: 4px;
  border-radius: 12px;
}
.night :focus-visible { outline-color: var(--cream); }

section, .footer { padding: clamp(3.5rem, 8vw, 6rem) 1.25rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .75em 1.6em;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--navy);
  text-decoration: none;
  background: var(--mustard);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { background: #EA9530; }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--line); }
.btn:focus-visible { border-radius: 999px; }
.btn-icon { font-size: .8em; }

/* ---------- Social icons ---------- */

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--navy);
  background: var(--cream);
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.socials a:hover { background: var(--sky); }
.socials a:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.socials a:focus-visible { border-radius: 50%; }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Hero ---------- */

.hero-title { display: none; }
.hero-banner img { width: 100%; }

.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(3rem, 7vw, 5.5rem) 1.25rem clamp(3.5rem, 8vw, 6rem);
}
.hero-headline {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--navy);
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  max-width: 22ch;
}
.hero-headline span, .footer-tagline span { display: inline-block; }
.hero-copy {
  max-width: 36rem;
  margin: 1.5rem 0 2.25rem;
  font-size: 1.2rem;
}
.hero-intro .socials { margin-top: 2.25rem; }

@media (max-width: 639px) {
  .hero-title {
    display: block;
    background: var(--sky);
    padding: 2rem 0 1.25rem;
  }
  .hero-title img { width: 75%; margin: 0 auto; }

  /* Crop the banner to its right side so Fig, Hux and Bean fill the frame.
     Window onto the source art: x 900–1376, y 220–640 (of 1376×768). */
  .hero-banner {
    position: relative;
    aspect-ratio: 476 / 420;
    overflow: hidden;
    background: var(--sky);
  }
  .hero-banner img {
    position: absolute;
    width: 289.08%;
    max-width: none;
    left: -189.08%;
    top: -52.38%;
  }
}

/* ---------- Siblings ---------- */

.sib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 1120px;
  margin: 0 auto;
}

.sib {
  --tint: var(--cream);
  --accent: var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.1rem 1.1rem 1.75rem;
  background: var(--tint);
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
}
.sib--fig  { --tint: var(--clay-tint); --accent: var(--clay); }
.sib--hux  { --tint: var(--sage-tint); --accent: var(--show-sage); }
.sib--bean { --tint: var(--gold-tint); --accent: var(--gold); }

.sib-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border: var(--stroke) solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--accent);
}
.sib-portrait picture, .sib-portrait img { width: 100%; height: 100%; }
.sib-portrait img { object-fit: contain; padding: 5% 0 3%; }

.sib-name {
  margin: 1.6rem .4rem .8rem;
  padding: .2em .85em;
  font-size: 1.15rem;
  letter-spacing: .06em;
  background: var(--accent);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
}
.sib-lead {
  margin: 0 .4rem .5rem;
  font-family: var(--heading);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--navy);
}
.sib p:not(.sib-lead) { margin: 0 .4rem; }

/* ---------- Day & night formats ---------- */

.formats { background: var(--sky); padding-bottom: clamp(4rem, 9vw, 7rem); }

.prose {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.2rem;
}
.prose p + p { margin-top: 1rem; }

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 880px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
}
.format {
  position: relative;
  padding: 2rem 2rem 2.25rem;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
}
.format h3 { font-size: 1.75rem; margin-bottom: .6rem; }
.format--day { background: var(--sage-tint); box-shadow: 0 6px 0 var(--show-sage); }
.format--night { background: var(--night); color: var(--cream); box-shadow: 0 6px 0 var(--night-sage); }
.format--night h3 { color: var(--cream); }
/* two small points of light */
.format--night::before,
.format--night::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
}
.format--night::before { width: 9px; height: 9px; top: 1.6rem; right: 2rem; }
.format--night::after  { width: 5px; height: 5px; top: 2.9rem; right: 3.3rem; }

/* ---------- Dusk divider ---------- */

.dusk { background: var(--sky); line-height: 0; }
.dusk svg { display: block; width: 100%; height: max(120px, 15.28vw); }

/* ---------- Night sections ---------- */

.night { background: var(--night); color: var(--cream); }
.night h2 { color: var(--cream); }

.watch { padding-top: clamp(1.5rem, 4vw, 3rem); text-align: center; }
.watch h2 { margin-bottom: .5rem; }
.watch-sub {
  font-family: var(--heading);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  color: var(--sky);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.trailer {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: var(--stroke) solid var(--night-sage);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--night);
}
.trailer-link { position: absolute; inset: 0; display: block; }
.trailer-link:focus-visible { outline-offset: -8px; border-radius: 20px; }
.trailer-link picture, .trailer-link img { width: 100%; height: 100%; }
.trailer-link img {
  object-fit: cover;
  filter: brightness(.5) saturate(.55);
  transition: filter .15s ease;
}
.trailer-link:hover img { filter: brightness(.6) saturate(.65); }

.play {
  position: absolute;
  top: 50%; left: 50%;
  display: grid;
  place-items: center;
  width: clamp(72px, 11vw, 104px);
  aspect-ratio: 1;
  margin: calc(clamp(72px, 11vw, 104px) / -2) 0 0 calc(clamp(72px, 11vw, 104px) / -2);
  background: var(--mustard);
  color: var(--navy);
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  box-shadow: 0 6px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.play svg { width: 44%; fill: currentColor; margin-left: 8%; }
.trailer-link:hover .play { background: #EA9530; }
.trailer-link:active .play { transform: translateY(6px); box-shadow: 0 0 0 var(--line); }

/* The real trailer fills the 16:9 frame. */
.trailer-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.watch-link { margin-top: 1.75rem; }
.watch-link a,
.footer-contact a,
.footer-links a {
  font-weight: 700;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  border-radius: 6px;
  transition: color .12s ease;
}
.watch-link a { font-size: 1.2rem; }
.watch-link a:hover,
.footer-contact a:hover,
.footer-links a:hover { color: var(--sky); }
.footer-links { font-size: .95rem; }

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding-top: clamp(1rem, 3vw, 2rem);
}
.footer-logo { width: 220px; }
.footer-tagline { font-family: var(--heading); font-weight: 500; font-size: 1.25rem; }
.footer .socials { margin: .25rem 0; }
.footer-legal { font-size: .95rem; color: var(--sky); }

/* ---------- Privacy page ---------- */

.page-header {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1.25rem;
  background: var(--sky);
  border-bottom: var(--stroke) solid var(--line);
}
.page-header a { display: block; border-radius: 16px; }
.page-header img { width: 180px; }

.legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 1.25rem clamp(4rem, 9vw, 6rem);
}
.legal section { padding: 0; }
.legal h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); margin-bottom: 1rem; }
.legal h2 {
  text-align: left;
  font-size: 1.6rem;
  margin: 2.5rem 0 .75rem;
}
.legal-lead { font-size: 1.25rem; }
.legal p + p { margin-top: 1rem; }
.legal ul { margin: 0; padding-left: 1.4rem; }
.legal li + li { margin-top: .4rem; }
.legal li::marker { color: var(--clay); }
.legal a {
  font-weight: 700;
  color: var(--navy);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  border-radius: 6px;
}
.legal a:hover { color: var(--line); }
.legal-updated {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 2px dashed var(--show-sage);
  font-size: .95rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .sib-grid { grid-template-columns: minmax(0, 420px); justify-content: center; }
}
@media (max-width: 700px) {
  .format-grid { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  body { font-size: 1.0625rem; }
  .footer-logo { width: 180px; }
  .page-header img { width: 150px; }
  .format { padding: 1.6rem 1.5rem 1.9rem; }
  .btn { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
