/* =========================================================
   Ijaz Batalvi Memorial Site
   Global Stylesheet, Heritage Gold Palette
   ========================================================= */

:root {
  /* Deep archival browns */
  --navy-900: #20160c;
  --navy-800: #2d1f10;
  --navy-700: #422e17;
  --navy-600: #5a411f;
  --navy-500: #73552a;

  /* Paper / cream backgrounds */
  --cream-50:  #f2e0c8;
  --cream-100: #ead8c0;
  --cream-200: #d8c7aa;
  --cream-300: #b9a179;

  /* Antique gold scale */
  --gold-100: #B1843B;
  --gold-200: #B1843B;
  --gold-300: #B1843B;
  --gold-400: #B1843B;
  --gold-500: #B1843B;
  --gold-600: #8e672d;
  --gold-700: #63451f;
  --gold-rgb: 177, 132, 59;

  /* Ink / text */
  --ink-900: #141312;
  --ink-700: #302d29;
  --ink-500: #625b52;
  --ink-300: #90877b;

  /* Paper surfaces */
  --paper-bg: #f2e0c8;
  --paper-card: #f2e0c8;
  --paper-muted: #ead8c0;
  --paper-thumb: #f1eadf;
  --chrome-bg: rgba(16, 24, 22, 0.97);

  /* Restrained heritage accent, use sparingly */
  --russet-600: #7a3f2b;
  --russet-700: #5c2d20;

  /* Dividers */
  --line: rgba(111, 77, 38, 0.2);

  /* Typography */
  --font-serif:   Georgia, 'Times New Roman', serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body:    Georgia, 'Times New Roman', serif;
  --font-urdu:    'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Alvi Nastaleeq', serif;

  /* Layout */
  --container:        1180px;
  --container-narrow:  820px;
  --radius:    4px;
  --shadow-sm: 0 2px 8px rgba(22, 19, 15, 0.08);
  --shadow-md: 0 10px 30px rgba(22, 19, 15, 0.16);
  --shadow-lg: 0 24px 60px rgba(22, 19, 15, 0.28);
  --transition: 0.24s ease;
}

/* =========================================================
   Reset & 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-body);
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ink-700);
  background: var(--paper-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-700);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--gold-500);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.2;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--navy-800);
  border-left: 3px solid var(--gold-500);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 1.5rem 0;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 3rem auto;
  max-width: 120px;
}

/* =========================================================
   Layout helpers
   ========================================================= */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title .eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.6rem;
}

.section-title h2 {
  margin-bottom: 0.75rem;
}

.section-title .lede {
  color: var(--ink-500);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.divider {
  width: 80px;
  height: 2px;
  background: var(--gold-500);
  margin: 0.85rem auto;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--gold-500);
  border-radius: 50%;
  transform: translateY(-50%);
}

.divider::before { left: -14px; }
.divider::after  { right: -14px; }

/* =========================================================
   Header & Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--chrome-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.1;
  color: var(--cream-100);
  text-decoration: none;
  transition: color var(--transition);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: max-content;
}

.brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
  transition: color var(--transition);
}

.brand .brand-years {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold-300);
  text-transform: uppercase;
  margin-top: 2px;
}

.brand:hover {
  color: var(--gold-300);
}

.brand-signature {
  display: block;
  width: clamp(78px, 7.8vw, 122px);
  height: auto;
  max-height: 2.3rem;
  object-fit: contain;
  opacity: 0.98;
  filter: brightness(0) saturate(100%) invert(87%) sepia(12%) saturate(399%) hue-rotate(354deg) brightness(102%) contrast(89%);
  transition: filter var(--transition), opacity var(--transition);
}

.brand:hover .brand-signature {
  filter: brightness(0) saturate(100%) invert(56%) sepia(38%) saturate(657%) hue-rotate(359deg) brightness(88%) contrast(91%);
  opacity: 1;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a,
.nav-menu > li > button {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-100);
  padding: 0.75rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  border-radius: var(--radius);
}

.nav-menu > li > a:hover,
.nav-menu > li > button:hover,
.nav-menu > li.open > button,
.nav-menu a[aria-current="page"],
.nav-menu > li > button[aria-current="page"] {
  color: var(--gold-300);
}

.nav-menu a[aria-current="page"],
.nav-menu > li > button[aria-current="page"] {
  background: rgba(var(--gold-rgb), 0.12);
}

.nav-menu a:focus-visible,
.nav-menu button:focus-visible,
.btn:focus-visible,
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

.nav-menu > li > button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
}

.nav-menu > li.open > button::after {
  transform: rotate(-135deg) translateY(-2px);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 230px;
  background: var(--navy-800);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition);
}

.nav-menu > li.open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Desktop hover/focus opens dropdowns (no click needed) */
@media (hover: hover) and (min-width: 761px) {
  .nav-menu > li:hover .dropdown,
  .nav-menu > li:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav-menu > li:hover > button,
  .nav-menu > li:focus-within > button {
    color: var(--gold-300);
  }

  .nav-menu > li:hover > button::after,
  .nav-menu > li:focus-within > button::after {
    transform: rotate(-135deg) translateY(-2px);
  }
}

.dropdown a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-100);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.dropdown a:hover {
  color: var(--gold-400);
  background: var(--navy-700);
  border-left-color: var(--gold-500);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  color: var(--cream-100);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top:  6px; }

body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: calc(108vh - 78px);
  display: flex;
  align-items: center;
  padding: 0;
  background:
    radial-gradient(ellipse 78% 70% at 78% 18%, rgba(var(--gold-rgb), 0.18) 0%, transparent 62%),
    radial-gradient(ellipse 64% 60% at 12% 24%, rgba(111, 70, 25, 0.42) 0%, transparent 72%),
    linear-gradient(160deg, #211508 0%, #302109 48%, #1c1107 100%);
  color: var(--cream-100);
  overflow: hidden;
}

/* Subtle grain vignette, no longer needed for text legibility */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(14, 8, 3, 0.55) 100%);
  pointer-events: none;
}

/* Thin decorative gold rule on left edge */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(var(--gold-rgb), 0.45) 30%, rgba(var(--gold-rgb), 0.45) 70%, transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(600px, 1.28fr);
  gap: clamp(1.25rem, 2.6vw, 2.75rem);
  align-items: center;
  min-height: auto;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(0.9rem, 2vh, 1.6rem) clamp(1.5rem, 4vw, 4rem) clamp(1.4rem, 3vh, 2.4rem);
  width: 100%;
}

.hero-text {
  position: relative;
  z-index: 3;
  max-width: 560px;
  padding-top: 0;
}

.hero-text .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 0.8rem;
}

.hero-text .eyebrow::before,
.hero-text .eyebrow::after {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.58));
  opacity: 0.76;
}

.hero-text .eyebrow::after {
  background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.58), transparent);
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3vw, 2.7rem);
  color: var(--gold-200);
  margin-bottom: 0.55rem;
  font-weight: 600;
  line-height: 1.05;
}

.hero-name {
  display: block;
  white-space: nowrap;
}

.hero-text h1 em {
  display: block;
  font-size: 0.48em;
  font-style: italic;
  color: var(--gold-300);
  font-weight: 400;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

.hero-years {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold-300);
  margin-bottom: 1.2rem;
  letter-spacing: 0.1em;
}

