/* Nobody Said Impossible — landing styles. Calm, light, large type for older readers. Mobile first.
   Colours from the book: the cover's night navy, the interior's deep blue headings, one strong indigo for buttons,
   warm gold only as an accent. */

@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/jost-500.woff) format("woff"); }
@font-face { font-family: "Jost"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/jost-700.woff) format("woff"); }
@font-face { font-family: "Jost"; font-weight: 800; font-style: normal; font-display: swap; src: url(../fonts/jost-800.woff) format("woff"); }
@font-face { font-family: "Literata"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/literata-italic.woff) format("woff"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/atkinson-Regular.woff) format("woff"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/atkinson-Bold.woff) format("woff"); }
@font-face { font-family: "Kalam"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/kalam-400.woff2) format("woff2"); }

:root {
  --cream: #f7f3ea;      /* page, hero, «Inside the book» (= the table colour of the open-book pictures) */
  --paper: #fdfbf7;      /* light bands */
  --mist: #e8edf5;       /* the author's band: a pale evening blue */
  --line: #ddd5c4;
  --ink: #141a2a;        /* text, 16:1 on cream */
  --ink-2: #39415a;      /* secondary text, 9:1 on cream */
  --navy: #0e2a5c;       /* headings, the book's navy */
  --night: #0a1630;      /* footer, the cover's sky */
  --indigo: #2b3f9e;     /* the one button colour: white on it 8.6:1 */
  --indigo-dark: #1f2f7a;
  --gold: #f2b33d;       /* accent fills only (never text on light) */
  --gold-text: #8a5c00;  /* gold for small text on light grounds, 5.3:1 */
  --on-dark: #f7f3ea;
  --on-dark-2: #d9dfeb;
  --focus: #d98a00;

  --display: "Jost", "Futura", "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --voice: "Literata", Georgia, "Times New Roman", serif;
  --hand: "Kalam", "Bradley Hand", "Segoe Print", cursive;

  --fs-body: 20px;
  --fs-small: 17px;
  --gutter: 20px;
  --section-y: 64px;
  --maxw: 1200px;
}
@media (min-width: 700px) { :root { --gutter: 32px; --section-y: 84px; } }
@media (min-width: 1000px) { :root { --fs-body: 21px; --section-y: 100px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: var(--fs-body); line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--indigo-dark); }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0 0 .45em; color: var(--navy); letter-spacing: -.005em; }
h2 { font-size: 34px; }
@media (min-width: 1000px) { h2 { font-size: 44px; } }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--paper); color: var(--ink); padding: 14px 20px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.nw { white-space: nowrap; }
.section { padding: var(--section-y) 0; }
.section--cream { background: var(--cream); }
.section--paper { background: var(--paper); }
.section--mist { background: var(--mist); }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: var(--fs-small); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 12px; }
/* a short gold rule under section titles, like the bars in the book */
h2.center::after { content: ""; display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--gold); margin: 16px auto 0; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 60px; padding: 12px 24px;
  border: 2px solid var(--indigo); border-radius: 999px; background: var(--indigo); color: #fff; cursor: pointer;
  font-family: var(--sans); font-size: 21px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  box-shadow: 0 6px 16px rgba(43, 63, 158, .25); transition: background-color .15s ease, transform .1s ease; }
.btn:hover { background: var(--indigo-dark); border-color: var(--indigo-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn .btn-price { white-space: nowrap; }
.btn--outline { background: transparent; color: var(--indigo); box-shadow: none; }
.btn--outline:hover { background: rgba(43, 63, 158, .07); color: var(--indigo-dark); }
.btn--sm { width: auto; min-height: 52px; font-size: 19px; padding: 10px 22px; }
.btn--big { min-height: 64px; font-size: 22px; }
@media (min-width: 700px) { .btn--auto { width: auto; display: inline-flex; } }

/* ---------- header ---------- */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--navy); padding: 8px 0; }
.brand-mark { flex: 0 0 auto; width: 40px; height: 40px; margin-right: 12px; display: block; }
.brand-name { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: .01em; }
.brand:hover { color: var(--navy); }
.nav { display: none; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; padding: 12px 14px; border-radius: 8px; }
.nav a:not(.btn):hover { background: rgba(14, 42, 92, .06); }
.nav .btn { margin-left: 10px; }
@media (min-width: 1000px) { .nav { display: flex; align-items: center; } .brand-name { font-size: 24px; } }

/* ---------- hero: the big book and Buy ---------- */
.hero { background: var(--cream) url(../img/sky.svg) right -260px top -40px / 1100px auto no-repeat; padding: 16px 0 44px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; text-align: center; }
.hero h1 { font-weight: 800; font-size: 44px; line-height: 1.02; letter-spacing: -.012em; margin: 0 0 6px; }
.hero-by { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; }
.hero-line { font-size: 20px; line-height: 1.45; color: var(--ink-2); margin: 0 auto 4px; max-width: 560px; }
/* the picture carries the book's shadow on its left (~27 % of its width): on phones the picture is wider than the
   column and moved left, so the BOOK itself is centred and big; the shadow runs off the left edge */
