/* =========================================================
   COMIC STENCILS — styles (one-product scrolling journey)
   Edit colours in :root.
   Type rules: Luckiest Guy = headings (never contains £),
   Bangers = labels & ALL prices, Nunito = body.
   ========================================================= */

:root {
  --ink:    #161616;
  --paper:  #FFFBEF;
  --blue:   #2A6DF4;
  --red:    #FF2D55;
  --yellow: #FFD23F;

  --shadow: 8px 8px 0 var(--ink);
  --shadow-sm: 5px 5px 0 var(--ink);
  --border: 5px solid var(--ink);
  --maxw: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
img, svg { max-width: 100%; }

h1, h2, h3 { font-family: "Luckiest Guy", cursive; font-weight: 400; margin: 0; }

/* prices & stamped labels always use Bangers (its £ is full-size) */
.big, .price-tagline, .eyebrow, .cap, .buybar-price { font-family: "Bangers", cursive; letter-spacing: 0.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  padding: 0.7em 1.25em;
  background: var(--yellow);
  color: var(--ink);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }

/* =========================================================
   TOP BAR — logo + one button
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 1rem;
  background: var(--paper);
  border-bottom: var(--border);
}
.logo { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.logo-mark { display: inline-flex; filter: drop-shadow(2px 2px 0 var(--ink)); }
.logo-text { font-family: "Luckiest Guy", cursive; font-size: 1.35rem; letter-spacing: 0.5px; }
.btn-nav {
  font-size: 0.98rem; padding: 0.55em 1em; border-width: 4px;
  box-shadow: 4px 4px 0 var(--ink); display: flex; align-items: center; gap: 0.5em;
}
.price-tagline {
  font-size: 1.05em; background: var(--ink); color: var(--yellow);
  border-radius: 6px; padding: 0.05em 0.4em;
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: clamp(1.6rem, 4vw, 3.5rem) 1rem; display: flex; justify-content: center; }
.hero-inner {
  width: 100%; max-width: var(--maxw);
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.2rem, 3vw, 2.5rem);
  align-items: center;
  background: var(--red); color: #fff;
  border: var(--border); border-radius: 20px; box-shadow: var(--shadow);
  padding: clamp(1.6rem, 4vw, 3rem);
}
.eyebrow {
  display: inline-block; font-size: 1rem; margin: 0 0 1rem;
  padding: 0.3em 0.85em; background: var(--ink); color: var(--yellow); border-radius: 6px;
}
#hero-title {
  font-size: clamp(2.3rem, 6.5vw, 4rem); line-height: 1; margin: 0 0 0.9rem;
  text-shadow: 4px 4px 0 var(--ink);
}
.burst-word { position: relative; display: inline-block; }
.burst-word > span { position: relative; z-index: 2; color: var(--ink); text-shadow: none; }
.burst {
  position: absolute; z-index: 1; width: 170%; height: 170%;
  left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg);
}
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.25rem); font-weight: 700; margin: 0 0 1.4rem; max-width: 34ch; }
.hero-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn-go { font-size: 1.3rem; }
.hero-price { font-weight: 800; font-size: 1rem; }
.hero-price .big { font-size: 1.9rem; vertical-align: -0.12em; margin-right: 0.15em; text-shadow: 2px 2px 0 var(--ink); }

/* the three stencils, fanned */
.hero-shot { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 230px; }
.hero-shot .shot {
  width: 31%; border: 4px solid var(--ink); border-radius: 10px;
  background: #191919; box-shadow: var(--shadow-sm);
}
.shot-1 { transform: rotate(-7deg) translateY(8px); z-index: 1; }
.shot-2 { transform: translateY(-6px); z-index: 2; }
.shot-3 { transform: rotate(7deg) translateY(8px); z-index: 1; }

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.section-head {
  font-size: clamp(1.9rem, 5vw, 2.8rem); text-align: center; margin: 0 0 0.5rem;
  text-shadow: 3px 3px 0 var(--yellow);
}
.section-head--light { color: #fff; text-shadow: 3px 3px 0 var(--ink); text-align: left; }
.section-lead { text-align: center; max-width: 46ch; margin: 0 auto 1.8rem; font-weight: 700; }

/* =========================================================
   HOW IT WORKS — the comic strip
   ========================================================= */
.strip { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 1rem 0; }
.strip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.4rem; }
.strip-panel {
  position: relative; margin: 0;
  background: #fff; border: var(--border); border-radius: 12px; box-shadow: var(--shadow-sm);
  padding: 0.9rem 0.9rem 1rem;
}
.strip-panel svg { width: 100%; height: auto; display: block; }
.strip-no {
  position: absolute; top: -16px; left: -10px;
  font-family: "Bangers", cursive; font-size: 1.3rem;
  background: var(--red); color: #fff;
  border: 4px solid var(--ink); border-radius: 50%;
  width: 40px; height: 40px; display: grid; place-items: center;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg);
}
.strip-panel figcaption { margin-top: 0.6rem; font-weight: 700; font-size: 0.98rem; }
.cap {
  display: inline-block; margin-right: 0.45em; padding: 0.08em 0.55em;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 6px;
  font-size: 1.02rem;
}

/* =========================================================
   THE SET
   ========================================================= */
.set { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.4rem, 6vw, 4rem) 1rem 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: #fff; border: var(--border); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 0.9rem; text-align: center;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.card img {
  width: 100%; aspect-ratio: 327 / 626; object-fit: contain;
  background: #191919; border: 4px solid var(--ink); border-radius: 10px; display: block;
}
.card h3 { font-size: 1.35rem; margin: 0.7rem 0 0.2rem; }
.card p { margin: 0; font-weight: 600; }

