/* ==========================================================================
   VETUNIVER · Heritage of the Lviv Veterinary School
   Design tokens, layout primitives, components
   ========================================================================== */

:root {
  --night: #050b1a;
  --night-2: #0a1428;
  --ink: #0d1b35;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --gold: #d4a843;
  --gold-light: #fbbf24;
  --paper: #f2ede4;
  --paper-2: #e8e0d0;
  --paper-ink: #1a1208;

  --fg: #ffffff;
  --fg-70: rgba(255, 255, 255, 0.7);
  --fg-50: rgba(255, 255, 255, 0.5);
  --fg-35: rgba(255, 255, 255, 0.35);
  --fg-20: rgba(255, 255, 255, 0.2);
  --line: rgba(255, 255, 255, 0.08);
  --line-gold: rgba(212, 168, 67, 0.25);

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-serif: 'Noto Serif Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius: 1.25rem;
  --radius-paper: 0 3.5rem 0 3.5rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --max: 1320px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-display);
  font-weight: 300;
  background: var(--night);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 700; }

.serif { font-family: var(--font-serif); }
.mono  { font-family: var(--font-mono); }

/* Skip link */
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--gold); color: var(--paper-ink); padding: .5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------------------
   Typography primitives
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue-light);
  display: block;
}
.eyebrow--gold { color: var(--gold); }
.eyebrow--dim  { color: var(--fg-35); }
.eyebrow--ink  { color: rgba(26, 18, 8, 0.45); }

.h-section {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  margin-top: .75rem;
}
.h-section em {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  color: var(--fg-35);
  font-size: 0.85em;
}

.lead { font-size: .95rem; color: var(--fg-50); max-width: 34rem; line-height: 1.75; }
.small { font-size: .78rem; line-height: 1.7; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { position: relative; z-index: 1; padding-block: var(--section-y); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }

.grid { display: grid; gap: 1.5rem; }
.grid-12 { grid-template-columns: repeat(12, 1fr); }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.card--gold { background: rgba(212, 168, 67, 0.06); border-color: var(--line-gold); }
.card--gold:hover { border-color: rgba(212, 168, 67, 0.45); }
.card--accent-blue { border-left: 3px solid var(--blue); }
.card--accent-gold { border-left: 3px solid var(--gold); }
.card h3 { font-size: .95rem; font-weight: 700; text-transform: uppercase; line-height: 1.25; margin: .25rem 0 .75rem; }
.card p { font-size: .8rem; line-height: 1.7; color: var(--fg-50); }

.paper {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: var(--radius-paper);
  padding: clamp(2rem, 4vw, 4rem);
}
.paper p { color: rgba(26, 18, 8, 0.72); }
.paper .h-section em { color: rgba(26, 18, 8, 0.45); }

.icon-ring {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(37, 99, 235, 0.15); border: 1px solid rgba(37, 99, 235, 0.35);
}
.icon-ring--gold { background: rgba(212, 168, 67, 0.12); border-color: rgba(212, 168, 67, 0.3); }
.icon-ring--dim  { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.6rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--gold); color: var(--paper-ink); transform: translateY(-2px); }
.btn--ghost { border-color: transparent; color: var(--fg-50); padding-inline: 0; }
.btn--ghost::before { content: ''; width: 1.5rem; height: 1px; background: var(--fg-35); }
.btn--ghost:hover { background: transparent; color: var(--fg); transform: none; }

.tag {
  display: inline-block; flex-shrink: 0;
  padding: .45rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--fg-35);
}
.tag--gold { border-color: var(--line-gold); color: var(--gold); }

.stat-num { font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1; }

