/* The Tactics Academy checkout.
   Same brand system as the Game Model Builder page (context/brand_visual.md):
   cream canvas with the dot grid and grain, Instrument Serif for the one
   display line, Lora for working headlines, Inter for everything read.
   A checkout's job is calm, so motion is limited to one drawn line under the
   headline and cards settling in as they arrive. */

:root {
  --cream: #FAF7F0;
  --cream-deep: #F2EDE2;
  --white: #FFFFFF;
  --ink: #1D2730;
  /* #6E7680 is the brand muted, but it measures 4.34:1 on cream. One step
     darker for body text, the same call gmb-v2 made. */
  --muted: #656D77;
  --blue: #3281BC;
  --blue-deep: #2A6C9E;
  --blue-dark: #1F5680;
  --navy: #141D24;
  --hair: rgba(29, 39, 48, 0.12);
  --hair-strong: rgba(29, 39, 48, 0.24);
  --blue-hair: rgba(50, 129, 188, 0.5);
  --blue-tint: rgba(50, 129, 188, 0.1);
  --ok: #2F7A4F;
  --err: #B3261E;

  --f-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-work: "Lora", Georgia, serif;
  --f-text: "Inter", system-ui, -apple-system, sans-serif;

  --r-card: 16px;
  --r-btn: 10px;
  --shadow: 0 1px 3px rgba(29, 39, 48, 0.06);
  --shadow-lift: 0 12px 34px rgba(50, 129, 188, 0.14);
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  color: var(--ink);
  font: 400 16.5px/1.65 var(--f-text);
  background-color: var(--cream);
  /* Paper grain only. Lucas ruled the dot grid out on 11 October 2026. The
     grain is a tiny inline SVG noise tile. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

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

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

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------- top bar */
.bar { border-bottom: 1px solid var(--hair); background: rgba(250, 247, 240, 0.86); }
.bar__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.bar__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.005em; }
.bar__tile { width: 32px; height: 32px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; }
.bar__tile img { width: 24px; height: 24px; }
.bar__secure { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.bar__secure svg { color: var(--blue-deep); }

/* ---------------------------------------------------------------- grid */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero" "order" "body";
  row-gap: 32px;
  padding-top: 32px;
  padding-bottom: 72px;
}
.hero { grid-area: hero; }
.order { grid-area: order; }
.body { grid-area: body; }

@media (min-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 432px;
    grid-template-areas: "hero order" "body order";
    grid-template-rows: auto 1fr;
    column-gap: clamp(48px, 6vw, 88px);
    row-gap: 56px;
    padding-top: 64px;
    padding-bottom: 120px;
  }
  /* Sticky, but never by its top alone: the card is taller than a laptop
     screen, and pinning its top would hide the pay button until the page
     ends. checkout.js sets --stick-top so the card scrolls until its foot is
     on screen, then holds there. */
  .order { align-self: start; position: sticky; top: var(--stick-top, 24px); }
}

/* ---------------------------------------------------------------- hero */
.kicker {
  display: flex; align-items: center; gap: 12px;
  color: var(--blue-deep);
  font: 600 0.74rem/1 var(--f-text); letter-spacing: 0.14em; text-transform: uppercase;
}
/* A short rule instead of a pill: an editorial label, no box. */
.kicker::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }

