/* Ufalugaa design mockup
   Brand: Ufalugaa blue #0091CC + white, Montserrat. */

:root {
  --blue: #0091cc;          /* brand blue: large surfaces and big type */
  --blue-text: #0072a3;     /* brand blue, deepened so small text passes contrast */
  --blue-tint: #dcf0f9;
  --page: #e9f1f6;
  --surface: #ffffff;
  --surface-2: #f2f7fa;
  --ink: #0a2433;
  --ink-soft: #46606f;
  --line: #d3e2ea;
  --btn-bg: #0072a3;
  --btn-ink: #ffffff;
  --title-blue: #0091cc;
  --on-title-blue: #ffffff;
  --photo: #cfcfcf;
  --shadow: 0 30px 60px -24px rgb(0 45 75 / 0.45);
  --photo-dim: none;

  --r-panel: 30px;       /* every section box: the same curve as the header pill (60px tall) */
  --r-tile: 20px;
  --r-small: 14px;
  --gap: 12px;
  --pad: clamp(20px, 4.5vw, 64px);
  --max: 1440px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* Dark mode: only when the visitor chooses it with the sun/moon button (remembered on their device). */
:root[data-theme="dark"] {
  --blue-text: #5cc6f0;
  --blue-tint: #0f3448;
  --page: #04121b;
  --surface: #0a1f2b;
  --surface-2: #10293a;
  --ink: #e6f2f8;
  --ink-soft: #9fb7c4;
  --line: #1b3646;
  --btn-bg: #5cc6f0;
  --btn-ink: #04121b;
  --title-blue: #0091cc;
  --on-title-blue: #ffffff;
  --shadow: 0 30px 60px -24px rgb(0 0 0 / 0.7);
  --photo-dim: brightness(0.86);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--gap) * 2 + 60px); /* header (60px) plus the page gap above and below it */ -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}