.hero-book { width: 106%; margin: 0 0 0 -3%; transform: translateX(-13.5%); }
.hero-book img { width: 100%; height: auto; }
.price-row { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; margin: 0; }
.price-big { font-family: var(--display); font-weight: 700; font-size: 54px; line-height: 1; color: var(--navy); }
.price-was { order: -1; font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1; color: #5d6478; text-decoration: line-through; text-decoration-thickness: 2px; margin-right: 12px; }
.price-note { font-size: 18px; color: var(--ink-2); margin: 6px 0 16px; }
.hero .price-note { font-size: 19px; }
.hero-small { font-size: var(--fs-small); color: var(--ink-2); margin: 14px 0 0; }
@media (min-width: 700px) {
  .hero { background-position: right -120px top -60px; background-size: 1500px auto; }
  .hero h1 { font-size: 60px; }
  .hero-book { width: 100%; max-width: 480px; margin: 4px auto 6px; }
}
@media (min-width: 1000px) {
  .hero { padding: 40px 0 64px; background-position: right top; background-size: cover; }
  .hero-grid { grid-template-columns: 1.08fr 1fr; grid-template-rows: auto auto; column-gap: 56px; text-align: left; align-items: center; }
  .hero-book { grid-column: 1; grid-row: 1 / span 2; width: 100%; max-width: 590px; margin: 0; transform: none; }
  .hero-title { grid-column: 2; grid-row: 1; align-self: end; }
  .hero-buy { grid-column: 2; grid-row: 2; align-self: start; }
  .hero h1 { font-size: 72px; }
  .hero-line { font-size: 23px; margin: 0 0 24px; }
  .hero .price-row { justify-content: flex-start; }
  .price-big { font-size: 64px; }
  .hero .btn--big { width: auto; display: inline-flex; padding: 14px 44px; }
}

/* ---------- a note from Dale ---------- */
.author { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.author-photo { max-width: 300px; margin: 0 auto; }
.author-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 50%; border-radius: 8px; box-shadow: 0 14px 30px rgba(10, 22, 48, .22); }
.author-text h2 { font-family: var(--voice); font-style: italic; font-weight: 400; font-size: 30px; line-height: 1.25; letter-spacing: 0; color: var(--navy); }
.author-text p { color: var(--ink-2); }
.signature { font-family: var(--hand); font-size: 40px; color: var(--navy) !important; margin: 0; line-height: 1.1; }
@media (min-width: 900px) {
  /* the photo is as tall as the text beside it (owner 21.10): the row takes the text's height, the photo fills it */
  .author { grid-template-columns: 380px 1fr; gap: 56px; max-width: 1120px; align-items: stretch; }
  .author-text h2 { font-size: 38px; }
  .author-photo { margin: 0; max-width: 380px; display: flex; align-items: center; }
  .author-photo picture { display: block; width: 100%; height: 100%; max-height: 720px; }
  .author-photo img { height: 100%; aspect-ratio: auto; }
}

/* ---------- what you get (duotone icons on the left) ---------- */
.benefits { list-style: none; margin: 34px auto 0; padding: 0; max-width: 1080px; display: grid; grid-template-columns: 1fr; row-gap: 22px; }
.benefits li { display: grid; grid-template-columns: 60px 1fr; align-items: center; column-gap: 16px; }
.benefits .b-ic { width: 60px; height: 60px; color: var(--indigo); display: block; }
.benefits .b-tx { display: grid; }
.benefits b { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.1; color: var(--navy); }
.benefits .b-tx span { font-size: 19px; line-height: 1.35; color: var(--ink-2); }
@media (min-width: 900px) {
  .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 36px; row-gap: 40px; }
  .benefits li { grid-template-columns: 72px 1fr; column-gap: 18px; }
  .benefits .b-ic { width: 72px; height: 72px; }
  .benefits b { font-size: 44px; }
}

/* ---------- inside: the open book, one spread per slide ---------- */
.inside-head { margin: 0 auto 26px; }
.inside-text { font-size: 21px; color: var(--ink-2); margin-bottom: 8px; }
.slides { max-width: 1180px; margin: 0 auto; }
.slide-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.slide-tab { appearance: none; -webkit-appearance: none; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 80px; padding: 8px 6px 10px; border: 2px solid var(--navy); border-radius: 12px; background: var(--paper); color: var(--navy); text-align: center; }
.slide-tab small { display: none; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); }
.slide-tab b { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.15; }
.slide-tab:hover { background: rgba(14, 42, 92, .07); }
.slide-tab[aria-current="true"] { background: var(--navy); color: var(--on-dark); box-shadow: 0 6px 16px rgba(14, 42, 92, .25); }
.slide-tab[aria-current="true"] small { color: var(--gold); }
.slide-stage { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "track track track" "prev count next"; align-items: center; gap: 10px 14px; }
.slide-track { grid-area: track; position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 8px; }
.slide-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; margin: 0; }
.slide picture { display: block; aspect-ratio: 1383 / 755; }
.slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slide figcaption { max-width: 780px; margin: 6px auto 0; padding: 0 6px; text-align: center; font-size: 20px; line-height: 1.45; color: var(--ink-2); }
.slide figcaption b { color: var(--ink); }
.slide-arrow { grid-area: prev; justify-self: end; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; padding: 0;
  border: 2px solid var(--navy); border-radius: 50%; background: var(--paper); color: var(--navy); cursor: pointer; }