.hero-tagline {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--cream-200);
  max-width: 500px;
  margin-bottom: 1.55rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gold-500);
  color: var(--cream-50);
  border-color: var(--gold-500);
}

.btn-primary:hover {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: var(--cream-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--cream-100);
  border-color: rgba(245, 236, 215, 0.4);
}

.btn-ghost:hover {
  border-color: var(--gold-400);
  color: var(--gold-400);
  transform: translateY(-2px);
}

.page-content .btn-ghost {
  color: var(--navy-800);
  border-color: rgba(96, 70, 33, 0.28);
}

.page-content .btn-ghost:hover {
  color: var(--gold-600);
  border-color: var(--gold-500);
}

/* --- Diptych art column --- */
.hero-art {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: auto;
  width: 100%;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: -8% -6% -12%;
  z-index: -1;
  background: radial-gradient(ellipse 72% 66% at 52% 50%, rgba(var(--gold-rgb), 0.16), transparent 68%);
  pointer-events: none;
}

.hero-diptych {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.8fr);
  gap: 0;
  width: 100%;
  max-width: 860px;
  height: auto;
  overflow: visible;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.hero-portrait,
.hero-poem {
  position: relative;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  box-shadow: none;
}

.hero-portrait {
  background: transparent;
  justify-content: center;
}

.hero-media-link {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  color: var(--cream-100);
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
  outline-offset: 6px;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.hero-media-link::after {
  content: attr(data-hover-label);
  position: absolute;
  left: clamp(0.45rem, 1vw, 0.8rem);
  bottom: clamp(0.5rem, 1.3vw, 1rem);
  z-index: 1;
  padding: 0.34rem 0.5rem;
  background: rgba(32, 22, 12, 0.74);
  border: 1px solid rgba(var(--gold-rgb), 0.45);
  color: var(--cream-100);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.hero-media-link:hover,
.hero-media-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.hero-media-link:hover::after,
.hero-media-link:focus-visible::after {
  opacity: 1;
}

.hero-portrait img {
  width: 100%;
  height: auto;
  max-height: min(68vh, 610px);
  object-fit: contain;
  object-position: top center;
  display: block;
  filter: sepia(0.1) saturate(1.12) contrast(1.04) brightness(0.97);
  transition: filter 0.6s ease;
}

.hero-portrait .hero-media-link:hover img,
.hero-portrait .hero-media-link:focus-visible img {
  filter: sepia(0.06) saturate(1.15) contrast(1.06) brightness(1);
}

.hero-poem {
  background: transparent;
  justify-content: center;
  margin-left: 0;
  z-index: 2;
  overflow: visible;
}

.hero-poem img {
  width: 100%;
  height: auto;
  max-height: min(68vh, 610px);
  object-fit: contain;
  object-position: center center;
  display: block;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 0 0.45px rgba(227, 180, 96, 0.45));
  opacity: 0.94;
  transition: filter 0.6s ease;
}

.hero-poem .hero-media-link:hover img,
.hero-poem .hero-media-link:focus-visible img {
  filter: drop-shadow(0 0 0.55px rgba(227, 180, 96, 0.55)) contrast(1.06);
}

/* =========================================================
   About block
   ========================================================= */

.about {
  background: var(--paper-bg);
  position: relative;
}

.about-inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.about-inner p {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--ink-700);
  margin-bottom: 1.5rem;
}

.about-inner p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin: 0.5rem 0.5rem 0 0;
  color: var(--gold-500);
}

.signature {
  display: block;
  margin: 1rem auto 0;
  max-width: 310px;
  width: min(68vw, 310px);
  opacity: 0.82;
}

/* =========================================================
   Sections grid (explore)
   ========================================================= */

.explore {
  background: var(--navy-900);
  color: var(--cream-100);
  position: relative;
}

.explore::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(var(--gold-rgb), 0.10), transparent 70%);
  pointer-events: none;
}

.explore .section-title h2 {
  color: var(--gold-400);
}

.explore .section-title .lede {
  color: var(--cream-200);
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  position: relative;
}

.explore-card {
  background: var(--navy-800);
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: var(--radius);
  padding: 1.35rem 1rem;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.explore-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.explore-card:hover {
  background: var(--navy-700);
  transform: translateY(-4px);
  border-color: rgba(var(--gold-rgb), 0.4);
  box-shadow: var(--shadow-md);
}

.explore-card:hover::before {
  transform: scaleX(1);
}

.explore-card .num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-style: normal;
  color: var(--gold-400);
  margin-bottom: 0.35rem;
}

.explore-card h3 {
  font-size: 1.1rem;
  color: var(--gold-400);
  margin-bottom: 0.45rem;
}

.explore-card p {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--cream-200);
  margin-bottom: 0.8rem;
}

.explore-card .more {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.explore-card .more::after {
  content: "→";
  transition: transform var(--transition);
}

.explore-card:hover .more::after {
  transform: translateX(4px);
}

/* =========================================================
   Featured cases
   ========================================================= */

.featured {
  background: var(--paper-muted);
  position: relative;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.case-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-500);
}

.case-card .year {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--gold-600);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.case-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.case-card p {
  font-size: 0.95rem;
  color: var(--ink-500);
  line-height: 1.65;
}

/* =========================================================
   Quote block
   ========================================================= */

.quote-section {
  background: linear-gradient(rgba(26, 15, 4, 0.88), rgba(26, 15, 4, 0.93));
  color: var(--cream-100);
  text-align: center;
  padding: 3.5rem 1.5rem;
  position: relative;
}

.quote-section::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 1;
  color: var(--gold-500);
  opacity: 0.2;
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.quote-section blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  line-height: 1.5;
  font-style: italic;
  color: var(--cream-50);
  max-width: 720px;
  margin: 0 auto 1.25rem;
  border: none;
  padding: 0;
  position: relative;
}

.quote-section cite {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-400);
  font-style: normal;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--chrome-bg);
  color: var(--cream-200);
  padding: 1.45rem 0 1rem;
  border-top: 1px solid rgba(var(--gold-rgb), 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(5, minmax(90px, 0.6fr));
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.2rem;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.16rem;
  color: var(--gold-300);
  margin-bottom: 0.15rem;
}

.footer-brand-link {
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.footer-signature {
  display: block;
  width: clamp(92px, 9vw, 132px);
  height: auto;
  margin: 0.1rem 0 0.25rem;
  opacity: 0.86;
  transition: filter var(--transition), opacity var(--transition);
}

.footer-brand-link:hover h3,
.footer-brand-link:hover .years {
  color: var(--cream-100);
}

.footer-brand-link:hover .footer-signature {
  filter: brightness(0) saturate(100%) invert(94%) sepia(10%) saturate(359%) hue-rotate(357deg) brightness(103%) contrast(94%);
  opacity: 1;
}

.footer-brand .years {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  color: var(--gold-300);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  display: block;
}

.footer-brand p {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--cream-300);
  opacity: 0.85;
  max-width: 18rem;
}

.footer-brand p span {
  display: block;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 0.35rem;
}

.footer-heading-link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

.footer-heading-link:hover {
  color: var(--cream-100);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.22rem;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--cream-200);
}