img { display: block; max-width: 100%; height: auto; }
.book__img { filter: var(--photo-dim); }
a { color: var(--blue-text); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(30px, 3.6vw, 48px); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue-text); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 16px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.logo { display: block; width: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Page frame: everything sits in rounded panels on a tinted page */
.frame { max-width: var(--max); margin: 0 auto; padding: var(--gap); display: flex; flex-direction: column; gap: var(--gap); min-height: 100vh; min-height: 100dvh; }
/* On short pages the footer stretches to the bottom of the window, so the gap below it stays the page gap. */
.frame > .footer { flex: 1 0 auto; align-content: space-between; }
main { display: flex; flex-direction: column; gap: var(--gap); }
.panel { background: var(--surface); border-radius: var(--r-panel); padding: var(--pad); transition: background-color 0.3s; }
.panel--blue { background: var(--blue); color: #fff; }
.panel--blue a:not(.btn) { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: clamp(24px, 3vw, 44px); }
.section-head p { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  --fill: var(--ink); --fill-ink: var(--surface);
  background: linear-gradient(var(--fill), var(--fill)) no-repeat left center / 0% 100%, var(--btn-bg);
  color: var(--btn-ink); border: 2px solid var(--btn-bg);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-size 0.4s var(--ease-out), color 0.25s, border-color 0.25s;
}
.btn:hover { background-size: 100% 100%, auto; color: var(--fill-ink); border-color: var(--fill); }
.btn:active { transition-duration: 0.1s; filter: brightness(0.92); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--white { --btn-bg: #fff; --btn-ink: #00618b; --fill: #0a2433; --fill-ink: #fff; }
.btn--outline { --fill: var(--blue-text); --fill-ink: var(--surface); background-color: transparent; color: var(--blue-text); border-color: currentColor; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; transition: background-color 0.2s;
}
.icon-btn:hover { background: var(--blue-tint); }
.icon-btn--on-blue { background: rgb(255 255 255 / 0.16); color: #fff; }
.icon-btn--on-blue:hover { background: rgb(255 255 255 / 0.28); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: var(--gap); z-index: 50;
  display: flex; align-items: center; gap: 16px;
  background: var(--blue); color: #fff;
  border-radius: 999px; padding: 8px;
  box-shadow: 0 10px 30px -18px rgb(0 60 100 / 0.6);
}
.nav__logo { display: flex; }
.nav__logo .logo { height: 44px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 14px; border-radius: 999px; transition: background-color 0.2s; }
.nav__links a:hover { background: rgb(255 255 255 / 0.16); }
.nav :focus-visible { outline-color: #fff; }
.nav__actions { display: flex; gap: 8px; align-items: center; }
.nav__menu { display: none; }
[data-theme-toggle] .icon-moon { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon-moon { display: inline; }
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; border-radius: 30px; } /* half the 60px header: a perfect pill, like desktop */
  .nav__actions { margin-left: auto; }
  .nav__cta { display: none; }
  .nav__menu { display: inline-grid; }
  .nav__links { order: 3; width: 100%; flex-direction: column; margin: 0; display: none; padding: 4px 0 8px; }
  .nav[data-open] .nav__links { display: flex; }
  .nav__links a { padding: 12px 10px; font-size: 17px; }
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; min-height: min(78vh, 760px); overflow: hidden; }
.hero h1 { font-size: clamp(46px, 7.4vw, 108px); line-height: 0.95; letter-spacing: -0.04em; max-width: 9ch; }
.hero__lede { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; line-height: 1.45; max-width: 30ch; margin-top: 28px; }
.hero__stack { position: relative; aspect-ratio: 1; width: min(100%, 560px); justify-self: center; }
.hero__card {
  position: absolute; width: 60%; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.08), 0 40px 70px -28px rgb(0 40 70 / 0.65);
  transition: transform 0.6s var(--ease-out);
}
.hero__card--0 { left: 20%; top: 18%; transform: rotate(-3deg); z-index: 3; }
.hero__card--1 { left: 36%; top: 4%; transform: rotate(8deg); z-index: 2; }
.hero__card--2 { left: 3%; top: 30%; transform: rotate(-12deg); z-index: 1; }
.hero__stack:hover .hero__card--0, .hero__stack:focus-within .hero__card--0 { transform: rotate(-2deg) translateY(-4%); }
.hero__stack:hover .hero__card--1, .hero__stack:focus-within .hero__card--1 { transform: rotate(12deg) translate(14%, -6%); }
.hero__stack:hover .hero__card--2, .hero__stack:focus-within .hero__card--2 { transform: rotate(-16deg) translate(-12%, 6%); }
.hero__card:hover { z-index: 4; }
/* The books float slowly, each on its own timing. The float uses `translate`, separate from the
   `transform` above, so the hover fan-out still works on top of it. The badge rides with the front book. */
.hero { --float: 12px; }
.hero__card, .hero__badge { animation: hero-float 6.5s ease-in-out infinite; }
.hero__card--1 { animation-duration: 7s; animation-delay: -2.3s; }
.hero__card--2 { animation-duration: 6s; animation-delay: -4.1s; }
@keyframes hero-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 calc(var(--float) * -1); }
}
.hero__badge {
  position: absolute; z-index: 5; right: 6%; bottom: 8%;
  background: #fff; color: #0091cc; font-weight: 800; font-size: clamp(16px, 1.6vw, 20px);
  padding: 12px 22px; border-radius: 999px; transform: rotate(-4deg); box-shadow: var(--shadow);
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__stack { width: min(100%, 420px); }
  .hero { --float: 8px; }
}

/* ---------- Book tiles ---------- */
.grid-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 28px); }
.book { min-width: 0; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.book[hidden], .book-card[hidden] { display: none; }
.book-card { position: relative; min-width: 0; display: flex; flex-direction: column; }
.book__img { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-tile); overflow: hidden; background: var(--photo); margin-bottom: 14px; }
.book__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s, transform 0.6s var(--ease-out); }
.book__peek { opacity: 0; }
.book:hover .book__peek, .book:focus-visible .book__peek { opacity: 1; }
.book:hover .book__img img { transform: scale(1.03); }
.book__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.book__title { font-weight: 700; font-size: 19px; line-height: 1.25; }
.book__topic { color: var(--ink-soft); font-size: 15px; }

