/* Heritage Architecture Foundation — Editorial Museum design system */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #fdfcf9;
  --ink: #1a1a1a;
  --brick: #8b2b1d;
  --gold: #c0a080;
  --line: #e6e2da;
  --ink-60: #66635e;
  --ink-40: #99948a;
  --dark-bg: #121212;
  --dark-fg: #fdfcf9;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1280px;
  --gut: 28px;
  --section: 160px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

::selection { background: var(--brick); color: var(--bg); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

.wrap-center {
  max-width: 720px;
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gut);
}

section { position: relative; }

.section-pad { padding-top: var(--section); padding-bottom: var(--section); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.02em; }

.display {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
}

.h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1.05; }
.h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.1; font-weight: 400; }
.h3 { font-size: clamp(24px, 2.5vw, 36px); line-height: 1.15; font-weight: 400; }

.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 56ch;
}

p { margin: 0 0 1em; text-wrap: pretty; }
.body-max { max-width: 62ch; }

.label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--brick);
}
.label-muted { color: var(--ink-40); }

.serif-num { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Links ---------- */
a { color: inherit; text-decoration: none; }

.link {
  color: var(--brick);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
  width: fit-content;
}
.link:hover { border-color: var(--brick); }
.link .arr { transition: transform 0.25s ease; }
.link:hover .arr { transform: translateX(3px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--brick); border-color: var(--brick); color: var(--bg); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 249, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(230, 226, 218, 0.5);
  transition: all 0.3s ease;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}
.wordmark .mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--ink);
  position: relative;
  flex: none;
}
.wordmark .mark::after {
  content: "";
  position: absolute;
  inset: 4px 4px auto auto;
  width: 7px; height: 7px;
  background: var(--brick);
  top: 4px; right: 4px;
}
.wordmark small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-40); margin-top: 3px; }
.wordmark .wm-text { line-height: 1; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--brick); transition: right 0.28s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--brick); }
.nav-cta { font-size: 14px !important; }

.nav-burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: 0.25s; }

/* ---------- Placeholder image ---------- */
.ph {
  position: relative;
  background-color: #e3ddd1;
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 11px, rgba(20,20,20,0.05) 11px, rgba(20,20,20,0.05) 12px);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph img.ph-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.ph-tag {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-40);
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.frame { overflow: hidden; border-radius: 2px; }
.frame .ph, .frame img { transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); }
.frame:hover .ph, .frame:hover img { transform: scale(1.05); }

figure { margin: 0; }
.cap {
  margin-top: 12px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-40);
  line-height: 1.5;
}
.cap b { color: var(--ink-60); font-weight: 500; }

/* ---------- Breadcrumb ---------- */
.crumb {
  padding-top: 28px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-40);
  display: flex;
  gap: 10px;
  align-items: center;
}
.crumb a { color: var(--ink-40); border-bottom: 1px solid transparent; }
.crumb a:hover { color: var(--brick); border-color: var(--brick); }
.crumb .sep { color: var(--line); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding-top: 56px; padding-bottom: 64px; border-bottom: 1px solid var(--line); }
.page-head .label { margin-bottom: 18px; }
.page-head h1 { max-width: 20ch; }
.page-head p { color: var(--ink-60); max-width: 56ch; margin-top: 20px; font-size: 18px; line-height: 1.6; }

.hero-banner {
  width: 100%;
  height: 60vh;
  min-height: 400px;
  max-height: 700px;
  position: relative;
  overflow: hidden;
  margin-bottom: 64px;
}
.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 3s ease-out;
}
.hero-banner:hover img {
  transform: scale(1.05);
}
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 60%);
}
.hero-banner .hero-banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px var(--gut);
  max-width: var(--maxw);
  margin: 0 auto;
  z-index: 10;
  color: #fff;
}
.hero-banner .h1 { color: #fff; text-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.hero-banner .label { color: rgba(255,255,255,0.8); text-shadow: 0 2px 4px rgba(0,0,0,0.3); }

/* ---------- Long-form prose (about, etc.) ---------- */
.prose { max-width: 100%; }
.prose h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; margin-top: 80px; margin-bottom: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.18; margin-top: 48px; margin-bottom: 16px; }
.prose p { color: var(--ink-60); line-height: 1.7; }
.prose p.intro { color: var(--ink); font-size: 18px; line-height: 1.55; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 1.4em; color: var(--ink-60); }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 40px 0;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--brick);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- Programme list (programmes page) ---------- */
.prog-section { border-top: 1px solid var(--line); padding: 56px 0; }
.prog-section:last-child { border-bottom: 1px solid var(--line); }
.prog-section .prog-num {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-40);
  margin-bottom: 12px;
  font-variant-numeric: lining-nums tabular-nums;
}
.prog-section h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; margin-bottom: 20px; margin-top: 0; }
.prog-section p { color: var(--ink-60); max-width: 60ch; }
.prog-section .link { margin-top: 24px; }

