/*
 * Little Claybelt Homesteaders Museum — website mockup styles
 * © 2026 Little Claybelt Homesteaders Museum
 * Website design © Ghost Solutions  https://ghostsolutions.tech
 *
 * Colour tokens are taken from the current claybeltmuseum.ca stylesheet
 * (css/mainstyle.css) and refined for contrast, accessibility, and a
 * calmer modern surface — same brand green, not a new palette.
 *   #205f4a  header, footer, borders, headings
 *   #C9DCCF  navigation bar
 *   #e2feeb  page wash (softened here)
 *   #D0F8DB  footer link highlight
 *   #FFFFFF  content surface
 *   #CF0A4B  occasional emphasis (deepened slightly)
 */

:root {
  --forest: #205f4a;
  --forest-deep: #16382d;
  --forest-mid: #287456;
  --sage: #c9dccf;
  --sage-deep: #b3cbb9;
  --mint: #eef8f2;
  --mint-wash: #f4f2ea;
  --mint-bright: #d0f8db;
  --paper: #f6f3ea;
  --white: #fffdf8;
  --ink: #132017;
  --ink-soft: #2c3d35;
  --muted: #5a6c64;
  --line: rgba(32, 95, 74, 0.16);
  --line-strong: rgba(32, 95, 74, 0.28);
  --raspberry: #a10e3d;
  --gold: #c6a15b;
  --shadow: 0 10px 30px rgba(22, 56, 45, 0.08);
  --shadow-lg: 0 24px 50px rgba(22, 56, 45, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, "Times New Roman", Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image: url("images/paper-grain.png");
  background-size: 180px 180px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--forest-deep); }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; }

/* Mockup banner — small, soft, dismissible */
.proposal {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--sage);
  color: var(--forest-deep);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0.28rem 2.4rem 0.28rem 1rem;
  border-bottom: 1px solid var(--line);
}
.proposal p { margin: 0; }
.proposal[hidden] { display: none; }
.proposal button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--forest-deep);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.proposal a { color: var(--forest-deep); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 243, 234, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--forest);
  min-width: 0;
}
.brand-mark {
  width: 42px; height: 42px; flex: none;
  border: 1.5px solid var(--forest);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--forest);
  background: var(--white);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.brand-text span { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line-strong);
  background: var(--white); color: var(--forest); border-radius: 8px; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-open { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.15rem 0.1rem;
}
.site-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  background: var(--sage);
  color: var(--forest-deep);
  text-decoration: none;
}
.header-badge { display: none; }

@media (max-width: 899px) {
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow);
  }
  body.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 0.8rem 0.85rem; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; }
}

/* Buttons & badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--forest);
  background: var(--forest);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { background: var(--forest-deep); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-outline {
  background: var(--white);
  color: var(--forest);
}
.btn-outline:hover { background: var(--sage); color: var(--forest-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--sage);
  color: var(--forest-deep);
  border: 1px solid var(--line-strong);
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--forest);
}
.badge.is-open { background: var(--forest); color: #fff; border-color: var(--forest); }
.badge.is-open .dot { background: var(--mint-bright); }
.badge.is-closed { background: #fff; color: var(--raspberry); border-color: rgba(161,14,61,0.35); }
.badge.is-closed .dot { background: var(--raspberry); }
.badge.is-confirm { background: var(--white); color: var(--forest-deep); }

/* Hero — typographic, photo as a native-size framed inset (444×333, never upscaled) */
.hero {
  position: relative;
  color: #fff;
  background: var(--forest-deep);
  overflow: hidden;
  isolation: isolate;
  padding: 2.25rem 0 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 8% 0%, rgba(208, 248, 219, 0.18), transparent 46%),
    radial-gradient(ellipse at 100% 90%, rgba(32, 95, 74, 0.45), transparent 42%),
    linear-gradient(165deg, #1d5242 0%, var(--forest-deep) 48%, #0e221c 100%);
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/paper-grain.png");
  background-size: 180px 180px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 1.6rem;
  align-items: center;
}
.hero-copy { padding: 0 1.25rem; }
@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 5rem; }
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--mint-bright);
  margin: 0 0 0.85rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(2.6rem, 6.2vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  font-optical-sizing: auto;
}
.hero .lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  max-width: 32rem;
  margin: 0 0 1.6rem;
  color: rgba(255,255,255,0.92);
  font-weight: 400;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }

/* Hero media — no polaroid, no caption; never larger than native 774×410 */
.hero-media {
  position: relative;
  width: 100%;
}
.hero-shot { margin: 0; }
.hero-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero-shot-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  overflow: hidden;
  border-radius: 0;
}
.hero-shot-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--forest-deep) 0%, rgba(14,34,28,0.28) 18%, transparent 42%);
}
.hero-shot-school,
.hero-shot-rail { display: none; }