/* ---------- Why Ufalugaa (magnetic, wobbling pills) ---------- */
.why { position: relative; padding: clamp(48px, 6vw, 96px) var(--pad); min-height: 600px; display: grid; place-items: center; }
.why__center { position: relative; z-index: 1; text-align: center; pointer-events: none; }
.why__center h2 { font-size: clamp(36px, 4.6vw, 64px); color: var(--ink); }
.why__pills { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; }
/* The list item carries position, tilt and the pull towards the pointer… */
.pill {
  position: absolute; white-space: nowrap;
  --x: 0px; --y: 0px; --spin: 0deg;
  transform: translate(var(--x), var(--y)) rotate(calc(var(--r) + var(--spin)));
  will-change: transform; user-select: none;
}
/* …and the inner pill wobbles on its own, all the time. */
.pill__wobble {
  display: block;
  font-weight: 800; letter-spacing: -0.02em; font-size: clamp(22px, 2.5vw, 36px); line-height: 1;
  padding: 0.55em 0.9em 0.6em; border-radius: 999px;
  background: var(--blue); color: #fff;
  animation: wobble var(--dur, 3.4s) ease-in-out var(--delay, 0s) infinite alternate;
}
.pill:nth-child(even) .pill__wobble { background: var(--surface); color: var(--title-blue); box-shadow: inset 0 0 0 3px var(--blue); }
@keyframes wobble {
  0%   { transform: translate(-3px, 2px) rotate(-2.2deg); }
  35%  { transform: translate(2px, -3px) rotate(1.4deg); }
  70%  { transform: translate(-1px, 3px) rotate(-0.6deg); }
  100% { transform: translate(3px, -2px) rotate(2.2deg); }
}
/* Desktop: a loose cluster around the heading, three pills above and three below,
   tilted at varied angles. Pills sit on top of the heading and may clip the edges of its letters. */
.pill--1 { left: 4%;  top: 25%; --r: -11deg; --dur: 3.1s; --delay: -0.4s; }
.pill--2 { left: 30%; top: 28%; --r: 5deg;   --dur: 3.7s; --delay: -1.9s; }
.pill--3 { right: 5%; top: 12%; --r: -8deg;  --dur: 2.9s; --delay: -1.1s; }
.pill--4 { left: 13%; top: 64%; --r: 9deg;   --dur: 3.3s; --delay: -0.8s; }
.pill--5 { left: 38%; top: 57%; --r: -7deg;  --dur: 3.6s; --delay: -2.2s; }
.pill--6 { right: 4%; top: 64%; --r: 6deg;   --dur: 3.2s; --delay: -1.5s; }
@media (max-width: 1080px) {
  .why { display: flex; flex-direction: column; gap: 32px; min-height: 0; }
  .why__pills { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 10px; max-width: 640px; }
  .pill { position: static; transform: translate(var(--x), var(--y)) rotate(calc(var(--r) * 0.4 + var(--spin))); }
  .pill__wobble { font-size: clamp(20px, 5vw, 28px); }
}

