@font-face {
  font-family: "Baloo 2";
  src: url("assets/baloo-2-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("assets/nunito-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #fafbf8;
  --surface-soft: #eff4ee;
  --hero-surface: #fff1bd;
  --text: #25334c;
  --text-secondary: #4e5968;
  --accent: #ad1b67;
  --accent-hover: #8f1554;
  --on-accent: #fff9fc;
  --line: #d6ddd4;
  --focus: #ad1b67;
  --radius: 16px;
  --control-radius: 999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --space-section: clamp(64px, 8vw, 104px);
  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
  /* Layers: content 0, sticky header 10, keyboard skip link 20. */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #17202d;
    --surface-soft: #202c36;
    --hero-surface: #342d21;
    --text: #f7f1de;
    --text-secondary: #c2c8ca;
    --accent: #ef93bf;
    --accent-hover: #f7afcf;
    --on-accent: #32122a;
    --line: #42505a;
    --focus: #ef93bf;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #17202d;
  --surface-soft: #202c36;
  --hero-surface: #342d21;
  --text: #f7f1de;
  --text-secondary: #c2c8ca;
  --accent: #ef93bf;
  --accent-hover: #f7afcf;
  --on-accent: #32122a;
  --line: #42505a;
  --focus: #ef93bf;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; scrollbar-color: var(--accent) var(--surface); }
body { margin: 0; background: var(--surface); color: var(--text); font: 400 17px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 5px; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(40px, 4.35vw, 64px); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(32px, 3.2vw, 46px); line-height: 1.16; letter-spacing: -0.025em; }
h3 { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.container { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.section-space { padding-block: var(--space-section); }
.icon { width: 21px; height: 21px; flex-shrink: 0; fill: currentColor; }
.accent-text { color: var(--accent); }
.skip-link { position: fixed; z-index: 20; left: 16px; top: 12px; padding: 10px 16px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 10; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; height: 79px; }
.brand { display: flex; position: relative; align-items: center; justify-content: center; flex-shrink: 0; width: 166px; height: 58px; overflow: hidden; background: #050505; border-radius: 12px; }
.brand img { width: 158px; height: 158px; max-width: none; object-fit: contain; flex-shrink: 0; }
.desktop-nav { display: flex; gap: 32px; white-space: nowrap; font-size: 15px; font-weight: 700; }
.desktop-nav a { text-decoration: none; padding-block: 12px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 14px 25px; border: none; border-radius: var(--control-radius); background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 800; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color 180ms ease, transform 140ms var(--ease-out); }
.button-small { min-height: 46px; padding: 12px 20px; font-size: 14px; }
.button:active, .icon-button:active { transform: scale(0.97); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; background: transparent; border: 1px solid var(--line); border-radius: var(--control-radius); transition: transform 140ms var(--ease-out), background-color 180ms ease; }
.theme-sun { display: none; }
[data-resolved-theme="dark"] .theme-sun { display: block; }
[data-resolved-theme="dark"] .theme-moon { display: none; }
.menu-toggle { display: none; }
.menu-close-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-close-icon { display: block; }
.mobile-nav { display: none; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; color: var(--accent); font-size: 15px; font-weight: 800; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; }

.hero { background: var(--hero-surface); overflow: clip; }
.hero-inner { display: grid; grid-template-columns: 1.04fr 1fr; align-items: center; gap: 12px; padding-block: 46px 42px; min-height: 570px; }
.hero-copy { position: relative; }
.hero-copy h1 span { display: block; white-space: nowrap; }
.hero-copy p { max-width: 430px; margin-top: 24px; font-size: 18px; color: var(--text-secondary); }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; }
.hero-art { position: relative; width: calc(100% + 40px); margin-left: -12px; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.brand-promise { display: flex; align-items: center; justify-content: center; gap: 18px; padding-block: 25px; border-bottom: 1px solid var(--line); }
.brand-promise p { font-size: 17px; font-weight: 700; }
.promise-icon { width: 32px; height: 32px; fill: var(--accent); flex-shrink: 0; }

.section-heading { max-width: 650px; margin-bottom: 40px; }
.section-heading p { max-width: 600px; margin-top: 14px; color: var(--text-secondary); }
.books-grid { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 30px; align-items: start; }
.book:nth-child(2) { padding-top: 34px; }
.book:nth-child(3) { padding-top: 68px; }
.media-frame { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-soft); }
.book-image { aspect-ratio: 3 / 4; }
.content-image { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms var(--ease-out); }
.book-description { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 20px; }
.book-description p { font-size: 14px; line-height: 1.5; color: var(--text-secondary); margin-top: 4px; }
.book-price { flex-shrink: 0; color: var(--accent); font-size: 22px; line-height: 1.4; font-weight: 800; font-variant-numeric: tabular-nums; }
.book-price > span { font-size: 15px; }
.book-price sup { position: relative; top: -2px; font-size: 13px; }
.book-price sup a { text-decoration: none; }
.publication-link { margin-top: 8px; }
.price-note { margin-top: 36px; font-size: 14px; color: var(--text-secondary); scroll-margin-top: 100px; }
.image-error { padding: 24px; font-size: 15px; color: var(--text); text-align: center; }
.media-frame.has-error { display: flex; align-items: center; justify-content: center; }

.schools-section { background: var(--surface-soft); }
.schools-inner { display: grid; grid-template-columns: 0.8fr 1.4fr; align-items: center; gap: 64px; }
.schools-copy p { max-width: 350px; margin-top: 20px; color: var(--text-secondary); }
.schools-copy > a { margin-top: 20px; }
.school-photos { display: grid; grid-template-columns: 2.25fr 1fr; align-items: start; gap: 20px; }
.school-photo-main .media-frame { aspect-ratio: 4 / 3; }
.school-photo-reel { padding-top: 64px; }
.school-photo-reel .media-frame { aspect-ratio: 9 / 16; }
figcaption { margin-top: 12px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.school-photo-reel figcaption .text-link { font-size: 13px; gap: 5px; }
.school-photo-reel .icon { width: 17px; height: 17px; }

.faq-section { display: grid; grid-template-columns: 0.9fr 1.35fr; gap: 80px; align-items: start; }
.faq-intro { max-width: 340px; }
.faq-intro p { margin-top: 16px; color: var(--text-secondary); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px; font-weight: 800; font-size: 17px; line-height: 1.45; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { width: 20px; height: 20px; fill: var(--accent); }
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.faq-list details p { max-width: 65ch; padding-bottom: 24px; font-size: 16px; color: var(--text-secondary); }
.faq-list details p a { color: var(--accent); font-weight: 700; }

.contact-panel { display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: var(--radius); background: var(--hero-surface); padding: 54px 24px 58px; }
.contact-book { width: 44px; height: 44px; fill: var(--accent); margin-bottom: 16px; }
.contact-panel p { margin-top: 14px; color: var(--text-secondary); }
.contact-panel .button { margin-top: 28px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 40px; }
.site-footer p { font-size: 14px; color: var(--text-secondary); }
.site-footer > .text-link { font-size: 13px; }
.footer-brand { width: 142px; height: 52px; }
.footer-brand img { width: 138px; height: 138px; }
.noscript-note { font-size: 14px; padding-bottom: 24px; }

@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-hover); transform: translateY(-2px); }
  .icon-button:hover { background: var(--surface-soft); }
  .text-link:hover { text-decoration-color: currentColor; }
  .desktop-nav a:hover { color: var(--accent); }
  .media-frame:hover .content-image { transform: scale(1.025); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: arrive 560ms var(--ease-out) both; }
  .hero-art { animation: arrive 640ms 80ms var(--ease-out) both; }
  @keyframes arrive { from { opacity: 0.6; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .button:active, .icon-button:active, .media-frame:hover .content-image { transform: none; }
}

[data-input="keyboard"] .button, [data-input="keyboard"] .icon-button { transition: none; }
[data-input="keyboard"] .button:active, [data-input="keyboard"] .icon-button:active { transform: none; }

@media (max-width: 1199px) {
  .container { width: calc(100% - 64px); }
  .desktop-nav { gap: 22px; }
  .header-inner { gap: 16px; }
  .hero-inner { min-height: 510px; gap: 0; }
  h1 { font-size: 4.45vw; }
  .hero-actions { gap: 16px; }
  .schools-inner { gap: 36px; }
  .books-grid { gap: 22px; }
  .book-description { display: block; }
  .book-price { display: block; margin-top: 10px; }
  .faq-section { gap: 48px; }
  .site-footer p { max-width: 210px; }
}

@media (max-width: 1023px) {
  .desktop-nav { display: none; }
  .menu-toggle:not([hidden]) { display: inline-flex; }
  .header-inner { height: 76px; }
  .mobile-nav:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; padding-block: 12px 20px; gap: 8px 20px; }
  .mobile-nav a { min-height: 44px; display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 15px; font-weight: 700; }
  .hero-actions { align-items: flex-start; gap: 12px; flex-direction: column; margin-top: 24px; }
  .hero-copy p { font-size: 17px; margin-top: 18px; }
  .hero-art { width: calc(100% + 20px); }
  .hero-inner { min-height: 470px; }
  .schools-inner { grid-template-columns: 1fr 1.45fr; gap: 30px; }
  .school-photos { gap: 14px; }
  .school-photo-reel { padding-top: 32px; }
  .school-photo-reel figcaption .text-link { flex-wrap: wrap; line-height: 1.4; }
  .site-footer { flex-wrap: wrap; }
}

@media (max-width: 767px) {
  .container { width: calc(100% - 40px); }
  .header-inner { height: 72px; gap: 12px; }
  .brand { width: 142px; height: 52px; }
  .brand img { width: 138px; height: 138px; }
  .header-contact { display: none; }
  .header-actions { gap: 8px; }
  .hero-inner { grid-template-columns: 1fr; min-height: auto; padding-block: 38px 22px; gap: 12px; }
  h1 { font-size: clamp(34px, 7.5vw, 53px); line-height: 1.12; }
  .hero-copy p { margin-top: 18px; max-width: 420px; font-size: 16px; }
  .hero-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; }
  .hero-actions .button { min-height: 50px; padding-inline: 22px; font-size: 15px; }
  .hero-actions .text-link { font-size: 14px; }
  .hero-art { width: min(460px, 100%); margin: 0 auto; }
  .hero-art img { max-height: 310px; }
  .brand-promise { justify-content: flex-start; gap: 14px; padding-block: 22px; }
  .brand-promise p { font-size: 15px; }
  .promise-icon { width: 28px; height: 28px; }
  .section-heading { margin-bottom: 30px; }
  .section-heading p { font-size: 16px; }
  .books-grid { grid-template-columns: 1fr; gap: 38px; }
  .book { max-width: 440px; width: 100%; margin-inline: auto; }
  .book:nth-child(2), .book:nth-child(3) { padding-top: 0; }
  .book-image { aspect-ratio: 4 / 4.8; }
  .book-description { display: flex; margin-top: 18px; }
  .book-price { margin-top: 0; }
  .price-note { margin-top: 28px; font-size: 13px; }
  .schools-inner { grid-template-columns: 1fr; gap: 32px; }
  .schools-copy p { max-width: 480px; font-size: 16px; }
  .school-photos { grid-template-columns: 2fr 1fr; gap: 14px; }
  .school-photo-reel { padding-top: 40px; }
  .school-photo-main .media-frame { aspect-ratio: 4 / 3; }
  .school-photos figcaption { font-size: 12px; }
  .school-photo-reel figcaption .text-link { font-size: 12px; }
  .faq-section { grid-template-columns: 1fr; gap: 30px; }
  .faq-intro { max-width: 100%; }
  .faq-list summary { font-size: 16px; padding-block: 20px; }
  .faq-list details p { font-size: 15px; }
  .contact-panel { padding: 40px 20px 44px; }
  .contact-panel p { max-width: 270px; font-size: 16px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 32px; }
  .site-footer p { max-width: none; }
}

@media (max-width: 374px) {
  .container { width: calc(100% - 32px); }
  h1 { font-size: 29px; }
  .hero-actions { gap: 8px 14px; }
  .hero-actions .text-link { font-size: 13px; }
  .header-actions { gap: 6px; }
  .brand { width: 128px; }
  .brand img { width: 126px; height: 126px; }
  .book-description { display: block; }
  .book-price { margin-top: 8px; }
}
