/* wclips.lol: colours and type are lifted straight from the episodes.
   Night court navy, caption yellow, Dash's hoodie orange, the canteen's tiles
   and level signs, and the Lilita One captions we burn into every clip. */

@font-face {
  font-family: "Lilita One";
  src: url("fonts/LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-var.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --night: #1b2357;      /* the sky over the basketball court */
  --court: #252d68;      /* slightly lifted night for the scoreboard */
  --ink: #0f1235;        /* caption outline and body text on light */
  --caption: #ffd43b;    /* caption keyword yellow */
  --hoodie: #ff7a1a;     /* Dash's hoodie: every action button */
  --wall: #e3ebf5;       /* canteen wall */
  --tile: #5fd0c4;       /* canteen floor tile */
  --sign: #15172b;       /* level sign plaque */
  --sign-text: #a9f2e4;  /* level sign lettering */
  --pip: #ff9bcf;        /* Pip's top */
  --mist: #cfd5ff;       /* secondary text on night */

  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: #fff;
  background: var(--night);
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--caption); outline-offset: 3px; border-radius: 6px; }
.light :focus-visible, .offer :focus-visible, .inside :focus-visible { outline-color: var(--ink); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--caption); color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Mode switch: only show what applies right now */
body[data-mode="waitlist"] [data-when="live"],
body[data-mode="live"] [data-when="waitlist"] { display: none !important; }

/* ---------- The caption type: our burned-in subtitle style ---------- */
.caption {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.98;
  color: #fff;
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--ink);
}
.caption.dark { color: var(--caption); }
.caption.small { font-size: 28px; -webkit-text-stroke-width: 0.16em; }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background-color .2s ease, padding .2s ease, box-shadow .2s ease;
}
.top.is-solid { background: var(--night); padding-top: 10px; padding-bottom: 10px; box-shadow: 0 4px 0 var(--ink); }
.wordmark {
  font-family: var(--display);
  font-size: 30px; line-height: 1;
  text-decoration: none;
  color: var(--caption);
  -webkit-text-stroke: 0.16em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; }
