@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; font-style: normal;
}

:root {
  --paper: #F6F3EA;
  --ink: #14170F;
  --green: #1E4633;
  --green-deep: #0E1A12;
  --brass: #B08D4B;
  --brass-link: #C9A25E; /* lightened for AA contrast on dark sections */
  --line: #D9D3C4;
  --sand: #E6EAE0; /* soft sage — alternates with paper to separate sections */
  --measure: 62ch;
  --step--1: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  --step-0: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --step-1: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --step-2: clamp(2rem, 1.6rem + 2.5vw, 3.4rem);
  --step-3: clamp(2.8rem, 2rem + 5vw, 6rem);
  --pad: clamp(1.25rem, 5vw, 6rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
p { max-width: var(--measure); }
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: 0.2em; }
img, canvas { max-width: 100%; display: block; }

.section { padding: clamp(4rem, 12vh, 10rem) var(--pad); position: relative; }
.wrap { max-width: 68rem; margin-inline: auto; }
.section--spotlight { background: var(--green-deep); color: var(--paper); }
.section--spotlight a { color: var(--brass-link); }
.section--accent { background: var(--green); color: var(--paper); }
.section--sand { background: var(--sand); }
.section + .section { border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.section--spotlight + .section, .section + .section--spotlight,
.section--accent + .section, .section + .section--accent { border-top: 0; }

/* Hero */
#hero { min-height: 100svh; display: grid; align-content: center; justify-items: center;
  gap: clamp(1.5rem, 4vh, 3rem); text-align: center; }
.hero__copy { max-width: min(94vw, 60rem); }
/* Keep the headline to its two intended rows (never wrap a line further). */
#hero h1 { font-size: clamp(1.7rem, 6.5vw, 5.2rem); white-space: nowrap; }
.hero__art { display: grid; place-items: center; width: 100%; }
.hero__art img { width: min(94vw, 60rem); height: auto; border-radius: 10px; }
.lede { font-size: var(--step-1); margin-inline: auto; color: color-mix(in srgb, var(--paper) 82%, transparent); }

/* Pillars */
.pillars { list-style: none; padding: 0; display: grid; gap: 1.5rem; margin: 2.5rem 0;
  grid-template-columns: 1fr; }
.pillars li { border-top: 2px solid var(--brass); padding-top: 1rem; display: grid; gap: .35rem; }
.pillars strong { font-family: 'Fraunces', serif; font-size: var(--step-1); }
.pillars span { color: color-mix(in srgb, var(--ink) 70%, transparent); }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.cta { font-family: 'Fraunces', serif; font-size: var(--step-1); }

/* What's inside */
.inside__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); margin-top: 2.5rem;
  grid-template-columns: 1fr; align-items: center; }
@media (min-width: 820px) { .inside__grid { grid-template-columns: 1.25fr 1fr; } }

/* Fancy "glass" frame around the real page */
.inside__art { position: relative; display: inline-grid; place-items: center; justify-self: center;
  width: fit-content; padding: clamp(.6rem, 1.4vw, 1rem); border-radius: 18px; isolation: isolate;
  background: linear-gradient(150deg, color-mix(in srgb, var(--paper) 94%, white),
              color-mix(in srgb, var(--sand) 60%, white));
  border: 1px solid color-mix(in srgb, var(--brass) 50%, transparent);
  box-shadow: 0 2.6rem 5.5rem rgba(20, 23, 15, .30), 0 .4rem 1.1rem rgba(20, 23, 15, .12),
              inset 0 1px 0 rgba(255, 255, 255, .7); }
.inside__art::before { content: ""; position: absolute; inset: -18%; z-index: -1;
  background: radial-gradient(46% 46% at 50% 42%,
    color-mix(in srgb, var(--green) 34%, transparent), transparent 70%);
  filter: blur(32px); }
.inside__art::after { content: ""; position: absolute; inset: 0; border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .40), rgba(255, 255, 255, 0) 42%); }
.inside__art img { display: block; width: auto; max-width: 100%; max-height: 30rem; height: auto;
  border-radius: 8px; box-shadow: 0 1rem 2.4rem rgba(20, 23, 15, .20); }
.feature-list { list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem;
  font-family: 'Inter', sans-serif; }
.feature-list li { font-size: var(--step-0); font-weight: 500;
  padding: .95rem 0 .95rem 1.5rem; position: relative; white-space: nowrap;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 1.45em;
  width: .48rem; height: .48rem; border-radius: 50%; background: var(--brass); }
@media (max-width: 560px) { .feature-list { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 70%, transparent);
  padding: 4rem var(--pad); font-size: var(--step--1); }
.site-footer .byline { margin-top: 1rem; color: var(--paper); }
.site-footer .credit { margin-top: .6rem; opacity: .55; max-width: 74ch; }
.site-footer details { margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; }
.site-footer summary { cursor: pointer; color: var(--brass-link); }
.site-footer details p { max-width: 70ch; line-height: 1.5; opacity: .8; }

/* The books so far — contained collection of real course covers */
.books-grid { list-style: none; padding: 0; margin: 2.5rem auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 3vw, 1.8rem); }
.books-grid li { flex: 0 1 clamp(140px, 21%, 210px); }
.books-grid img { width: 100%; height: auto; border-radius: 8px;
  box-shadow: 0 1rem 2.4rem rgba(20, 23, 15, .22); }
@media (prefers-reduced-motion: no-preference) {
  .books-grid img { transition: transform .3s ease, box-shadow .3s ease; }
  .books-grid img:hover { transform: translateY(-6px); box-shadow: 0 1.8rem 3.4rem rgba(20, 23, 15, .32); }
}

/* Default: fully visible (reduced-motion + no-JS safe). */
.reveal-up { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-up { opacity: 0; transform: translateY(1.5rem);
    transition: opacity .8s ease, transform .8s ease; }
  .reveal-up.in-view { opacity: 1; transform: none; }
}