/* ---------- Testimonials (home) ---------- */
.reviews__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.review {
  margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 340px; padding: clamp(28px, 3.2vw, 48px);
  border-radius: var(--r-panel); background: var(--surface); color: var(--ink);
}
.review blockquote { margin: 0; }
.review blockquote p { font-size: clamp(20px, 1.9vw, 26px); font-weight: 600; line-height: 1.38; letter-spacing: -0.01em; }
.review figcaption { font-size: 16px; font-weight: 700; }
/* Two-colour rhythm: brand blue, pale blue and white, arranged so no two neighbours match */
.review:nth-child(6n + 1), .review:nth-child(6n + 5) { background: var(--blue); color: #fff; }
.review:nth-child(6n + 2), .review:nth-child(6n + 6) { background: var(--blue-tint); }
@media (max-width: 960px) {
  .reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review:nth-child(n) { background: var(--surface); color: var(--ink); }
  .review:nth-child(4n + 1), .review:nth-child(4n + 4) { background: var(--blue); color: #fff; }
}
@media (max-width: 600px) {
  .reviews__grid { grid-template-columns: minmax(0, 1fr); }
  .review { min-height: 0; }
  .review:nth-child(n) { background: var(--surface); color: var(--ink); }
  .review:nth-child(3n + 1) { background: var(--blue); color: #fff; }
  .review:nth-child(3n + 2) { background: var(--blue-tint); }
}

/* ---------- Quotes (book page) ---------- */
/* Book testimonials: a real grid, two per row in reading order, so each row's tops always line up
   however long the quotes are. */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(24px, 3vw, 48px); align-items: start; }
.quotes--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .quotes, .quotes--two { grid-template-columns: minmax(0, 1fr); } }
.quote { margin: 0; padding-top: 26px; border-top: 2px solid var(--line); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.5; }
.quote blockquote p::before { content: "\201C"; display: block; font-size: 64px; line-height: 0.6; height: 30px; font-weight: 800; color: var(--blue); }
.quote figcaption { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 15px; }
.quote__name { font-weight: 700; }
.quote__on { color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 5vw, 80px); }
.faq__intro p { margin-top: 18px; color: var(--ink-soft); max-width: 32ch; }
.faq__list details { border-bottom: 2px solid var(--line); }
.faq__list details:first-child { border-top: 2px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-size: clamp(18px, 1.6vw, 21px); font-weight: 700;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-text); flex: none; transition: transform 0.3s var(--ease-out); }
.faq__list details[open] .faq__icon { transform: rotate(45deg); }
.faq__list details p { padding: 0 0 24px; color: var(--ink-soft); max-width: 62ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
/* Desktop: bio on the far left; Policies + Contact form a tight group on the right.
   The contact column sizes to its widest line (the email), so that line ends exactly
   where the divider below ends. */
.footer { display: grid; grid-template-columns: minmax(0, 400px) 1fr auto auto; column-gap: 0; row-gap: 40px; align-items: start; }
.footer__brand { grid-column: 1; }
.footer > .footer__col { grid-column: 3; margin-left: 48px; margin-right: clamp(48px, 5vw, 80px); }
.footer__stack { grid-column: 4; }
.footer__logo { display: inline-flex; }
.footer__logo .logo { height: 54px; }
.footer__brand p { margin-top: 20px; max-width: 40ch; font-weight: 600; font-size: 16px; line-height: 1.5; }
.footer__col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer__col h2 { font-size: 14px; font-weight: 700; letter-spacing: 0; opacity: 0.85; margin-bottom: 2px; }
.footer__col a { text-decoration: none; font-weight: 600; font-size: 16px; }
.footer__col a:hover { text-decoration: underline; }
.footer__stack { display: flex; flex-direction: column; gap: 32px; }
.footer__legal { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid rgb(255 255 255 / 0.35); font-size: 14px; font-weight: 600; }
@media (max-width: 860px) {
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer > .footer__col, .footer__stack { grid-column: auto; margin: 0; }
}
@media (max-width: 600px) { .footer { grid-template-columns: minmax(0, 1fr); row-gap: 32px; } }

/* ---------- Book page ---------- */
/* Two panels side by side: the pictures, and the book's key details. */
.product { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }

/* Gallery: the original photo fills the whole panel, uncropped (both are square). */
/* Always a perfect square, so the photo is never trimmed. Long titles shrink to fit instead (see app.js). */
.gallery { position: relative; align-self: start; aspect-ratio: 1; padding: 0; overflow: hidden; background: var(--photo); }
.gallery__slides { filter: var(--photo-dim); }
.gallery__slides { position: absolute; inset: 0; touch-action: pan-y; }
.gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.gallery__img.is-active { opacity: 1; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: clamp(14px, 2.4vw, 28px); display: flex; justify-content: center; gap: 4px; }
.gallery__dot { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.gallery__dot::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: rgb(255 255 255 / 0.85); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.2s var(--ease-out), background-color 0.2s; }
.gallery__dot:hover::before { transform: scale(1.25); }
.gallery__dot[aria-current="true"]::before { background: transparent; box-shadow: inset 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.25); transform: scale(1.3); }