.wordmark .mark { width: 1.45em; height: 1.45em; margin-top: -0.12em; flex: none; }
.wordmark span { color: var(--hoodie); font-size: 0.62em; align-self: flex-end; margin-bottom: 0.3em; margin-left: -5px; }
.pill, .btn, .signup button {
  font-family: var(--body); font-weight: 600; font-size: 17px; line-height: 1;
  color: var(--ink); background: var(--hoodie);
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 14px 20px;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pill { padding: 11px 16px; font-size: 16px; }
.pill:hover, .btn:hover, .signup button:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.pill:active, .btn:active, .signup button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center; gap: clamp(32px, 5vw, 72px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  min-height: min(100svh, 920px);
  padding: 110px var(--gutter) 72px;
}
.sky {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 31% 9%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 47% 24%, #fffa 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 66% 12%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 83% 30%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 8%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 7% 62%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 39% 74%, #fff5 50%, transparent 51%);
}
.moon {
  position: absolute; left: 50%; top: 96px;
  width: 54px; height: 54px; border-radius: 50%;
  background: #fffbea; box-shadow: 0 0 60px 10px #fff3c855;
}
.hero-copy { max-width: 700px; }
.hero h1 { font-size: clamp(40px, min(5.2vw, 9.5vh), 76px); }
.lede { margin-top: 28px; max-width: 34em; color: var(--mist); font-size: 19px; }

.signup { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; max-width: 560px; }
.signup input {
  flex: 1 1 240px; min-width: 0;
  font: inherit; font-size: 17px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 14px;
  padding: 13px 16px;
}
.signup input::placeholder { color: #7a80a6; }
.signup button { flex: 0 0 auto; }
.note { flex-basis: 100%; font-size: 15px; color: var(--mist); }
.signup .note.is-error { color: var(--pip); }
.signup .note.is-done { color: var(--caption); }
.buy { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.btn { display: inline-block; font-size: 18px; padding: 16px 22px; }
.text-link { font-weight: 500; text-underline-offset: 4px; }

/* The phone: our clip, playing */
.phone { position: relative; justify-self: center; width: min(100%, 340px); }
.screen {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border: 7px solid var(--ink); border-radius: 34px;
  background: var(--ink);
  box-shadow: 0 10px 0 var(--ink), 0 30px 80px #0008;
  transform: rotate(2.5deg);
}
.screen video { width: 100%; height: 100%; object-fit: cover; }
.sound, .play {
  position: absolute; font-family: var(--body); font-weight: 600; cursor: pointer;
  color: var(--ink); background: #fffd; border: 2px solid var(--ink); border-radius: 999px;
}
.sound { right: 12px; top: 12px; font-size: 14px; padding: 7px 12px; }
.play { inset: 50% auto auto 50%; transform: translate(-50%, -50%); font-size: 17px; padding: 12px 18px; }
.sticker {
  position: absolute; left: -26px; bottom: 74px;
  font-family: var(--display); font-size: 34px; line-height: 1;
  color: var(--caption); background: var(--sign);
  padding: 12px 16px 10px; border-radius: 12px;
  transform: rotate(-6deg);
  box-shadow: 0 5px 0 #000a;
}
.phone figcaption { margin-top: 26px; text-align: center; font-size: 15px; color: var(--mist); }

/* Intro moment: the clip drops in once, like a new post loading */
@media (prefers-reduced-motion: no-preference) {
  .screen { animation: drop .7s cubic-bezier(.2, 1.4, .4, 1) both .15s; }
  .phone .sticker { animation: slap .35s cubic-bezier(.2, 1.6, .4, 1) both .8s; }
}
@keyframes drop { from { transform: translateY(-40px) rotate(-4deg); opacity: 0; } }
@keyframes slap { from { transform: scale(1.6) rotate(-14deg); opacity: 0; } }

/* ---------- Scoreboard ---------- */
.score { background: var(--court); padding: 88px 0 96px; border-top: 6px solid var(--ink); }
.score h2 { font-size: clamp(36px, 4.6vw, 60px); max-width: 16em; }
.sub { margin-top: 18px; max-width: 40em; color: var(--mist); }
.levels {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px;
  counter-reset: none;
}
.level { display: flex; flex-direction: column; gap: 12px; }
.plaque {
  align-self: flex-start;
  font-family: var(--display); font-size: 30px; line-height: 1;
  color: var(--sign-text); background: var(--sign);
  padding: 10px 14px 8px; border-radius: 10px;
  box-shadow: 0 4px 0 #0009;
}
.card {
  position: relative; flex: 1;
  display: flex; flex-direction: column; gap: 10px;
  background: #ffffff0f; border: 2px solid #ffffff1f; border-radius: 16px;
  padding: 18px 16px 18px;
}
.card h3 { font-weight: 600; font-size: 18px; line-height: 1.25; }
.card p { font-size: 15px; color: var(--mist); }
.card .count { margin-top: auto; color: #fff; font-weight: 500; }
.bar { height: 12px; border-radius: 999px; background: #0f123599; border: 2px solid var(--ink); overflow: hidden; margin-top: auto; }
.bar b { display: block; height: 100%; width: var(--p, 0%); min-width: 4px; background: var(--caption); border-radius: inherit; }
.level.here .card { background: var(--caption); border-color: var(--ink); color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.level.here .plaque { color: var(--caption); }
.facts { display: grid; gap: 6px; }
.facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px dashed #0f123533; padding-bottom: 6px; }
.facts dt { font-size: 15px; }
.facts dd { font-family: var(--display); font-size: 26px; line-height: 1; }
.pin {
  position: absolute; right: 12px; top: -15px;
  font-weight: 600; font-size: 13px; color: #fff; background: var(--hoodie);
  border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px;
}

/* ---------- Inside ---------- */
.inside { position: relative; background: var(--wall); color: var(--ink); padding: 0 0 96px; }
.tiles {
  height: 44px; margin-bottom: 76px;
  border-top: 6px solid var(--ink); border-bottom: 6px solid var(--ink);
  background: repeating-conic-gradient(var(--tile) 0 25%, #fff 0 50%) 0 0 / 44px 44px;
}
.inside h2 { font-size: clamp(36px, 4.6vw, 60px); color: var(--caption); }
.chapters {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px;
  counter-reset: ch;
}
.chapters li {
  counter-increment: ch;
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto 1fr; gap: 4px 16px;
  padding: 20px 0; border-top: 3px solid #0f123522;
}
.chapters li::before {
  content: counter(ch);
  grid-row: span 2;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  font-family: var(--display); font-size: 26px; line-height: 1;
  color: var(--sign-text); background: var(--sign); border-radius: 10px;
}
.chapters h3 { font-weight: 600; font-size: 21px; line-height: 1.25; }
.chapters p { color: #3c4270; max-width: 32em; }

.strip { margin-top: 64px; }
.strip ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.strip li { border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.strip li:nth-child(odd) { transform: rotate(-1.5deg); }
.strip li:nth-child(even) { transform: rotate(1.5deg) translateY(10px); }
.strip img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.strip figcaption { margin-top: 34px; font-size: 16px; color: #3c4270; }

/* ---------- Offer ---------- */
.offer { background: var(--caption); color: var(--ink); padding: 96px 0 88px; border-top: 6px solid var(--ink); }
.offer-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 88px); align-items: center; }

.book { position: relative; justify-self: center; width: min(100%, 330px); }
.cover {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: var(--night); color: #fff;
  border: 5px solid var(--ink); border-radius: 8px 18px 18px 8px;
  box-shadow: -14px 0 0 -4px #0f123555 inset, 10px 12px 0 var(--ink);
  transform: rotate(-3deg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 22px 24px 30px;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .9; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 48%, #1b2357f2 78%); }
.cover p { position: relative; z-index: 1; }
.cover-title {
  font-family: var(--display); font-size: 42px; line-height: 0.95; color: var(--caption);
  -webkit-text-stroke: 0.14em var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink);
}
.cover-sub { margin-top: 10px; font-size: 14px; line-height: 1.35; color: #fff; }
.book .sticker { left: auto; right: -18px; top: 18px; bottom: auto; transform: rotate(8deg); color: var(--pip); }

.deal h2 { font-size: clamp(38px, 4.8vw, 64px); color: #fff; }
.price { margin-top: 16px; font-family: var(--display); font-size: 76px; line-height: 1; }
.price small { font-family: var(--body); font-weight: 500; font-size: 20px; }
.gets { margin-top: 22px; display: grid; gap: 10px; }
.gets li { position: relative; padding-left: 34px; font-size: 18px; }
.gets li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px;
  border-radius: 6px; background: var(--ink);
  -webkit-mask: none;
}
.gets li::after {
  content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 11px;
  border: solid var(--caption); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.signup.light .note, .offer .note { color: #3c3510; }
.offer .signup .note.is-error { color: #a1123f; }
.offer .signup .note.is-done { color: var(--ink); font-weight: 600; }

.faq { margin-top: 80px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.faq div { border-top: 4px solid var(--ink); padding-top: 18px; }
.faq dt { font-weight: 600; font-size: 20px; }
.faq dd { margin-top: 8px; color: #3c3510; max-width: 34em; }

/* ---------- Footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  padding: 36px var(--gutter) 44px; border-top: 6px solid var(--ink);
}
.channels { display: flex; gap: 22px; }
.channels a { font-weight: 500; text-underline-offset: 4px; }
.channels:empty { display: none; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1060px) {
  .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level.here { grid-column: span 3; }
  .level.here .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .strip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 96px; text-align: left; }
  .phone { width: min(78%, 300px); }
  .moon { left: auto; right: 9%; top: 84px; width: 40px; height: 40px; }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level.here { grid-column: span 2; }
  .chapters { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: 1fr; }
  .book { width: min(72%, 280px); }
  .faq { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .top { padding-top: 14px; }
  .wordmark { font-size: 26px; }
  .pill { font-size: 15px; padding: 9px 12px; }
  .hero h1 { font-size: 42px; }
  .lede { font-size: 17px; }
  .signup button { flex: 1 1 100%; }
  .levels { grid-template-columns: 1fr; }
  .level.here { grid-column: auto; }
  .level { flex-direction: row; align-items: stretch; }
  .plaque { font-size: 22px; padding: 8px 0 6px; width: 62px; text-align: center; }
  .moon { display: none; }
  .level.here .facts { grid-template-columns: 1fr; gap: 6px; }
  .strip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; row-gap: 18px; }
  .strip li { border-width: 3px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
  .cover { padding: 18px 16px 18px 22px; }
  .cover-title { font-size: 32px; }
  .cover-sub { font-size: 13px; }
  .price { font-size: 64px; }
  .sticker { font-size: 26px; left: -10px; }
  .book .sticker { right: -8px; }
}
