/* ============================================================
   IRONSHORE INC — VERSION 3
   Editorial craft-forward design
   Palette: off-white #FDFBF7 | forest #2C3E2D | brass #B8860B
            charcoal #1A1A1A | body-grey #4A4A4A | white #FFFFFF
   ============================================================ */

/* ── Custom Properties ───────────────────────────────────── */
:root {
  --bg:          #FDFBF7;
  --forest:      #2C3E2D;
  --brass:       #B8860B;
  --brass-light: #D4A017;
  --charcoal:    #1A1A1A;
  --body:        #4A4A4A;
  --white:       #FFFFFF;
  --rule:        rgba(44, 62, 45, 0.18);
  --shadow-sm:   0 2px 12px rgba(26,26,26,0.08);
  --shadow-md:   0 8px 40px rgba(26,26,26,0.14);
  --shadow-lg:   0 20px 70px rgba(26,26,26,0.22);

  --serif:  'DM Serif Display', Georgia, serif;
  --sans:   'Inter', system-ui, -apple-system, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  --max-w: 1200px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--sans);
  cursor: pointer;
}

/* ── Utility: container ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* ── Utility: section title ───────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.75rem;
}

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
/* Cross-browser note: backdrop-filter is unsupported in Firefox < 103 and
   some older mobile browsers. The fallback (no @supports block) provides a
   near-opaque background so the header is still legible without the blur.
   The -webkit- prefix already covers Safari/Chrome. Firefox 103+ supports
   the unprefixed form natively, so no extra rule is needed. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(253, 251, 247, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

/* Fallback: for browsers where backdrop-filter is not supported,
   raise the opacity so the header is fully readable. */
@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(253, 251, 247, 1);
  }
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
}

/* Logo — left column */
.site-logo {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--forest);
  white-space: nowrap;
}

.site-logo span {
  display: block;
  font-weight: 300;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--brass);
  margin-top: 1px;
}

/* Desktop nav — center column */
.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--body);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width 0.3s ease;
}

.site-nav a:hover {
  color: var(--charcoal);
}

.site-nav a:hover::after {
  width: 100%;
}

/* CTA — right column */
.header-cta {
  display: flex;
  justify-content: flex-end;
}

.btn-cta {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--forest);
  background: transparent;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}

.btn-cta:hover {
  background: var(--forest);
  color: var(--white);
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  z-index: 200;
  cursor: pointer;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.35s ease, opacity 0.25s ease;
  transform-origin: center;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--forest);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
  visibility: hidden;
}

.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-nav a {
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 3.5rem);
  color: var(--white);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.mobile-nav a:hover {
  opacity: 1;
}

.mobile-nav-contact {
  margin-top: 1rem;
  text-align: center;
}

.mobile-nav-contact p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
}

.mobile-nav-contact a {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--brass-light);
  opacity: 1;
}


/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: calc(100svh - var(--header-h));
  min-height: 560px;
  max-height: 900px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed; /* parallax */
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(26, 26, 26, 0.68) 0%,
    rgba(26, 26, 26, 0.35) 55%,
    rgba(26, 26, 26, 0.08) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: 1.05;
  color: var(--white);
  max-width: 14ch;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgba(255,255,255,0.78);
  max-width: 44ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 2rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.35s, border-color 0.35s;
  align-self: flex-start;
}

.btn-hero:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn-hero svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.btn-hero:hover svg {
  transform: translateX(4px);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero-scroll::before {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 0.3; }
  50%       { transform: scaleY(0.5); opacity: 0.8; }
}


/* ══════════════════════════════════════════════════════════
   STATS RIBBON
══════════════════════════════════════════════════════════ */
.stats-ribbon {
  background: var(--forest);
  color: var(--white);
  padding: 1.4rem 0;
  overflow: hidden;
}

.stats-ribbon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem 2.5rem;
  border-right: 1px solid rgba(255,255,255,0.18);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--white);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  max-width: 12ch;
  line-height: 1.35;
}

/* Full-width ribbon marquee variant for notable clients */
.clients-ribbon {
  background: var(--brass);
  padding: 0.85rem 0;
  overflow: hidden;
}

.clients-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  width: max-content;
}

.clients-ribbon:hover .clients-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.client-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.9;
}

.client-dot {
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════
   OUR STORY
══════════════════════════════════════════════════════════ */
.story-section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--rule);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.story-image-wrap {
  position: relative;
}

