/* SnoValley Academic Press. No external fonts or resources.
   Palette: Cascade evergreen, river blue, snow, and granite neutrals tinted toward green. */
:root {
  --forest: #17332c;
  --forest-2: #24483e;
  --river: #4f8fb0;
  --snow: #f4f8f7;
  --moss: #8fa98a;

  --bg: #f7f9f8;
  --bg-alt: #ebf0ee;
  --surface: #ffffff;
  --text: #1a2421;
  --muted: #55625e;
  --line: #d3dcd8;
  --link: #1d5f7e;
  --accent: #17332c;
  --accent-ink: #ffffff;
  --head-bg: #17332c;
  --head-ink: #e7efec;
  --focus: #4f8fb0;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1100px;
  --narrow: 740px;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a17; --bg-alt: #142420; --surface: #182b26; --text: #e5ece9; --muted: #a8b7b2;
    --line: #2b3f39; --link: #8cc4e0; --accent: #cfe3da; --accent-ink: #0f1a17;
    --head-bg: #0b1512; --head-ink: #dbe7e2; --snow: #e5ece9; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1a17; --bg-alt: #142420; --surface: #182b26; --text: #e5ece9; --muted: #a8b7b2;
  --line: #2b3f39; --link: #8cc4e0; --accent: #cfe3da; --accent-ink: #0f1a17;
  --head-bg: #0b1512; --head-ink: #dbe7e2; --snow: #e5ece9; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 0.45em; }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.95rem); margin: 1.6em 0 0.55em; }
h3 { font-size: 1.2rem; margin: 0 0 0.35em; }
p { margin: 0 0 1em; }
cite { font-style: italic; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: var(--narrow); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--snow); color: var(--forest); padding: 8px 14px; z-index: 100; border-radius: 4px; }
.skip:focus { left: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem; font-weight: 700; color: var(--muted); margin: 0 0 0.6em; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 44em; }
.small { font-size: 0.93rem; color: var(--muted); }

/* header */
.site-header { background: var(--head-bg); color: var(--head-ink); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--head-ink); text-decoration: none; }
.mark { width: 40px; height: 40px; color: var(--moss); flex: none; --snow: #f4f8f7; --river: #6fb0d2; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.24em; opacity: 0.82; margin-top: 3px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { color: var(--head-ink); text-decoration: none; padding: 8px 12px; border-radius: 4px; font-size: 0.98rem; opacity: 0.88; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,0.08); }
.nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 #6fb0d2; border-radius: 0; }

/* hero */
.hero { background: var(--head-bg); color: var(--head-ink); position: relative; overflow: hidden; }
.hero-inner { padding-block: 56px 120px; position: relative; z-index: 1; }
.hero .eyebrow { color: #a9c3b9; }
.hero h1 { max-width: 15em; }
.hero .em { font-style: italic; color: #9fd0e6; }
.hero .lede { color: #c8d8d2; }
.ridge { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; }
.ridge::before, .ridge::after { content: ""; position: absolute; inset: 0; }
.ridge::before { background: #24483e; clip-path: polygon(0 100%, 0 62%, 9% 40%, 17% 58%, 28% 22%, 37% 48%, 46% 30%, 58% 60%, 68% 18%, 78% 46%, 88% 32%, 100% 55%, 100% 100%); }
.ridge::after { background: var(--bg); clip-path: polygon(0 100%, 0 84%, 12% 70%, 22% 80%, 34% 62%, 45% 76%, 55% 66%, 66% 82%, 77% 64%, 89% 78%, 100% 70%, 100% 100%); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }
.btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); font-weight: 600; text-decoration: none; font-size: 0.98rem; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: currentColor; color: var(--link); }
.hero .btn-primary { background: var(--snow); color: var(--forest); }
.hero .btn-ghost { color: var(--head-ink); }

/* sections */
.section { padding-block: 56px; }
.section-tight { padding-block: 28px 64px; }
.section-alt { background: var(--bg-alt); }
.section-alt h2 { margin-top: 0; }
.page-head { padding-block: 44px 8px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-head .lede { margin-bottom: 1.4em; }
.crumbs { font-size: 0.92rem; color: var(--muted); margin: 0 0 1.2em; }

/* book feature + catalog */
.feature, .book, .catalog-item { display: grid; gap: 40px; align-items: start; }
.feature { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.book { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
.catalog-item { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.catalog-item:last-child { border-bottom: 0; }
.feature-text, .book-main, .catalog-item > div { min-width: 0; }
.cover { border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.18), 0 14px 34px -10px rgba(16,40,34,0.45); }
.book-aside { position: sticky; top: 24px; }
.book-title { margin: 0 0 0.2em; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.book-title a { color: inherit; text-decoration: none; }
.book-title a:hover { text-decoration: underline; }
.book-sub { font-family: var(--serif); font-style: italic; font-size: 1.18rem; color: var(--muted); margin-bottom: 0.6em; }
.byline { font-weight: 600; letter-spacing: 0.02em; margin-bottom: 1.2em; }
.meta { font-size: 0.93rem; color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 1.2em 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: 0.86rem; padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); }
.ticks { padding-left: 1.2em; }
.ticks li { margin-bottom: 0.45em; }
.ticks li::marker { color: var(--river); }

.details { margin: 0 0 1.4em; border-top: 1px solid var(--line); }
.details > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.details dt { font-weight: 600; color: var(--muted); font-size: 0.94rem; }
.details dd { margin: 0; font-variant-numeric: tabular-nums; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.pillars > div { border-top: 3px solid var(--river); padding-top: 16px; }
.pillars p { color: var(--muted); margin: 0; }

/* contact */
.email { font-weight: 600; word-break: break-word; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.contact-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.contact-item p { color: var(--muted); margin-bottom: 0.6em; }
.contact-item p:last-child { margin: 0; }
.prose h2:first-child { margin-top: 0.6em; }

/* footer */
.site-footer { background: var(--head-bg); color: var(--head-ink); margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-block: 36px 20px; }
.foot-brand { display: flex; gap: 14px; max-width: 30em; }
.foot-brand p { margin: 0; opacity: 0.9; font-size: 0.95rem; }
.mark-foot { width: 34px; height: 34px; margin-top: 2px; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 28px; }
.foot-links a { color: var(--head-ink); opacity: 0.88; font-size: 0.95rem; }
.foot-legal { padding-block: 14px 28px; border-top: 1px solid rgba(255,255,255,0.12); }
.foot-legal p { margin: 0; font-size: 0.84rem; opacity: 0.72; }

@media (max-width: 820px) {
  .feature, .book, .catalog-item { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .feature-cover, .book-aside, .catalog-cover { max-width: 240px; }
  .book-aside { position: static; }
  .pillars, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hero-inner { padding-block: 40px 100px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .site-header nav, .hero .actions, .ridge { display: none; } body { background: #fff; color: #000; } }
