/* ═══════════════════════════════════════════════════════════════════════════
   Pep — the decoration layer for the marketing pages.

   Linked LAST by pricing.html, schools.html and the three look-inside tours
   (naplan.html, olna.html, scholarships/trainer.html), after policy.css,
   look.css and each page's own <style>, so it only ever adds to them. The
   homepage carries the same treatment inline, because it is a single file.
   The policy pages do not link this: long documents stay plain.

   Decoration only, and still no script: headlines that drop in, a doodle
   beside each headline, cards and buttons that lift, books with page edges.
   Every moving part is switched off under prefers-reduced-motion.

   Pages link pep.css?v=YYYYMMDD. Bump the date whenever this file changes
   (Pages caches stylesheets for four hours — see _headers).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Headline: each word a cut-out with a shadow, dropped onto the page ──── */
h1.ransom{gap:14px 26px; margin-bottom:24px}
h1.ransom .row{background:#fff; box-shadow:5px 5px 0 var(--ink); animation:pep-drop .55s cubic-bezier(.2,1.5,.4,1) backwards}
h1.ransom .row:nth-child(1){transform:rotate(-2deg)}
h1.ransom .row:nth-child(2){transform:rotate(1.5deg); animation-delay:.12s}
h1.ransom .row:nth-child(3){transform:rotate(-1deg); animation-delay:.24s}
@keyframes pep-drop{from{opacity:0; transform:translateY(-26px) rotate(-9deg)}}
h1.ransom .row span{transition:transform .15s ease}
h1.ransom .row span:hover{transform:translateY(-4px) rotate(0deg)}

/* ── The doodle beside the headline ─────────────────────────────────────────
   Only where there is empty paper for it; hidden from screen readers. */
.wrap{position:relative}
.doodle{
  display:none; position:absolute; top:clamp(14px,3vw,26px); right:clamp(16px,4vw,30px);
  width:170px; height:auto; overflow:visible; pointer-events:none;
}
@media (min-width:820px){.doodle{display:block}}
@media (min-width:1000px){.doodle{width:200px}}
.doodle .tw{transform-box:fill-box; transform-origin:center; animation:pep-twinkle 2.6s ease-in-out infinite}
.doodle .tw.t2{animation-delay:-.9s}
.doodle .tw.t3{animation-delay:-1.7s}
@keyframes pep-twinkle{50%{transform:scale(.72) rotate(18deg)}}
.doodle .bob{animation:pep-bob 3.6s ease-in-out infinite}
@keyframes pep-bob{50%{transform:translate(2px,-5px)}}

/* ── Buttons and chips press back ───────────────────────────────────────── */
.btn,.go{transition:transform .16s ease, box-shadow .16s ease, background-color .16s ease}
.btn:hover,.btn:focus-visible,.go:hover,.go:focus-visible{transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink)}
.mast-chip{transition:transform .18s cubic-bezier(.2,1.5,.4,1)}
a.mast-chip:hover,a.mast-chip:focus-visible{transform:rotate(2deg) scale(1.06)}
.jump a,.foot-nav a{transition:transform .14s ease, box-shadow .14s ease}
.jump a:hover,.jump a:focus-visible{transform:translate(-1px,-2px); box-shadow:3px 3px 0 var(--ink)}
.foot-nav a:hover,.foot-nav a:focus-visible{transform:translate(-2px,-2px); box-shadow:4px 4px 0 var(--ink)}