/* Details panel: name, price and credits at the top; ordering at the bottom. */
.product__info { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.product__info h1 { font-size: clamp(40px, 4.4vw, 64px); letter-spacing: -0.035em; color: var(--title-blue); }
/* Order buttons in the exact brand blue. Text is 19px bold so white on #0091CC meets the
   contrast standard for large text (3:1). */
.btn--brand { --btn-bg: var(--title-blue); --btn-ink: var(--on-title-blue); font-size: 19px; }
.product__price { font-size: clamp(26px, 2.2vw, 32px); font-weight: 800; margin-top: 16px; }
.credits { margin: clamp(24px, 3vw, 40px) 0 0; display: grid; gap: 18px; }
.credits div { display: flex; flex-direction: column; }
.credits dt { color: var(--ink-soft); font-size: clamp(15px, 1.25vw, 18px); }
.credits dd { margin: 0; font-weight: 700; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.3; }
.product__order-label { font-weight: 700; margin-bottom: 12px; }
.product__order { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn--social { gap: 10px; min-height: 56px; padding: 0 18px 0 12px; }
.btn--social img { width: 32px; height: 32px; }
.product__note { margin-top: 14px; font-size: 15px; color: var(--ink-soft); }
.pack {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 16px 18px; border-radius: var(--r-tile); background: var(--blue-tint); color: var(--ink); text-decoration: none;
  transition: background-color 0.2s;
}
.pack:hover { background: color-mix(in srgb, var(--blue-tint) 70%, var(--blue) 30%); }
.pack__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-ink); flex: none; }
.pack__title { display: block; font-weight: 700; font-size: 17px; }
.pack__meta { display: block; font-size: 14px; color: var(--ink-soft); }


/* Collapsible sections (Synopsis, Additional details, Topic explored): same open/close button as the FAQ. */
.fold { padding: 0; }
.fold summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: clamp(22px, 2.6vw, 34px) var(--pad);
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary h2 { font-size: clamp(24px, 2.4vw, 32px); }
.fold__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-text); flex: none; transition: transform 0.3s var(--ease-out), background-color 0.2s; }
.fold summary:hover .fold__icon { background: color-mix(in srgb, var(--blue-tint) 70%, var(--blue) 30%); }
.fold[open] .fold__icon { transform: rotate(45deg); }
.fold summary:focus-visible { outline-offset: -6px; border-radius: var(--r-panel); }
.fold__body { padding: 0 var(--pad) var(--pad); }
/* The download row looks like a closed section, but downloads the activity pack when clicked. */
.fold--download { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(22px, 2.6vw, 34px) var(--pad); color: var(--ink); text-decoration: none; }
.fold__label { display: flex; flex-direction: column; gap: 2px; }
.fold__title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
.fold__meta { font-size: 15px; color: var(--ink-soft); }
.fold--download:hover .fold__icon { background: color-mix(in srgb, var(--blue-tint) 70%, var(--blue) 30%); }
.fold--download:focus-visible { outline-offset: -6px; border-radius: var(--r-panel); }
.fold[open] .fold__body { animation: fold-in 0.35s var(--ease-out); }
@keyframes fold-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.synopsis { display: grid; gap: 18px; }
.synopsis p { font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.6; max-width: 68ch; }
.topic h3 { font-size: clamp(26px, 2.6vw, 36px); color: var(--title-blue); margin-bottom: 12px; }
.topic p { font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.6; max-width: 68ch; }

