/* ============================================================
   PILLAR STUDIO — Design System
   Bold, corporate, production-company. Built mobile-first.
   ============================================================ */

/* ---------- Fonts (self-hosted Montserrat) ---------- */
@font-face { font-family: "Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/montserrat/Montserrat-Regular.otf") format("opentype"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/montserrat/Montserrat-Medium.otf") format("opentype"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/montserrat/Montserrat-SemiBold.otf") format("opentype"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/montserrat/Montserrat-Bold.otf") format("opentype"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/montserrat/Montserrat-ExtraBold.otf") format("opentype"); }
@font-face { font-family: "Montserrat"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/montserrat/Montserrat-Black.otf") format("opentype"); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, picture, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; }

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

/* ---------- Design Tokens ---------- */
:root {
  /* Brand palette (from client-supplied Coolors export) */
  --ink: #221f20;
  --paper: #ffffff;
  --blue: #1b5d8f;
  --teal: #5c959e;
  --pale: #c4d3e8;

  /* Semantic surface */
  --bg: var(--paper);
  --bg-dark: var(--ink);
  --bg-elevated: #f4f6f9;
  --bg-elevated-2: #e8ecf3;
  --line: rgba(34, 31, 32, 0.12);
  --line-strong: rgba(34, 31, 32, 0.22);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --line-on-dark-strong: rgba(255, 255, 255, 0.26);
  --text: var(--ink);
  --text-muted: #5a5658;
  --text-faint: #8b8688;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.68);
  --text-on-dark-faint: rgba(255, 255, 255, 0.44);
  --accent: var(--blue);
  --accent-soft: rgba(27, 93, 143, 0.08);

  /* Type */
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 220ms;
  --dur-med: 480ms;
  --dur-slow: 900ms;

  --radius: 4px;
  --header-h: 72px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -60px;
  background: var(--blue);
  color: var(--paper);
  padding: 0.6em 1.2em;
  font-weight: 600;
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-2); }

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--space-3);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-5); } }
@media (min-width: 1440px) { .container { padding-inline: var(--space-6); } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

p { color: var(--text-muted); }
p.lead { font-size: clamp(1.05rem, 1.5vw, 1.35rem); color: var(--text); line-height: 1.6; }

/* ---------- Buttons / pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  min-height: 44px;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.pill:hover, .pill:focus-visible { border-color: var(--blue); background: var(--accent-soft); }
.pill.pill-solid {
  background: var(--blue);
  color: var(--paper);
  border-color: var(--blue);
}
.pill.pill-solid:hover { background: var(--ink); border-color: var(--ink); }
.pill.pill-on-dark { color: var(--paper); border-color: var(--line-on-dark-strong); }
.pill.pill-on-dark:hover { border-color: var(--pale); background: rgba(196,211,232,0.1); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding-inline: var(--space-3);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-fast) var(--ease);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo span { color: var(--blue); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-1);
}
@media (min-width: 900px) { .nav-desktop { display: flex; } }

.nav-desktop a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6em 1em;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-desktop a:hover, .nav-desktop a:focus-visible { color: var(--blue); background: var(--bg-elevated); }
.nav-desktop a[aria-current="page"] { color: var(--blue); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-toggle .bar { width: 16px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle .bar::before, .nav-toggle .bar::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--ink);
}
.nav-toggle .bar::before { top: -5px; }
.nav-toggle .bar::after { top: 5px; }

.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease), visibility var(--dur-med);
}
.nav-mobile.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-mobile ul { display: flex; flex-direction: column; gap: var(--space-2); }
.nav-mobile a { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 9vw, 3rem); color: var(--paper); }
.nav-mobile a:hover { color: var(--pale); }
.nav-mobile .nav-mobile-foot { margin-top: var(--space-5); color: var(--text-on-dark-faint); font-size: 0.85rem; }
.nav-mobile .nav-mobile-foot a { color: var(--text-on-dark-muted); text-decoration: underline; text-underline-offset: 3px; }

body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + var(--space-5)) 0 var(--space-6);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-6); }
}
.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  color: var(--paper);
}
.hero-title .accent { color: var(--pale); }
.hero-lead { color: var(--text-on-dark-muted); margin-top: var(--space-3); max-width: 48ch; font-size: clamp(1rem, 1.4vw, 1.2rem); }
.hero-actions { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-on-dark);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) { .hero-media { aspect-ratio: 6 / 5; } }

/* ---------- Logos / trust strip ---------- */
.trust-strip { padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.trust-strip .eyebrow { color: var(--text-faint); margin-bottom: var(--space-2); display: block; }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-5); align-items: center; }
.trust-row span { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; color: var(--text-faint); text-transform: uppercase; font-size: 0.95rem; }