@media (min-width: 900px) {
  .hero {
    padding: 4.5rem 0 5rem;
  }
  .hero-inner {
    max-width: none;
    padding-left: max(1.25rem, calc((100vw - var(--max)) / 2));
    padding-right: 0;
    grid-template-columns: minmax(18rem, 1fr) minmax(280px, min(774px, 52vw));
    gap: 2.25rem;
    align-items: center;
  }
  .hero-copy { max-width: 36rem; padding-right: 0.5rem; }
  .hero-media {
    max-width: 774px;
    justify-self: end;
    width: 100%;
  }
  .hero-shot-main {
    aspect-ratio: 774 / 410;
    max-height: 410px;
    border-radius: 18px 0 0 18px;
    overflow: hidden;
    box-shadow: none;
  }
  .hero-shot-main::after {
    background: linear-gradient(90deg, var(--forest-deep) 0%, rgba(14,34,28,0.35) 18%, transparent 46%);
  }
  .hero-shot-main img {
    width: 100%;
    height: auto;
    max-width: 774px;
    max-height: 410px;
    object-fit: contain;
    object-position: center;
  }

  /* Variant B: building + school + railway collage, all at or under native size */
  .hero-layout-b .hero-media {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.55fr);
    grid-template-rows: auto auto;
    gap: 0.55rem;
    padding-right: 0;
    max-width: 774px;
  }
  .hero-layout-b .hero-shot-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    aspect-ratio: auto;
    max-height: none;
    border-radius: 18px 4px 4px 18px;
    align-self: stretch;
    height: 100%;
  }
  .hero-layout-b .hero-shot-main img {
    width: 100%;
    height: 100%;
    max-height: 410px;
    object-fit: cover;
    object-position: center 58%;
  }
  /* cover box: if column is ~500px wide, height for 774/410 would be ~265, max-height 410 OK */
  .hero-layout-b .hero-shot-school,
  .hero-layout-b .hero-shot-rail {
    display: block;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
  }
  .hero-layout-b .hero-shot-school {
    aspect-ratio: 4 / 3;
    max-height: 196px; /* well under 843 */
  }
  .hero-layout-b .hero-shot-rail {
    aspect-ratio: 3 / 4;
    max-height: 214px; /* well under 800 */
  }
}

/* Variant A (single bleed photo) hides the supporting shots even on desktop */
.hero-layout-a .hero-shot-school,
.hero-layout-a .hero-shot-rail { display: none !important; }
.hero-layout-a.hero .hero-media { display: block; }


/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.section { position: relative; z-index: 1; padding: 4.5rem 0; background: var(--paper); }
.section-alt { background: var(--white); }
.section-forest { background: var(--forest); color: #fff; }
.section-forest a { color: var(--mint-bright); }
.kicker {
  display: inline-block;
  color: var(--forest);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--forest);
}
.section-forest .kicker { color: var(--mint-bright); border-color: var(--mint-bright); }
.section-forest h2.display,
.section-forest .lead,
.section-forest p { color: rgba(255,255,255,0.94); }
.section-forest .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.7);
  background: transparent;
}
.section-forest .btn-outline:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.section-forest .btn:not(.btn-outline) {
  background: #fff;
  color: var(--forest-deep);
  border-color: #fff;
}
.section-forest .btn:not(.btn-outline):hover {
  background: var(--mint-bright);
  color: var(--forest-deep);
}
h2.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--ink);
}
.section-forest h2.display { color: #fff; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 42rem; }
.note {
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--mint);
  border: 1px dashed var(--line-strong);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
}
.note strong { color: var(--forest-deep); }

/* Visit strip */
.visit-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .visit-grid { grid-template-columns: 1.2fr 1fr; align-items: stretch; }
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}
.panel h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
  color: var(--forest);
}
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.hours-table th, .hours-table td { text-align: left; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.hours-table th { font-weight: 600; width: 42%; }
.hours-table .closed { color: var(--muted); }
.stat-free {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--forest);
  margin: 0.3rem 0 0.4rem;
}

/* Exhibit cards */
.exhibit-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .exhibit-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .exhibit-grid { grid-template-columns: 1fr 1fr 1fr; }
  .exhibit-grid .card.wide { grid-column: span 1; }
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: var(--sage); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.1rem 1.15rem 1.25rem; }
.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--forest);
}
.card-body p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.card .more { margin-top: 0.7rem; font-weight: 700; color: var(--forest); font-size: 0.9rem; }