.slide-arrow--next { grid-area: next; justify-self: start; }
.slide-arrow svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.slide-arrow:hover { background: var(--navy); color: var(--on-dark); }
.slide-arrow:disabled { opacity: .28; cursor: default; background: var(--paper); color: var(--navy); }
.slide-count { grid-area: count; margin: 0; min-width: 72px; text-align: center; font-size: 19px; font-weight: 700; color: var(--ink-2); }
.slides:not(.js) .slide-arrow, .slides:not(.js) .slide-count { visibility: hidden; }
/* phones: the open book runs edge to edge, so it is as big as the screen allows */
@media (max-width: 599px) { .slide-track { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; } .slide-tab { min-height: 64px; } }
@media (min-width: 600px) { .slide-tab small { display: block; } .slide-tab b { font-size: 21px; } }
@media (min-width: 900px) {
  .slide-tabs { gap: 14px; margin-bottom: 26px; max-width: 900px; margin-left: auto; margin-right: auto; }
  .slide-tab { min-height: 96px; }
  .slide-tab b { font-size: 25px; }
  .slide-stage { grid-template-columns: 66px minmax(0, 1fr) 66px; grid-template-areas: "prev track next" ". count ."; gap: 6px 14px; }
  .slide-arrow, .slide-arrow--next { justify-self: center; width: 64px; height: 64px; margin-bottom: 70px; }
  .slide-arrow svg { width: 32px; height: 32px; }
  .slide figcaption { font-size: 21px; }
}
.buy-again { max-width: 520px; margin: 40px auto 0; text-align: center; }
.buy-again .price-note { margin: 4px 0 14px; }
@media (min-width: 700px) { .buy-again .btn { width: auto; display: inline-flex; padding: 14px 44px; } }

/* ---------- reviews (shown only when real ones exist) ---------- */
.reviews { display: grid; gap: 22px; margin-top: 26px; }
.review { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.review blockquote { margin: 0 0 10px; font-family: var(--voice); font-style: italic; font-size: 21px; line-height: 1.45; }
.review figcaption { font-weight: 700; color: var(--ink-2); }
@media (min-width: 900px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

/* ---------- FAQ ---------- */
.guarantee { margin: 8px 0 26px; padding: 16px 20px; background: var(--cream); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 10px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 12px 2px;
  font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.3; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; font-family: var(--sans); font-size: 32px; color: var(--indigo); margin-left: 16px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 2px 18px; color: var(--ink-2); }
.faq .a p { margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--on-dark-2); padding: 40px 0 110px; font-size: 18px; }
.site-footer a { color: var(--on-dark); }
.foot-brand { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--on-dark); }
.foot-links { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; }
.foot-links li { margin: 0 6px 8px 0; }
.foot-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 12px; text-decoration: underline; font-weight: 700; }
.site-footer p { margin: 0 0 8px; }

/* ---------- sticky buy bar ---------- */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--paper); border-top: 2px solid var(--indigo);
  box-shadow: 0 -8px 24px rgba(0,0,0,.16); transform: translateY(110%); transition: transform .25s ease; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); }
.buybar.show { transform: translateY(0); }
.buybar-in { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.buybar-text { margin-right: 14px; line-height: 1.2; min-width: 0; }
.buybar-title { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--navy); }
.buybar-price { display: block; font-weight: 700; font-size: 22px; color: var(--navy); }
.buybar-price small { font-size: 17px; color: var(--ink-2); white-space: nowrap; }
.buybar-kind { display: none; font-size: 17px; color: var(--ink-2); }
.buybar .btn { width: auto; flex: 0 0 auto; min-height: 58px; padding: 12px 22px; }
/* phones: the long title would take two lines — show the price and what it is instead */
@media (max-width: 559px) { .buybar-title { display: none; } .buybar-kind { display: block; } }
@media (max-width: 380px) { .buybar .btn { padding: 12px 18px; } }

/* ---------- legal pages ---------- */
.legal { padding: 40px 0 80px; background: var(--paper); }
.legal h1 { font-size: 44px; }
.legal h2 { font-size: 28px; margin-top: 1.4em; }
.legal li { margin-bottom: .5em; }
.fill { background: #fff3cd; color: #3d2e00; outline: 2px dashed #b8860b; padding: 0 4px; }

/* ---------- 404 ---------- */
.notfound p { color: var(--ink-2); }
.notfound-book { max-width: 220px; margin: 18px auto 30px; }
.notfound-book img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 14px 30px rgba(10, 22, 48, .25); }
.notfound .fine { font-size: var(--fs-small); margin-top: 22px; }