.gold-line { width: 1px; height: 5rem; background: linear-gradient(to bottom, transparent, var(--gold), transparent); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(5, 11, 26, 0.65);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; padding-block: 1rem; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand__meta { font-family: var(--font-mono); font-size: 9px; letter-spacing: .5em; color: var(--blue-light); margin-bottom: .2rem; }
.brand__name { font-weight: 700; text-transform: uppercase; font-size: 1rem; letter-spacing: -0.01em; }
.brand__name span { color: var(--gold); }

.nav { display: flex; gap: 2.25rem; align-items: center; }
.nav a { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-50); transition: color .2s; }
.nav a:hover, .nav a.is-active { color: var(--gold-light); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; width: 2.5rem; height: 2.5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 16px; height: 1px; background: currentColor; margin: 3px auto; transition: transform .25s; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 7.5rem; padding-bottom: 4rem;
  position: relative; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 40% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 40% 50%, #000 30%, transparent 75%);
}
.hero__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 55% 40%;
  filter: saturate(.7) contrast(1.05);
  animation: hero-photo 1.6s var(--ease) both;
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5,11,26,.92) 0%, rgba(5,11,26,.72) 35%, rgba(5,11,26,.3) 65%, rgba(5,11,26,.12) 100%),
    linear-gradient(180deg, rgba(5,11,26,.6) 0%, rgba(5,11,26,.05) 35%, rgba(5,11,26,.25) 70%, var(--night) 100%);
}
.hero__shade::after { /* subtle blue tint over the photo */
  content: ''; position: absolute; inset: 0; background: rgba(13,27,53,.22); mix-blend-mode: multiply;
}
@keyframes hero-photo { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.hero__orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.hero__orb--blue { top: 10%; right: -10%; width: 40vw; height: 40vw; background: radial-gradient(circle, rgba(37,99,235,.10), transparent 70%); }
.hero__orb--gold { bottom: -5%; left: -5%; width: 30vw; height: 30vw; background: radial-gradient(circle, rgba(212,168,67,.09), transparent 70%); }

.hero .wrap { position: relative; z-index: 1; }
.hero__grid-layout { display: grid; grid-template-columns: 7fr 5fr; gap: 3rem; align-items: center; }

.hero h1 {
  font-size: clamp(3rem, 8.5vw, 7rem);
  font-weight: 700; text-transform: uppercase; line-height: .92;
  letter-spacing: -0.01em;
}
.hero h1 em { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 300; text-transform: none; color: var(--gold); font-size: .82em; line-height: 1.15; }
.hero h1 .accent { color: var(--blue-light); }
.hero__lead { margin-top: 2.25rem; }
.hero__actions { margin-top: 2.25rem; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }

.hero__aside { display: flex; flex-direction: column; gap: 1rem; }
.stat-row { display: flex; gap: 1.5rem; align-items: flex-end; }
.stat-row .divider { width: 1px; align-self: stretch; background: var(--line); }
.stat-row .label { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--fg-35); margin-top: .4rem; }
.pulse { width: .5rem; height: .5rem; border-radius: 50%; background: var(--blue); display: inline-block; margin-bottom: 1rem; animation: pulse 2.5s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.5); }
  70% { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

.hero__tags { margin-top: 3.5rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* Hero entrance */
.hero .rise { animation: rise .9s var(--ease) both; }
.hero .rise:nth-child(2) { animation-delay: .1s; }
.hero .rise:nth-child(3) { animation-delay: .2s; }
.hero .rise:nth-child(4) { animation-delay: .3s; }
.hero__aside .card { animation: rise .9s var(--ease) both; animation-delay: .35s; }
.hero__aside .card + .card { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Gallery (replaces the old marquee)
   -------------------------------------------------------------------------- */
.gallery { padding-block: 0 var(--section-y); }
.gallery__grid { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 280px 280px; gap: 1rem; }
.gallery__grid figure:first-child { grid-row: span 2; }
.gallery figure {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(37,99,235,.12), transparent 50%),
    linear-gradient(315deg, rgba(212,168,67,.12), transparent 50%),
    var(--night-2);
}
.gallery img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to top, rgba(5,11,26,.92), transparent);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-70);
  display: flex; justify-content: space-between; gap: 1rem;
}
.gallery figcaption .mono { color: var(--gold); }

/* --------------------------------------------------------------------------
   History feature
   -------------------------------------------------------------------------- */
