/* ==========================================================================
   KINBRIDGES — v12 stylesheet
   One file for every page. Sections are in page order.
   Change a token at the top and the whole site follows.
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, /fonts/) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* colour */
  --cream: #FAF7F2;
  --warm-white: #FFFEF9;
  --ink: #2C2C2C;
  --ink-soft: #6F6A64;          /* secondary text, meets WCAG AA on cream */
  --terracotta: #C67B5C;        /* rules, marks, accents */
  --terracotta-deep: #A4573A;   /* small text + buttons, meets WCAG AA */
  --line: rgba(44, 44, 44, 0.09);

  /* type */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* layout */
  --max: 1200px;
  --gutter: 2rem;
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --measure: 60ch;

  /* objects */
  --radius: 8px;
  --shadow: 0 1px 2px rgba(44,44,44,.06), 0 14px 34px -14px rgba(44,44,44,.24);
  --shadow-lift: 0 2px 4px rgba(44,44,44,.06), 0 24px 44px -16px rgba(44,44,44,.30);
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Cold-press paper grain over every background. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

.section { padding: var(--section) 0; }
.section--alt { background: var(--warm-white); }

/* Eyebrow above a heading: BOOKS, ART, WHO IT'S FOR… */
.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 46ch;
}

.note {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Centred section header */
.section-head {
  max-width: 660px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.125rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-head p { font-size: 1.0625rem; }
.section-head .lede { margin: 0 auto; }
.section-head .note { margin-top: 0.75rem; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--terracotta-deep); border-color: var(--terracotta-deep); color: #fff; }
.btn--primary:hover { background: #8E4931; border-color: #8E4931; }

.btn--secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--cream); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.875rem; }

.text-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--terracotta-deep);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.text-link:hover { color: var(--ink); }

/* ---------- 4. Header ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--ink); color: var(--cream);
  padding: 0.75rem 1.25rem; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

.wordmark img { height: 26px; width: auto; }

.site-nav { display: flex; gap: 2.25rem; }

.site-nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover { color: var(--terracotta-deep); }
.site-nav a[aria-current="page"] { color: var(--terracotta-deep); border-color: var(--terracotta); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .3s; }

/* ---------- 5. Home hero ---------- */
.hero { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  min-height: 520px;
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  text-wrap: initial;
}

.hero .lede { margin-bottom: 2.25rem; max-width: 38ch; }

.hero-art { display: flex; justify-content: center; align-items: flex-end; }
.hero-art img {
  width: min(100%, 400px);
  filter: drop-shadow(0 18px 24px rgba(44,44,44,.10));
}

/* The one entrance animation on the site. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* The headline paints immediately (it's the page's main content); the
   supporting copy and Rumi rise in behind it. */
.hero-copy > :not(h1) { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .22s; }
.hero-art { animation: rise 1.3s var(--ease) .1s both; }

/* ---------- 6. Page hero (books) ---------- */
.page-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }

.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.page-hero .lede { margin-bottom: 2rem; }