/* Modal */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 36, 29, 0.62);
  display: grid; place-items: center;
  padding: 1rem;
}
.modal-dialog {
  background: var(--white);
  max-width: 820px;
  width: 100%;
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal-dialog img { display: block; width: auto; max-width: 100%; max-height: 46vh; margin: 0 auto; object-fit: contain; }
.modal-body { padding: 1.3rem 1.4rem 1.6rem; }
.modal-body h2 {
  font-family: var(--font-display);
  margin: 0 0 0.8rem;
  color: var(--forest);
  font-size: 1.7rem;
}
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--ink);
  cursor: pointer; font-size: 1.4rem; line-height: 1;
  box-shadow: var(--shadow);
}

/* Schoolhouse hotspots */
.explore {
  display: grid; gap: 1.5rem;
}
@media (min-width: 900px) {
  .explore { grid-template-columns: 1.4fr 0.9fr; align-items: start; }
}
.hotspot-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}
.hotspot-stage img { width: 100%; height: auto; display: block; }
.hotspot {
  position: absolute;
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.2s var(--ease);
}
.hotspot:hover, .hotspot.is-active { transform: scale(1.12); background: var(--forest-deep); }
.hotspot-info {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem;
  min-height: 12rem;
}
.hotspot-info h3 {
  font-family: var(--font-display);
  color: var(--forest);
  margin: 0 0 0.5rem;
}
.stage-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.stage-tabs button {
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--forest);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
}
.stage-tabs button.is-active { background: var(--forest); color: #fff; }

/* Hats */
.hat-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) {
  .hat-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.carousel { position: relative; }
.carousel-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 0.6rem;
}
.carousel-frame .slide:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.carousel-frame img { width: auto; height: auto; max-width: 100%; object-fit: contain; }
.carousel-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0.7rem; gap: 0.6rem;
}
.carousel-nav button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--white); color: var(--forest);
  cursor: pointer; font-size: 1.2rem;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.carousel-nav button:hover { background: var(--mint); transform: translateY(-1px); }
.flip-grid { display: grid; gap: 0.8rem; }
.flip-card {
  background: transparent;
  border: 0;
  padding: 0;
  perspective: 900px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.flip-inner {
  display: grid;
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.05rem;
  background: var(--white);
}
.flip-back { transform: rotateY(180deg); background: var(--mint); }
.flip-front h3, .flip-back h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  color: var(--forest);
  font-size: 1.15rem;
}
.flip-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; }

/* Railway */
.railway {
  background: var(--forest-deep);
  color: #fff;
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.railway .kicker, .railway h2.display { color: #fff; }
.railway .kicker { border-color: var(--mint-bright); color: var(--mint-bright); }
.rail-wrap { position: relative; margin-top: 2.2rem; }
.rail-track {
  position: relative;
  height: 90px;
  margin: 0 0 1.8rem;
}
.rail-line {
  position: absolute;
  left: 4%; right: 4%;
  top: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--sage), var(--mint-bright), var(--sage));
  border-radius: 4px;
  transform: translateY(-50%);
}
.rail-line::before, .rail-line::after {
  content: "";
  position: absolute;
  top: -6px; width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--mint-bright);
}
.rail-line::before { left: -2px; }
.rail-line::after { right: -2px; }
.rail-ends {
  display: flex; justify-content: space-between;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mint-bright);
  margin: 0 2% 0.4rem;
}
.train {
  position: absolute;
  top: 50%;
  left: 4%;
  width: 56px; height: 28px;
  margin-top: -30px;
  transform: translateX(-8px);
  color: var(--mint-bright);
  pointer-events: none;
}
.train svg { width: 56px; height: 28px; display: block; overflow: visible; }
.rail-stops {
  display: grid;
  gap: 0.8rem;
}
@media (min-width: 800px) {
  .rail-stops { grid-template-columns: repeat(4, 1fr); }
}
.rail-stop {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(208,248,219,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1rem 1.1rem;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.rail-stop.is-active {
  background: rgba(208,248,219,0.14);
  border-color: var(--mint-bright);
}
.rail-stop h3 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: var(--mint-bright);
}
.rail-stop p { margin: 0; font-size: 0.95rem; color: rgba(255,255,255,0.88); }

/* Timeline / then & now */
.timeline { display: grid; gap: 1.2rem; }
@media (min-width: 800px) {
  .timeline { grid-template-columns: 0.9fr 1.1fr; }
}
.tl-nav { display: flex; flex-direction: column; gap: 0.4rem; }
.tl-nav button {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  color: var(--ink);
}
.tl-nav button.is-active {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.tl-nav strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.archival {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 1.1rem;
  border: 1px solid var(--line);
}
.archival figure { margin: 0; }
.archival img {
  margin: 0 auto;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow);
  max-height: 280px;
  width: auto;
  image-rendering: auto;
}
.archival figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; text-align: center; }
.tone { filter: sepia(0.45) contrast(1.05); transition: filter 0.5s var(--ease); }
.tone:hover, .tone:focus, .tone.is-color { filter: none; }

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 800px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
.gallery-grid a, .gallery-grid button {
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 12px; overflow: hidden;
  display: block;
  aspect-ratio: 4 / 3;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }

/* Map */
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sage);
  min-height: 260px;
}
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; }
.map-fallback { padding: 1rem; }
.map-fallback img { border-radius: 8px; margin-bottom: 0.6rem; }

/* Membership form */
.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.form h2 { font-family: var(--font-display); color: var(--forest); margin-top: 0; }
.field { margin: 0 0 0.9rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field textarea, .field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; }
.choices label { font-weight: 500; display: flex; align-items: center; gap: 0.4rem; }
.payment-note {
  background: var(--mint);
  border-left: 3px solid var(--forest);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--forest);
  color: #fff;
  padding: 3rem 0 1.6rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--mint-bright); }
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.site-footer h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}
.social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
.social a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
}
.social a:hover { background: rgba(255,255,255,0.1); color: var(--mint-bright); }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.affiliations { font-size: 0.92rem; }
.affiliations a { display: inline; }
.copyright {
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.88);
}
.copyright a { color: var(--mint-bright); }

/* Books / lists */
.book-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .book-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .book-grid { grid-template-columns: 1fr 1fr 1fr; } }
.book-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  text-decoration: none;
  color: inherit;
}
.book-card img { width: 92px; height: 120px; object-fit: cover; background: var(--sage); }
.book-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 0.3rem; color: var(--forest); }
.book-card p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.prose { max-width: 46rem; }
.prose h2, .prose h3 { font-family: var(--font-display); color: var(--forest); }
.sponsor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}
@media (min-width: 800px) { .sponsor-grid { grid-template-columns: repeat(4, 1fr); } }
.sponsor-grid a, .sponsor-grid div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  min-height: 90px;
  display: grid; place-items: center;
}
.sponsor-grid img { max-height: 70px; width: auto; margin: 0 auto; }
.donor-list { columns: 1; gap: 1.5rem; }
@media (min-width: 700px) { .donor-list { columns: 2; } }
.donor-list li { break-inside: avoid; margin: 0 0 0.35rem; }

/* Reveal */
.reveal { opacity: 1; transform: none; }

.page-hero {
  background: var(--forest);
  color: #fff;
  padding: 3.2rem 0 2.4rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.crumbs { font-size: 0.88rem; color: var(--mint-bright); }
.crumbs a { color: var(--mint-bright); }

/* Print membership */
@media print {
  .proposal, .site-header, .site-footer, .no-print, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .print-form { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-media img { transform: none; }
  .card, .hotspot, .flip-inner, .tone { transition: none; }
  .train { transition: none; }
}

@media (min-width: 1100px) {
  .section { padding: 5.5rem 0; }
}


/* Unified image framing, fades, and consistent crops */
.media-fade,
.card-media,
.carousel-frame,
.hotspot-stage,
.gallery-grid a,
.gallery-grid button,
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--sage);
}
.media-fade::after,
.card-media::after,
.carousel-frame::after,
.hotspot-stage::after,
.gallery-grid a::after,
.gallery-grid button::after,
.hero .hero-vignette {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(22, 56, 45, 0.0) 58%, rgba(238, 248, 242, 0.22) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 42%, rgba(22, 56, 45, 0.28) 100%);
  z-index: 1;
}
.card-media img,
.carousel-frame img,
.gallery-grid img,
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.ratio-wide { aspect-ratio: 16 / 10; }
.ratio-photo { aspect-ratio: 4 / 3; }
.ratio-portrait { aspect-ratio: 3 / 4; }
.archival .media-fade::after,
.archival.frame::after { background: radial-gradient(ellipse at center, transparent 55%, rgba(22,56,45,0.12) 100%); }
.archival img {
  object-fit: contain;
  width: auto;
  max-width: 300px; /* native archival width */
  height: auto;
  max-height: 300px;
  background: #f3efe4;
  padding: 10px 10px 28px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  filter: none; /* already graded */
}
.book-card img {
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(22,56,45,0.14);
  background: var(--sage);
}

.print-only { display: none; }
@media print { .print-only { display: block !important; } .form, .prose, .page-hero, .proposal, .site-header, .site-footer, .no-print { display: none !important; } }

/* <picture> must fill the frame, or height:100% images collapse to 0 */
.card-media picture,
.carousel-frame picture,
.hotspot-stage picture,
.gallery-grid picture,
.frame picture,
.media-fade picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hotspot-stage { min-height: 0; }
.hotspot-stage img { width: 100%; height: auto; display: block; }