.history .paper h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.12; margin: 1rem 0 2.25rem; }
.history__cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; }
.history__cols p { font-size: .88rem; line-height: 1.8; margin-bottom: 1.25rem; }
.history__facts { border-left: 1px solid rgba(0,0,0,.1); padding-left: 2rem; display: flex; flex-direction: column; gap: 1.75rem; }
.history__facts .num { display: block; font-size: 2.6rem; font-weight: 700; line-height: 1; }
.history__facts .num--serif { font-family: var(--font-serif); font-style: italic; font-weight: 300; color: var(--gold); font-size: 3.6rem; }
.history__facts .num--blue { color: #1d4ed8; }
.history__facts .cap { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .55; margin-top: .35rem; display: block; }
.history__side { display: flex; flex-direction: column; gap: 1.5rem; }

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */
.figure-card { display: flex; flex-direction: column; min-height: 100%; }
.figure-card .years { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; display: block; margin-bottom: .5rem; color: var(--blue-light); }
.figure-card .name { font-family: var(--font-serif); font-size: 1.7rem; line-height: 1.15; font-weight: 300; text-transform: none; margin: 0 0 1.25rem; }
.figure-card .name strong { font-weight: 700; }
.figure-card p { flex: 0; font-size: .8rem; line-height: 1.7; }
.figure-card .role { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-35); }
.figure-card.paper { border-radius: 0 2.5rem 0 2.5rem; padding: 2rem; }
.figure-card.paper .years { color: rgba(26,18,8,.45); }
.figure-card.paper .role { border-color: rgba(0,0,0,.1); color: rgba(26,18,8,.45); }
.figure-card.paper:hover { transform: translateY(-4px); }
.figure-card.paper { transition: transform .35s var(--ease); }
.monogram { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--gold); color: var(--paper-ink); display: grid; place-items: center; font-size: .7rem; font-weight: 700; margin-bottom: 1.25rem; }

/* --------------------------------------------------------------------------
   Quote
   -------------------------------------------------------------------------- */
.quote { display: flex; flex-direction: column; align-items: center; text-align: center; }
.quote blockquote { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: clamp(1.25rem, 2.8vw, 1.9rem); line-height: 1.5; max-width: 46rem; color: var(--fg-70); margin-block: 2.5rem; }
.quote cite { font-style: normal; font-family: var(--font-mono); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--fg-35); }

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline { position: relative; max-width: 58rem; margin-inline: auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(212,168,67,.6) 15%, rgba(212,168,67,.6) 85%, transparent); }
.tl-item { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-block: 1rem; position: relative; }
.tl-item::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--gold);
  transform: translate(-50%, -50%); box-shadow: 0 0 16px rgba(212,168,67,.7); }
.tl-item .year { font-family: var(--font-mono); font-size: 2.2rem; font-weight: 700; color: var(--gold); line-height: 1; }
.tl-item:nth-child(even) .year { color: var(--blue-light); }
.tl-item h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; margin-top: .5rem; }
.tl-item p { font-size: .78rem; color: var(--fg-50); line-height: 1.7; margin-top: .5rem; }
.tl-item:nth-child(odd) .tl-body { text-align: right; padding-right: 1rem; }
.tl-item:nth-child(even) .tl-body { grid-column: 2; padding-left: 1rem; }

/* --------------------------------------------------------------------------
   Location / trust
   -------------------------------------------------------------------------- */
