/* Zayd & Razan — vivid travel-journal refresh */
:root {
  --ink: #153653;
  --muted: #536b7d;
  --paper: #fffaf1;
  --white: #ffffff;
  --coral: #ed674f;
  --coral-soft: #fff1ea;
  --blue: #2878b9;
  --blue-soft: #e8f4fb;
  --yellow: #ffc84a;
  --green: #368866;
  --line: #dce6e9;
  --shadow: 0 20px 55px rgba(21, 54, 83, .12);
}

html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 88% 8%, rgba(213, 239, 249, .78), transparent 27rem),
    radial-gradient(ellipse at 7% 33%, rgba(255, 236, 205, .55), transparent 30rem),
    linear-gradient(180deg, #fffaf1 0%, #f4f9fa 55%, #fffaf1 100%);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #2878b9; outline-offset: 3px; }

.site-header {
  height: 76px;
  padding-inline: max(5vw, 22px);
  background: rgba(255, 253, 248, .94);
  border-bottom-color: rgba(21, 54, 83, .09);
  box-shadow: 0 5px 22px rgba(21, 54, 83, .045);
}
.brand-mark b { border-color: #fffaf1; box-shadow: 0 3px 8px rgba(21,54,83,.12); }
nav button { transition: color .18s ease, background .18s ease, transform .18s ease; }
nav button:hover { transform: translateY(-1px); }
nav button.active { background: #153653; color: #fff; box-shadow: 0 5px 14px rgba(21,54,83,.18); }

.book-hero.book-hero-v2 {
  max-width: 1280px;
  min-height: 0;
  padding: clamp(42px, 6vw, 82px) clamp(22px, 5vw, 64px) 44px;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
}
.book-hero-copy { max-width: 580px; }
.book-hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(237,103,79,.22);
  border-radius: 999px;
  background: #fff;
  color: #c64f3b;
  font-size: 12px;
  letter-spacing: .13em;
}
.book-hero-copy .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.book-hero-copy h1 {
  max-width: 650px;
  margin: 23px 0 20px;
  color: var(--ink);
  font: 850 clamp(42px, 5.2vw, 70px)/.99 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.book-hero-copy h1 em { color: var(--blue); font-style: italic; }
.book-lead { max-width: 510px; color: #536b7d; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.65; }
.book-actions { margin-top: 27px; }
.child-primary {
  min-height: 56px;
  padding: 15px 24px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #153653, #2878b9);
  box-shadow: 0 11px 24px rgba(21,54,83,.2);
  font-size: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.child-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 28px rgba(21,54,83,.24); }
.child-primary span { margin-left: 10px; }
.home-progress-card {
  max-width: 460px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid rgba(21,54,83,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 26px rgba(21,54,83,.06);
}

.hero-illustration-card.hero-book-collage {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1.18 / 1;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 30px;
  background: linear-gradient(145deg, #ccecf6 0%, #f8e8c8 100%);
  box-shadow: 0 25px 55px rgba(21,54,83,.16);
  isolation: isolate;
}
.hero-illustration-card.hero-book-collage::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 21px;
}
.hero-book-main {
  position: absolute !important;
  inset: 16px !important;
  z-index: 1;
  display: block;
  width: calc(100% - 32px) !important;
  height: calc(100% - 32px) !important;
  border: 0 !important;
  border-radius: 21px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 12px 28px rgba(21,54,83,.14);
}
.hero-book-page, .paper-tape { display: none !important; }
.hero-stamp {
  right: 26px !important;
  bottom: 25px !important;
  z-index: 3;
  display: grid;
  place-content: center;
  width: 104px;
  height: 104px;
  border: 3px dashed var(--coral) !important;
  border-radius: 50%;
  background: #fffdf8 !important;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(21,54,83,.18);
  transform: rotate(7deg);
}
.hero-stamp small { font-size: 9px; letter-spacing: .12em; }
.hero-stamp strong { color: var(--coral); font-size: 17px; letter-spacing: .08em; }

.home-steps {
  position: relative;
  z-index: 2;
  max-width: 1130px;
  margin: 4px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.home-steps article {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(21,54,83,.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(21,54,83,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-steps article:hover { transform: translateY(-3px); box-shadow: 0 15px 32px rgba(21,54,83,.11); }
.home-steps article > span {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #e8f4fb;
  font-size: 23px;
}
.home-steps article:nth-child(2) > span { background: #fff1ea; }
.home-steps article:nth-child(3) > span { background: #fff5d8; }
.home-steps article strong { display: block; font-size: 16px; }
.home-steps article small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

.chapter-preview {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 100px) clamp(22px, 5vw, 64px) 110px;
}
.child-section-heading { margin-bottom: 27px; align-items: end; }
.child-section-heading .section-kicker { color: #c64f3b; font-size: 12px; }
.child-section-heading h2 { color: var(--ink); font: 850 clamp(34px, 4.5vw, 48px)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.child-section-heading > p { max-width: 390px; margin-bottom: 4px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.chapter-preview-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.preview-card {
  position: relative;
  min-width: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 18px 19px;
  overflow: hidden;
  border: 1px solid rgba(21,54,83,.09);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 28px rgba(21,54,83,.065);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.preview-card:not(:disabled):hover { transform: translateY(-4px); border-color: rgba(40,120,185,.3); box-shadow: 0 17px 36px rgba(21,54,83,.13); }
.preview-card.current { border: 2px solid var(--coral); box-shadow: 0 12px 30px rgba(237,103,79,.12); }
.preview-card:disabled { cursor: not-allowed; opacity: .63; }
.preview-thumb {
  width: calc(100% + 36px);
  height: 142px;
  flex: 0 0 142px;
  margin: 0 -18px 14px;
  display: block;
  object-fit: cover;
  object-position: center;
}
.preview-number {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  min-width: 35px;
  padding: 6px 8px;
  border: 1px solid rgba(21,54,83,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.preview-icon {
  position: absolute;
  top: 116px;
  right: 13px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 14px;
  background: #fff5d8;
  box-shadow: 0 5px 12px rgba(21,54,83,.12);
  font-size: 18px;
}
.preview-phase { margin-bottom: 5px; color: #c64f3b; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.preview-card strong { margin-bottom: 7px; font-size: 17px; line-height: 1.3; }
.preview-card > small:last-child { color: var(--muted); font-size: 13px; }

.reader-shell.child-reader-shell { max-width: 1280px; margin: 0 auto; padding: 28px 20px 70px; background: transparent; }
.reader-page.child-reader-page {
  overflow: hidden;
  border: 1px solid rgba(21,54,83,.08);
  border-radius: 26px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}
.child-story-header { padding: 25px clamp(18px,3vw,36px); gap: 20px; }
.child-story-header h1 { color: #fff; font: 800 clamp(25px,3vw,38px)/1.15 Georgia, "Times New Roman", serif; }
.child-story-header > div > span { color: rgba(255,255,255,.76); }
.back-to-route { border-radius: 12px; background: #e8f4fb; color: var(--ink); }
.chapter-stage-nav { margin: 0 clamp(18px,3vw,36px) 25px; gap: 10px; }
.chapter-stage-nav button {
  min-height: 62px;
  border: 1px solid rgba(21,54,83,.1);
  border-radius: 15px;
  background: #f5f9fa;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.chapter-stage-nav button:hover { transform: translateY(-2px); }
.chapter-stage-nav button.active { border-color: transparent; background: var(--ink); color: #fff; box-shadow: 0 7px 18px rgba(21,54,83,.17); }
.book-image-stage { padding: 0 clamp(18px,3vw,36px) 28px; gap: 22px; }
.book-page-frame { overflow: hidden; border: 7px solid #fff; border-radius: 22px; background: #e8f4fb; box-shadow: 0 12px 30px rgba(21,54,83,.14); }
.book-page-frame > img { display: block; width: 100%; height: auto; max-height: 600px; object-fit: contain; }
.book-image-guide { padding: 23px; border: 1px solid rgba(21,54,83,.08); border-radius: 22px; background: linear-gradient(150deg,#f2f9fb,#fff7e8); }
.book-image-guide h2 { color: var(--ink); font: 800 28px/1.1 Georgia, "Times New Roman", serif; }
.image-word-card { border-radius: 17px; background: #fff; box-shadow: 0 8px 22px rgba(21,54,83,.08); }
.stage-next { margin: 0 clamp(18px,3vw,36px) 28px; padding: 18px 20px; border-radius: 18px; background: #eaf5fa; }
.stage-next button { min-height: 48px; border-radius: 13px; background: var(--ink); color: #fff; }

.child-story-copy, .full-book-reader, .play-stage { margin-inline: clamp(18px,3vw,36px); }
.child-story-copy { padding: clamp(22px,4vw,42px); border-radius: 22px; background: linear-gradient(140deg,#fffaf1,#eff8fb); }
.kid-book-reader { border: 1px solid rgba(21,54,83,.1); border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(21,54,83,.07); }
.digital-book-page { border-radius: 18px; background: #fffdf8; }
.book-page-controls button { min-height: 46px; border-radius: 12px; }
.play-stage { padding-bottom: 28px; }
.matching-page-activity { border: 1px solid rgba(21,54,83,.09); border-radius: 22px; box-shadow: 0 12px 32px rgba(21,54,83,.07); }
.match-column > button { border-radius: 15px; transition: transform .18s ease, box-shadow .18s ease; }
.match-column > button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 9px 18px rgba(21,54,83,.1); }

footer { color: var(--muted); }
footer a { color: var(--blue); font-weight: 700; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .book-hero.book-hero-v2 { grid-template-columns: 1fr; padding-top: 42px; }
  .book-hero-copy { max-width: 720px; }
  .hero-illustration-card.hero-book-collage { max-width: 700px; aspect-ratio: 1.35 / 1; }
  .home-steps { margin-top: 14px; }
  .chapter-preview-grid-v2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .book-image-stage { grid-template-columns: 1fr; }
  .book-image-guide { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px 16px; }
  .book-image-guide .eyebrow, .book-image-guide h2, .book-image-guide > p { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-header { height: auto; min-height: 70px; padding: 11px 15px; gap: 8px; }
  .brand-mark { transform: scale(.9); transform-origin: left center; }
  .brand em { font-size: 15px; }
  .site-header nav { gap: 0; }
  nav button { padding: 9px 8px; font-size: 12px; }
  .book-hero.book-hero-v2 { padding: 35px 18px 28px; gap: 24px; }
  .book-hero-copy h1 { margin: 18px 0 14px; font-size: clamp(40px, 12vw, 55px); }
  .book-lead { font-size: 16px; }
  .hero-illustration-card.hero-book-collage { aspect-ratio: 1.05 / 1; border-width: 6px; border-radius: 23px; }
  .hero-book-main { inset: 11px !important; width: calc(100% - 22px) !important; height: calc(100% - 22px) !important; border-radius: 16px; }
  .hero-stamp { right: 17px !important; bottom: 17px !important; width: 82px; height: 82px; }
  .hero-stamp small { font-size: 8px; }
  .hero-stamp strong { font-size: 14px; }
  .home-progress-card { margin-top: 20px; }
  .home-steps { grid-template-columns: 1fr; padding-inline: 18px; gap: 10px; }
  .home-steps article { min-height: 75px; padding: 13px 15px; }
  .chapter-preview { padding: 58px 18px 76px; }
  .child-section-heading { display: block; }
  .child-section-heading > p { margin-top: 10px; }
  .chapter-preview-grid-v2 { grid-template-columns: 1fr; gap: 13px; }
  .preview-card { min-height: 224px; }
  .preview-thumb { height: 132px; flex-basis: 132px; }
  .reader-shell.child-reader-shell { padding: 12px 10px 45px; }
  .reader-page.child-reader-page { border-radius: 18px; }
  .child-story-header { grid-template-columns: 1fr auto; }
  .child-story-header > div { grid-column: 1 / -1; grid-row: 2; }
  .chapter-stage-nav { margin-inline: 12px; gap: 6px; }
  .chapter-stage-nav button { min-height: 54px; padding-inline: 6px; font-size: 12px; }
  .book-image-stage { padding-inline: 12px; }
  .book-image-guide { display: block; padding: 17px; }
  .child-story-copy, .full-book-reader, .play-stage { margin-inline: 12px; }
  .stage-next { margin-inline: 12px; flex-wrap: wrap; }
  .stage-next button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* October 2026: a distinct adventure homepage */
body { background: #f5f8fc; }
#app:has(.book-hero-v2) { padding-top: 24px; }
.book-hero.book-hero-v2 {
  width: calc(100% - 48px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px;
  border-radius: 32px;
  background: linear-gradient(125deg, #102d4b, #175587);
  color: #fff;
  box-shadow: 0 18px 40px rgba(16,45,75,.16);
  overflow: hidden;
  align-items: center;
}
.book-hero-copy .eyebrow { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #ffe0a1; }
.book-hero-copy .eyebrow::before { background: #ffc84a; }
.book-hero-copy h1 { color: #fff; font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-size: clamp(40px,4.5vw,64px); line-height: 1.05; letter-spacing: -.04em; font-weight: 850; }
.book-hero-copy h1 em { color: #ffc84a; font-style: normal; }
.book-hero-copy h1 em::after { display: none; }
.book-lead { color: #dceafb; font-size: 18px; }
.adventure-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.adventure-tags span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; color: #e9f5ff; font-size: 12px; font-weight: 700; }
.book-actions .child-primary { background: #ffc84a; color: #102d4b; border-radius: 14px; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.home-progress-card { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.17); box-shadow: none; color: #fff; }
.home-progress-card strong, .home-progress-card small { color: #fff; }
.home-progress-card .book-progress-line { background: rgba(255,255,255,.2); }
.hero-illustration-card.hero-book-collage { aspect-ratio: 1.35 / 1; background: #eaf5fc; border-radius: 24px; border-width: 5px; }
.hero-book-main { inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: contain; border-radius: 18px; box-shadow: none; }
.hero-stamp { width: 86px; height: 86px; right: 12px !important; bottom: 12px !important; }
.home-steps { max-width: 1190px; margin: 24px auto 0; }
.home-steps article { border-radius: 18px; box-shadow: 0 5px 15px rgba(21,54,83,.05); }
.chapter-preview { padding-top: 60px; }
.child-section-heading h2 { font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-weight: 800; font-size: clamp(30px,4vw,42px); }
.preview-card.current { border-color: #2878b9; }
.child-story-header h1 { color: #fff !important; }
@media (max-width: 860px) {
  .book-hero.book-hero-v2 { padding: 36px; gap: 28px; }
  .hero-illustration-card.hero-book-collage { max-width: 100%; aspect-ratio: 1.5 / 1; }
}
@media (max-width: 560px) {
  #app:has(.book-hero-v2) { padding-top: 12px; }
  .book-hero.book-hero-v2 { width: calc(100% - 24px); padding: 26px 20px; border-radius: 22px; gap: 22px; }
  .book-hero-copy h1 { font-size: clamp(36px,10vw,46px); }
  .book-lead { font-size: 16px; }
  .book-actions .child-primary { width: 100%; }
  .home-progress-card { padding: 13px; }
  .hero-illustration-card.hero-book-collage { aspect-ratio: 1.5 / 1; }
  .hero-stamp { width: 68px; height: 68px; }
  .hero-stamp strong { font-size: 12px; }
  .hero-stamp small { font-size: 7px; }
  .home-steps { margin-top: 16px; padding: 0 12px; }
}

/* Override the legacy homepage selectors with matching specificity. */
.book-hero-v2 .book-hero-copy h1 { color: #fff; font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-size: clamp(40px,4.5vw,64px); font-weight: 850; line-height: 1.05; }
.book-hero-v2 .book-hero-copy h1 em { color: #ffc84a; font-style: normal; }
.book-hero-v2 .book-hero-copy h1 em::after { display: none; }
.book-hero-v2 .book-lead { color: #dceafb; }
.hero-book-collage .hero-book-main { transform: none; object-fit: contain; }
@media (max-width: 560px) { .book-hero-v2 .book-hero-copy h1 { font-size: clamp(36px,10vw,46px); } }