/* ---------- 7. Feature: visual beside text ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.feature--reverse .feature-visual { order: 2; }

.feature-text h2 {
  font-size: clamp(2.125rem, 4vw, 3rem);
  margin-bottom: 1.125rem;
}

.feature-text p { font-size: 1.0625rem; max-width: 44ch; }
.feature-text .note { margin-top: 0.875rem; }
.feature-text .btn { margin-top: 2rem; }

.feature-visual--framed img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 8. Book stack: covers composed as physical books ---------- */
.book-stack {
  position: relative;
  aspect-ratio: 5 / 4;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.book-stack img {
  position: absolute;
  bottom: 4%;
  width: 44%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px 6px 6px 2px;
  box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}

.book-stack img:nth-child(1) { left: 4%;  transform: rotate(-7deg); z-index: 1; }
.book-stack img:nth-child(2) { left: 28%; transform: translateY(-6%); z-index: 3; width: 46%; }
.book-stack img:nth-child(3) { left: 52%; transform: rotate(6deg); z-index: 2; }

.book-stack:hover img:nth-child(1) { transform: rotate(-9deg) translateX(-4%); }
.book-stack:hover img:nth-child(3) { transform: rotate(8deg) translateX(4%); }

/* Four-book fan on the books page (Airport, second, sits up front) */
.book-stack--fan { aspect-ratio: 4 / 3; max-width: 600px; }
.book-stack--fan img { width: 38%; }
.book-stack--fan img:nth-child(1) { left: 2%;  transform: rotate(-10deg); z-index: 1; bottom: 6%; }
.book-stack--fan img:nth-child(2) { left: 21%; transform: rotate(-3deg) translateY(-4%); z-index: 4; bottom: 11%; width: 40%; }
.book-stack--fan img:nth-child(3) { left: 41%; transform: rotate(3deg);  z-index: 3; bottom: 9%; }
.book-stack--fan img:nth-child(4) { left: 60%; transform: rotate(10deg); z-index: 2; bottom: 6%; }
.book-stack--fan:hover img:nth-child(1) { transform: rotate(-12deg) translateX(-3%); }
.book-stack--fan:hover img:nth-child(4) { transform: rotate(12deg) translateX(3%); }

/* ---------- 9. Kinbridges principles ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  max-width: 1040px;
  margin: 0 auto;
}

.principle { text-align: center; }

.principle svg {
  width: 44px; height: 44px;
  margin: 0 auto 1.125rem;
  color: var(--terracotta);
}

.principle h3 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 0.5rem;
}

.principle p {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.25;
}

/* ---------- 10. Audiences ---------- */
.audiences {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.audience {
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section--alt .audience { background: var(--cream); }
.section:not(.section--alt) .audience { background: var(--warm-white); }

.audience .eyebrow { margin-bottom: 0.875rem; }

.audience h3 {
  font-size: clamp(1.625rem, 2.6vw, 2rem);
  margin-bottom: 0.875rem;
}

.audience p { font-size: 1rem; margin-bottom: 1.75rem; }
.audience .btn { margin-top: auto; align-self: flex-start; }

/* ---------- 11. Spread: one real page in both languages ---------- */
.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1080px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.spread-text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
  font-family: var(--serif);
}

/* the fold */
.spread-text::after {
  content: "";
  position: absolute; top: 0; bottom: 0; right: 0;
  width: 20px;
  background: linear-gradient(to left, rgba(44,44,44,.08), transparent);
  pointer-events: none;
}

.spread-text p { margin-bottom: 0.85em; line-height: 1.45; }
.spread-en { font-size: 1.25rem; margin-bottom: 1.5rem; }
.spread-fr { font-size: 1.125rem; color: var(--ink-soft); }
.spread-en p:last-child, .spread-fr p:last-child { margin-bottom: 0; }

.spread-folio {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.spread-art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 12. Meet Rumi ---------- */
.meet {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
}

.meet-art { display: flex; justify-content: center; }
.meet-art img { width: min(100%, 280px); filter: drop-shadow(0 16px 22px rgba(44,44,44,.10)); }

.meet-text h2 { font-size: clamp(2.125rem, 4vw, 3rem); margin-bottom: 1.125rem; }
.meet-text p { font-size: 1.125rem; max-width: 46ch; }

/* ---------- 13. Series + book tiles ---------- */
.series + .series {
  margin-top: var(--section);
  padding-top: var(--section);
  border-top: 1px solid var(--line);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 280px));
  justify-content: center;
  gap: 2.5rem 2rem;
}

.book {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.book-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  background: #F0EBE3;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  margin-bottom: 1.375rem;
}

.book-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* spine */
.book-cover::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 10px; z-index: 3;
  background: linear-gradient(to right, rgba(44,44,44,.14), rgba(44,44,44,.04) 60%, transparent);
  pointer-events: none;
}

/* optional interior, fades in over the cover on hover */
.book-cover .interior { opacity: 0; z-index: 2; transition: opacity .45s ease; }
.book:hover .book-cover .interior,
.book:focus-within .book-cover .interior { opacity: 1; }