.location .paper h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.2; margin: 1.25rem 0 1.5rem; }
.location__stats { display: flex; gap: 1.5rem; margin-top: 2rem; }
.location__stats .divider { width: 1px; background: rgba(0,0,0,.1); }
.location__stats .num { font-size: 1.6rem; font-weight: 700; }
.location__stats .cap { display: block; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; opacity: .45; margin-top: .25rem; }
.trust-list { display: flex; flex-direction: column; gap: 1rem; }
.trust { display: flex; gap: 1.5rem; align-items: center; }
.trust h3 { margin: 0 0 .3rem; }
.map-link { display: inline-flex; gap: .5rem; align-items: center; margin-top: 1.5rem; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #1d4ed8; border-bottom: 1px solid currentColor; padding-bottom: .2rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding-block: 3.5rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 2.5rem; align-items: end; }
.site-footer .center { text-align: center; }
.site-footer .center p { font-family: var(--font-mono); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--fg-20); }
.site-footer .center .note { font-family: var(--font-display); letter-spacing: 0; text-transform: none; font-size: 10px; max-width: 22rem; margin: .75rem auto 0; line-height: 1.6; color: var(--fg-35); }
.site-footer .center .note a { color: var(--fg-50); border-bottom: 1px solid var(--fg-20); }
.site-footer .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; }
.footer-nav { display: flex; gap: 1rem 1.75rem; flex-wrap: wrap; }
.footer-nav a { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--blue-light); }
.footer-nav a:hover { color: var(--fg); }
.site-footer .addr { font-size: 10px; color: var(--fg-35); }
.dots { display: flex; gap: .6rem; margin-top: 1rem; }
.dots i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--blue); }
.dots i + i { background: var(--gold); }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-page { min-height: 100svh; display: grid; place-items: center; padding: 8rem var(--gutter) 4rem; text-align: center; position: relative; z-index: 1; }
.error-page .code { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: clamp(6rem, 20vw, 14rem); line-height: 1; color: var(--gold); }
.error-page h1 { font-size: clamp(1.2rem, 3vw, 1.8rem); text-transform: uppercase; font-weight: 700; margin-top: 1rem; }
.error-page p { margin: 1.25rem auto 2rem; }
.error-page .links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 220px; }
  .gallery__grid figure:first-child { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 860px) {
  .hero__photo { object-position: 60% 30%; }
  .hero__shade { background: linear-gradient(180deg, rgba(5,11,26,.9) 0%, rgba(5,11,26,.8) 45%, rgba(5,11,26,.9) 80%, var(--night) 100%); }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(5,11,26,.96); border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .nav.is-open { display: flex; }
  .nav a { padding: 1rem var(--gutter); width: 100%; }
  .nav-toggle { display: block; }
  .nav.is-open + .nav-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav.is-open + .nav-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  .hero__grid-layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding-top: 6.5rem; }
  .col-4, .col-5, .col-7, .col-8 { grid-column: span 12; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .history__cols { grid-template-columns: 1fr; }
  .history__facts { border-left: 0; padding-left: 0; border-top: 1px solid rgba(0,0,0,.1); padding-top: 1.5rem; flex-direction: row; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
  .paper { border-radius: 0 2rem 0 2rem; }

  .timeline::before { left: 6px; }
  .tl-item { grid-template-columns: 1fr; gap: 0; padding-left: 2rem; }
  .tl-item::after { left: 6px; top: 2.4rem; }
  .tl-item:nth-child(odd) .tl-body { text-align: left; padding-right: 0; }
  .tl-item:nth-child(even) .tl-body { grid-column: 1; padding-left: 0; }
  .tl-item .year { font-size: 1.7rem; }

  .site-footer .wrap { grid-template-columns: 1fr; text-align: left; }
  .site-footer .center, .site-footer .right { text-align: left; align-items: flex-start; }
  .site-footer .center .note { margin-inline: 0; }
}

@media (max-width: 560px) {
  .cards-4 { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; grid-template-rows: 220px 200px 200px; }
  .gallery__grid figure:first-child { grid-column: auto; }
  .stat-row { flex-wrap: wrap; }
  .card, .figure-card.paper { padding: 1.5rem; }
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-hero { padding: 9rem 0 3.5rem; position: relative; z-index: 1; overflow: hidden; }
.page-hero .hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 700; text-transform: uppercase; line-height: 1.02; margin-top: .75rem; max-width: 20ch; }
.page-hero h1 em { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 300; text-transform: none; color: var(--gold); font-size: .8em; line-height: 1.2; }
.page-hero .lead { margin-top: 1.5rem; max-width: 40rem; }

.breadcrumbs { display: flex; gap: .6rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-35); margin-bottom: 1.5rem; }
.breadcrumbs a { color: var(--blue-light); }
.breadcrumbs a:hover { color: var(--gold-light); }
.breadcrumbs li + li::before { content: '/'; margin-right: .6rem; color: var(--fg-20); }
.breadcrumbs li { display: flex; }