.story-image-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Offset accent block */
.story-image-wrap::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: -1.5rem;
  width: 60%;
  height: 60%;
  border: 1px solid var(--brass);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.story-text {
  padding-top: 1rem;
}

.story-text h2 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.1;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}

.story-text .lead {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--charcoal);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.story-text p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--body);
  margin-bottom: 1rem;
}

.story-text p:last-of-type {
  margin-bottom: 0;
}

.story-founders {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.founders-line {
  width: 32px;
  height: 1px;
  background: var(--brass);
  flex-shrink: 0;
}

.founders-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
}

.founders-sub {
  font-size: 0.7rem;
  color: var(--body);
  letter-spacing: 0.06em;
}


/* ══════════════════════════════════════════════════════════
   SERVICES
══════════════════════════════════════════════════════════ */
.services-section {
  padding: var(--space-xl) 0;
  background: var(--forest);
}

.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.services-header .section-label {
  color: rgba(255,255,255,0.45);
}

.services-header h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--white);
  line-height: 1.1;
}

.services-header p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  line-height: 1.7;
  align-self: end;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.service-card {
  background: var(--forest);
  padding: 2.5rem 2rem;
  position: relative;
  transition: background 0.35s ease;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}

.service-card:hover {
  background: rgba(255,255,255,0.04);
}

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

.service-icon {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  display: block;
  line-height: 1;
  opacity: 0.8;
}

.service-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.service-card p {
  font-size: 0.88rem;
  line-height: 1.72;
  color: rgba(255,255,255,0.58);
  margin-bottom: 1.5rem;
}

.service-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-detail-list li {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.42);
  padding-left: 1rem;
  position: relative;
}

.service-detail-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--brass);
  font-size: 0.7rem;
  top: 1px;
}


/* ══════════════════════════════════════════════════════════
   PROJECT GALLERY
══════════════════════════════════════════════════════════ */
.gallery-section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--rule);
}

.gallery-section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.gallery-section-header h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--charcoal);
  line-height: 1.1;
}

/* Tab controls */
.gallery-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.gallery-tab {
  padding: 0.75rem 1.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--body);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  margin-bottom: -1px;
}

.gallery-tab.is-active {
  color: var(--charcoal);
  border-bottom-color: var(--brass);
}

.gallery-tab:hover:not(.is-active) {
  color: var(--charcoal);
}

/* Tab panels */
.gallery-panel {
  display: none;
}

.gallery-panel.is-active {
  display: block;
}

/* Masonry-style grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Varying heights for visual rhythm */
.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--forest);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease, filter 0.35s ease;
  filter: brightness(0.92);
}

.gallery-item:nth-child(4n+1) img { height: 320px; }
.gallery-item:nth-child(5n+3) img { height: 220px; }

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}

/* Overlay caption on hover */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.72) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-overlay span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

/* Show-more button */
.gallery-show-more {
  text-align: center;
  margin-top: 2rem;
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  border: 1px solid var(--forest);
  background: transparent;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-show-more:hover {
  background: var(--forest);
  color: var(--white);
}

.btn-show-more.is-expanded .expand-icon {
  transform: rotate(180deg);
}

.expand-icon {
  transition: transform 0.3s ease;
  display: inline-block;
  font-size: 0.7rem;
}

/* Hidden-by-default gallery items */
.gallery-item.is-hidden {
  display: none;
}


/* ══════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* BUG FIX: 'pointer-events: all' is not a valid CSS value. The correct
   keyword is 'auto', which re-enables pointer events after 'none'. */
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  position: absolute;
  bottom: -2rem;
  left: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  border-color: var(--white);
  color: var(--white);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}


/* ══════════════════════════════════════════════════════════
   NOTABLE INSTITUTIONS
══════════════════════════════════════════════════════════ */
.institutions-section {
  padding: var(--space-lg) 0;
  background: var(--white);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.institutions-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
}

.institutions-label-block {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rule);
  white-space: nowrap;
}

.institutions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.institution-item {
  padding: 1.25rem 2rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Note: this rule assumes exactly 3 columns. It is intentionally desktop-only;
   the 768px breakpoint overrides it for mobile. If the number of institutions
   changes, update the value from -n+3 to match the new column count. */
.institution-item:nth-last-child(-n+3) {
  border-bottom: none;
}

.institution-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--charcoal);
  display: block;
  margin-bottom: 0.25rem;
}