.book:hover .book-cover,
.book:focus-within .book-cover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.book h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.book-blurb {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.book-meta {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.book-meta .status { color: var(--terracotta-deep); }

.book .text-link { align-self: center; }

/* ---------- 14. FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }

.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;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: 0 0 12px;
  height: 12px;
  background:
    linear-gradient(var(--terracotta-deep), var(--terracotta-deep)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--terracotta-deep), var(--terracotta-deep)) center / 1.5px 12px no-repeat;
  transition: transform .3s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  padding: 0 2.5rem 1.625rem 0;
  font-size: 1rem;
  max-width: var(--measure);
}

.faq details p a { color: var(--terracotta-deep); }

/* ---------- 15. Stay in touch ---------- */
.contact { text-align: center; }
.contact .section-head { margin-bottom: 2.25rem; }
.contact .btn-row { justify-content: center; }

/* ---------- 16. Dialog forms ---------- */
dialog.kb-dialog {
  width: min(92vw, 520px);
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--warm-white);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(44,44,44,.45);
}

dialog.kb-dialog::backdrop { background: rgba(44, 44, 44, 0.42); backdrop-filter: blur(3px); }

.kb-dialog form { padding: 2.5rem; }
.kb-dialog h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.kb-dialog .note { margin-bottom: 1.75rem; }

.kb-dialog label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.kb-dialog input,
.kb-dialog textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.875rem;
  margin-bottom: 1.125rem;
  border: 1px solid rgba(44,44,44,.18);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.kb-dialog textarea { min-height: 130px; resize: vertical; }

.kb-dialog input:focus,
.kb-dialog textarea:focus { outline: 2px solid var(--terracotta-deep); outline-offset: 1px; border-color: transparent; }

.kb-dialog .btn-row { margin-top: 0.5rem; }

.kb-dialog .dialog-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border: none; background: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--ink-soft);
  border-radius: 50%;
}
.kb-dialog .dialog-close:hover { background: rgba(44,44,44,.06); color: var(--ink); }

.kb-dialog .form-done { display: none; padding: 1rem 0 0; }
.kb-dialog.is-done .form-fields { display: none; }
.kb-dialog.is-done .form-done { display: block; }

/* honeypot */
.kb-dialog .hp { position: absolute; left: -9999px; }

/* ---------- 17. Footer ---------- */
.site-footer { padding: 3rem 0; border-top: 1px solid var(--line); }

.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
}

.footer-mark img { height: 22px; width: auto; }

.footer-nav { display: flex; gap: 1.75rem; }
.footer-nav a { font-size: 0.875rem; color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--terracotta-deep); }

.footer-copy { font-size: 0.875rem; color: var(--ink-soft); }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink); margin-right: 0.75rem; }

/* ---------- 18. Art page (studios.html) ---------- */
.split-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

.split-intro.reverse .split-image { order: 2; }

.split-image { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-image img { width: 100%; height: 100%; object-fit: cover; }

.split-header h1,
.split-header h2 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); margin-bottom: 1.25rem; }
.split-header p { font-size: 1.0625rem; max-width: 48ch; }
.split-header p + p { margin-top: 1rem; }
.split-header .btn { margin-top: 2rem; }

.collection { margin-top: var(--section); padding-top: var(--section); border-top: 1px solid var(--line); }

.collection-row {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--terracotta) transparent;
}

.collection-row--center { justify-content: center; }

.mockup { flex: 0 0 300px; scroll-snap-align: start; text-align: center; }
.mockup img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.mockup h3 { font-family: var(--sans); font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); margin-top: 0.875rem; letter-spacing: 0; }

.collection-cta { text-align: center; margin-top: 2rem; }

/* ---------- 19. Book detail pages ---------- */
.crumbs { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 2rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--terracotta-deep); }
.crumbs span { margin: 0 0.5rem; }

.book-detail {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
}

.book-detail .book-cover { margin: 0; }
.book-detail h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.125rem; }
.book-detail .lede { margin-bottom: 1.5rem; }
.book-detail .book-meta { font-size: 0.8125rem; margin-bottom: 2rem; }

/* ---------- 20. 404 ---------- */
.not-found { text-align: center; padding: clamp(6rem, 14vw, 10rem) 0; min-height: 60vh; }
.not-found h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); margin-bottom: 1rem; }
.not-found p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 2.25rem; }
.not-found .btn-row { justify-content: center; }

