@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Serif:wght@400;500&display=swap');

:root {
  /* Trust palette — navy + gold + white, researched against finance/mining trust signals */
  --navy-900: #061B33;
  --navy-800: #0A2540;
  --navy-700: #0E2D52;
  --navy-600: #14406F;
  --navy-50:  #F2F5F9;
  --ink:      #0F1A2A;
  --ink-2:    #3D4A5C;
  --ink-3:    #6B7585;
  --rule:     #DFE4EC;
  --rule-dk:  rgba(255,255,255,0.14);
  --gold:     #C8A35C;
  --gold-2:   #E2BE7A;
  --bg:       #FFFFFF;
  --bg-soft:  #F7F8FB;

  --sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;

  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --max: 76rem;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'tnum' 1, 'kern' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

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

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

.measure { max-width: var(--measure); }

/* ============ TOP BAR ============ */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 1.5rem 0;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
}
.brand img { height: 38px; width: auto; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35)); }
.brand .wm-name {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
}
.brand .wm-sub {
  display: block;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-top: 2px;
}
.nav {
  display: flex;
  gap: 1.6rem;
}
.nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--gold);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: #fff;
  transition: transform 200ms ease, opacity 160ms ease, top 200ms ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Topbar variant for non-hero pages — dark logo on white */
.topbar.solid {
  position: relative;
  background: var(--navy-800);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  background: var(--navy-900);
  color: #fff;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: -2;
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,27,51,0.55) 0%, rgba(6,27,51,0.7) 60%, rgba(6,27,51,0.92) 100%);
  z-index: -1;
}
.hero-inner {
  padding: 8rem 0 4rem;
  width: 100%;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--gold);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: #fff;
  max-width: 22ch;
  margin-bottom: 1.5rem;
}
.hero .lede {
  max-width: 52ch;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2.5rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.hero-meta div { display: flex; flex-direction: column; gap: 0.25rem; }
.hero-meta .k {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.hero-meta .v {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ============ SECTIONS ============ */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section.dark { background: var(--navy-800); color: #fff; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .section-eyebrow { color: var(--gold-2); }
.section.dark .lead { color: rgba(255,255,255,0.85); }
.section.dark a { color: var(--gold-2); border-bottom: 1px solid rgba(226,190,122,0.4); }
.section.dark a:hover { border-bottom-color: var(--gold-2); }
.section.soft { background: var(--bg-soft); }

.section-head { margin-bottom: 3rem; max-width: var(--measure); }
.section-eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
  font-weight: 500;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.012em;
  margin-bottom: 1rem;
}
.section-head .lead {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 50ch;
}

/* ============ STATS STRIP ============ */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stats > div {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.stats > div:last-child { border-bottom: none; }
.stats .k {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.stats .v {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}
.stats .v small { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-3); margin-left: 0.4rem; font-weight: 400; }

/* ============ TWO-COLUMN ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
.two-col .figure { position: relative; }
.figure img, .figure video {
  width: 100%; height: auto;
  border-radius: 2px;
  display: block;
}
.figure .cap {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: 0.6rem;
  letter-spacing: 0.02em;
}

/* ============ HOLDINGS GRID ============ */
.holdings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
.holding-card {
  border: 1px solid var(--rule);
  padding: 1.5rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.holding-card .symbol {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.holding-card .name {
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}
.holding-card .desc {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ============ CLIP GALLERY ============ */
.clips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
.clip-card {
  position: relative;
  background: var(--navy-900);
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16 / 9;
}
.clip-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.clip-cap {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.section.dark .clip-cap { color: rgba(255,255,255,0.6); }

/* ============ LEADER CARD ============ */
.leader {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  display: grid;
  gap: 1rem;
}
.leader:last-child { border-bottom: 1px solid var(--rule); }
.leader .name {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
}
.leader .role {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.leader .bio { color: var(--ink-2); max-width: 60ch; }
.leader .credentials {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin-top: 0.5rem;
}

/* ============ FACTS DL ============ */
dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 2rem;
  row-gap: 0.65rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
dl.facts dt { font-size: 0.85rem; color: var(--ink-3); }
dl.facts dd { margin: 0; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* ============ FOOTER ============ */
.foot {
  background: var(--navy-900);
  color: rgba(255,255,255,0.78);
  padding: 4rem 0 1.5rem;
  font-size: 0.88rem;
}
.foot .container { display: grid; gap: 2rem; }
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule-dk);
}
.foot h4 {
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.85rem;
}
.foot p { margin: 0 0 0.4em; line-height: 1.6; }
.foot a { color: var(--gold-2); border-bottom: 1px solid rgba(226,190,122,0.35); }
.foot a:hover { border-bottom-color: var(--gold-2); }
.foot .legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.5);
  padding-top: 1.25rem;
}
.disclaimer {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
  max-width: 90ch;
}

/* ============ INNER PAGE TITLE ============ */
.page-head {
  background: var(--navy-800);
  color: #fff;
  padding: 6rem 0 3.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: #fff;
  letter-spacing: -0.012em;
  max-width: 22ch;
  margin-bottom: 0.85rem;
}
.page-head .lede {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  max-width: 56ch;
}

/* ============ PERMIT GALLERY ============ */
.permit-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.permit-card {
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.18s;
  background: #fff;
}
.permit-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.1); }
.permit-card img { width: 100%; height: 240px; object-fit: cover; object-position: top center; display: block; }
.permit-card-body { padding: 1rem 1.25rem 1.25rem; }
.permit-card-body .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-1); font-weight: 600; }
.permit-card-body h3 { font-size: 0.95rem; font-weight: 500; margin: 0.35rem 0 0.3rem; color: var(--ink-1); line-height: 1.35; }
.permit-card-body .ref { font-size: 0.77rem; color: var(--ink-3); font-family: var(--mono, monospace); letter-spacing: 0.01em; }

/* ============ LIGHTBOX ============ */
.lb-dialog { border: none; border-radius: 4px; padding: 0; max-width: min(92vw, 700px); width: 100%; box-shadow: 0 24px 80px rgba(0,0,0,0.55); }
.lb-dialog::backdrop { background: rgba(0,0,0,0.75); }
.lb-dialog img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #111; }
.lb-close { display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; padding: 0.55rem 0.85rem; font-size: 0.78rem; color: var(--ink-3); cursor: pointer; background: #f5f5f3; border: none; width: 100%; font-family: var(--sans); letter-spacing: 0.04em; border-top: 1px solid var(--rule); }
.lb-close:hover { color: var(--ink-1); }

/* ============ PHOTO GRID (ops / CSR) ============ */
.photo-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2rem; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; height: 210px; object-fit: cover; border-radius: 2px; display: block; }
.photo-grid figcaption { font-size: 0.77rem; color: var(--ink-3); margin-top: 0.45rem; letter-spacing: 0.015em; }
.section.dark .photo-grid figcaption { color: rgba(255,255,255,0.55); }

/* ============ MAP PAIR ============ */
.map-pair { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.map-pair figure { margin: 0; }
.map-pair img { width: 100%; border-radius: 2px; display: block; }
.map-pair figcaption { font-size: 0.75rem; color: var(--ink-3); margin-top: 0.4rem; }

/* ============ MOBILE NAV (< 768px) ============ */
@media (max-width: 767px) {
  .topbar {
    position: sticky;
    top: 0;
    background: var(--navy-900);
    padding: 0.75rem 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  }
  .topbar .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
  }
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    gap: 0;
    padding: 0 var(--gut);
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav[data-open="true"] {
    max-height: calc(100vh - 4rem);
    box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  }
  .nav a {
    padding: 1rem 0;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav a:last-child { border-bottom: 0; }
  /* Hero no longer needs the topbar's reserved space on mobile */
  .hero-inner { padding-top: 3rem; }
  .hero { min-height: auto; }

  /* Facts list — long unbreakable permit numbers force overflow on narrow screens.
     Allow wrap and let the grid column collapse. */
  dl.facts { grid-template-columns: minmax(7rem, max-content) 1fr; column-gap: 1.25rem; }
  dl.facts dd { min-width: 0; overflow-wrap: anywhere; }
}

/* ============ DESKTOP ============ */
@media (min-width: 768px) {
  body { font-size: 17px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats > div {
    padding: 1.75rem 1.5rem;
    border-bottom: none;
    border-right: 1px solid var(--rule);
  }
  .stats > div:first-child { padding-left: 0; }
  .stats > div:last-child { padding-right: 0; border-right: none; }
  .two-col { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
  .two-col.flip { grid-template-columns: 1fr 1.1fr; }
  .two-col.flip .figure { order: -1; }
  .holdings { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .clips { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .permit-gallery { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid img { height: 220px; }
  .map-pair { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
  .leader { grid-template-columns: 220px 1fr; gap: 2.5rem; align-items: start; }
  .leader .meta { display: flex; flex-direction: column; gap: 0.6rem; }
  .brand img { height: 44px; }
  .brand .wm-name { font-size: 1.1rem; }
}