.hero .btn:not(.btn-ghost) {
  background: var(--paper);
  color: var(--forest-deep);
  border-color: var(--paper);
}
.hero .btn:not(.btn-ghost):hover {
  background: var(--mint-bright);
  color: var(--forest-deep);
  transform: translateY(-1px);
}


/* Keep carousel slides at native size — do not upscale smaller hat photos */
.carousel-frame picture {
  display: flex;
  width: auto;
  height: auto;
  max-width: 100%;
  justify-content: center;
}
.carousel-frame img,
.carousel-frame .img-cover {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 550px;
  object-fit: contain;
}

/* Low-res gallery frames: cap at native 300px, contain on a sage mat */
.gallery-grid .is-native-sm {
  display: grid;
  place-items: center;
  background: var(--sage);
  min-height: 160px;
}
@media (min-width: 800px) {
  .gallery-grid .is-native-sm { min-height: 190px; }
}
.gallery-grid .is-native-sm picture {
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
}
.gallery-grid .is-native-sm img,
.gallery-grid .is-native-sm .img-cover {
  width: auto;
  height: auto;
  max-width: min(100%, 300px);
  max-height: 180px;
  object-fit: contain;
}

/* Official maps: two-up, never larger than native 600px */
.map-frame[hidden] { display: none; }
.map-fallback {
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .map-fallback { grid-template-columns: 1fr 1fr; align-items: start; }
}
.map-fallback > p { grid-column: 1 / -1; margin: 0; }
.map-fallback picture {
  display: block;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.65rem;
}
.map-fallback img {
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 4px;
  object-fit: contain;
}

/* Footer CTAs must contrast on forest — outline was white text on white */
.site-footer .btn {
  background: var(--paper);
  color: var(--forest-deep);
  border-color: var(--paper);
  text-decoration: none;
}
.site-footer .btn:hover {
  background: var(--mint-bright);
  color: var(--forest-deep);
}
.site-footer .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.site-footer .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}
.site-footer .copyright { margin-top: 1.6rem; padding-top: 1.1rem; }

/* Wide flagpole shot: keep the building, not the sky, in cover tiles */
.pos-building { object-position: center 78%; }

/* Low-resolution historic photos as framed insets, never upscaled */
.archive-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.archive-pair button,
.archive-pair .is-native-sm {
  max-width: 300px;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.7rem 0.85rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  cursor: pointer;
}
.archive-pair picture {
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
}
.archive-pair img,
.archive-pair .img-cover {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}
.archive-cap {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}


/* ——— Official wordmark chrome ——— */
.brand { gap: 0; align-items: center; }
.brand-logo {
  display: block;
  width: auto;
  height: 4.35rem;
  max-width: 210px;
  max-height: 4.35rem;
}
@media (min-width: 900px) {
  .brand-logo { height: 5.15rem; max-height: 5.15rem; max-width: 248px; }
}
.footer-logo {
  display: block;
  margin: 0 0 0.85rem;
  width: fit-content;
}
.footer-logo img {
  display: block;
  width: auto;
  height: 4.6rem;
  max-width: 220px;
}

/* ——— Catalogue / bookshop shelf ——— */
/* Space the first body block below the green page hero */
.page-hero + .section,
.page-hero + section {
  padding-top: 4.5rem;
}
@media (min-width: 1100px) {
  .page-hero + .section,
  .page-hero + section { padding-top: 5.5rem; }
}
.catalogue { padding-top: 4.5rem; }
.catalogue-intro {
  max-width: 42rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin: 0 0 2.4rem;
}
.catalogue-section { margin: 0 0 3.4rem; }
.catalogue-section header { margin: 0 0 1.4rem; max-width: 44rem; }
.catalogue-section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6rem;
}
.catalogue-section header p { margin: 0 0 0.5rem; color: var(--ink-soft); }
.shelf {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.6rem 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.4rem; }
}
@media (min-width: 1100px) {
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.shelf-book {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.shelf-cover {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 11rem;
  margin: 0 0 0.7rem;
  background:
    linear-gradient(180deg, transparent 0%, rgba(22,56,45,0.03) 100%);
  padding: 0.2rem 0 0.4rem;
}
.shelf-cover img,
.shelf-cover picture {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 240px);
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(22, 56, 45, 0.14);
  border-radius: 1px;
  background: none;
}
.shelf-book h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.25;
  margin: 0 0 0.25rem;
  color: var(--forest);
  text-wrap: pretty;
}
.shelf-book p,
.shelf-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.shelf-meta a { font-weight: 600; }
.shelf-book:hover h3, .shelf-book:focus-visible h3 { color: var(--forest-deep); }
.shelf-book:hover .shelf-cover img {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(22, 56, 45, 0.18);
}
.shelf-cover img { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }

/* Book monograph pages */
.book-prose,
.index-wrap { max-width: 52rem; }
.book-prose img,
.index-wrap img {
  width: auto;
  height: auto;
  max-width: min(100%, 240px);
  margin: 0 0 1.4rem;
  box-shadow: 0 10px 24px rgba(22, 56, 45, 0.14);
}
.book-prose h1, .index-wrap > h1, .index-body > h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: pretty;
}
.book-prose h2, .index-body > h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--forest);
}

/* Searchable indexes */
.index-tools { margin: 0 0 1.6rem; max-width: 28rem; }
.index-search-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 0.4rem;
}
.index-search {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  font: inherit;
}
.index-letter {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--forest);
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}
.index-body > p,
.index-wrap .index-body p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem 1rem;
  margin: 0;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(22, 56, 45, 0.08);
  font-size: 0.98rem;
  color: var(--ink);
}
.index-body p.is-hidden, .index-letter.is-hidden, .index-top.is-hidden { display: none; }
.index-top { margin: 0.8rem 0 0; font-size: 0.9rem; }
.letter-nav, .index-body > h1:has(a) {
  font-family: var(--font-display);
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.8;
  color: var(--forest);
}
.page-hero h1 { text-wrap: pretty; }

/* Newsletters archive */
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 40rem;
}
.archive-list li { border-bottom: 1px solid var(--line); }
.archive-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.archive-list a:hover { color: var(--forest); }
.archive-list .when { color: var(--muted); font-weight: 500; }

/* Sponsors: captions, native caps */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 1.2rem;
  margin: 1.6rem 0 2.4rem;
  align-items: end;
}
@media (min-width: 800px) {
  .sponsor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sponsor-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  text-align: center;
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 600;
}
.sponsor-grid img {
  width: auto;
  height: auto;
  max-width: min(100%, 240px);
  max-height: 110px;
  object-fit: contain;
  margin: 0 auto;
  filter: none;
}
.sponsor-grid .visually-hidden {
  position: static !important;
  clip: auto !important;
  width: auto;
  height: auto;
  overflow: visible;
}

/* Visit / forms: less “boxed memo” */
.page-hero .kicker { color: var(--mint-bright); border-color: var(--mint-bright); }
.hours-plain { margin: 0 0 1rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .shelf-cover img { transition: none; }
}

.brand-logo { background: transparent; }
.index-body > h1:has(a),
.index-wrap h1:has(a) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.45rem;
  align-items: baseline;
  font-size: 0.95rem !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 1.2rem;
}
.index-body > h1:has(a) a,
.index-wrap h1:has(a) a { text-decoration: none; }

.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 46rem; }


/* Forest-green scrollbars — pill thumb, gradient, floating inset, site-wide */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--forest) var(--paper);
}
.modal-dialog,
.modal,
[data-index-body],
.index-wrap,
.shelf,
pre,
.form,
* {
  scrollbar-width: thin;
  scrollbar-color: var(--forest) var(--paper);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: var(--paper);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(22, 56, 45, 0.1);
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--forest-deep) 0%, var(--forest) 48%, var(--sage-deep) 100%);
  background-clip: padding-box;
  border-radius: 999px;
  border: 2px solid var(--paper);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--forest-mid) 0%, #2f8a64 52%, var(--sage) 100%);
  background-clip: padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #10241c 0%, var(--forest-deep) 55%, var(--forest) 100%);
  background-clip: padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: var(--paper);
}

/* Slim forest-to-gold scroll progress at the very top of the viewport */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.scroll-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--forest-deep) 0%, var(--forest) 42%, var(--gold) 100%);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}


/* Tasteful load entrance — only when JS is present and motion is allowed.
   Without JS, or with reduced motion, everything stays fully visible. */