.page-body { position: relative; z-index: 1; padding-bottom: var(--section-y); }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2.5rem; align-items: start; }
.page-side { position: sticky; top: 6.5rem; display: flex; flex-direction: column; gap: 1.25rem; }

.toc { padding: 1.5rem; }
.toc h2 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.toc a { display: block; padding: .45rem 0; font-size: .74rem; color: var(--fg-50); border-bottom: 1px solid var(--line); line-height: 1.4; }
.toc a:last-child { border-bottom: 0; }
.toc a:hover { color: var(--gold-light); }

.prose { font-size: .95rem; line-height: 1.85; }
.prose.paper { color: var(--paper-ink); }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin: 2.75rem 0 1rem; scroll-margin-top: 6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 2rem 0 .75rem; scroll-margin-top: 6rem; }
.prose p { margin-bottom: 1.1rem; }
.prose.paper p { color: rgba(26,18,8,.78); }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .4rem; padding-left: .25rem; }
.prose li::marker { color: var(--gold); }
.prose a { color: #1d4ed8; border-bottom: 1px solid rgba(29,78,216,.3); }
.prose a:hover { border-color: currentColor; }
.prose blockquote { margin: 1.75rem 0; padding: 1.25rem 1.5rem; border-left: 3px solid var(--gold); background: rgba(212,168,67,.08); font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 1.6; }
.prose .callout { margin: 1.75rem 0; padding: 1.25rem 1.5rem; border-radius: var(--radius); background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.2); font-size: .85rem; }
.prose .callout strong { color: #1d4ed8; }
.prose figure { margin: 2rem 0; }
.prose figcaption { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; margin-top: .6rem; }

.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 1.25rem 0 1.75rem; }
.data-table th, .data-table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid rgba(0,0,0,.1); vertical-align: top; }
.data-table th { font-family: var(--font-mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; opacity: .55; font-weight: 400; }
.data-table td:first-child { font-weight: 700; white-space: nowrap; }
.data-table .code { font-family: var(--font-mono); font-size: .78rem; color: #1d4ed8; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.dl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.dl-stats div { border-top: 1px solid rgba(0,0,0,.12); padding-top: .75rem; }
.dl-stats dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; opacity: .55; }
.dl-stats dd { font-size: 1.5rem; font-weight: 700; line-height: 1.1; margin-top: .25rem; }
.dl-stats dd.serif { font-family: var(--font-serif); font-style: italic; font-weight: 300; color: var(--gold); font-size: 1.9rem; }

.faq details { border-bottom: 1px solid rgba(0,0,0,.1); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: .88rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); color: var(--gold); flex-shrink: 0; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: .75rem 0 0; font-size: .86rem; }

.contact-card { display: flex; flex-direction: column; gap: .4rem; }
.contact-card .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-35); }
.contact-card .v { font-size: .95rem; font-weight: 400; color: var(--fg); }
.contact-card .v a { border-bottom: 1px solid var(--line-gold); color: var(--gold-light); }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--night-2); aspect-ratio: 16 / 9; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.4) contrast(1.05); }

.related { padding-block: 0 var(--section-y); position: relative; z-index: 1; }
.related h2 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem; }
.related a.card { display: block; }
.related a.card h3 { font-size: .85rem; margin-bottom: .4rem; }
.related a.card:hover h3 { color: var(--gold-light); }

.museum-card { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.museum-card .meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; }

.timeline--compact .tl-item { padding-block: .6rem; }

.nav a.nav__link--pages { color: var(--gold); }

@media (max-width: 1024px) {
  .page-layout { grid-template-columns: minmax(0, 1fr); }
  .page-side { position: static; }
  .page-side > * { min-width: 0; }
}
@media (max-width: 560px) {
  .prose { font-size: .9rem; }
  .prose.paper { padding: 1.5rem; border-radius: 0 1.5rem 0 1.5rem; }
  .data-table td:first-child { white-space: normal; }
}