/* ---------- 21. Accessibility & motion ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--terracotta-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- 22. Responsive ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 1.75rem; }
  .hero-inner { min-height: 0; }
  .hero-art img { width: min(100%, 320px); }
  .principles { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .spread-text { padding: 2.5rem; }
}

@media (max-width: 768px) {
  :root { --gutter: 1.5rem; }

  .site-nav {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 1.5rem;
    padding: 2rem var(--gutter);
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    opacity: 0; visibility: hidden;
    transition: transform .3s, opacity .3s, visibility .3s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { font-size: 1.125rem; }
  .nav-toggle { display: block; }
  .nav-toggle.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle.is-open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .hero-inner,
  .page-hero-inner,
  .feature,
  .meet,
  .audiences,
  .split-intro,
  .book-detail { grid-template-columns: 1fr; }

  .hero-art img { width: min(64%, 260px); }

  .feature--reverse .feature-visual,
  .split-intro.reverse .split-image { order: 0; }

  .feature-visual { order: -1; }
  .feature--reverse .feature-visual { order: -1; }

  .page-hero-inner .book-stack { margin-top: 1rem; }

  .book-stack { max-width: 400px; }

  .meet-art img { width: min(56%, 220px); }
  .meet-text { text-align: center; }
  .meet-text p { margin: 0 auto; }

  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 1.25rem; }
  .book h3 { font-size: 1.25rem; }

  .spread { grid-template-columns: 1fr; }
  .spread-art { order: -1; aspect-ratio: 4 / 5; }
  .spread-text { padding: 2rem 1.5rem; }
  .spread-text::after { display: none; }
  .spread-en { font-size: 1.125rem; }
  .spread-fr { font-size: 1.0625rem; }

  .split-image { max-width: 420px; }

  .mockup { flex-basis: 260px; }
  .collection-row { margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }
  .collection-row--center { justify-content: flex-start; }

  .faq summary { font-size: 1.1875rem; }
  .faq details p { padding-right: 0; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-tagline { display: block; margin: 0 0 0.375rem; }

  .kb-dialog form { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
  .book-grid { grid-template-columns: minmax(0, 300px); }
  .principles { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .principle p { font-size: 1.1875rem; }
}

/* two-title rows (Curious Minds) */
.book-grid--2 { grid-template-columns: repeat(2, minmax(0, 280px)); }
@media (max-width: 1024px) { .book-grid--2 { grid-template-columns: repeat(2, minmax(0, 280px)); } }
@media (max-width: 480px) { .book-grid--2 { grid-template-columns: minmax(0, 300px); } }

/* An h2 that is visually an eyebrow (WHO IT'S FOR, COMMON QUESTIONS) */
.section-head h2.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.5;
  margin-bottom: 0;
}
.section-head:has(> h2.eyebrow:only-child) { margin-bottom: 2rem; }

/* Book page: left-aligned text beside the cover (the .book class centres tiles) */
.book-detail.book { text-align: left; display: grid; }
.book-detail .lede { max-width: 40ch; }
@media (max-width: 768px) {
  .book-detail.book { text-align: center; }
  .book-detail .book-cover { max-width: 320px; width: 100%; margin: 0 auto; }
  .book-detail .lede { margin-left: auto; margin-right: auto; }
  .book-detail .btn-row { justify-content: center; }
}

/* ==========================================================================
   23. /rumi — sign-up landing page
   One centred column. Logo-only header, no nav.
   ========================================================================== */

.site-header--minimal .header-inner { justify-content: center; }

.rumi-page { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 6rem); }

.rumi-col { max-width: 560px; margin: 0 auto; text-align: center; }

.rumi-hero h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 1.125rem;
}

.rumi-hero .lede { margin: 0 auto; max-width: 34ch; text-wrap: balance; }

/* Inline sign-up card */
.kb-inline {
  margin: clamp(2.5rem, 6vw, 3.5rem) auto 0;
  padding: clamp(2rem, 5vw, 2.75rem);
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: left;
}

.kb-inline h2 { font-size: 1.875rem; margin-bottom: 0.375rem; }
.kb-inline > form > .form-fields > .note { margin-bottom: 1.75rem; }

.kb-inline label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.kb-inline .optional { font-weight: 400; color: var(--ink-soft); }