/* Smaller laptops: tighten the details panel so it stays as tall as the picture. */
@media (max-width: 1200px) {
  .product__info { padding: 32px; gap: 20px; }
  .product__info h1 { font-size: 40px; }
  .product__price { font-size: 24px; margin-top: 8px; }
  .credits { margin-top: 16px; gap: 10px; }
  .credits dd { font-size: 18px; }
  .product__order-label { margin-bottom: 8px; }
  .btn--social { min-height: 48px; }
  .btn--social img { width: 28px; height: 28px; }
  .product__note { margin-top: 10px; font-size: 14px; }
  .product__info .pack { margin-top: 16px; padding: 12px 14px; gap: 12px; }
  .product__info .pack__icon { width: 40px; height: 40px; }
  .product__info .pack__title { font-size: 16px; }
}
@media (max-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr); }
  .product__info { padding: var(--pad); gap: 32px; }
}
@media (max-width: 420px) {
  .product__order { grid-template-columns: minmax(0, 1fr); }
}
.details__list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); column-gap: 24px; }
.details__list div { padding: 14px 0; border-top: 2px solid var(--line); }
.details__list dt { font-size: 15px; color: var(--ink-soft); }
.details__list dd { margin: 0; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  :root { --gap: 8px; }
  body { font-size: 16px; }
  .btn { width: 100%; }
  .grid-books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .book__row { flex-direction: column; gap: 0; }
  .book__title { font-size: 16px; }
  .book__topic { font-size: 14px; }
  .book__img { margin-bottom: 10px; border-radius: 16px; }
  .hero .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ---------- How to order ---------- */
.order__title { font-size: clamp(40px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.04em; max-width: 14ch; margin-bottom: clamp(32px, 4vw, 56px); }
.order__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.step { display: flex; flex-direction: column; gap: 14px; padding: clamp(28px, 3vw, 48px); border-radius: var(--r-tile); background: var(--surface-2); }
.step__num { font-size: clamp(64px, 6vw, 88px); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; color: var(--blue); margin-bottom: clamp(20px, 2.4vw, 36px); font-variant-numeric: tabular-nums; }
.step h3 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; }
.step p { font-size: 18px; color: var(--ink-soft); max-width: 34ch; }
@media (max-width: 960px) { .order__steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Book search ---------- */
/* Same space below the bar as above it (the panel padding), so it sits centred. */
.search { position: relative; margin-bottom: var(--pad); }
.search__icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); display: flex; pointer-events: none; }
.search__input {
  width: 100%; height: 60px; padding: 0 24px 0 58px; border-radius: 999px;
  border: 2px solid transparent; background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 18px; font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s;
}
.search__input::placeholder { color: var(--ink-soft); opacity: 1; }
.search__input:hover { border-color: var(--line); }
.search__input:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.search__empty { padding: 32px 0 8px; font-size: 18px; color: var(--ink-soft); }
@media (max-width: 600px) { .search__input { height: 54px; font-size: 16px; padding-left: 52px; } .search__icon { left: 19px; } }

/* ---------- Policies page ---------- */
.policy__body { max-width: 76ch; }
.policy__body > * + * { margin-top: 14px; }
.policy__body h3 { font-size: clamp(19px, 1.6vw, 22px); letter-spacing: -0.015em; margin-top: 32px; }
.policy__body p, .policy__body li { font-size: 17px; line-height: 1.65; }
.policy__body .policy__date { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.policy__body ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.policy__body li { position: relative; padding-left: 26px; }
.policy__body li::before { content: ""; position: absolute; left: 6px; top: 0.72em; width: 8px; height: 8px; border-radius: 999px; background: var(--blue); }
.policy__body strong { font-weight: 700; }

/* ---------- Simple pages (404, any other page) ---------- */
.simple-page h1 { font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.035em; color: var(--title-blue); margin-bottom: 20px; }
.simple-page p { font-size: 18px; max-width: 62ch; }
.simple-page > * + * { margin-top: 14px; }

/* ---------- When logged in, WordPress's admin bar sits on top: keep the header below it ---------- */
.admin-bar .nav { top: calc(var(--gap) + 32px); }
@media (max-width: 782px) { .admin-bar .nav { top: calc(var(--gap) + 46px); } }
@media (max-width: 600px) { .admin-bar .nav { top: var(--gap); } } /* the admin bar scrolls away on phones */