.hero-copy h1 .hero-line { display: block; }
@media (prefers-reduced-motion: no-preference) {
  html.js .hero-enter,
  html.js .hero-copy .eyebrow,
  html.js .hero-copy .hero-line,
  html.js .hero-copy .lede,
  html.js .hero-actions,
  html.js .hero-media,
  html.js .page-hero .crumbs,
  html.js .page-hero h1,
  html.js .page-hero .kicker,
  html.js .page-hero .wrap > p:not(.crumbs):not(.kicker) {
    opacity: 0;
    transform: translateY(16px);
  }
  html.js .hero-media { transform: translateY(0) scale(0.98); }
  html.js.enter-play .hero-copy .eyebrow { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0ms both; }
  html.js.enter-play .hero-copy .hero-line:nth-child(1) { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 80ms both; }
  html.js.enter-play .hero-copy .hero-line:nth-child(2) { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 160ms both; }
  html.js.enter-play .hero-copy .hero-line:nth-child(3) { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 240ms both; }
  html.js.enter-play .hero-copy .lede { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 320ms both; }
  html.js.enter-play .hero-actions { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 400ms both; }
  html.js.enter-play .hero-media { animation: hero-frame-in 0.62s cubic-bezier(0.22, 1, 0.36, 1) 480ms both; }
  html.js.enter-play .page-hero .crumbs { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0ms both; }
  html.js.enter-play .page-hero .kicker { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 80ms both; }
  html.js.enter-play .page-hero h1 { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 160ms both; }
  html.js.enter-play .page-hero .wrap > p:not(.crumbs):not(.kicker) { animation: fade-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 240ms both; }
}
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-frame-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  html.js .hero-copy .eyebrow,
  html.js .hero-copy .hero-line,
  html.js .hero-copy .lede,
  html.js .hero-actions,
  html.js .hero-media,
  html.js .page-hero .crumbs,
  html.js .page-hero h1,
  html.js .page-hero .kicker,
  html.js .page-hero .wrap > p:not(.crumbs):not(.kicker) {
    opacity: 1;
    transform: none;
    animation: none;
  }
}


/* ——— Final elevation: rhythm, type, ornaments, motion ——— */
h2.display {
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}
.section {
  position: relative;
}
.section > .wrap { position: relative; z-index: 1; }
.section-alt { background: var(--white); }
.section.section-forest,
.railway {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(208,248,219,0.12), transparent 42%),
    var(--forest-deep);
}
/* Subtle typographic divider — a short sage rule */
.kicker::after {
  content: "";
  display: none;
}
.section .kicker {
  position: relative;
}
.section .wrap > .kicker::before,
.page-hero .kicker::before {
  content: none;
}
.ornament,
.section > .wrap > .kicker + .display::before,
.catalogue-section > header > h2::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  background: var(--forest);
  margin: 0 0 0.85rem;
  border-radius: 2px;
}
.section-forest .wrap > .kicker + .display::before,
.railway .wrap > .kicker + .display::before {
  background: var(--mint-bright);
}
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 3.4rem 0 3.1rem;
  background:
    radial-gradient(ellipse at 8% 0%, rgba(208,248,219,0.16), transparent 46%),
    radial-gradient(ellipse at 100% 100%, rgba(32,95,74,0.35), transparent 50%),
    linear-gradient(165deg, #1d5242 0%, var(--forest-deep) 55%, #0e221c 100%);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/paper-grain.png");
  background-size: 180px 180px;
  opacity: 0.18;
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 {
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}
.page-hero .wrap > p:last-of-type {
  margin-bottom: 0;
}
.page-hero .wrap > p:last-of-type::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--mint-bright);
  margin-top: 1.2rem;
  border-radius: 2px;
}

/* Cards and links: quiet, smooth micro-interactions */
.card, .shelf-book, .flip-card, .archive-list a, .sponsor-grid a {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.2s var(--ease);
}
a {
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.card:hover, .card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 900px) {
  .site-nav a:not([aria-current="page"]) {
    position: relative;
  }
  .site-nav a:not([aria-current="page"])::after {
    content: "";
    position: absolute;
    left: 0.7rem; right: 0.7rem; bottom: 0.28rem;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
    opacity: 0.4;
  }
  .site-nav a:not([aria-current="page"]):hover::after { transform: scaleX(1); }
}

/* Tasteful scroll reveal: only below-the-fold, never hides no-JS or first paint */
.will-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.will-reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; transition: none; }
  .site-nav a::after { transition: none; }
  .card, .shelf-book, .flip-card, .archive-list a { transition: none; }
}

/* Archival frames must never stretch historic photos past native size */
.archival .frame {
  background: transparent;
  box-shadow: none;
  overflow: visible;
  aspect-ratio: auto;
  height: auto;
  display: flex;
  justify-content: center;
}
.archival .frame picture {
  width: auto;
  height: auto;
  display: block;
}
.archival img,
.archival .frame img {
  width: auto;
  height: auto;
  max-width: 300px;
  max-height: 200px;
  object-fit: contain;
}