.kb-inline input[type="text"],
.kb-inline input[type="email"],
.kb-inline textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.875rem;
  margin-bottom: 1.125rem;
  border: 1px solid rgba(44,44,44,.18);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.kb-inline textarea:focus,
.kb-inline input:focus { outline: 2px solid var(--terracotta-deep); outline-offset: 1px; border-color: transparent; }

/* language choice as pills */
.kb-inline fieldset { border: none; margin: 0.25rem 0 1.5rem; }
.kb-inline legend { font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.625rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid rgba(44,44,44,.18);
  border-radius: 999px;
  background: #fff;
  transition: background-color .2s, border-color .2s, color .2s;
  user-select: none;
}
.pill input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pill input:focus-visible + span { outline: 2px solid var(--terracotta-deep); outline-offset: 2px; }

.kb-inline .btn { width: 100%; }
.kb-inline .fine {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-align: center;
}

.kb-inline .hp { position: absolute; left: -9999px; }
.kb-inline .form-done { display: none; text-align: center; padding: 1rem 0; }
.kb-inline.is-done .form-fields { display: none; }
.kb-inline.is-done .form-done { display: block; }

/* the books strip beneath the form */
.rumi-shelf {
  margin-top: clamp(4rem, 9vw, 5.5rem);
  padding-top: clamp(3rem, 7vw, 4rem);
  border-top: 1px solid var(--line);
}

.shelf {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 1.75rem;
}

.shelf a { flex: 0 1 92px; min-width: 0; text-decoration: none; }

.shelf img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px 5px 5px 2px;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease);
}

.shelf a:hover img { transform: translateY(-3px); }

.rumi-hello { margin-top: 2.5rem; font-size: 0.9375rem; color: var(--ink-soft); }
.rumi-hello a { color: var(--terracotta-deep); }

@media (max-width: 480px) {
  .shelf { gap: 0.5rem; }
}


/* ==========================================================================
   24. v13 refinements
   ========================================================================== */

/* Text for screen readers only */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Comfortable tap targets for small links (WCAG 2.2, 24px minimum) */
.footer-nav a,
.crumbs a { display: inline-block; padding: 0.375rem 0; }
.text-link { display: inline-block; padding-top: 0.25rem; }

/* Keyboard focus on scrollable art rows */
.collection-row:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 6px; border-radius: 6px; }

/* Forced-colours / high-contrast modes keep buttons and pills visible */
@media (forced-colors: active) {
  .btn, .pill span { border: 1px solid ButtonText; }
  .pill input:checked + span { background: Highlight; color: HighlightText; }
}

/* Print: clean, ink-friendly */
@media print {
  body::before, .site-header, .site-footer, .btn-row, .kb-dialog, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .section, .page-hero, .hero { padding: 1.5rem 0; }
}


/* ==========================================================================
   25. v15 refinements
   ========================================================================== */

/* Wide World: four titles across, 2 × 2 on tablets, one column on phones */
.book-grid--4 { grid-template-columns: repeat(4, minmax(0, 250px)); gap: 2.5rem 1.75rem; }
@media (max-width: 1024px) { .book-grid--4 { grid-template-columns: repeat(2, minmax(0, 280px)); } }
@media (max-width: 480px)  { .book-grid--4 { grid-template-columns: minmax(0, 300px); } }

/* "Coming soon" bar, added automatically wherever a cover file is missing
   and the fallback cover shows instead. Drop the real cover in and it goes. */