.institution-type {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass);
}


/* ══════════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════════ */
.contact-section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--rule);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contact-form-side h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--charcoal);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.contact-form-side .sub {
  font-size: 0.92rem;
  color: var(--body);
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

/* Form fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
}

.field input,
.field textarea,
.field select {
  border: none;
  border-bottom: 1.5px solid var(--rule);
  background: transparent;
  padding: 0.6rem 0;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--charcoal);
  transition: border-color 0.3s;
  border-radius: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(74, 74, 74, 0.35);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--brass);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

/* Inline validation */
.field-error {
  font-size: 0.7rem;
  color: #c0392b;
  letter-spacing: 0.04em;
  min-height: 1em;
  display: none;
}

.field.has-error .field-error {
  display: block;
}

.field.has-error input,
.field.has-error textarea {
  border-bottom-color: #c0392b;
}

.field.is-valid input,
.field.is-valid textarea {
  border-bottom-color: #27ae60;
}

/* Submit button */
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--forest);
  border: 1px solid var(--forest);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s, transform 0.2s;
}

.btn-submit:hover {
  background: #1e2e1f;
  transform: translateY(-1px);
}

.form-success {
  display: none;
  padding: 1.5rem;
  background: rgba(44, 62, 45, 0.06);
  border-left: 3px solid var(--forest);
  font-size: 0.9rem;
  color: var(--forest);
}

.form-success.is-visible {
  display: block;
}

/* Contact info side */
.contact-info-side {
  padding-top: 5.5rem;
}

.contact-info-side h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.contact-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--brass);
}

.contact-detail-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-detail-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--body);
}

.contact-detail-value {
  font-size: 0.95rem;
  color: var(--charcoal);
}

.contact-detail-value a {
  color: var(--charcoal);
  transition: color 0.2s;
}

.contact-detail-value a:hover {
  color: var(--brass);
}

/* Map placeholder */
.map-placeholder {
  margin-top: 2.5rem;
  height: 200px;
  background: linear-gradient(135deg, rgba(44,62,45,0.07) 0%, rgba(44,62,45,0.04) 100%);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--rule) 0px, var(--rule) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, var(--rule) 0px, var(--rule) 1px, transparent 1px, transparent 40px);
  opacity: 0.5;
}

.map-placeholder span {
  position: relative;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--body);
  background: var(--bg);
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule);
}


/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.55);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}

.footer-brand .site-logo {
  color: var(--white);
  display: inline-block;
  margin-bottom: 1.25rem;
}

.footer-brand .site-logo span {
  color: var(--brass);
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  max-width: 32ch;
}

.footer-col h4 {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--brass-light);
}

.footer-col address {
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.45);
}

.footer-col address a {
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}

.footer-col address a:hover {
  color: var(--brass-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.06em;
}

.footer-tagline {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255,255,255,0.25);
}


/* ══════════════════════════════════════════════════════════
   FOCUS STATES (accessibility)
══════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .institutions-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .institutions-label-block {
    writing-mode: horizontal-tb;
    transform: none;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  /* Header: show hamburger, hide desktop nav */
  .site-nav { display: none; }
  .header-cta { display: none; }
  .hamburger { display: flex; }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  /* Hero — reduce image dominance, let text breathe */
  .hero {
    max-height: none;
    min-height: auto;
    height: 65svh;
    min-height: 420px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 9vw, 3.4rem);
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-bg {
    background-attachment: scroll; /* fixed attachment broken on iOS */
  }

  /* Stats */
  .stats-ribbon-inner {
    flex-direction: column;
    gap: 0;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  /* Story */
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .story-image-wrap::before {
    display: none;
  }

  .story-image-wrap img {
    aspect-ratio: 4 / 3;
  }

  /* Services */
  .services-header {
    grid-template-columns: 1fr;
  }

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

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-section-header {
    grid-template-columns: 1fr;
  }

  /* Institutions */
  .institution-item {
    padding: 1rem 1.25rem;
  }

  .institution-item:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--rule);
  }

  .institution-item:last-child {
    border-bottom: none;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-side {
    padding-top: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img,
  .gallery-item:nth-child(4n+1) img,
  .gallery-item:nth-child(5n+3) img {
    height: 220px;
  }

  .stats-ribbon-inner {
    flex-direction: column;
  }

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