/* Better at Chess start page (MAR-170, direction D, owner's pick 13 Nov 2026): the board-first layout on light board
   paper. Cream and paper fields with the store screenshots' faint checker (MAR-166), one blue band, and the dark app
   shown as objects on them: a self-playing board, phones, cards lifted out of the screens. The paper's tokens, fields,
   bar and footer: /paper.css (shared with the blog and the search pages); buttons and form: /site.css.
   Board colours: CoachBoardPalette (ios/.../DesignSystem/CoachTokens.swift). */

h2 { font-size: clamp(40px, 4.6vw, 72px); line-height: 1; letter-spacing: -0.035em; }
.acc { color: var(--blue); }
.blue .acc { color: var(--cream); }
.lead { margin-top: 24px; max-width: 36rem; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; color: var(--ink-brown); }
.lead strong { font-weight: 600; color: var(--ink-dark); }
.habits .lead a { color: var(--ink-dark); }
.blue .lead { color: #EAF0FF; }
.note { color: var(--ink-brown-2); }
.consent { color: var(--ink-brown-2); }

/* Hero: one job, the sign-up. The promise and its action on the left, above the fold; one real mistake on the board
   to the right, the app's habit card on its corner. */
.hero { padding: clamp(16px, 2.5vw, 40px) 0 clamp(72px, 8vw, 120px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 104px); align-items: center; min-height: min(calc(100vh - 140px), 720px); }
.hero h1 { max-width: 12ch; font-size: clamp(44px, 5.6vw, 84px); line-height: .98; letter-spacing: -0.04em; }
.hero .lead { max-width: 33rem; }
.hero-act { margin-top: clamp(28px, 3vw, 40px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cta p { margin: 0; }
.cta .web { order: 1; }
.cta .store { order: 2; }
.hero .store a { padding: 0; }
.hero .store img { height: 64px; }
.hero .cta .pill { min-height: 64px; padding: 0 32px; font-size: 19px; }
.scene { position: relative; justify-self: end; width: min(100%, 520px); }
.boardbox { position: relative; margin: 0; }
.boardbox .board-cap { justify-content: center; padding-left: 64px; }
.float { position: absolute; left: -13%; top: -5%; width: 50%; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgb(60 40 20 / .3); }
.float img { width: 100%; }

/* The board (landing.js plays it): squares, pieces that slide, arrows, and a ?? or ✓ on the move. */
.board-wood { padding: 2.2%; border-radius: 20px; background: var(--frame); box-shadow: var(--shadow-warm); }
.cb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sq-dark); container-type: inline-size; }
.cb > img { width: 100%; height: 100%; }
.cb .sq { position: absolute; width: 12.5%; height: 12.5%; }
.cb .sq.l { background: var(--sq-light); }
.cb .sq.d { background: var(--sq-dark); }
.cb .sq.hl::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--hl-from), var(--hl-to)); opacity: .55; }
.cb .pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; will-change: transform; transition: opacity 200ms; }
.cb .pc img { width: 100%; height: 100%; }
.cb .pc.gone { opacity: 0; }
.cb svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cb .tag { position: absolute; z-index: 2; display: grid; place-items: center; width: 7cqw; height: 7cqw; min-width: 22px; min-height: 22px; border-radius: 50%; transform: translate(-50%, -50%); font: 700 3.3cqw/1 var(--font); color: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .35); }
.cb .tag[hidden] { display: none; }
.cb .tag.bad { background: var(--blunder); }
.cb .tag.good { background: var(--good); }
.pause { position: absolute; right: 0; bottom: -8px; min-height: 44px; padding: 0 4px; font-size: 15px; font-weight: 600; color: var(--ink-brown-2); }
.pause:hover { color: var(--ink-dark); text-decoration: underline; text-underline-offset: 4px; }
.board-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-height: 28px; padding-right: 64px; margin-top: 14px; font-weight: 600; }
.board-cap b { font-size: 20px; letter-spacing: -0.01em; color: var(--ink-dark); }
.board-cap span { font-size: 16px; font-weight: 400; color: var(--ink-brown-2); }