.no-cover { position: relative; container-type: inline-size; }
.no-cover::before {
  content: "Coming\A soon";
  white-space: pre;
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  padding: 0.75em 0.5em;
  background: rgba(44, 44, 44, 0.78);
  color: #FAF7F2;
  font-family: var(--sans);
  font-size: clamp(9px, 8cqi, 15px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
  transition: transform .3s var(--ease);
}
.shelf a.no-cover:hover::before { transform: translateY(calc(-50% - 3px)); }

/* /rumi strip: six covers wrap to two rows of three on phones */
@media (max-width: 480px) {
  .shelf { flex-wrap: wrap; gap: 1rem 0.75rem; }
  .shelf a { flex: 0 0 calc((100% - 1.5rem) / 3); max-width: 96px; }
}

/* Covers keep the real book shape (6 × 8.9 in), so titles are never cropped */
.book-cover, .shelf img { aspect-ratio: 1000 / 1485; }
.book-stack img { aspect-ratio: 1000 / 1485; }

/* Spread art: show the whole painted page, deckle edges included,
   on a ground that matches the paper of the scan */
.spread-art { background: #FDFCFA; }
.spread-art img { object-fit: contain; }

/* Rumi cut-outs are trimmed tight to the figure; size them by height */
.hero-art img { width: min(100%, 340px); }
.meet-art img { width: min(100%, 210px); }
@media (max-width: 1024px) { .hero-art img { width: min(100%, 280px); } }
@media (max-width: 480px) { .hero-art img { width: min(100%, 220px); } }

/* ==========================================================================
   26. v15: zoom, page turner, buy buttons, landing pages
   ========================================================================== */

/* Look-closer zoom (home art photo) */
.zoom {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: none; overflow: hidden; cursor: zoom-in; border-radius: inherit;
  -webkit-tap-highlight-color: transparent;
}
.zoom img { display: block; width: 100%; height: auto; transform-origin: var(--zx, 50%) var(--zy, 42%); transition: transform .45s var(--ease); }
.zoom.is-zoomed { cursor: zoom-out; }
.zoom.is-zoomed img { transform: scale(2.4); }
.zoom-hint {
  position: absolute; right: .75rem; bottom: .75rem; display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .65rem; border-radius: 999px; background: rgba(250, 247, 242, .92); color: var(--ink);
  font: 500 .75rem/1 var(--sans); letter-spacing: .02em; pointer-events: none; transition: opacity .3s;
}
.zoom-hint svg { width: 14px; height: 14px; }
.zoom-wrap { position: relative; border-radius: var(--radius); }
.zoom.is-zoomed + .zoom-hint { opacity: 0; }
.zoom-hint .on-touch { display: none; }
@media (hover: none) { .zoom-hint .on-mouse { display: none; } .zoom-hint .on-touch { display: inline; } }
.zoom:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .zoom img { transition: none; } }

/* Covers that carry a status bar over a real cover */
.is-soon { position: relative; container-type: inline-size; }
.is-soon::before { content: "Coming\A soon"; }
.no-cover::before, .is-soon::before {
  white-space: pre; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 4;
  padding: .75em .5em; background: rgba(44, 44, 44, .78); color: #FAF7F2;
  font-family: var(--sans); font-size: clamp(9px, 8cqi, 15px); font-weight: 500; line-height: 1.35;
  letter-spacing: .14em; text-transform: uppercase; text-align: center; pointer-events: none;
}
.shelf a.is-soon:hover::before { transform: translateY(calc(-50% - 3px)); }

/* Book tiles: one clear buy button, a quiet "Read more" */
.btn--small { padding: .6rem 1.15rem; font-size: .875rem; }
.book .btn { align-self: center; }
.read-more { white-space: nowrap; color: var(--terracotta-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.read-more:hover { text-decoration-thickness: 2px; }

/* Look inside: a short page turner */
.look-inside .section-head { margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.pager { max-width: 880px; margin: 0 auto; }
.pager-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--warm-white);
}
.pager-track::-webkit-scrollbar { display: none; }
.pager-track { position: relative; }
.pager-slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; position: relative; }
.pager .spread { box-shadow: none; border-radius: 0; margin: 0; max-width: none; }
.pager .spread-en { font-size: 1.0625rem; }
.pager .spread-fr { font-size: .9375rem; }
.pager-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }
.pager-btn {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, opacity .2s;
}
.pager-btn:hover:not(:disabled) { background: var(--ink); color: var(--cream); }
.pager-btn:disabled { opacity: .3; cursor: default; }
.pager-btn svg { width: 18px; height: 18px; }
.pager-dots { display: flex; gap: .5rem; }
.pager-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.pager-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(44,44,44,.22); transition: background .2s; }
.pager-dot[aria-current="true"]::before { background: var(--terracotta-deep); }
.pager-dot:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 0; border-radius: 50%; }
.pager-dots { gap: .125rem; }
.pager-label { min-width: 6.5em; text-align: center; font-size: .8125rem; color: var(--ink-soft); }
.pager-end {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center; padding: clamp(2rem, 5vw, 3.5rem); min-height: 100%;
}
.pager-end img { width: 100%; height: auto; border-radius: 2px 6px 6px 2px; box-shadow: var(--shadow); }
.pager-end h3 { font-size: clamp(1.625rem, 3vw, 2.125rem); margin: .5rem 0 .75rem; }
.pager-end p { margin-bottom: 1.5rem; max-width: 38ch; }
.pager-end .btn-row { align-items: center; }
@media (max-width: 640px) {
  .pager-end { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .pager-end img { max-width: 170px; }
  .pager-end .btn-row { justify-content: center; }
}

/* Parents and educators landing pages */
.landing-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.landing-hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.landing-hero h1 { font-size: clamp(2.5rem, 5.2vw, 3.75rem); line-height: 1.08; margin: .75rem 0 1.25rem; }
.landing-hero .lede { max-width: 44ch; margin-bottom: 2rem; }
.landing-art img { width: 100%; height: auto; display: block; }
.landing-art--framed img { border-radius: var(--radius); box-shadow: var(--shadow); }
.landing-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.landing-note h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.landing-note p { color: var(--ink-soft); }
.landing-note .num { display: block; font: 500 .75rem/1 var(--sans); letter-spacing: .14em; color: var(--terracotta-deep); margin-bottom: .875rem; }
.landing-talk .kb-inline { max-width: 560px; }
.landing-talk textarea { min-height: 9rem; resize: vertical; display: block; font: inherit; line-height: 1.5; }
.landing-talk textarea::placeholder { color: #9A948C; }
.landing-talk button[type="submit"] { margin-top: .5rem; }
@media (max-width: 860px) {
  .landing-hero-inner { grid-template-columns: 1fr; }
  .landing-art { max-width: 420px; }
  .landing-notes { grid-template-columns: 1fr; }
}
.feature-visual--framed .zoom-wrap .zoom { border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-visual--framed .zoom img { border-radius: 0; box-shadow: none; }

.footer-nav { flex-wrap: wrap; row-gap: .5rem; }
@media (max-width: 640px) { .footer-nav { justify-content: center; column-gap: 1.25rem; } }
.landing-art--framed .zoom { border-radius: var(--radius); box-shadow: var(--shadow); }
.landing-art--framed .zoom img { border-radius: 0; box-shadow: none; }
/* Every page in the page turner fills the same height, so no blank band */
.pager-slide { display: flex; }
.pager-slide > .spread, .pager-slide > .pager-end { flex: 1 1 auto; width: 100%; }

/* Art tiles: close-up, then the wall view on hover (tap on phones) */
.swap {
  position: relative; display: block; width: 100%; aspect-ratio: 5 / 4; padding: 0; border: 0;
  background: #F0EBE3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mockup .swap img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; box-shadow: none; transition: opacity .45s var(--ease); }
.swap .swap-b { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .mockup:hover .swap-b { opacity: 1; } }
.swap.is-flipped .swap-b { opacity: 1; }
.swap:focus-visible { outline: 2px solid var(--terracotta-deep); outline-offset: 3px; }
.swap-hint {
  display: none; position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); white-space: nowrap;
  padding: .3rem .6rem; border-radius: 999px; background: rgba(250, 247, 242, .92); color: var(--ink);
  font: 500 .6875rem/1 var(--sans); letter-spacing: .02em; pointer-events: none; transition: opacity .3s;
}
@media (hover: none) { .swap-hint { display: block; } }
.swap-wrap { position: relative; }
.swap.is-flipped + .swap-hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .mockup .swap img { transition: none; } }

/* Home hero lede: "everyday family life." and "Story first, always."
   each stay whole. On wide screens that gives two even lines starting
   "everyday family life."; when space runs short, "Story first, always."
   drops to its own line as a unit. */
.hero .hero-lede { max-width: 46ch; }
.hero-lede .l2, .hero-lede .l3 { display: inline-block; }
@media (min-width: 380px) { .hero-lede .l1 { display: block; } }