/* =========================================================
   TAPER
   ========================================================= */
.taper {
  margin-top: clamp(2.4rem, 6vw, 4rem);
  background: var(--blue); color: #fff;
  border-top: var(--border); border-bottom: var(--border);
  padding: clamp(2.2rem, 5vw, 3.5rem) 1rem;
}
.taper-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center;
}
.taper-shot { margin: 0; }
.taper-shot img {
  width: 100%; display: block; background: #191919;
  border: var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.taper-copy p { font-weight: 700; font-size: 1.08rem; }

/* =========================================================
   BUY
   ========================================================= */
.buy { padding: clamp(2.4rem, 6vw, 4rem) 1rem; display: flex; justify-content: center; }
.buybox {
  width: 100%; max-width: 560px; text-align: center;
  background: var(--paper); border: var(--border); border-radius: 20px; box-shadow: var(--shadow);
  padding: clamp(1.8rem, 5vw, 2.6rem);
}
.buybox h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); text-shadow: 3px 3px 0 var(--yellow); }
.buy-price { margin: 0.4rem 0 1.2rem; font-weight: 800; }
.buy-price .big { font-size: clamp(3rem, 9vw, 4rem); color: var(--blue); text-shadow: 3px 3px 0 var(--ink); margin-right: 0.12em; vertical-align: -0.1em; }
.buy-list { list-style: none; margin: 0 auto 1.5rem; padding: 0; max-width: 34ch; text-align: left; }
.buy-list li { font-weight: 700; padding: 0.3rem 0 0.3rem 1.8rem; position: relative; }
.buy-list li::before {
  content: "✔"; position: absolute; left: 0; top: 0.32rem; font-size: 0.9rem;
  color: #fff; background: var(--blue); width: 1.2rem; height: 1.2rem; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--ink);
}
#buy-set { font-size: 1.35rem; }

/* qty selector */
.qty-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.2rem 0 0.5rem; }
.qty-label { font-weight: 800; font-size: 1rem; }
.qty-control { display: flex; align-items: center; gap: 0; border: var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.qty-btn {
  font-family: "Luckiest Guy", cursive; font-size: 1.4rem; line-height: 1;
  width: 44px; height: 44px; border: none; border-radius: 0; background: var(--yellow);
  color: var(--ink); cursor: pointer; transition: background 0.08s;
}
.qty-btn:hover { background: #f0c430; }
.qty-btn:first-child { border-right: var(--border); }
.qty-btn:last-child  { border-left:  var(--border); }
.qty-display { min-width: 44px; text-align: center; font-family: "Bangers", cursive; font-size: 1.5rem; padding: 0 0.3em; background: #fff; }
.postage-line { font-weight: 700; margin: 0.3rem 0 0.1rem; font-size: 0.95rem; color: #555; }
.total-line { font-weight: 800; font-size: 1.1rem; margin: 0 0 1.2rem; }
.total-line span { font-family: "Bangers", cursive; font-size: 1.5rem; color: var(--blue); }

/* =========================================================
   SCHOOLS
   ========================================================= */
.schools { background: var(--yellow); border-top: var(--border); padding: clamp(2rem, 5vw, 3rem) 1rem; }
.schools-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.schools-inner h2 { font-size: clamp(1.7rem, 4.5vw, 2.2rem); text-shadow: 3px 3px 0 #fff; }
.schools-inner p { font-weight: 700; margin: 0.6rem 0 1.3rem; }
.btn-mail { background: var(--red); color: #fff; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--ink); color: var(--paper); border-top: var(--border); padding: 2rem 1rem 2.4rem; text-align: center; }
.footer p { margin: 0.3rem 0; font-weight: 600; }
.footer a { color: var(--yellow); }
.footer-brand { font-family: "Luckiest Guy", cursive; font-size: 1.5rem; }
.footer-small { opacity: 0.7; font-size: 0.88rem; }

/* =========================================================
   STICKY MOBILE BUY BAR
   ========================================================= */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 0.8rem;
  background: var(--paper); border-top: var(--border);
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
}
.buybar-price { font-size: 1rem; }
.buybar-price .big { font-size: 1.6rem; vertical-align: -0.1em; margin-right: 0.1em; }
.buybar .btn { font-size: 1.05rem; padding: 0.55em 1.2em; border-width: 4px; box-shadow: 4px 4px 0 var(--ink); }

/* =========================================================
   EMBEDDED CHECKOUT MODAL
   ========================================================= */
.checkout-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(22,22,22,0.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; overflow-y: auto;
}
.checkout-modal[hidden] { display: none; }
.checkout-dialog {
  position: relative; width: 100%; max-width: 540px;
  background: #fff; border: var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 2.6rem 1rem 1rem;
}
.checkout-close {
  position: absolute; top: 8px; right: 12px;
  font-family: "Luckiest Guy", cursive; font-size: 1.6rem; line-height: 1;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer;
}
.checkout-close:focus-visible { outline: 4px solid var(--blue); outline-offset: 2px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-shot { min-height: 0; margin-top: 0.4rem; }

  .strip-row { grid-template-columns: 1fr; max-width: 380px; margin: 1.6rem auto 0; gap: 1.6rem; }

  /* the set: swipeable row */
  .cards {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.5rem 0.25rem 1rem;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: center; }

  .taper-inner { grid-template-columns: 1fr; }
  .section-head--light { text-align: center; }

  .buybar { display: flex; }
  body { padding-bottom: 76px; }     /* room for the buy bar */
  .topbar .btn-nav { display: none; } /* buy lives in the bottom bar on mobile */
}

@media (max-width: 400px) {
  .logo-text { font-size: 1.2rem; }
  .hero-shot .shot { width: 32%; }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