/* Ms. Claybelt feature */
.claybelt-feature-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 860px) {
  .claybelt-feature-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 3.25rem;
  }
}
.claybelt-photo {
  margin: 0;
}
.claybelt-photo picture { display: block; }
.claybelt-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 2256px;
  max-height: 1448px;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 16px;
  background: rgba(0,0,0,0.15);
}
@media (max-width: 859px) {
  .claybelt-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 16px;
    max-height: 360px; /* well under 1448 */
  }
  .claybelt-photo img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 0;
  }
}
.claybelt-photo figcaption {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.claybelt-photo figcaption a {
  color: var(--mint-bright);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.claybelt-copy .display { color: #fff; margin: 0 0 1rem; }
.claybelt-copy p { color: rgba(255,255,255,0.92); max-width: 36rem; }
.section-forest.claybelt-feature .kicker { color: var(--mint-bright); }


/* ——— First-visit boot intro (landing page only) ——— */
.intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  margin: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(208, 248, 219, 0.28), transparent 46%),
    radial-gradient(ellipse at 100% 100%, rgba(32, 95, 74, 0.16), transparent 50%),
    var(--paper);
  color: var(--forest-deep);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
  overflow: hidden;
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/paper-grain.png");
  background-size: 180px 180px;
  opacity: 0.2;
  pointer-events: none;
}
html.has-intro .intro { display: flex; }
html.has-intro body { overflow: hidden; }
.intro-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 0 1.25rem;
}
.intro-cow {
  width: min(78vw, 420px);
  height: auto;
  color: var(--forest-deep);
  overflow: visible;
}
.intro-cow path.draw {
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: intro-draw 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.intro-cow .d1 { animation-delay: 0ms; }
.intro-cow .d2 { animation-delay: 50ms; }
.intro-cow .d3 { animation-delay: 90ms; }
.intro-cow .d4 { animation-delay: 120ms; }
.intro-cow .d5, .intro-cow .d6 { animation-delay: 150ms; }
.intro-cow .d7, .intro-cow .d8 { animation-delay: 190ms; }
.intro-cow .d9 { animation-delay: 230ms; }
.intro-cow .d10 { animation-delay: 260ms; }
.intro-cow .d11, .intro-cow .d12 { animation-delay: 300ms; }
.intro-cow .d13 { animation-delay: 340ms; }
.intro-cow .eye {
  opacity: 0;
  animation: intro-fade 0.3s ease 0.45s forwards;
}
.intro-wordmark {
  display: block;
  width: min(46vw, 200px);
  max-width: 200px; /* native 843 — never upscale */
  height: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: intro-mark 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}
.intro-progress {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 16%;
  height: 2px;
  border-radius: 2px;
  background: rgba(32, 95, 74, 0.16);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.intro-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--forest-deep), var(--forest) 55%, var(--gold));
  animation: intro-bar 1s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
.intro-skip {
  position: absolute;
  z-index: 2;
  bottom: 1.35rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 0;
  color: var(--muted);
  font: 600 0.78rem/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: intro-fade 0.35s ease 0.55s forwards;
}
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
@keyframes intro-mark { to { opacity: 1; transform: none; } }
@keyframes intro-bar { to { transform: scaleX(1); } }
@keyframes intro-fade { to { opacity: 1; } }
@keyframes intro-lift {
  from { transform: translate3d(0, 0, 0); opacity: 1; }
  to { transform: translate3d(0, -100%, 0); opacity: 0; }
}
/* Auto lift at 1.05s so the overlay is gone by 1.5s even if later JS fails */
html.has-intro .intro {
  animation: intro-lift 0.45s cubic-bezier(0.65, 0.05, 0.36, 1) 1.05s forwards;
}
html.has-intro.intro-out .intro {
  animation: intro-lift 0.25s cubic-bezier(0.65, 0.05, 0.36, 1) 0s forwards;
}
@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; animation: none !important; }
  .intro-cow path.draw, .intro-cow .eye, .intro-wordmark, .intro-progress > span, .intro-skip {
    animation: none !important;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* On-site forms: labels above fields, dark type, no cramped rows */
fieldset.field {
  border: 0;
  margin: 0 0 1.2rem;
  padding: 0;
  min-width: 0;
}
fieldset.field legend,
.field label,
.form legend {
  display: block;
  font-weight: 650;
  color: var(--forest-deep);
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0 0 0.4rem;
}
.field { margin: 0 0 1.2rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  box-sizing: border-box;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
}
.choices label {
  font-weight: 550;
  color: var(--ink);
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 0.45rem 0;
  line-height: 1.4;
}
.choices input { flex: none; margin-top: 0.2rem; }
.form .btn-row { margin-top: 0.4rem; }
.payment-note {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.catalogue-intro { overflow-wrap: break-word; }
@media (max-width: 599px) {
  .form { padding: 1.15rem 1rem; }
  .form .btn-row .btn,
  .prose .btn-row .btn { flex: 1 1 100%; width: 100%; }
}

.form-downloads { align-items: center; }
.form-original {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest-deep);
  text-underline-offset: 0.16em;
  padding: 0.4rem 0.15rem;
}
.form-original:hover { color: var(--forest); }