/* ---------- Programme row (homepage) ---------- */
.prog-list { border-top: 1px solid var(--line); margin-top: 8px; }
.prog-row {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center;
  gap: 28px; padding: 32px 24px; border-bottom: 1px solid var(--line);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 4px;
}
.prog-row:hover { background: #ffffff; box-shadow: 0 12px 40px rgba(0,0,0,0.04); transform: translateY(-2px); border-color: transparent; z-index: 10; position: relative; }
.prog-row .num { font-family: var(--serif); font-size: 24px; color: var(--gold); }
.prog-row .pt { display: block; font-family: var(--serif); font-size: clamp(24px,2.6vw,34px); line-height: 1.1; }
.prog-row .pd { display: block; color: var(--ink-60); font-size: 16px; margin-top: 8px; max-width: 60ch; }
.prog-row .pa { color: var(--brick); font-size: 22px; transition: transform 0.3s ease; opacity: 0; transform: translateX(-10px); }
.prog-row:hover .pa { opacity: 1; transform: translateX(5px); }

/* ---------- Walk listing ---------- */
.walk-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.walk-meta { display: flex; flex-direction: column; gap: 4px; }
.walk-meta .walk-city { font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.walk-meta .walk-date { font-size: 13px; color: var(--ink-40); letter-spacing: 0.04em; text-transform: uppercase; }
.walk-body .walk-title { font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); line-height: 1.15; margin-bottom: 8px; }
.walk-body p { color: var(--ink-60); font-size: 15px; max-width: 52ch; margin: 0; }
.walk-action { align-self: center; }

.walk-past { opacity: 0.55; }
.walk-past .walk-row { border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }

/* ---------- Research listing ---------- */
.research-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.research-filters button {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-60);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.research-filters button:hover { border-color: var(--ink); color: var(--ink); }
.research-filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.research-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 40px 24px;
  border-bottom: 1px solid var(--line);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 4px;
}
.research-row:hover { background: #ffffff; box-shadow: 0 12px 40px rgba(0,0,0,0.04); transform: translateY(-2px); border-color: transparent; }
.research-row .r-type {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.research-row .r-title { font-family: var(--serif); font-size: clamp(24px, 2.5vw, 32px); line-height: 1.15; margin-bottom: 12px; transition: color 0.3s; }
.research-row:hover .r-title { color: var(--brick); }
.research-row .r-desc { color: var(--ink-60); font-size: 16px; max-width: 60ch; margin: 0; line-height: 1.6; }
.research-row .r-date { font-size: 13px; color: var(--ink-40); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; padding-top: 4px; font-weight: 500; }

/* ---------- Support page ---------- */
.support-method { padding: 56px 0; border-bottom: 1px solid var(--line); }
.support-method:first-child { border-top: 1px solid var(--line); }
.support-method h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; margin-bottom: 20px; margin-top: 0; }
.support-method p { color: var(--ink-60); max-width: 60ch; }
.support-method .link { margin-top: 20px; }

/* ---------- Contact block ---------- */
.contact-block { margin-top: 48px; padding: 40px; background: #f3efe7; border: 1px solid var(--line); }
.contact-block h3 { font-family: var(--sans); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-40); font-weight: 500; margin-bottom: 16px; }
.contact-block p { margin: 0 0 8px; font-size: 15px; color: var(--ink-60); }
.contact-block a { color: var(--brick); border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.contact-block a:hover { border-color: var(--brick); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 72px 0 40px;
  margin-top: var(--section);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 40px;
}
.foot h4 { font-family: var(--sans); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-40); font-weight: 500; margin-bottom: 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 9px; }
.foot a { font-size: 14.5px; border-bottom: 1px solid transparent; transition: border-color .25s; }
.foot a:hover { border-color: var(--ink); }
.foot .legal { font-size: 12.5px; color: var(--ink-40); line-height: 1.6; }
.foot-bottom {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px;
  font-size: 12px; color: var(--ink-40); letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- Motion ---------- */
@keyframes revealUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.anim .reveal { opacity: 0; }
.anim .reveal.in { animation: revealUp 0.7s cubic-bezier(.2,.7,.2,1) both; }
.anim .reveal.d1.in { animation-delay: 0.09s; }
.anim .reveal.d2.in { animation-delay: 0.18s; }
.anim .reveal.d3.in { animation-delay: 0.27s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal, .anim .reveal { opacity: 1 !important; transform: none !important; }
  .hero-img .ph { transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --section: 88px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 20px var(--gut); gap: 18px;
  }
  .page-head { padding-top: 36px; padding-bottom: 48px; }
  .walk-row { grid-template-columns: 1fr; gap: 12px; }
  .walk-action { justify-self: start; }
  .research-row { grid-template-columns: 1fr; gap: 8px; }
  .research-row .r-date { padding-top: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 8px; }
  .prog-row { grid-template-columns: 40px 1fr auto; gap: 16px; padding: 22px 6px; }
}