.hero__h {
  margin-top: 20px;
  font: 400 clamp(2.35rem, 1.5rem + 3.6vw, 4.1rem)/1.02 var(--f-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
  max-width: 17ch;
}
.hero__mark { position: relative; white-space: nowrap; font-style: italic; color: var(--blue-deep); }
.hero__line {
  position: absolute; left: -2%; right: -2%; bottom: -0.12em; width: 104%; height: 0.32em;
  overflow: visible;
}
.hero__line path {
  fill: none; stroke: var(--blue); stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: 320; stroke-dashoffset: 0;
}
.js .hero__line path { stroke-dashoffset: 320; animation: draw 1.1s cubic-bezier(.5, 0, .2, 1) .35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__lede { margin-top: 22px; font-size: clamp(1.06rem, 1rem + .3vw, 1.2rem); line-height: 1.6; color: var(--ink); max-width: 36em; }
.hero__facts {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.hero__facts span:first-child { font: 600 1.35rem/1 var(--f-work); color: var(--ink); }
/* On a phone the order card follows the subheadline directly, and it already
   shows the price, so the facts line would only push it down. */
@media (max-width: 979px) {
  .hero__facts { display: none; }
  .layout { row-gap: 24px; padding-top: 24px; }
  .hero__h { margin-top: 14px; }
  .hero__lede { margin-top: 14px; }
}

/* ---------------------------------------------------------- order card */
.order__card {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  box-shadow: var(--shadow), 0 24px 60px -36px rgba(29, 39, 48, 0.28);
  padding: 22px;
}
@media (min-width: 980px) { .order__card { padding: 28px; } }

.order__label { font: 600 0.74rem/1 var(--f-text); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-deep); }
.order__product { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.order__cover { width: 56px; border-radius: 4px; border: 1px solid var(--hair); box-shadow: 0 6px 14px -6px rgba(29, 39, 48, .35); transform: rotate(-3deg); }
.order__name { font: 600 1.25rem/1.15 var(--f-work); letter-spacing: -0.01em; }
.order__meta { margin-top: 4px; font-size: 13px; color: var(--muted); }

.order__includes { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.order__sub { font-size: 14px; font-weight: 600; }
.ticks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--blue-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.9' fill='none' stroke='%232A6C9E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}

.order__sums { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); }
.order__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; }
.order__row dt, .order__row dd { margin: 0; }
.order__row--discount { font-size: 14px; color: var(--ok); margin-bottom: 8px; }
.order__row--discount dt { display: block; }
.order__row--total dt { font-weight: 600; }
.order__row--total dd { font: 600 1.5rem/1 var(--f-work); }
.order__was { font: 500 1rem/1 var(--f-text); color: var(--muted); margin-right: 6px; }
.order__code { font-weight: 600; letter-spacing: .04em; }

/* Discount code. Collapsed behind a link so a buyer without a code is not
   sent off to hunt for one, open for anyone who has one. */
.coupon { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 14px; }
.coupon__toggle, .coupon__remove {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 14px/1.4 var(--f-text); color: var(--blue-deep);
  text-decoration: underline; text-underline-offset: 3px;
}
.coupon__toggle:hover, .coupon__remove:hover { color: var(--blue-dark); }
.coupon__form { display: flex; gap: 8px; margin-top: 10px; }
.coupon__form input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px;
  font: 500 16px/1 var(--f-text); letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
  background: var(--white); border: 1px solid var(--hair-strong); border-radius: var(--r-btn);
}
.coupon__form input::placeholder { text-transform: none; letter-spacing: 0; color: #9AA1A9; }
.coupon__form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 129, 188, .18); }
.coupon__apply {
  height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--r-btn);
  background: var(--white); color: var(--ink); cursor: pointer; font: 600 14px/1 var(--f-text);
}
.coupon__apply:hover { background: var(--ink); color: #fff; }
.coupon__apply[disabled] { opacity: .6; cursor: progress; }
.coupon__msg { margin-top: 8px; font-size: 13px; color: var(--err); }
.coupon__applied { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ok); }
.order__note { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------- payment form */
.pay { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hair); }
.pay__express { margin-bottom: 18px; }
.pay__or { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.pay__or::before, .pay__or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

.field { margin-bottom: 14px; }
.field label, .field__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.field input {
  width: 100%; height: 46px; padding: 0 13px;
  font: 400 16px/1 var(--f-text); color: var(--ink);
  background: var(--white); border: 1px solid var(--hair-strong); border-radius: var(--r-btn);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 129, 188, .18); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field__hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.pay__element { min-height: 46px; }
.pay__loading { height: 46px; border: 1px dashed var(--hair-strong); border-radius: var(--r-btn); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.pay__error { margin: 4px 0 12px; padding: 10px 12px; border-radius: var(--r-btn); background: rgba(179, 38, 30, .07); color: var(--err); font-size: 14px; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--r-btn);
  background: var(--blue-deep); color: #fff; text-decoration: none; cursor: pointer;
  font: 600 16px/1.2 var(--f-text); letter-spacing: -0.005em; text-align: center;
  transition: background-color .15s, box-shadow .2s, transform .2s;
}
.btn:hover { background: var(--blue-dark); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--pay, .btn--block { width: 100%; margin-top: 6px; }
.btn[disabled] { cursor: progress; opacity: .7; transform: none; box-shadow: none; }
.btn__spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.is-busy .btn__spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.pay__small { margin-top: 10px; text-align: center; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.pay__stripe { margin-top: 6px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- body */
.body { display: grid; gap: clamp(56px, 7vw, 88px); container-type: inline-size; }

/* Workbook pages. Three across once the column is wide enough, the middle
   one set lower like pages laid on a desk. On a phone they become a row you
   swipe, each page big enough to read the headings. */
.pages {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 8px;
}
.pages::-webkit-scrollbar { display: none; }
.page { margin: 0; scroll-snap-align: start; }
.page__shot {
  background: var(--white); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--hair);
  box-shadow: 0 1px 3px rgba(29, 39, 48, .06), 0 18px 40px -22px rgba(29, 39, 48, .35);
}
.page__shot img { width: 100%; }
.page figcaption { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
@container (min-width: 520px) {
  .pages {
    grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto;
    overflow: visible; margin: 0; padding: 0; gap: 18px;
  }
  .page--b { margin-top: 36px; }
}

.body h2 { font: 600 clamp(1.6rem, 1.25rem + 1.3vw, 2.15rem)/1.15 var(--f-work); letter-spacing: -0.01em; text-wrap: balance; max-width: 22ch; }
.clarity p { margin-top: 16px; max-width: 38em; }
.clarity__q {
  padding: 4px 0 4px 18px; border-left: 2px solid var(--blue);
  font: 500 1.15rem/1.55 var(--f-work); color: var(--ink);
}

.points { display: grid; gap: 16px; }
@media (min-width: 640px) { .points { grid-template-columns: 1fr 1fr; } }
.point {
  background: var(--white); border: 1px solid var(--hair); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.point:hover { border-color: var(--blue-hair); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.point__num { font: 600 0.74rem/1 var(--f-text); letter-spacing: .1em; color: var(--blue-deep); }
.point h3 { margin-top: 14px; font: 600 1.2rem/1.2 var(--f-work); letter-spacing: -0.01em; }
.point p { margin-top: 8px; font-size: 15px; color: var(--muted); }

.praise h2 { margin-bottom: 24px; }
.quote { margin: 0; background: var(--white); border: 1px solid var(--hair); border-radius: var(--r-card); padding: 22px 24px; box-shadow: var(--shadow); }
.quote blockquote { margin: 0; }
.quote blockquote p { font: 500 1.05rem/1.5 var(--f-work); }
.quote figcaption { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.quote figcaption strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
/* The one dark panel on the page. */
.quote--feature { background: var(--navy); border-color: var(--navy); color: #F1EFEA; padding: clamp(26px, 4vw, 40px);
}
.quote--feature blockquote p { font: 400 clamp(1.45rem, 1.1rem + 1.3vw, 2rem)/1.25 var(--f-display); letter-spacing: -0.005em; }
.quote--feature figcaption { color: #9FAAB4; }
.quote--feature figcaption strong { color: #F1EFEA; }
.quotes { display: grid; gap: 16px; margin-top: 16px; }
@container (min-width: 520px) {
  .quotes { grid-template-columns: 1fr 1fr; }
  .quotes .quote:first-child { grid-column: 1 / -1; }
}

.faq h2 { margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--hair-strong); }
.faq details:last-of-type { border-bottom: 1px solid var(--hair-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font: 600 1.06rem/1.35 var(--f-work);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--blue-deep); border-bottom: 2px solid var(--blue-deep); transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 40em; }

.close { max-width: 520px; }

/* ---------------------------------------------------------------- foot */
.foot { border-top: 1px solid var(--hair); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
.foot__in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* --------------------------------------------- phone dock, under 980px */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--hair);
  box-shadow: 0 -10px 30px -18px rgba(29, 39, 48, .35);
  transform: translateY(110%); transition: transform .28s ease;
}
.dock.is-on { transform: translateY(0); }
.dock__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; }
.dock__price { font-size: 12.5px; color: var(--muted); line-height: 1.2; }
.dock__price strong { display: block; font: 600 1.2rem/1.1 var(--f-work); color: var(--ink); }
.btn--dock { min-height: 46px; padding: 0 16px; font-size: 15px; }
@media (min-width: 980px) { .dock { display: none; } }

/* --------------------------------------------------- arrival, JS only */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__line path { animation: none; stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .point, .dock { transition: none; }
  .btn:hover, .point:hover { transform: none; }
}