/* Statement: its words light up as you scroll past (landing.js sets --o per word). */
.say { padding: clamp(96px, 12vw, 200px) 0; }
.words { max-width: 28ch; font-size: clamp(28px, 3.6vw, 56px); font-weight: 600; line-height: 1.14; letter-spacing: -0.03em; text-wrap: balance; }
.words .w { opacity: var(--o, 1); transition: opacity 120ms linear; }

/* Habits: four boards from four games arrive as you scroll, gather into one stack, and the habit card lands on it
   (landing.js sets each board's transform and the card's). The copy holds the left half meanwhile. Without script
   or with reduced motion (no .live) the end state shows laid out. The card is the app's Patterns card. */
.habits, .train, .prog, .close { padding: clamp(96px, 11vw, 180px) 0; }
.habits { padding-bottom: 40px; }
.hb-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(32px, 4vw, 64px); }
.hb-copy-in { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; }
.hb-say { display: grid; margin-top: 36px; font-size: clamp(22px, 1.9vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.hb-say span { grid-area: 1 / 1; transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.hb-say .s2 { color: var(--blue); opacity: 0; transform: translateY(10px); }
.habits.together .hb-say .s1 { opacity: 0; transform: translateY(-10px); }
.habits.together .hb-say .s2 { opacity: 1; transform: none; }
.hb-track { height: 330vh; }
.hb-stage { position: sticky; top: 0; height: 100vh; }
.hb-g { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 50% 40%; will-change: transform, opacity; }
.hb-g .board-wood { padding: 3%; border-radius: 14px; }
.hb-g .board-wood > img, .hb-g .cb { display: block; width: 100%; border-radius: 6px; }
.hb-g figcaption { margin-top: 10px; font-size: 16px; line-height: 1.35; color: var(--ink-brown); opacity: var(--cap, 1); }
.hb-g figcaption b { margin-right: 6px; font-weight: 700; color: var(--ink-dark); }
.hb-card { position: absolute; left: 50%; bottom: 7vh; z-index: 5; width: min(460px, 94%); padding: 26px 28px 24px; border-radius: 26px; background: var(--blue); color: #fff; box-shadow: 0 30px 70px rgb(23 57 143 / .35); }
.hb-count { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #DCE5FF; }
.hb-name { margin-top: 6px; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.hb-dots { display: flex; gap: 6px; margin-top: 12px; }
.hb-dots i { width: 16px; height: 16px; border-radius: 4px; background: var(--blunder); }
.hb-what { margin-top: 14px; font-size: 17px; line-height: 1.45; color: #EAF0FF; }
.hb-q { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: rgb(255 255 255 / .14); font-size: 19px; font-weight: 600; line-height: 1.35; }
.hb-q span { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; color: #DCE5FF; }
.habits:not(.live) .hb-track { height: auto; }
.habits:not(.live) .hb-stage { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; height: auto; padding: 64px 0; }
.habits:not(.live) .hb-g { position: static; }
.habits:not(.live) .hb-card { position: static; grid-column: 1 / -1; width: auto; transform: none; }
.habits:not(.live) .hb-say .s1 { opacity: 0; }
.habits:not(.live) .hb-say .s2 { opacity: 1; transform: none; }

/* Phones: the native capture (dark, 9:41) in a device edge. */
.phone { position: relative; padding: 3.2%; border-radius: 15.5% / 7.2%; background: linear-gradient(155deg, #3A4150 0%, #12151B 22%, #05070A 60%, #1B2029 100%); box-shadow: 0 30px 80px rgb(40 30 20 / .35); }
.phone img { width: 100%; border-radius: 12.6% / 5.8%; background: var(--canvas); }
.lift { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgb(4 8 20 / .45); }
.lift img { width: 100%; }

/* Training: four phones dealt out from one stack as you scroll (landing.js). */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.4vw, 36px); align-items: start; margin-top: 64px; }
.strip figure { margin: 0; }
.strip figure:nth-child(even) { margin-top: 72px; }
.strip figcaption { margin-top: 20px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; opacity: var(--cap, 1); }
.strip figcaption span { display: block; margin-top: 2px; font-size: 16px; font-weight: 400; color: var(--ink-brown-2); }

/* Progress: the blue band; the phone and its card drift apart as you pass. */
.prog .grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.prog .stage { position: relative; justify-self: center; width: min(100%, 520px); }
.prog .phone { width: 74%; margin-left: auto; }
.prog .lift { left: -6%; bottom: 16%; width: 92%; }

/* Close: the action and the price on the left, the chess profile (or the browser app) beside it, so nothing
   below the button pulls the eye past it. */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 104px); align-items: center; }
.close h2 { font-size: clamp(44px, 4.8vw, 76px); }
.close .join { margin-top: 36px; }
.close .consent { margin-top: 14px; }
.close .go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.close .alt { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--ink-dark); }
.close .alt:hover { text-decoration: underline; }
.close .note { margin-top: 14px; }
.close .price { max-width: 34rem; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgb(15 19 25 / .1); font-size: 16px; line-height: 1.55; color: var(--ink-brown-2); }
.close .price strong { font-weight: 600; color: var(--ink-dark); }
.shot { justify-self: center; width: min(320px, 80%); }
.shot.wide { width: 100%; }
/* The chess profile's top habit, lifted out of its screen as a card. */
.shot.card { width: min(400px, 86%); }
.shot.card img { display: block; width: 100%; height: auto; border-radius: 26px; box-shadow: var(--shadow-warm); }
.browser { overflow: hidden; border-radius: 14px; background: #1A1F28; box-shadow: 0 30px 90px rgb(40 30 20 / .35); }
.browser .chrome { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; }
.browser .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #3A4150; }
.browser .chrome span { display: flex; align-items: center; flex: 1; max-width: 300px; height: 22px; margin-left: 14px; padding-left: 10px; border-radius: 6px; background: var(--canvas); font-size: 12px; color: var(--ink-3); }
.browser img { width: 100%; }


/* Entrances: the parts of each chapter rise in order. Content stays visible without script or with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-in] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-in].is-in { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero-grid, .prog .grid, .split { grid-template-columns: 1fr; }
  .hero-grid { min-height: 0; gap: 48px; }
  .hero h1 { font-size: clamp(38px, calc((100vw - 40px) * .13), 56px); }
  .hero .store img { height: 56px; }
  /* On a phone the App Store leads. */
  .cta .web { order: 3; }
  .scene { justify-self: center; width: min(100%, 440px); margin-top: 24px; }
  .float { left: -2%; top: -7%; width: 58%; }
  .boardbox .board-cap { padding-left: 0; padding-right: 64px; justify-content: flex-start; }
  /* Habits: the copy first, then the boards and the card on a screen-high stage. */
  .hb-grid { grid-template-columns: 1fr; gap: 0; }
  .hb-copy-in { position: static; min-height: 0; }
  .hb-say, .hb-what { display: none; }
  .hb-track { height: 300vh; }
  .hb-stage { height: 100svh; }
  .habits:not(.live) .hb-stage { gap: 16px 12px; padding: 40px 0 0; }
  .hb-g figcaption { font-size: 14px; }
  .hb-card { bottom: 4svh; padding: 20px 20px 18px; }
  .hb-name { font-size: 28px; }
  .strip { grid-template-columns: 1fr 1fr; gap: 28px 16px; margin-top: 48px; }
  .strip figure:nth-child(even) { margin-top: 48px; }
  .strip figcaption { font-size: 18px; }
  .strip figcaption span { font-size: 15px; }
  .prog .lift { left: 0; width: 88%; }
  /* The close: its picture first, so the button is the last thing on the way down. */
  .split .shot { order: -1; width: min(240px, 62%); }
  .split .shot.wide { width: 100%; }
  .split .shot.card { width: min(320px, 84%); }
  .close .go { flex-direction: column-reverse; align-items: flex-start; }
}