.footer-col a:hover {
  color: var(--gold-200);
}

.footer-bottom {
  max-width: var(--container);
  margin: 1rem auto 0;
  padding: 0.7rem 1.2rem 0;
  border-top: 1px solid rgba(var(--gold-rgb), 0.15);
  text-align: center;
  font-size: 0.78rem;
  color: var(--cream-300);
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--gold-400);
}

.footer-bottom .divider-dot {
  color: var(--gold-500);
  margin: 0 0.45rem;
}

/* =========================================================
   Interior page styles
   ========================================================= */

.page-header {
  --section-banner: none;
  background:
    linear-gradient(90deg, rgba(63, 36, 20, 0.95) 0%, rgba(122, 79, 46, 0.96) 44%, rgba(69, 38, 22, 0.98) 100%);
  color: var(--cream-100);
  padding: 1.45rem 0 1.2rem;
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  border-bottom: 2px solid var(--gold-500);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(78vw, 560px);
  background-image:
    linear-gradient(90deg, rgba(122, 79, 46, 0.08) 0%, rgba(122, 79, 46, 0.03) 44%, rgba(122, 79, 46, 0) 100%),
    var(--section-banner);
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: right center;
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 16%, rgba(0, 0, 0, 0.62) 38%, #000 58%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 16%, rgba(0, 0, 0, 0.62) 38%, #000 58%);
  pointer-events: none;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(30, 18, 10, 0.5) 0%, rgba(30, 18, 10, 0.12) 42%, rgba(30, 18, 10, 0.36) 100%);
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  color: var(--cream-50);
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 8px rgba(24, 13, 8, 0.72);
}

.page-header .eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 0.35rem;
  text-shadow: 0 1px 6px rgba(24, 13, 8, 0.72);
}

.page-header .lede {
  max-width: 560px;
  margin: 0.35rem auto 0;
  color: var(--cream-200);
  font-size: 0.88rem;
  line-height: 1.45;
  display: none;
}

body:is(
  .page-lifeatglance,
  .page-degrees,
  .page-testimonials,
  .page-broadcasting,
  .page-personal,
  .page-diary,
  .page-passports-visas,
  .page-london-expenses
) .page-header {
  --section-banner: url("../images/bnr_theman_clean_2x.jpg");
}

body:is(
  .page-cases-and-trials,
  .page-supreme-court-letters,
  .page-lawbooks
) .page-header {
  --section-banner: url("../images/bnr_hismind_clean_2x.jpg");
}

body:is(
  .page-gc-gazette,
  .page-mushaira-poster,
  .page-letters,
  .page-condolence-book,
  .page-condolences,
  .page-epitaphs,
  .page-mention-other-books
) .page-header {
  --section-banner: url("../images/bnr_memories_clean_2x.jpg");
}

body:is(
  .page-afsanay,
  .page-book-reviews,
  .page-articles,
  .page-poetry,
  .page-speeches
) .page-header {
  --section-banner: url("../images/bnr_masterpieces_clean_2x.jpg");
}

body:is(
  .page-picture-gallery,
  .page-videos,
  .page-audios,
  .page-old-website
) .page-header {
  --section-banner: url("../images/bnr_moments_clean_2x.jpg");
}

.page-content {
  padding: 2.25rem 0 3rem;
}

.content-prose {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-700);
}

.content-prose h2 {
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.content-prose h3 {
  margin: 2rem 0 0.75rem;
  color: var(--navy-800);
}

.content-prose p {
  margin-bottom: 1.25rem;
}

.content-prose ul,
.content-prose ol {
  margin: 0 0 1.25rem 1.5rem;
}

.content-prose img {
  margin: 2rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Timeline */
.timeline {
  --date-col: 10.75rem;
  --rail-col: 2.75rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(1.5rem + var(--date-col) + (var(--rail-col) / 2) - 1px);
  width: 2px;
  background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.18), var(--gold-500) 12%, var(--gold-500) 88%, rgba(var(--gold-rgb), 0.18));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--date-col) var(--rail-col) minmax(0, 1fr);
  column-gap: 0;
  align-items: start;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(var(--date-col) + (var(--rail-col) / 2) - 8px);
  top: 0.28rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper-bg);
  border: 3px solid var(--gold-500);
  box-shadow: 0 0 0 4px var(--cream-100);
}

.timeline-date {
  grid-column: 1;
  justify-self: end;
  max-width: 100%;
  padding: 0;
  text-align: right;
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 700;
  box-shadow: none;
  overflow-wrap: anywhere;
}

.timeline-body {
  grid-column: 3;
  padding: 0 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-700);
}

.timeline-body p {
  margin-bottom: 0.75rem;
}

/* =========================================================
   Gallery grid
   ========================================================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gallery figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-card);
  border: 1px solid rgba(96, 70, 33, 0.14);
  box-shadow: var(--shadow-sm);
  align-self: start;
  cursor: pointer;
  line-height: 0;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.gallery figure a {
  display: block;
  line-height: 0;
}

.gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  image-rendering: auto;
  transform: translateZ(0);
  transition: transform 0.5s ease;
}

.gallery figure:hover img {
  transform: scale(1.06);
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(transparent, rgba(16, 24, 22, 0.9));
  color: var(--cream-100);
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition);
}

.gallery figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Collated multi-page item (e.g. Author I + II → single thumbnail) */
.gallery figure.collated > a:not(:first-of-type),
.gallery figure.collated .collated-page {
  display: none !important;
}

.gallery figure.collated {
  position: relative;
}

.gallery figure.collated .more-badge,
.letter-grid > figure.collated .more-badge,
.page-count-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(16, 12, 8, 0.85);
  color: var(--gold-400);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(var(--gold-rgb), 0.45);
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(2px);
  z-index: 2;
  line-height: 1;
}


/* Hide typed-text-only standalone figures. Typed text appears as regular slides in the archive viewer. */
figure[data-is-typed-text] {
  display: none !important;
}

/* Page count badge on archive-viewer thumbnails that have multiple internal pages */
.letter-card-thumb,
.gallery figure,
.gallery-docs figure {
  position: relative;
}

/* Thumbnail crop override for letters where content is right-aligned */
.letter-card-thumb img[data-crop="right"] {
  object-position: right center;
}

.gallery.gallery-compact {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 0.9rem;
}

.gallery.gallery-compact figure {
  flex: 0 0 clamp(150px, 18vw, 210px);
  scroll-snap-align: start;
}

.gallery.gallery-compact img {
  min-height: 220px;
}

/* Horizontal-scroll photo row with fixed row height and natural aspect ratio per item */
.gallery.gallery-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.9rem;
  grid-template-columns: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 1rem;
  align-items: flex-start;
  scrollbar-color: var(--gold-500) rgba(96, 70, 33, 0.12);
  scrollbar-width: thin;
}

.gallery.gallery-row figure {
  flex: 0 0 auto;
  height: clamp(180px, 26vh, 260px);
  width: auto;
  scroll-snap-align: start;
  align-self: stretch;
  aspect-ratio: auto;
  background: var(--paper-card);
}

.gallery.gallery-row figure a {
  display: block;
  height: 100%;
}

.gallery.gallery-row img {
  height: 100%;
  width: auto;
  max-width: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: top center;
  display: block;
  padding: 0;
}

