/*
  Spell Beasts marketing pages: home (home.html, / after the launch move), For schools,
  privacy and accessibility. Builds on base.css's tokens in the app's riso look (flat inks,
  ink outlines, hard undersides); buttons mirror components.css. Works from 320px up.
  For schools' own layout is in schools.html's <style>.
*/

/* Georgia sized like Fraunces while it loads: headings keep their breaks, nothing moves. */
@font-face { font-family: 'Fraunces fallback'; src: local('Georgia Bold'), local('Georgia-Bold'); font-weight: 500 900; size-adjust: 83.5%; }
:root { --font-display: 'Fraunces', 'Fraunces fallback', Georgia, serif; }

.wide { width: 100%; max-width: 1312px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.inner { max-width: 1280px; margin-inline: auto; }
.gut { padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 1001; padding: 10px 16px; border-radius: var(--r-sm); background: var(--ink); color: var(--paper-light); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

.btn {
  --btn-bg: var(--paper-light);
  --btn-fg: var(--ink);
  --btn-under: var(--paper-shade);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 10px 22px;
  border: var(--stroke) solid var(--ink); border-radius: var(--r);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 var(--text-md)/1.15 var(--font-ui); letter-spacing: 0.01em;
  text-align: center; text-decoration: none;
  box-shadow: 0 var(--lift) 0 var(--btn-under);
  transition: transform var(--t-micro) var(--out), box-shadow var(--t-micro) var(--out), background-color var(--t-micro);
  cursor: pointer; touch-action: manipulation;
}
.btn:hover { --btn-bg: var(--btn-hover, var(--paper)); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-under); }
.btn svg { flex: none; width: 22px; height: 22px; }
.btn-primary { --btn-bg: var(--yolk); --btn-hover: var(--yolk-hover); --btn-under: var(--yolk-deep); }
.btn-pond { --btn-bg: var(--pond); --btn-hover: var(--pond-hover); --btn-fg: var(--paper-light); --btn-under: var(--pond-deep); }
.btn-big { min-height: 60px; padding-inline: 26px; font-size: var(--text-lg); }
.btn-small { min-height: 48px; padding: 6px 16px; font-size: var(--text-sm); --lift: 3px; }

.hd { display: flex; align-items: center; gap: 0 24px; min-height: 64px; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; font: 800 1.6rem/1.1 var(--font-display); font-variation-settings: var(--display-axes); color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { flex: none; width: 44px; height: 44px; border-radius: 11px; }
.hd nav { display: flex; align-items: center; gap: 0 24px; }
.hd nav a { padding-block: 12px; font-weight: 700; color: var(--ink); text-decoration: none; }
.hd nav a:hover, .hd nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--yolk-deep); text-decoration-thickness: 3px; }

.ft { margin-top: clamp(32px, 6vw, 56px); padding-block: 28px 44px; border-top: var(--stroke) solid var(--ink); display: grid; gap: 14px; font-size: var(--text-sm); color: var(--ink-soft); }
.ft nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.ft nav a { padding-block: 10px; font-weight: 700; }
.ft p { max-width: 62rem; }

.band { padding-block: clamp(40px, 7vw, 76px); }
.band-deep { background: var(--paper-deep); border-block: var(--stroke) solid var(--ink); }
.band-deep a:not(.btn) { color: var(--pond-deep); }
.dusk { --focus: var(--yolk); background: var(--dusk); color: var(--paper-light); border-block: var(--stroke) solid var(--ink); }
.dusk a { color: var(--yolk-light); }
.jump { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 18px; }
.jump a { padding-block: 10px; font-weight: 700; color: var(--pond-deep); }
h2.big { font-size: clamp(1.9rem, 4.6vw, 2.8rem); }
.lead { margin-top: 12px; max-width: 42rem; font-size: var(--text-lg); line-height: 1.45; color: var(--ink-soft); }
.dusk .lead { color: var(--paper-deep); }
.sheet { position: relative; background: var(--paper-light); border: var(--stroke) solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 4px 0 var(--paper-shade); padding: clamp(18px, 3vw, 28px); }
.hint { margin-top: 8px; font-size: var(--text-sm); line-height: 1.45; color: var(--ink-soft); }
.note { font-size: var(--text-sm); color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; align-items: start; }
.flush { margin-top: 0; }

.ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 36px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.18em; width: 24px; height: 24px; border-radius: 50%; border: var(--stroke) solid var(--ink); background: var(--leaf-light); }
.ticks li::after { content: ""; position: absolute; left: 9px; top: calc(0.18em + 5px); width: 6px; height: 11px; border: solid var(--leaf-deep); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.ticks b { color: var(--ink); }
.points { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.points li { padding-left: 16px; border-left: 4px solid var(--yolk); }
.points b { display: block; }
.dusk .points b { color: var(--yolk-light); }
.dusk .points li { color: var(--paper-deep); }

.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { position: relative; padding-left: 52px; min-height: 40px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; border: var(--stroke) solid var(--ink); border-radius: 50%; background: var(--yolk-light); font: 800 1.15rem/1 var(--font-display); }
.steps b { display: block; }
.steps p { color: var(--ink-soft); }

.amt { margin-top: 6px; font: 800 2.4rem/1.1 var(--font-display); font-variation-settings: var(--display-axes); }
.amt small { font: 600 1.1rem var(--font-ui); }
[data-price]:empty::before, [data-fill]:empty::before { content: "\2026"; color: var(--ink-faint); }

.intro { padding-block: 0 10px; text-align: center; }
.intro h1 { font-size: clamp(2.3rem, 4.2vw, 3rem); line-height: 1; letter-spacing: -0.02em; isolation: isolate; }
h1 em { position: relative; font-style: normal; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; left: -0.04em; right: -0.04em; bottom: 0.06em; z-index: -1; height: 0.3em; background: var(--think); border-radius: 0.08em 0.14em 0.06em 0.12em; mix-blend-mode: multiply; }
.intro p { margin: 8px auto 0; max-width: 60rem; font-size: var(--text-lg); line-height: 1.4; color: var(--ink-soft); text-wrap: balance; }

.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: clamp(36px, 6vw, 64px); border: var(--stroke) solid var(--ink); border-radius: var(--r-xl); overflow: hidden; background: var(--paper-light); box-shadow: 0 6px 0 var(--paper-shade); }
.side { position: relative; padding: 18px clamp(20px, 3.2vw, 46px) 20px; }
.side h2 { margin-top: 10px; font-size: clamp(1.6rem, 2.2vw, 2rem); }
.tag { display: inline-block; padding: 3px 12px; border: var(--stroke-thin) solid var(--ink); border-radius: var(--r-sm); background: var(--yolk-light); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tag-paper { background: var(--paper); }

.kids { background: var(--pond-light); border-right: var(--stroke) solid var(--ink); }
.kids > :not(.scene) { position: relative; z-index: 1; max-width: 28rem; }
.hint b { color: var(--ink); }
.kids > .hint { max-width: 25rem; }
.scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sun { position: absolute; top: 12px; right: 12px; width: 84px; height: 84px; }
.hill { position: absolute; right: -70px; bottom: -92px; width: 320px; height: 170px; border: var(--stroke) solid var(--ink); border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: var(--leaf-light); }
.hill img { position: absolute; left: 92px; top: -106px; width: 124px; height: 124px; }
.carry { margin-top: 14px; }
.code { margin-top: 18px; }
.code label { display: block; margin-bottom: 8px; font-weight: 700; }
.code-row { display: flex; gap: 10px; }
.code-input {
  flex: 1 1 auto; min-width: 0; width: 100%; min-height: 60px; padding: 6px 14px;
  border: var(--stroke) solid var(--ink); border-radius: var(--r);
  background: var(--paper-light); box-shadow: inset 0 3px 0 var(--paper-deep);
  color: var(--ink); font: 700 1.5rem/1 var(--font-word); letter-spacing: 0.12em; text-transform: uppercase;
}
.code-input[aria-invalid="true"] { border-color: var(--think-ink); }
.code-row .btn { flex: none; min-width: 84px; }
.code-msg { margin-top: 10px; padding: 8px 12px 8px 14px; border: var(--stroke-thin) solid var(--think-ink); border-left-width: 6px; border-radius: var(--r-sm); background: var(--paper-light); font-size: var(--text-sm); font-weight: 700; }
.code-msg:empty { display: none; }
.free { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; padding-top: 18px; border-top: var(--stroke-thin) dashed var(--ink-faint); }
.or { font-size: var(--text-lg); font-weight: 700; }

.schools { background: var(--paper-light); }
.schools .ticks { gap: 4px; line-height: 1.4; }
.schools .ticks a { color: var(--ink); text-decoration-color: var(--pond); }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr)); gap: 16px 20px; margin-top: 18px; }
.paths .q { margin-bottom: 8px; font-weight: 700; }
.paths .btn { width: 100%; }
.paths .note { margin-top: 8px; line-height: 1.4; }