/* ---------- Sections generic ---------- */
.section { padding-block: var(--space-6); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-tint { background: var(--bg-elevated); }
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
@media (min-width: 900px) {
  .section-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.section-dark .section-head h2 { color: var(--paper); }
.section-head p { max-width: 46ch; }
.section-dark .section-head p, .section-dark p:not(.lead) { color: var(--text-on-dark-muted); }
.section-dark .eyebrow { color: var(--pale); }

/* ---------- Feature trio (one-team style) ---------- */
.feature-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
}
.feature-list { display: grid; gap: var(--space-3); margin-top: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }
.feature-list li { border-top: 2px solid var(--ink); padding-top: var(--space-2); }
.feature-list strong { display: block; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.4em; }
.feature-list p { font-size: 0.88rem; }

/* ---------- Service cards (numbered) ---------- */
.service-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: #2a2627;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #1a1718; }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.service-card:hover .thumb img { transform: scale(1.05); }
.service-card .body { padding: var(--space-3); }
.service-card .eyebrow { color: var(--teal); }
.service-card h3 { font-size: 1.2rem; margin-top: 0.5em; color: var(--paper); }
.service-card p { margin-top: 0.5em; font-size: 0.9rem; color: var(--text-on-dark-muted); }

/* ---------- Industries / work grid ---------- */
.industry-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .industry-grid { grid-template-columns: repeat(3, 1fr); } }
.industry-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated-2);
  display: block;
}
.industry-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.industry-card:hover img, .industry-card:focus-visible img { transform: scale(1.045); }
.industry-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,18,19,0.88) 0%, rgba(20,18,19,0.05) 55%);
}
.industry-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--space-3);
  color: var(--paper);
}
.industry-card .cap .eyebrow { color: var(--pale); display: block; margin-bottom: 0.3em; }
.industry-card .cap h3 { font-size: 1.15rem; color: var(--paper); }

/* ---------- Process steps ---------- */
.process-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 700px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
.process-step { border-top: 2px solid var(--line-strong); padding-top: var(--space-2); }
.process-step .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--blue);
  display: block;
  margin-bottom: 0.3em;
}
.process-step h3 { font-size: 1.05rem; text-transform: uppercase; }
.process-step p { margin-top: 0.4em; font-size: 0.9rem; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  padding: calc(var(--header-h) + var(--space-5)) 0 var(--space-5);
  background: var(--ink);
  color: var(--paper);
}
.page-hero .eyebrow { margin-bottom: var(--space-2); color: var(--pale); }
.page-hero h1 { font-size: clamp(2.2rem, 6.4vw, 4rem); color: var(--paper); }
.page-hero p.lead { margin-top: var(--space-3); max-width: 60ch; color: var(--text-on-dark-muted); }

/* ---------- About / team ---------- */
.about-grid { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.85fr 1.15fr; gap: var(--space-6); align-items: start; } }
.about-photo { width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.value-list { display: grid; gap: var(--space-3); margin-top: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .value-list { grid-template-columns: 1fr 1fr; } }
.value-list li { border-top: 2px solid var(--ink); padding-top: var(--space-2); }
.value-list strong { display: block; font-size: 0.95rem; text-transform: uppercase; margin-bottom: 0.35em; }
.value-list p { font-size: 0.9rem; }

/* ---------- Contact page ---------- */
.contact-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.contact-list a, .contact-list span.static {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-family: var(--font-display);
  font-weight: 700;
}
.contact-list a { transition: color var(--dur-fast) var(--ease); }
.contact-list a:hover, .contact-list a:focus-visible { color: var(--blue); }
.contact-list .label { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }

.placeholder-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.placeholder-note strong { color: var(--text); }

/* ---------- Retainer tier cards ---------- */
.tier-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .tier-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }

.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: var(--space-4);
  position: relative;
}
.tier-card.is-featured {
  border-color: var(--blue);
  border-width: 2px;
  box-shadow: 0 12px 32px rgba(27,93,143,0.12);
}
.tier-badge {
  position: absolute;
  top: -14px; left: var(--space-4);
  background: var(--blue);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35em 0.9em;
  border-radius: 999px;
}
.tier-name { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.tier-title { font-size: 1.6rem; margin-top: 0.3em; }
.tier-price { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; margin-top: var(--space-2); }
.tier-price span { font-family: var(--font-ui); font-weight: 500; font-size: 0.85rem; text-transform: none; letter-spacing: 0; color: var(--text-faint); }
.tier-desc { margin-top: var(--space-2); font-size: 0.9rem; }
/* tier cards are always a white surface, even inside a dark section — pin their text colors */
.section-dark .tier-card,
.section-dark .tier-card h3,
.section-dark .tier-card .tier-price { color: var(--text); }
.section-dark .tier-card p { color: var(--text-muted); }
.section-dark .tier-card .tier-price span { color: var(--text-faint); }
.tier-features { margin-top: var(--space-3); display: flex; flex-direction: column; gap: 0.6em; flex-grow: 1; }
.tier-features li { display: flex; gap: 0.6em; font-size: 0.88rem; color: var(--text); align-items: flex-start; }
.tier-features li::before { content: "✓"; color: var(--blue); font-weight: 700; flex-shrink: 0; }
.tier-card .pill { margin-top: var(--space-4); justify-content: center; width: 100%; }

/* ---------- Stat callouts ---------- */
.stat-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; margin-top: var(--space-3); }
@media (min-width: 640px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.stat-card { border-top: 2px solid var(--ink); padding-top: var(--space-2); }
.stat-number { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--blue); display: block; }
.stat-card p { margin-top: 0.3em; font-size: 0.9rem; }

/* ---------- Add-on service cards ---------- */
.addon-grid { display: grid; gap: var(--space-2); grid-template-columns: 1fr; margin-top: var(--space-3); }
@media (min-width: 700px) { .addon-grid { grid-template-columns: 1fr 1fr; } }
.addon-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: var(--bg-elevated);
}
.addon-card .eyebrow { color: var(--teal); }
.addon-card h3 { font-size: 1.05rem; margin-top: 0.4em; }
.addon-card p { margin-top: 0.4em; font-size: 0.88rem; }

/* ---------- Video placeholder cards ---------- */
.video-grid { display: grid; gap: var(--space-2); grid-template-columns: 1fr; }
@media (min-width: 700px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }

.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(155deg, var(--bg-elevated-2), var(--bg-elevated));
  border: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  text-align: center;
  padding: var(--space-3);
}
.video-placeholder .play-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.video-placeholder .play-icon svg { width: 18px; height: 18px; }
.video-placeholder .video-tag {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3em 0.8em;
}
.video-placeholder .video-label { font-family: var(--font-display); font-weight: 700; color: var(--text-muted); font-size: 0.95rem; margin-top: 0.3em; }
.video-placeholder .video-meta { font-size: 0.78rem; color: var(--text-faint); }

/* ---------- Real video cards (homepage) ---------- */
.video-grid-real { display: grid; gap: var(--space-2); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 700px) { .video-grid-real { grid-template-columns: repeat(3, 1fr); } }
.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c0b0b;
  border: 1px solid var(--line);
}
.video-card video { width: 100%; height: auto; display: block; background: #0c0b0b; }
.video-card .video-info { padding: var(--space-2) var(--space-3); }
.video-card .video-info .eyebrow { color: var(--teal); }
.video-card .video-info h3 { font-size: 1.05rem; margin-top: 0.3em; }

/* ---------- Gallery grid (Work page) ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  aspect-ratio: 4 / 5;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.gallery-item.is-visible { opacity: 1; transform: translateY(0); }
@media (min-width: 640px) {
  .gallery-item.span-wide { grid-column: span 2; aspect-ratio: 16/10; }
}
.gallery-item button {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-med) var(--ease);
}
.gallery-item:hover img, .gallery-item:focus-within img { transform: scale(1.04); }
.gallery-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--space-2);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  pointer-events: none;
}
.gallery-item:hover .cap, .gallery-item:focus-within .cap { opacity: 1; transform: translateY(0); }

.gallery-section { margin-bottom: var(--space-5); }
.gallery-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); padding-bottom: var(--space-2); }
.gallery-section-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.gallery-section-head span { font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(10,9,9,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease), visibility var(--dur-med);
  padding: var(--space-3);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox figure { max-width: 92vw; max-height: 82vh; margin: 0; }
.lightbox img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { text-align: center; margin-top: var(--space-2); color: rgba(255,255,255,0.72); font-size: 0.82rem; letter-spacing: 0.04em; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(10,10,11,0.4);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--pale); color: var(--pale); }
.lightbox-close { top: var(--space-3); right: var(--space-3); }
.lightbox-prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
}
.lightbox-count { position: absolute; bottom: var(--space-3); left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--space-4);
}
.footer-grid { display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 900px) { .footer-grid { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.footer-links a { color: var(--text-on-dark-muted); font-size: 0.85rem; transition: color var(--dur-fast) var(--ease); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--paper); }
.footer-meta { color: var(--text-on-dark-faint); font-size: 0.78rem; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