.gallery.gallery-row::-webkit-scrollbar {
  height: 10px;
}
.gallery.gallery-row::-webkit-scrollbar-track {
  background: rgba(96, 70, 33, 0.12);
  border-radius: 999px;
}
.gallery.gallery-row::-webkit-scrollbar-thumb {
  background: var(--gold-500);
  border-radius: 999px;
}

/* Case list */
.case-list {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.case-entry {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.case-entry:last-child {
  border-bottom: none;
}

.case-entry h3 {
  color: var(--navy-800);
  margin-bottom: 0.75rem;
}

.case-entry h3::before {
  content: "§";
  color: var(--gold-600);
  margin-right: 0.5rem;
  font-weight: 400;
}

.case-entry p {
  margin-bottom: 0.85rem;
}

/* Condolence cards */
.condolence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.condolence-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.condolence-card h4 {
  font-family: var(--font-display);
  color: var(--navy-800);
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.condolence-card .role {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 1rem;
  display: block;
}

.condolence-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--ink-700);
}

/* =========================================================
   Lightbox with full navigation and arrows
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 13, 0.96);
  display: none;
  z-index: 1000;
  cursor: zoom-out;
  overflow-y: auto;
}

.lightbox.open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 4rem 1.5rem;
  gap: 0;
}

.lightbox-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(100vh - 8.5rem);
  min-height: 0;
}

.lightbox img {
  width: auto;
  height: auto;
  max-width: min(98vw, 1800px);
  max-height: calc(100vh - 8.5rem);
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  display: block;
  cursor: default;
  background: transparent;
}

.lightbox-meta {
  flex: 0 0 auto;
  width: min(86vw, 980px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem 0.5rem;
  pointer-events: none;
  text-align: center;
}

.lightbox-meta:empty {
  display: none;
}

.lightbox-caption {
  color: var(--cream-100);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 100%;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(16, 12, 8, 0.36);
  border: 1px solid rgba(245, 236, 215, 0.18);
  color: var(--cream-100);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0.72;
}

.lightbox-close:hover {
  background: rgba(var(--gold-rgb), 0.9);
  border-color: rgba(var(--gold-rgb), 0.9);
  color: var(--cream-50);
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16, 24, 22, 0.68);
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  color: var(--cream-100);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  user-select: none;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

.lightbox-counter {
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-300);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.lightbox-counter:empty {
  display: none;
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Urdu / RTL */
.urdu,
[lang="ur"] {
  font-family: var(--font-urdu);
  direction: rtl;
  text-align: right;
  line-height: 2.4;
  font-size: 1.3em;
}

/* Document galleries for scanned letters and papers */
.gallery-docs {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  justify-items: center;
  align-items: stretch;
}

.gallery-docs figure {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px;
  aspect-ratio: auto;
  height: auto;
  background: var(--paper-card);
  line-height: 0;
}

.gallery-docs figure a {
  display: flex;
  flex-direction: column;
  height: auto;
  color: inherit;
  text-decoration: none;
  line-height: 0;
}

.gallery-docs img {
  display: block;
  width: 100%;
  height: clamp(320px, 40vw, 430px);
  aspect-ratio: auto;
  object-fit: cover;
  object-position: top center;
  padding: 0;
  background: var(--paper-thumb);
  vertical-align: bottom;
}

.gallery-docs .doc-text-thumb {
  display: block;
  width: 100%;
  height: clamp(320px, 40vw, 430px);
  aspect-ratio: auto;
  padding: 1rem;
  overflow: hidden;
  color: var(--ink-700);
  background: var(--paper-thumb);
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.55;
}

.gallery-docs figure img {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
}

.gallery-docs figcaption {
  position: static;
  opacity: 1;
  transform: none;
  background: #7a4f2e;
  color: var(--cream-100);
  text-align: center;
  padding: 0.48rem 0.65rem;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  line-height: 1.25;
  text-transform: uppercase;
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
}

.gallery-docs.gallery-landscape {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 920px;
}

.gallery-docs.gallery-landscape figure {
  max-width: 440px;
}

.gallery-docs.gallery-landscape img {
  height: 330px;
  aspect-ratio: auto;
  object-fit: cover;
  padding: 0;
  background: var(--paper-card);
}

.gallery-docs.gallery-fit figure {
  height: auto;
}

.gallery-docs.gallery-fit img {
  height: 340px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: top center;
  padding: 0;
  background: var(--paper-card);
}

body.page-degrees .gallery-docs figure {
  max-width: 280px;
}

body.page-degrees .gallery-docs img {
  height: clamp(285px, 34vw, 380px);
  object-fit: cover;
  object-position: top center;
}

body.page-testimonials .gallery-docs {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body.page-testimonials .gallery-docs figure {
  max-width: 270px;
}

body.page-testimonials .gallery-docs img {
  height: clamp(230px, 26vw, 295px);
  object-fit: cover;
  object-position: top center;
}

body.page-testimonials .gallery-docs figcaption {
  height: 3.2rem;
  min-height: 3.2rem;
}

body.page-personal .personal-compact-gallery figure {
  max-width: 280px;
}

body.page-personal .personal-compact-gallery img {
  height: clamp(235px, 29vw, 315px);
  object-fit: cover;
  object-position: top center;
}

body.page-personal .personal-ticket-gallery {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

body.page-personal .personal-ticket-gallery figure {
  max-width: 430px;
}

body.page-personal .personal-ticket-gallery img {
  height: clamp(170px, 22vw, 245px);
  object-fit: cover;
  object-position: center center;
}

body.page-personal .personal-links {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body.page-personal .personal-links .letter-card-thumb {
  aspect-ratio: auto;
  height: clamp(205px, 24vw, 275px);
}

body.page-personal .personal-links .letter-card-thumb img {
  object-fit: cover;
  object-position: top center;
}

body.page-diary .gallery-docs figure,
body.page-london-expenses .gallery-docs figure {
  max-width: 310px;
}

body.page-diary .gallery-docs img,
body.page-london-expenses .gallery-docs img {
  height: clamp(300px, 34vw, 380px);
  object-fit: cover;
  object-position: center center;
}

body.page-diary .gallery.gallery-row figure {
  width: clamp(190px, 17vw, 230px);
  height: clamp(300px, 34vw, 380px);
}

body.page-london-expenses .gallery.gallery-row figure {
  width: clamp(220px, 22vw, 285px);
  height: auto;
  align-self: flex-start;
}

body:is(.page-diary, .page-london-expenses) .gallery.gallery-row img {
  width: 100%;
  object-fit: cover;
}

body.page-diary .gallery.gallery-row img {
  height: 100%;
}

body.page-london-expenses .gallery.gallery-row img {
  height: clamp(185px, 21vw, 255px);
  object-fit: contain;
  object-position: center center;
  background: var(--paper-card);
}

body.page-diary .gallery-docs,
body.page-london-expenses .gallery-docs {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

body.page-diary .gallery-docs.gallery-compact figure,
body.page-london-expenses .gallery-docs.gallery-compact figure {
  flex: 0 0 clamp(255px, 24vw, 310px);
  max-width: 310px;
}

body:is(.page-diary, .page-london-expenses) .letter-card {
  height: 100%;
}

body:is(.page-diary, .page-london-expenses) .letter-card-thumb {
  aspect-ratio: auto;
  height: clamp(235px, 25vw, 295px);
}

body:is(.page-diary, .page-london-expenses) .letter-card-thumb img {
  object-fit: cover;
  object-position: top center;
}

body.page-broadcasting .gallery-docs figure {
  max-width: 285px;
}

body.page-broadcasting .gallery-docs img {
  height: clamp(250px, 29vw, 335px);
  object-fit: cover;
  object-position: top center;
}

body.page-gc-gazette .gallery-docs img,
body.page-mushaira-poster .gallery-docs img {
  height: clamp(300px, 34vw, 395px);
  object-fit: cover;
  object-position: top center;
}

body.page-book-reviews .gallery-docs figure,
body.page-articles .gallery-docs figure {
  max-width: 270px;
}

body.page-book-reviews .gallery-docs img,
body.page-articles .gallery-docs img {
  height: clamp(250px, 29vw, 325px);
  object-fit: cover;
  object-position: top center;
}

body.page-supreme-court-letters .gallery-docs figure,
body.page-epitaphs .gallery-docs figure,
body.page-poetry .gallery-docs figure {
  max-width: 275px;
}

body.page-supreme-court-letters .gallery-docs img {
  height: clamp(260px, 31vw, 335px);
  object-fit: cover;
  object-position: top center;
}

body.page-supreme-court-letters .supreme-court-grid {
  grid-template-columns: minmax(230px, 360px);
  max-width: 420px;
  justify-content: center;
}

body.page-supreme-court-letters .supreme-court-grid .letter-card {
  height: 100%;
}

body.page-supreme-court-letters .supreme-court-grid .letter-card-thumb {
  height: clamp(260px, 30vw, 340px);
  aspect-ratio: auto;
  background: var(--paper-card);
}

body.page-supreme-court-letters .supreme-court-grid .letter-card-thumb img {
  object-fit: contain;
  object-position: center center;
  padding: 0.45rem;
  background: var(--paper-card);
}

body.page-lawbooks .gallery-docs.gallery-landscape figure {
  max-width: 430px;
}

body.page-lawbooks .gallery-docs.gallery-landscape img {
  height: clamp(255px, 25vw, 300px);
  object-fit: cover;
  object-position: center center;
  background: var(--paper-card);
}

body.page-lawbooks .gallery-docs.gallery-landscape img.lawbook-crop-sides {
  object-position: center center;
}

body.page-lawbooks .gallery-docs.gallery-landscape img.lawbook-crop-top {
  object-position: center top;
}

body.page-epitaphs .gallery-docs img,
body.page-poetry .gallery-docs img {
  height: clamp(260px, 31vw, 335px);
  object-fit: cover;
  object-position: top center;
}

body.page-poetry .gallery-docs img {
  height: clamp(230px, 27vw, 300px);
}

body.page-passports-visas .gallery-docs figure {
  max-width: 300px;
}

body.page-passports-visas .gallery.gallery-row figure {
  width: 300px;
  height: auto;
}

body.page-passports-visas .gallery.gallery-row figure a {
  height: auto;
}

body.page-passports-visas .gallery-docs img {
  height: clamp(175px, 20vw, 235px);
  object-fit: cover;
  object-position: center center;
  background: var(--paper-card);
}

body.page-passports-visas .gallery figcaption {
  display: none;
}

body.page-passports-visas .letter-card {
  height: 100%;
}

body.page-passports-visas .letter-card-thumb {
  aspect-ratio: auto;
  height: clamp(175px, 20vw, 235px);
}

body.page-passports-visas .letter-card-thumb img {
  object-fit: cover;
  object-position: center center;
}

body.page-picture-gallery .gallery {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

body.page-picture-gallery .gallery.gallery-compact:not(.gallery-row) {
  display: grid;
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}

body.page-picture-gallery .gallery figure,
body.page-picture-gallery .gallery.gallery-compact:not(.gallery-row) figure {
  width: 100%;
  height: clamp(190px, 19vw, 255px);
  max-width: none;
  align-self: stretch;
  scroll-snap-align: unset;
}

body.page-picture-gallery .gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  padding: 0;
  background: transparent;
}

body.page-picture-gallery .gallery.gallery-row {
  display: flex;
}

body.page-picture-gallery .gallery.gallery-row figure {
  flex: 0 0 auto;
  width: auto;
  height: clamp(205px, 28vh, 292px);
  max-width: none;
}

body.page-picture-gallery .gallery.gallery-row figure img {
  width: auto;
  max-width: none;
}

/* Section subhead */
.section-subhead {
  max-width: var(--container);
  margin: 2.5rem auto 1rem;
  padding: 0 1.5rem;
  text-align: center;
}

.section-subhead h2 {
  font-family: var(--font-display);
  color: var(--navy-800);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.section-subhead .eyebrow {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 0.4rem;
}

.section-subhead .divider {
  width: 60px;
  height: 1px;
  background: var(--gold-500);
  margin: 0.6rem auto 0;
}

.section-subhead p {
  max-width: 640px;
  margin: 0.6rem auto 0;
  color: var(--ink-500);
  font-style: italic;
  font-family: var(--font-serif);
}

/* Name-card grid */
.name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.name-card {
  display: block;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  color: var(--navy-800);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.name-card:hover {
  transform: translateY(-2px);
  border-left-color: var(--gold-400);
  color: var(--navy-900);
  box-shadow: 0 6px 18px rgba(26, 15, 4, 0.1);
}

.name-card small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-top: 0.25rem;
  font-weight: 500;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.letter-grid > figure.collated {
  margin: 0;
  min-height: 100%;
}

.letter-grid > figure.collated .letter-card {
  height: 100%;
}

.letter-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--navy-800);
  min-height: 100%;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.letter-card:hover,
.letter-card:focus {
  transform: translateY(-3px);
  border-color: rgba(var(--gold-rgb), 0.45);
  box-shadow: var(--shadow-md);
  color: var(--navy-900);
  outline: none;
}

.letter-card-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--paper-muted);
  border-bottom: 0;
  line-height: 0;
  overflow: hidden;
}

.letter-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

body:is(.page-letters, .page-condolence-book, .page-condolences) .letter-card {
  height: 100%;
}

body:is(.page-letters, .page-condolence-book, .page-condolences) .letter-card-thumb {
  aspect-ratio: auto;
  height: clamp(235px, 28vw, 315px);
}

body:is(.page-letters, .page-condolence-book, .page-condolences) .letter-card-thumb img {
  object-fit: cover;
  object-position: top center;
}

body:is(.page-letters, .page-condolence-book, .page-condolences, .page-epitaphs) .letter-card-body {
  min-height: 3.05rem;
}

body.page-epitaphs .letter-card {
  height: 100%;
}

body.page-epitaphs .letter-card-thumb {
  aspect-ratio: auto;
  height: clamp(235px, 28vw, 315px);
}

body.page-epitaphs .letter-card-thumb img {
  object-fit: cover;
  object-position: top center;
}

body.page-condolence-book .letter-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

body.page-condolence-book .letter-card-thumb {
  height: clamp(205px, 24vw, 255px);
}

body.page-condolence-book .letter-card-thumb img {
  object-position: center center;
}

body:is(.page-mention-other-books, .page-afsanay) .gallery-docs,
body:is(.page-mention-other-books, .page-afsanay) .letter-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: stretch;
}

body:is(.page-mention-other-books, .page-afsanay) .gallery-docs figure,
body:is(.page-mention-other-books, .page-afsanay) .letter-card {
  max-width: 260px;
  width: 100%;
  height: auto;
}

body:is(.page-mention-other-books, .page-afsanay) .gallery-docs img,
body:is(.page-mention-other-books, .page-afsanay) .gallery-docs .doc-text-thumb,
body:is(.page-mention-other-books, .page-afsanay) .letter-card-thumb {
  height: clamp(300px, 34vw, 350px);
  aspect-ratio: auto;
  background: var(--paper-thumb);
}

body:is(.page-mention-other-books, .page-afsanay) .gallery-docs img,
body:is(.page-mention-other-books, .page-afsanay) .letter-card-thumb img {
  width: 100%;
  object-fit: cover;
  object-position: top center;
  padding: 0;
  background: var(--paper-thumb);
}

body:is(.page-mention-other-books, .page-afsanay) .gallery-docs img {
  height: clamp(300px, 34vw, 350px);
}

body:is(.page-mention-other-books, .page-afsanay) .letter-card-thumb img {
  height: 100%;
}

body:is(.page-mention-other-books, .page-afsanay) .gallery-docs .doc-text-thumb {
  padding: 1rem;
}

body.page-mention-other-books .truth-love-gallery img,
body.page-mention-other-books .truth-love-gallery .doc-text-thumb {
  object-fit: contain;
  object-position: center center;
  padding: 0;
  background: var(--paper-thumb);
}

body.page-mention-other-books .truth-love-gallery .doc-text-thumb {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.72rem;
  position: relative;
  z-index: 1;
  color: var(--ink-700);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  line-height: 1.32;
  overflow: hidden;
}

body.page-afsanay .letter-card-thumb {
  background: var(--paper-thumb);
  border-bottom: 0;
  line-height: 0;
}

body.page-afsanay .letter-card {
  height: 100%;
  background: #7a4f2e;
}

body.page-afsanay .letter-card-thumb img {
  display: block;
  vertical-align: bottom;
}

body.page-afsanay .letter-card-body {
  height: 3.45rem;
  min-height: 3.45rem;
  margin-top: 0;
  border-top: 0;
}

body.page-condolences .letter-card-text-thumb {
  padding: 0.7rem;
  font-size: 0.66rem;
  line-height: 1.22;
}

.letter-card-text-thumb {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1rem;
  overflow: hidden;
  color: var(--ink-700);
  background: var(--paper-card);
  font-size: 0.88rem;
  line-height: 1.55;
}

.letter-card-thumb.letter-card-text-thumb {
  line-height: 1.45;
}

.letter-card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  min-height: 2.8rem;
  background: #7a4f2e;
  line-height: 1.25;
  margin: 0;
  border: 0;
}

.letter-card-body strong {
  display: -webkit-box;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--cream-100);
  text-align: center;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.letter-card-body small {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  min-height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Temporary old-site review page */
body.page-old-website .old-site-review {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.legacy-banner-stack {
  display: grid;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.legacy-banner-stack figure,
.legacy-mini-banners figure,
.old-site-fragment,
.old-site-notes article {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.legacy-banner-stack img {
  display: block;
  width: 100%;
  height: auto;
  background: #17100b;
}

.modified-banner-options,
.modified-banner-gallery {
  display: grid;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.modified-banner-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modified-banner-gallery {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.modified-banner-option {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.modified-banner-option.is-selected {
  border-color: rgba(177, 127, 74, 0.75);
  box-shadow: 0 12px 28px rgba(74, 45, 25, 0.17);
}

.modified-banner-preview {
  position: relative;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(63, 36, 20, 0.96), rgba(122, 79, 46, 0.96) 48%, rgba(69, 38, 22, 0.98));
  color: var(--cream-50);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
}

.modified-banner-preview::before,
.modified-banner-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.modified-banner-preview::after {
  background: linear-gradient(90deg, rgba(30, 18, 10, 0.5), rgba(30, 18, 10, 0.08) 45%, rgba(30, 18, 10, 0.34));
}

.modified-banner-preview span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(24, 13, 8, 0.72);
}

.modified-banner-crop::before {
  inset: 0 0 0 auto;
  width: 88%;
  background-image:
    linear-gradient(90deg, rgba(122, 79, 46, 0.08) 0%, rgba(122, 79, 46, 0.03) 44%, rgba(122, 79, 46, 0) 100%),
    var(--banner-image);
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: right center;
  opacity: 0.94;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 16%, rgba(0, 0, 0, 0.62) 38%, #000 58%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 16%, rgba(0, 0, 0, 0.62) 38%, #000 58%);
}

.modified-banner-right-only::before {
  inset: 0 0 0 auto;
  width: 46%;
  background-image:
    linear-gradient(90deg, rgba(122, 79, 46, 0.95), rgba(122, 79, 46, 0) 52%),
    var(--banner-image);
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: right center;
  opacity: 0.9;
}

.modified-banner-muted-full::before {
  background-image:
    linear-gradient(90deg, rgba(70, 42, 24, 0.72), rgba(70, 42, 24, 0.42)),
    var(--banner-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.76;
}

.modified-banner-option h3 {
  margin: 1rem 1rem 0.35rem;
  color: var(--ink-700);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.modified-banner-option p {
  margin: 0 1rem 1.1rem;
  color: var(--ink-500);
  font-size: 0.9rem;
  line-height: 1.55;
}

.legacy-banner-stack figcaption,
.legacy-mini-banners figcaption,
.old-site-fragment figcaption {
  padding: 0.55rem 0.75rem;
  background: #7a4f2e;
  color: var(--cream-100);
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: center;
}

.old-site-fragments,
.legacy-mini-banners,
.old-site-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.old-site-fragment {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.old-site-fragment img {
  display: block;
  width: 100%;
  height: clamp(120px, 20vw, 210px);
  object-fit: contain;
  background: var(--paper-muted);
  padding: 0.65rem;
}

.old-site-fragment-large {
  grid-column: span 2;
}

.old-site-fragment-large img,
.old-site-fragment-tall img {
  height: clamp(260px, 34vw, 390px);
}

.old-site-fragment-rail img {
  height: clamp(260px, 34vw, 390px);
}

.legacy-mini-banners figure {
  display: flex;
  flex-direction: column;
}

.legacy-mini-banners img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: contain;
  background: var(--paper-muted);
  padding: 0.7rem;
}

body.page-old-website .old-site-photo-row figure {
  height: clamp(175px, 24vh, 235px);
}

.old-site-audio {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.old-site-notes article {
  padding: 1.1rem;
}

.old-site-notes h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink-700);
}

.old-site-notes p {
  margin: 0;
  color: var(--ink-500);
  line-height: 1.65;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
    align-items: start;
    padding-top: 0.75rem;
    padding-bottom: 2.5rem;
    min-height: unset;
  }

  .hero {
    min-height: calc(106vh - 72px);
  }

  .hero-text .hero-actions {
    justify-content: flex-start;
  }

  .hero-tagline {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-art {
    align-items: center;
  }

  .hero-diptych {
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .modified-banner-options,
  .modified-banner-gallery {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .timeline {
    padding: 0 1rem;
  }

  .timeline::before {
    left: 1rem;
  }

  .timeline-item {
    display: block;
    padding-left: 2.25rem;
    margin-bottom: 2rem;
  }

  .timeline-item::before {
    left: -8px;
    top: 0.72rem;
  }

  .timeline-date {
    width: auto;
    text-align: left;
    margin-bottom: 0.7rem;
    display: inline-flex;
    justify-content: center;
  }

  .timeline-body {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .old-site-fragment-large {
    grid-column: auto;
  }

  .modified-banner-preview {
    min-height: 104px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  section {
    padding: 2.75rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0 2rem;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    border-top: 1px solid rgba(var(--gold-rgb), 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    gap: 0;
  }

  body.nav-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.1);
  }

  .nav-menu > li:last-child {
    border-bottom: none;
  }

  .nav-menu > li > a,
  .nav-menu > li > button {
    width: 100%;
    padding: 1rem 1.5rem;
    justify-content: space-between;
    border-radius: 0;
  }

  .dropdown {
    position: static;
    transform: none;
    min-width: 0;
    background: var(--navy-800);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }

  .nav-menu > li.open .dropdown {
    display: block;
    transform: none;
  }

  .dropdown a {
    padding: 0.85rem 2.25rem;
    border-left: none;
  }

  .hero {
    min-height: calc(105vh - 72px);
    padding: 0;
  }

  .hero-inner {
    padding: 0.75rem 1.25rem 2.25rem;
    gap: 1.35rem;
    min-height: unset;
  }

  .hero-text h1 {
    font-size: 2.1rem;
  }

  .hero-diptych {
    box-shadow: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-brand-link {
    align-items: center;
  }

  .footer-signature {
    margin-left: auto;
    margin-right: auto;
  }

  .page-header {
    padding: 1.4rem 0 1.1rem;
    min-height: 108px;
  }

  .page-header::before {
    width: min(86vw, 440px);
  }

  .quote-section {
    padding: 3rem 1.5rem;
  }

  .about-inner p:first-of-type::first-letter {
    font-size: 3rem;
  }

  .lightbox {
    padding: 3.25rem 0.5rem 1rem;
  }

  .lightbox-stage {
    max-height: calc(100vh - 9rem);
  }

  .lightbox img {
    width: auto;
    height: auto;
    max-width: 98vw;
    max-height: calc(100vh - 9rem);
  }

  .lightbox-prev { left: 0.35rem; }
  .lightbox-next { right: 0.35rem; }

  .archive-modal {
    padding: 3.75rem 0.6rem 1rem;
  }

  .archive-modal-body,
  .archive-modal-body img,
  .archive-modal-text {
    max-height: calc(100vh - 9rem);
  }

  .archive-modal-prev,
  .archive-modal-next {
    width: 40px;
    height: 40px;
  }

  .archive-modal-meta {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.72rem;
  }

  .hero-diptych {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.8fr);
    height: auto;
    max-width: 100%;
  }

  .hero-portrait,
  .hero-poem {
    width: auto;
    min-height: 0;
  }

  .hero-portrait,
  .hero-poem {
    height: auto;
  }

  .hero-portrait img,
  .hero-poem img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
  }

  .hero-poem { border-left: 0; border-top: 0; }

  .btn {
    padding: 0.8rem 1.3rem;
    font-size: 0.75rem;
  }

  .explore-card,
  .case-card,
  .condolence-card {
    padding: 1.5rem;
  }

  .explore-grid {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 3.5rem 2.25rem 1.25rem;
  }

  .lightbox-caption {
    max-width: 88vw;
  }
}

/* =========================================================
   Contact form, reachout
   ========================================================= */

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.contact-form .form-intro {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-500);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-form .field {
  margin-bottom: 1.25rem;
}

.contact-form .form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-700);
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  border-left-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.65;
}

.contact-form .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-form button {
  font-family: var(--font-body);
  cursor: pointer;
}

.message-result {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.message-result p {
  color: var(--ink-500);
  font-size: 1.05rem;
}

.message-result ul {
  display: inline-block;
  margin: 1rem auto 0;
  padding-left: 1.25rem;
  text-align: left;
  color: var(--ink-500);
}

.message-result .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-on-light {
  color: var(--navy-800);
  border-color: var(--line);
}

.btn-on-light:hover {
  color: var(--gold-600);
  border-color: var(--gold-500);
}

.archive-viewer-header {
  padding-bottom: 1rem;
}

.archive-viewer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.5rem;
}

.archive-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.archive-frame {
  width: 100%;
  min-height: 82vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-card);
  box-shadow: var(--shadow-sm);
}

.archive-native {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1rem, 2vw, 2rem);
}

.archive-native-media {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}

.archive-native-media figure {
  width: 100%;
  margin: 0;
  text-align: center;
}

.archive-native-media figure[data-archive-slide],
.archive-native-text[data-archive-slide] {
  cursor: zoom-in;
}

.archive-native-media figure[data-archive-slide] {
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.archive-native-media figure[data-archive-slide]::after {
  content: "Open";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.35rem 0.65rem;
  background: rgba(32, 22, 12, 0.82);
  color: var(--cream-50);
  border: 1px solid rgba(var(--gold-rgb), 0.45);
  border-radius: var(--radius);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.archive-native-media figure[data-archive-slide]:hover,
.archive-native-media figure[data-archive-slide]:focus {
  transform: translateY(-2px);
}

.archive-native-media figure[data-archive-slide]:hover::after,
.archive-native-media figure[data-archive-slide]:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.archive-native-media img {
  display: block;
  width: auto;
  max-width: min(100%, 1040px);
  max-height: none;
  margin: 0 auto;
  background: var(--paper-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.archive-native-text {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-700);
  font-size: 1.08rem;
  line-height: 1.8;
}

.archive-native-text p {
  margin-bottom: 1rem;
}

.archive-native-text[data-archive-slide] {
  padding: 1rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.archive-native-text[data-archive-slide]:hover,
.archive-native-text[data-archive-slide]:focus {
  background: var(--paper-card);
  border-color: rgba(var(--gold-rgb), 0.28);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.archive-native-text + .archive-native-media,
.archive-native-media + .archive-native-text,
.archive-native-links + .archive-native-media,
.archive-native-links + .archive-native-text {
  margin-top: 1.5rem;
}

.archive-native-links,
.archive-native-jump {
  max-width: var(--container);
  margin: 0 auto;
}

.archive-native-jump {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.archive-native-jump .name-grid {
  padding: 0;
}

.archive-native-child {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.archive-native-child:first-of-type {
  border-top: 0;
}

.archive-native-child h2 {
  text-align: center;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  margin-bottom: 1.15rem;
}

.archive-native-child h2 span {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.archive-native-section-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 0.2rem;
}

.archive-native-unavailable {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  color: var(--ink-500);
}

.archive-collection {
  max-width: var(--container);
  margin: 0 auto;
}

.archive-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.archive-doc-tile {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--navy-800);
  cursor: zoom-in;
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.archive-doc-tile:hover,
.archive-doc-tile:focus {
  transform: translateY(-3px);
  border-color: rgba(var(--gold-rgb), 0.45);
  box-shadow: var(--shadow-md);
  outline: none;
}

.archive-doc-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--paper-muted);
  border-bottom: 1px solid var(--line);
}

.archive-doc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  padding: 0;
  background: transparent;
}

.archive-doc-text-preview {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1rem;
  overflow: hidden;
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.55;
  background: var(--paper-card);
}

.archive-doc-meta {
  display: block;
  padding: 0.8rem 0.9rem 0.9rem;
}

.archive-doc-page {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.archive-doc-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.3;
}

.archive-error {
  text-align: center;
  color: var(--ink-500);
}

.archive-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1.5rem 0.75rem;
  background: rgba(12, 9, 6, 0.96);
  overflow-y: auto;
}

.archive-modal.open {
  display: flex;
}

.archive-modal-stage {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.archive-modal-body {
  min-width: 0;
  width: 100%;
  max-width: min(96vw, 1440px);
  max-height: calc(100vh - 9rem);
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: transform, opacity;
}

.archive-modal-body.is-entering-next {
  animation: archiveSlideInNext 260ms ease-out both;
}

.archive-modal-body.is-entering-prev {
  animation: archiveSlideInPrev 260ms ease-out both;
}

.archive-modal-body.is-document-shift {
  animation-duration: 340ms;
}

.archive-modal-body img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1440px);
  max-height: calc(100vh - 9rem);
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.archive-modal-text {
  max-width: min(92vw, 860px);
  max-height: calc(100vh - 8rem);
  overflow: auto;
  background: var(--paper-card);
  color: var(--ink-700);
  border: 1px solid rgba(var(--gold-rgb), 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  font-size: 1.08rem;
  line-height: 1.8;
}

.archive-modal-text h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.archive-modal-close,
.archive-modal-prev,
.archive-modal-next {
  border: 1px solid rgba(var(--gold-rgb), 0.45);
  color: var(--cream-100);
  background: rgba(32, 22, 12, 0.78);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.archive-modal-close:hover,
.archive-modal-prev:hover,
.archive-modal-next:hover {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}

.archive-modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  z-index: 2;
  opacity: 0.72;
  background: rgba(32, 22, 12, 0.42);
  border-color: rgba(245, 236, 215, 0.16);
}


.archive-modal-prev,
.archive-modal-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.archive-modal-prev {
  left: 1rem;
}

.archive-modal-next {
  right: 1rem;
}

.archive-modal-meta {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  color: var(--cream-200);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
  padding: 0.6rem 1rem 0;
}

.archive-modal-caption {
  max-width: min(88vw, 760px);
  color: var(--cream-100);
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.archive-modal-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.archive-modal-counter {
  color: var(--cream-300);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.archive-modal-context {
  color: var(--cream-300);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.archive-modal-context:not(:empty),
.archive-modal-counter:not(:empty) {
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(245, 236, 215, 0.14);
  border-radius: 999px;
  background: rgba(245, 236, 215, 0.06);
}

.archive-modal-boundary {
  min-height: 1.5rem;
  max-width: min(88vw, 620px);
  color: var(--gold-300);
  font-size: 0.78rem;
  font-weight: 600;
}

.archive-modal-boundary:empty {
  display: none;
}

.archive-modal-boundary.is-document-shift {
  color: var(--cream-50);
  animation: archiveBoundaryPulse 900ms ease-out both;
}

@keyframes archiveSlideInNext {
  from {
    opacity: 0;
    transform: translateX(26px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes archiveSlideInPrev {
  from {
    opacity: 0;
    transform: translateX(-26px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes archiveBoundaryPulse {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  28% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-modal-body.is-entering-next,
  .archive-modal-body.is-entering-prev,
  .archive-modal-boundary.is-document-shift {
    animation: none;
  }
}

@media (max-width: 760px) {
  .archive-modal {
    padding: 3.5rem 0.5rem 0.5rem;
  }

  .archive-modal-body,
  .archive-modal-body img,
  .archive-modal-text {
    max-height: calc(100vh - 9rem);
  }

  .archive-modal-prev {
    left: 0.35rem;
    width: 40px;
    height: 40px;
  }

  .archive-modal-next {
    right: 0.35rem;
    width: 40px;
    height: 40px;
  }

  .archive-modal-meta {
    gap: 0.2rem;
    padding: 0.5rem 0.5rem 0;
  }
}

.contact-meta {
  max-width: 640px;
  margin: 3rem auto 0;
  padding: 1.75rem 1.5rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-serif);
  color: var(--ink-500);
  font-style: italic;
}

.contact-meta strong {
  color: var(--navy-800);
  font-style: normal;
  font-family: var(--font-display);
}

/* =========================================================
   Video cards
   ========================================================= */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.video-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.video-card .poster {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--navy-800);
  overflow: hidden;
  display: block;
}

.video-card .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card .poster::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--cream-50);
  background: rgba(26, 15, 4, 0.35);
  transition: background var(--transition);
}

.video-card:hover .poster::after {
  background: rgba(26, 15, 4, 0.55);
}

.video-card .body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.video-card h3 {
  font-family: var(--font-display);
  color: var(--navy-800);
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.video-card .caption {
  font-size: 0.85rem;
  color: var(--ink-500);
  font-style: italic;
  margin-bottom: 0.9rem;
}

.video-card .download {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 600;
  border-bottom: 1px solid var(--gold-500);
  padding-bottom: 2px;
}

.video-card .download:hover {
  color: var(--gold-700);
}

/* =========================================================
   Audio player cards
   ========================================================= */

.audio-list {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.audio-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.audio-card h3 {
  font-family: var(--font-display);
  color: var(--navy-800);
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.audio-card .meta {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.audio-card p {
  font-size: 0.95rem;
  color: var(--ink-500);
  margin-bottom: 1rem;
  font-style: italic;
}

.audio-card audio {
  width: 100%;
  margin-top: 0.25rem;
}

.video-card video {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--navy-900);
  display: block;
}

.section-subhead p {
  display: none;
}

/* =========================================================
   Back to top, floating fixed button
   ========================================================= */

.back-to-top-bar { display: none; }

.back-to-top-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--gold-rgb), 0.82);
  border: 1px solid rgba(var(--gold-rgb), 0.5);
  color: var(--cream-50);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.22s ease, transform 0.22s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.back-to-top-float.is-visible {
  opacity: 0.88;
  pointer-events: auto;
}

.back-to-top-float:hover {
  opacity: 1;
  background: var(--gold-500);
  transform: translateY(-2px);
}

/* =========================================================
   Skeleton shimmer for lazy-loading gallery images
   ========================================================= */

.gallery-docs figure {
  position: relative;
}

.gallery-docs figure::before {
  content: '';
  position: absolute;
  inset: 0;
  bottom: 2.8rem;
  background: linear-gradient(
    90deg,
    var(--paper-muted) 0%,
    var(--cream-200) 50%,
    var(--paper-muted) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.gallery-docs figure:has(.doc-text-thumb)::before {
  display: none;
}

.gallery-docs figure img {
  position: relative;
  z-index: 1;
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* =========================================================
   Print
   ========================================================= */

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .nav-toggle {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
