:root {
  --ink: #25211e;
  --muted: #655d54;
  --paper: #f5efe4;
  --paper-deep: #e8dbc8;
  --line: rgba(72, 57, 41, 0.18);
  --night: #181d2c;
  --night-soft: #282c3a;
  --sand: #c98545;
  --sand-light: #e3bb7d;
  --focus: #7452d4;
  --shell: min(1120px, calc(100% - 48px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(227, 187, 125, 0.22), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell { width: var(--shell); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  color: white;
  background: var(--night);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(245, 239, 228, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid rgba(37, 33, 30, 0.5);
  border-radius: 50%;
  font-family: ui-monospace, monospace;
  font-size: 1rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.05rem;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); }

.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.35rem; }

.hero {
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0 clamp(4rem, 8vw, 7rem);
  color: white;
  background: var(--night);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-copy { position: relative; z-index: 1; }

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--sand-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero h1,
.prose h1,
.section-heading h2,
.not-found h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero h1 { font-size: clamp(3.5rem, 7vw, 6.5rem); }
.hero h1 em { color: var(--sand-light); font-style: italic; }

.lead {
  max-width: 35rem;
  margin: 1.8rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.35rem; margin-top: 2rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.68rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.2rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.button-primary { color: var(--night); background: var(--sand-light); }
.button-primary:hover { background: #f0ce98; }

.text-link {
  color: white;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 0.32rem;
}

.hero-art { margin: 0; }
.hero-art img { display: block; width: 100%; min-height: 360px; object-fit: cover; box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.32); }
.hero-art figcaption { margin-top: 0.7rem; color: rgba(255, 255, 255, 0.56); font-size: 0.75rem; }

.intro-section,
.route-section { padding: clamp(4rem, 8vw, 7rem) 0; }

.section-heading { max-width: 45rem; }
.section-heading .eyebrow,
.page-layout .eyebrow,
.note-panel .eyebrow,
.not-found .eyebrow { color: #9d5d25; }
.section-heading h2 { font-size: clamp(2.2rem, 4vw, 4rem); }

.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 4rem;
  max-width: 60rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-grid p { margin: 0; }

.route-section { border-top: 1px solid var(--line); }
.route-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 2.25rem 0 0; padding: 0; list-style: none; background: var(--line); }
.route-list li { padding: 1.6rem; background: var(--paper); }
.route-number, .theme-index { color: #a16533; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; }
.route-list h3 { margin: 2.7rem 0 0.7rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; font-weight: 400; }
.route-list p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.route-list a, .prose a { color: #6c411f; font-weight: 800; text-decoration-color: rgba(108, 65, 31, 0.4); text-underline-offset: 0.3rem; }
.route-list a { display: inline-block; margin-top: 1.15rem; font-size: 0.88rem; }

.note-panel {
  margin-bottom: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  color: #f8f2e8;
  background: var(--night-soft);
}
.note-panel p:last-child { max-width: 49rem; margin: 0; }

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(235px, 0.36fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(3rem, 6vw, 5.8rem); }
.lede { margin: 1.5rem 0 3rem; color: var(--muted); font-size: 1.18rem; }
.prose section { margin-top: 2.65rem; }
.prose h2 { margin: 0 0 0.7rem; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 400; letter-spacing: -0.025em; line-height: 1.12; }
.prose p { margin: 0; color: #4f4841; }

.page-aside {
  align-self: start;
  position: sticky;
  top: 1.2rem;
  padding: 1.45rem;
  border-top: 3px solid var(--sand);
  background: var(--paper-deep);
}
.page-aside h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; font-weight: 400; line-height: 1.1; }
.page-aside p:not(.eyebrow) { color: var(--muted); font-size: 0.94rem; }
.page-aside .button { width: 100%; margin-top: 0.8rem; }

.book-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.book-list li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.book-list span { padding-top: 0.3rem; color: #a16533; font-family: ui-monospace, monospace; font-size: 0.75rem; font-weight: 800; }
.book-list h2 { margin-bottom: 0.3rem; font-size: 1.5rem; }
.book-list p { font-size: 0.94rem; }
.reading-note { padding: 1.4rem 1.5rem; border-left: 3px solid var(--sand); background: rgba(232, 219, 200, 0.42); }
.reading-note h2 { font-size: 1.45rem; }

.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 2.5rem; background: var(--line); }
.theme-grid section { margin: 0; padding: 1.5rem; background: var(--paper); }
.theme-grid h2 { margin-top: 2.2rem; font-size: 1.55rem; }

.site-footer { padding: 1.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 2rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: inherit; }

.not-found { min-height: 100svh; display: grid; align-content: center; justify-items: start; }
.not-found h1 { max-width: 48rem; font-size: clamp(3rem, 7vw, 6rem); }
.not-found p:not(.eyebrow) { max-width: 32rem; color: var(--muted); font-size: 1.1rem; }

@media (max-width: 760px) {
  :root { --shell: min(100% - 32px, 1120px); }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 1rem 0; }
  .site-nav { justify-content: flex-start; }
  .hero-grid, .page-layout { grid-template-columns: 1fr; }
  .hero-art { grid-row: 1; }
  .hero-art img { min-height: 220px; }
  .intro-grid, .route-list, .theme-grid { grid-template-columns: 1fr; }
  .page-aside { position: static; }
}

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