/* ── Section headings: a stripe of colour hanging off the rule ──────────── */
.band{position:relative}
.band::after{content:""; position:absolute; left:0; bottom:-10px; width:78px; height:7px; background:var(--pink); border:2px solid var(--ink); border-top:0}
h2.band:nth-of-type(5n+2)::after{background:var(--cyan)}
h2.band:nth-of-type(5n+3)::after{background:var(--yellow)}
h2.band:nth-of-type(5n+4)::after{background:var(--green)}
h2.band:nth-of-type(5n+5)::after{background:var(--purple)}
.band-sub{margin-top:14px}
/* the tour's numbered chips take turns with the palette */
.stop:nth-of-type(5n+2) h2 .num{background:var(--cyan); transform:rotate(2deg)}
.stop:nth-of-type(5n+3) h2 .num{background:var(--green)}
.stop:nth-of-type(5n+4) h2 .num{background:#ffc9e2; transform:rotate(2deg)}
.stop:nth-of-type(5n+5) h2 .num{background:#dcc8f5}

/* ── Feature cards: a colour tab on top, and they lift ──────────────────── */
.inc,.also > div{
  --tab:var(--yellow); padding-top:19px;
  box-shadow:inset 0 7px 0 var(--tab), 3px 3px 0 var(--ink);
  transition:transform .18s cubic-bezier(.2,1.5,.4,1), box-shadow .18s ease;
}
.inc:nth-child(6n+2),.also > div:nth-child(6n+2){--tab:var(--pink)}
.inc:nth-child(6n+3),.also > div:nth-child(6n+3){--tab:var(--cyan)}
.inc:nth-child(6n+4),.also > div:nth-child(6n+4){--tab:var(--green)}
.inc:nth-child(6n+5),.also > div:nth-child(6n+5){--tab:var(--purple)}
.inc:nth-child(6n+6),.also > div:nth-child(6n+6){--tab:var(--red)}
.inc:hover,.also > div:hover{transform:translate(-2px,-4px) rotate(-.6deg); box-shadow:inset 0 7px 0 var(--tab), 6px 7px 0 var(--ink)}

/* ── Pricing: the two books get page edges, and the price a highlighter ─── */
.book{
  box-shadow:5px 5px 0 0 #fdfcf7, 5px 5px 0 3px var(--ink), 13px 13px 0 0 rgba(17,17,17,.16);
  animation:pep-rise .6s cubic-bezier(.2,1.2,.4,1) backwards;
}
.book.a{transform:rotate(-1.2deg)}
.book.b{transform:rotate(1deg); animation-delay:.1s}
@keyframes pep-rise{from{opacity:0; transform:translateY(34px) rotate(0deg)}}
.book::before{background:#141414 repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 4px)}
.amount{padding:0 6px; background:linear-gradient(transparent 56%, var(--hl,var(--yellow)) 56% 93%, transparent 93%)}

/* ── Schools: the four tariff labels ────────────────────────────────────── */
.tier{
  animation:pep-rise .55s cubic-bezier(.2,1.2,.4,1) backwards;
  transition:transform .2s cubic-bezier(.2,1.5,.4,1), box-shadow .2s ease;
}
.tier .amount{align-self:center}
.tier.t1{transform:rotate(-.7deg)}
.tier.t2{--hl:var(--cyan); transform:rotate(.5deg); animation-delay:.07s}
.tier.t3{--hl:var(--green); transform:rotate(-.4deg); animation-delay:.14s}
.tier.t4{--hl:#ff8fc3; transform:rotate(.7deg); animation-delay:.21s}
.tier:hover{transform:translate(-3px,-6px) rotate(0deg); box-shadow:9px 10px 0 var(--ink)}
.panel,.schools{box-shadow:6px 6px 0 var(--ink), 13px 13px 0 rgba(17,17,17,.1)}

/* ── Look inside: photos you can pick up ────────────────────────────────── */
.shot{transform:rotate(-.6deg); transition:transform .25s cubic-bezier(.2,1.4,.4,1), box-shadow .25s ease}
.shot.tilt{transform:rotate(.7deg)}
.shot:hover{transform:rotate(0deg) translate(-3px,-5px); box-shadow:10px 12px 0 var(--ink)}
.shot.tilt::before{background:rgba(255,47,146,.5)}
.shot.tilt::after{background:rgba(43,179,214,.55)}
.facts span:nth-child(odd){transform:rotate(-1.2deg)}
.facts span:nth-child(even){transform:rotate(1deg)}
.facts span{box-shadow:2px 2px 0 var(--ink)}
/* closing panel: halftone dots fading in from the right */
.lk-cta{
  transform:rotate(-.4deg);
  background-image:
    linear-gradient(100deg, var(--cover,var(--yellow)) 52%, transparent),
    radial-gradient(rgba(17,17,17,.3) 1.7px, transparent 2.2px);
  background-size:auto, 11px 11px;
}

@media (max-width:520px){
  h1.ransom{gap:10px 16px}
  h1.ransom .row:nth-child(n){transform:none; box-shadow:3px 3px 0 var(--ink)}
  .book.a,.book.b,.tier:nth-child(n),.lk-cta{transform:none}
  .shot,.shot.tilt{transform:none}
}
@media (hover:none){
  .shot:hover,.tier:hover,.inc:hover,.also > div:hover{transform:none}
}
@media (prefers-reduced-motion:reduce){
  h1.ransom .row,h1.ransom .row span,.doodle *,.btn,.go,.mast-chip,.jump a,.foot-nav a,.inc,.also > div,.book,.tier,.shot{animation:none !important; transition:none !important}
}
@media print{
  .doodle,.band::after{display:none}
  h1.ransom .row,.book,.tier,.inc,.also > div,.panel,.schools,.facts span{box-shadow:none; transform:none}
  .lk-cta{background-image:none; transform:none}
  .amount{background:none}
}