.show { --focus: var(--yolk); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.dusk h2 { color: var(--paper-light); }
.dusk .ticks li { color: var(--paper-deep); }
.show .actions { margin-top: 26px; }
#tour-open small { font-weight: 600; font-size: var(--text-sm); }
.screen-frame { position: relative; overflow: hidden; border: var(--stroke) solid var(--ink); border-radius: var(--r-lg); background: var(--paper-deep); box-shadow: 0 6px 0 var(--ink); }
.screen-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.now { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); padding: 3px 12px; border: var(--stroke) solid var(--ink); border-radius: 999px; background: var(--paper-light); box-shadow: 0 3px 0 var(--ink); color: var(--ink); font: 800 var(--text-sm)/1.25 var(--font-display); font-variation-settings: var(--display-axes); pointer-events: none; }
.toggle { --focus: var(--ink); position: absolute; right: 10px; bottom: 10px; gap: 6px; min-height: 40px; padding: 2px 12px; border-radius: var(--r-sm); font-size: var(--text-xs); --lift: 2px; }
.toggle svg { width: 14px; height: 14px; }
.watch-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; margin-top: 8px; font-size: var(--text-sm); }
.shows { margin-top: 10px; font-size: var(--text-sm); color: var(--paper-deep); }
.alt { margin-top: 6px; font-size: var(--text-sm); color: var(--ink-soft); }
.alt summary { display: inline-block; padding-block: 8px; cursor: pointer; font-weight: 700; color: var(--ink); text-decoration: underline 2px var(--rule); text-underline-offset: 3px; }
.alt ol { margin: 0 0 8px; padding-left: 1.3em; max-width: 50rem; }
.dusk .alt { margin-top: 10px; color: var(--paper-deep); }
.dusk .alt summary { color: var(--paper-light); text-decoration-color: var(--yolk); }

.teach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px clamp(28px, 4vw, 56px); align-items: start; margin-top: 30px; }
.features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 36px; margin: 0; }
.features li { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.45; }
.features b { display: block; margin-bottom: 2px; font-size: var(--text-md); }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: var(--stroke) solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 5px 0 var(--paper-shade); background: var(--paper-deep); }
.shot figcaption { margin-top: 10px; font-size: var(--text-sm); color: var(--ink-soft); }
.kicker { margin-bottom: 8px; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pond); }
.per { margin-top: 4px; font-weight: 700; }

.film { width: min(920px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: var(--stroke) solid var(--ink); border-radius: var(--r-lg); background: var(--paper-light); color: var(--ink); box-shadow: 0 6px 0 var(--ink); }
.film::backdrop { background: rgba(42, 38, 51, 0.72); }
.film-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; }
.film-head h2 { font-size: var(--text-lg); }
.film-frame { position: relative; }
.film video { display: block; width: 100%; height: auto; max-height: calc(100dvh - 180px); aspect-ratio: 16 / 9; background: var(--ink); border-block: var(--stroke) solid var(--ink); }
.film .alt { margin: 0; padding: 2px 20px 8px; }

.who .ticks { gap: 12px; font-size: var(--text-sm); }
.who li { color: var(--ink-soft); }
.price h3 { font-size: var(--text-lg); }
.price .ticks { font-size: var(--text-sm); }
.price .note { margin-top: 14px; }

@media (max-width: 1180px) {
  .hill { right: -110px; }
}
@media (min-width: 881px) and (max-width: 1180px) {
  .schools .ticks, .paths .note { font-size: var(--text-sm); }
  .hill img { left: 110px; top: -76px; width: 88px; height: 88px; }
}
@media (min-width: 1000px) and (max-width: 1180px) {
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paths .btn { padding-inline: 10px; font-size: var(--text-sm); }
}
@media (max-width: 1100px) {
  .teach { grid-template-columns: minmax(0, 1fr); }
  .shot { max-width: 420px; }
}
@media (max-width: 960px) {
  .show { grid-template-columns: minmax(0, 1fr); }
  .watch { width: 100%; max-width: 640px; }
}
@media (max-width: 880px) {
  .stage, .grid3, .grid2, .features { grid-template-columns: minmax(0, 1fr); }
  .kids { border-right: 0; border-bottom: var(--stroke) solid var(--ink); }
  .kids > :not(.scene) { max-width: 34rem; }
}
@media (max-width: 640px) {
  .hd { flex-wrap: wrap; gap: 0 12px; min-height: 64px; }
  .brand { gap: 8px; font-size: 1.3rem; }
  .brand img { width: 36px; height: 36px; border-radius: 9px; }
  .hd nav { order: 3; width: 100%; gap: 0 20px; }
  .hd nav a { padding-block: 8px 10px; }
  .hd .brand { flex: 1 1 0; }
  .intro { padding-bottom: 16px; }
  .intro p { font-size: var(--text-md); }
  .stage { border-radius: var(--r-lg); }
  .side { padding: 20px 16px 24px; }
  .hill { display: none; }
  .sun { width: 56px; height: 56px; top: 8px; right: 8px; }
  .or { font-size: var(--text-md); }
}
@media (max-width: 400px) {
  .hd .btn-small { padding-inline: 12px; }
  .hd .brand { font-size: clamp(1rem, 5.6vw, 1.3rem); }
  .code-input { font-size: 1.3rem; letter-spacing: 0.08em; padding-inline: 10px; }
  .code-row .btn { min-width: 72px; padding-inline: 16px; }
}
@media (max-width: 359px) {
  .sun { display: none; }
  .hd .brand { gap: 6px; }
  .hd .brand img { width: 32px; height: 32px; }
  .hd .btn-small { padding-inline: 10px; font-size: 0.9375rem; }
}
@media print {
  .hd nav, .hd .btn, .watch, .film, .skip, #tour-open { display: none !important; }
}
