:root {
  --navy: #071b31;
  --paper: #f4f1e9;
  --paper-2: #fbfaf6;
  --white: #fffefb;
  --ink: #0d1d2d;
  --muted: #5c6976;
  --gold: #c69a4b;
  --gold-light: #e8cc91;
  --emerald: #0c5548;
  --mint: #cfe9dc;
  --cyan: #11a8e8;
  --line: rgba(7, 27, 49, 0.16);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.65; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 10px 14px; background: var(--white); color: var(--navy); }
.skip-link:focus { top: 12px; }

.site-header { min-height: 88px; padding: 12px clamp(22px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 28px; background: rgba(244, 241, 233, .94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand img { width: 136px; height: 62px; object-fit: contain; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { text-decoration: none; font-size: .9rem; font-weight: 650; }
nav a:hover { color: #8b682e; }
.nav-cta { padding: 10px 17px; border: 1px solid var(--navy); }
.menu-button { display: none; padding: 8px 12px; border: 1px solid var(--navy); background: transparent; color: var(--navy); font: inherit; font-weight: 600; }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(480px, .85fr); min-height: calc(100vh - 88px); }
.hero-copy { padding: clamp(72px, 9vw, 132px) clamp(28px, 7vw, 112px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { margin: 0 0 20px; color: #8f6928; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.06; }
h1 { max-width: 900px; margin: 0; font-size: clamp(3.5rem, 6.4vw, 6.9rem); letter-spacing: -.045em; font-weight: 600; }
.lede { max-width: 760px; margin: 32px 0 0; color: #495866; font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.hero-actions { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 14px; }
.button { min-height: 52px; padding: 13px 21px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: var(--navy); }
.button-outline { border-color: var(--navy); color: var(--navy); }
.button-outline:hover { background: var(--navy); color: var(--white); }

.hero-shelf { display: grid; grid-template-rows: 1fr 1fr; }
.shelf-card { position: relative; overflow: hidden; padding: clamp(36px, 5vw, 68px); color: var(--white); display: flex; flex-direction: column; justify-content: center; }
.shelf-card::after { content: ""; position: absolute; width: 300px; height: 300px; right: -120px; bottom: -120px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 84px rgba(255,255,255,.025); }
.shelf-math { background: var(--emerald); }
.shelf-ml { background: var(--navy); }
.shelf-number { color: rgba(255,255,255,.52); font-size: .72rem; font-weight: 700; letter-spacing: .16em; }
.shelf-card p { margin: 22px 0 8px; color: var(--gold-light); font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.shelf-math p { color: var(--mint); }
.shelf-card h2 { max-width: 520px; margin: 0; font-size: clamp(2.6rem, 4.1vw, 5rem); letter-spacing: -.035em; }
.shelf-status { margin-top: 24px; align-self: flex-start; padding: 6px 10px; border: 1px solid rgba(255,255,255,.42); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.trust-strip p { margin: 0; padding: 22px clamp(24px, 4vw, 54px); color: var(--muted); font-size: .88rem; }
.trust-strip p + p { border-left: 1px solid var(--line); }
.trust-strip strong { color: var(--navy); }

.books, .standards { padding: clamp(84px, 10vw, 142px) clamp(22px, 7vw, 104px); }
.section-heading { max-width: 1060px; margin-bottom: 62px; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(34px, 7vw, 100px); align-items: end; }
.section-heading .eyebrow { grid-column: 1 / -1; margin-bottom: -20px; }
.section-heading h2, .about h2 { margin: 0; font-size: clamp(2.8rem, 5vw, 5.2rem); letter-spacing: -.04em; }
.section-heading > p:last-child { max-width: 470px; margin: 0 0 8px; color: var(--muted); font-size: 1.07rem; }
.book-grid { display: grid; gap: 28px; }
.book-card { display: grid; grid-template-columns: minmax(300px, .76fr) minmax(0, 1.24fr); min-height: 720px; color: var(--white); }
.math-card { background: var(--emerald); }
.ml-card { background: var(--navy); }
.book-visual { padding: clamp(34px, 5vw, 68px); display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.045); }
.book-visual > a { width: min(310px, 100%); }
.actual-cover { width: 100%; aspect-ratio: 938 / 1500; object-fit: cover; box-shadow: 16px 20px 0 rgba(17,168,232,.18), 0 24px 55px rgba(0,0,0,.28); }
.concept-cover { width: min(310px, 100%); aspect-ratio: 5.5 / 8.5; padding: 34px 27px; background: #0a473d; border: 7px solid var(--mint); box-shadow: 16px 20px 0 rgba(207,233,220,.17), 0 24px 55px rgba(0,0,0,.22); display: flex; flex-direction: column; text-align: center; }
.concept-series, .concept-publisher { color: var(--mint); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.concept-cover strong { margin-top: 28px; color: var(--white); font-size: clamp(4.6rem, 8vw, 7rem); line-height: .92; }
.concept-cover h3 { margin: 18px 0 12px; color: var(--white); font-size: clamp(1.7rem, 3vw, 2.55rem); }
.concept-cover p { margin: 0; color: rgba(255,255,255,.82); font-size: .9rem; line-height: 1.45; }
.concept-publisher { margin-top: auto; }
.book-copy { padding: clamp(46px, 7vw, 94px); display: flex; flex-direction: column; justify-content: center; }
.book-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,.64); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.status { padding: 6px 10px; border: 1px solid rgba(255,255,255,.44); color: var(--white); }
.status-available { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
.series-name { margin: 30px 0 8px; color: var(--gold-light); font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.math-card .series-name { color: var(--mint); }
.book-copy h3 { max-width: 780px; margin: 0; font-size: clamp(2.5rem, 4.8vw, 5rem); letter-spacing: -.035em; }
.book-intro { max-width: 740px; margin: 26px 0 0; color: rgba(255,255,255,.78); font-size: 1.08rem; }
.feature-list { max-width: 740px; margin: 34px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.2); }
.feature-list li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.book-actions { margin-top: 36px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.button-math { background: var(--mint); color: #073c33; }
.button-amazon { background: var(--gold); color: var(--navy); }
.download-link { color: var(--white); font-weight: 700; text-underline-offset: 5px; }
.availability { color: rgba(255,255,255,.68); font-size: .82rem; }
.fine-print { max-width: 970px; margin: 26px 0 0; color: var(--muted); font-size: .79rem; }

.standards { background: var(--paper-2); }
.compact-heading { display: block; max-width: 1000px; }
.compact-heading .eyebrow { margin-bottom: 20px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principles article { padding: 34px 42px 12px 0; }
.principles article + article { padding-left: 42px; border-left: 1px solid var(--line); }
.principles span { color: #98702e; font-size: .75rem; font-weight: 700; letter-spacing: .15em; }
.principles h3 { margin: 22px 0 12px; font-size: 1.75rem; }
.principles p { max-width: 360px; color: var(--muted); }

.about { padding: clamp(88px, 11vw, 150px) clamp(24px, 9vw, 138px); display: grid; grid-template-columns: .4fr 1.6fr; gap: clamp(44px, 8vw, 116px); align-items: center; background: var(--navy); color: var(--white); }
.about-mark { width: min(260px, 100%); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); color: var(--gold-light); font-family: var(--serif); font-size: clamp(6rem, 12vw, 11rem); }
.about p:not(.eyebrow) { max-width: 780px; margin: 28px 0; color: #c9d2db; font-size: 1.08rem; }
.about .text-link { color: var(--gold-light); font-weight: 700; text-underline-offset: 5px; }

footer { padding: 32px clamp(22px, 5vw, 76px); display: flex; justify-content: space-between; align-items: center; gap: 24px; color: #67717c; font-size: .84rem; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 700; }
.footer-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--navy); color: var(--gold-light); font-family: var(--serif); font-size: 1.2rem; }

.detail-page { background: var(--paper-2); }
.detail-back { text-decoration: none; font-size: .88rem; font-weight: 700; }
.detail-hero { min-height: calc(100vh - 88px); display: grid; grid-template-columns: minmax(360px, .75fr) minmax(0, 1.25fr); background: var(--navy); color: var(--white); }
.detail-cover-wrap { padding: clamp(48px, 7vw, 96px); display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.045); }
.detail-cover { width: min(390px, 100%); aspect-ratio: 938 / 1500; object-fit: cover; box-shadow: 18px 24px 0 rgba(17,168,232,.18), 0 28px 70px rgba(0,0,0,.32); }
.detail-copy { padding: clamp(64px, 9vw, 132px) clamp(34px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; }
.detail-copy .eyebrow { margin: 30px 0 18px; color: var(--gold-light); }
.detail-copy h1 { max-width: 900px; font-size: clamp(3.25rem, 6vw, 6.7rem); }
.detail-meta { color: rgba(255,255,255,.68); }
.detail-lede { max-width: 760px; margin: 30px 0 0; color: rgba(255,255,255,.78); font-size: clamp(1.07rem, 1.6vw, 1.28rem); }
.detail-actions { margin-top: 36px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.detail-preview { border-color: rgba(255,255,255,.58); color: var(--white); }
.detail-preview:hover { background: var(--white); color: var(--navy); }
.detail-note { margin: 20px 0 0; color: rgba(255,255,255,.54); font-size: .8rem; }
.detail-topics { padding: clamp(86px, 10vw, 146px) clamp(24px, 8vw, 120px); }
.detail-section-heading { max-width: 940px; margin-bottom: 60px; }
.detail-section-heading h2, .detail-cta h2 { margin: 0; font-size: clamp(2.8rem, 5vw, 5.3rem); letter-spacing: -.04em; }
.detail-section-heading > p:last-child { max-width: 680px; margin-top: 24px; color: var(--muted); font-size: 1.07rem; }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.topic-grid article { padding: 36px 46px 32px 0; border-bottom: 1px solid var(--line); }
.topic-grid article:nth-child(even) { padding-left: 46px; border-left: 1px solid var(--line); }
.topic-grid span { color: #98702e; font-size: .75rem; font-weight: 700; letter-spacing: .15em; }
.topic-grid h3 { margin: 20px 0 10px; font-size: 1.8rem; }
.topic-grid p { max-width: 520px; margin: 0; color: var(--muted); }
.detail-cta { padding: clamp(86px, 11vw, 150px) 24px; text-align: center; background: var(--emerald); color: var(--white); }
.detail-cta .eyebrow { color: var(--mint); }
.centered-actions { justify-content: center; }
.text-link-light { color: var(--white); font-weight: 700; text-underline-offset: 5px; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .hero-shelf { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .book-card { grid-template-columns: minmax(270px, .72fr) minmax(0, 1.28fr); }
  .detail-hero { grid-template-columns: minmax(300px, .68fr) minmax(0, 1.32fr); }
}

@media (max-width: 820px) {
  .site-header { min-height: 76px; }
  .brand img { width: 115px; height: 48px; }
  .menu-button { display: block; }
  nav { display: none; position: absolute; top: 76px; left: 0; right: 0; padding: 22px 24px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 17px; }
  nav.open { display: flex; }
  .nav-cta { text-align: center; }
  .hero-copy { min-height: 70vh; }
  .trust-strip, .section-heading, .book-card, .about { grid-template-columns: 1fr; }
  .trust-strip p + p { border-left: 0; border-top: 1px solid var(--line); }
  .section-heading .eyebrow { margin-bottom: 0; }
  .book-card { min-height: 0; }
  .book-visual { padding-block: 54px; }
  .book-copy { padding-block: 58px; }
  .about-mark { width: 190px; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-cover-wrap { min-height: 640px; }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(3rem, 13vw, 4.7rem); }
  .hero-copy, .books, .standards { padding-left: 22px; padding-right: 22px; }
  .hero-shelf { grid-template-columns: 1fr; }
  .shelf-card { min-height: 330px; }
  .principles { grid-template-columns: 1fr; }
  .principles article, .principles article + article { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .book-visual > a, .concept-cover { width: min(260px, 88%); }
  .book-copy h3 { font-size: clamp(2.35rem, 11vw, 3.35rem); }
  .detail-cover-wrap { min-height: 0; padding: 58px 22px; }
  .detail-cover { width: min(275px, 82%); }
  .detail-copy, .detail-topics { padding-left: 22px; padding-right: 22px; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-grid article, .topic-grid article:nth-child(even) { padding: 28px 0; border-left: 0; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
