/* ══════════════════════════════════════════════════════════
   DESKTOP — metallic surfaces, 3D depth, fluid motion.
   Additive only: nothing here changes layout or copy.
   Loaded after the page's own <style>, so it wins on tie.
═══════════════════════════════════════════════════════════ */

:root {
  /* brass / antique-gold leaf — the trust's metal */
  --metal-1: #8C6B1F;
  --metal-2: #D9B45B;
  --metal-3: #F7EBC0;
  --metal-4: #B98F32;
  --metal-5: #6E5216;
  --metal-sheen: linear-gradient(115deg,
      var(--metal-5) 0%, var(--metal-1) 14%, var(--metal-2) 30%,
      var(--metal-3) 44%, #FFFDF4 50%, var(--metal-3) 56%,
      var(--metal-2) 70%, var(--metal-4) 84%, var(--metal-5) 100%);

  /* forest-metal for dark grounds */
  --metal-green: linear-gradient(115deg,
      #14392A 0%, #2E5E4E 18%, #6FA88C 38%, #CFE8DA 50%,
      #6FA88C 62%, #2E5E4E 82%, #14392A 100%);

  --spring: cubic-bezier(.16,1,.3,1);
  --spring-soft: cubic-bezier(.22,1,.36,1);
}

/* ── Fluidity: springier reveals ─────────────────────────── */
.reveal {
  transition: opacity .9s var(--spring-soft),
              transform .9s var(--spring-soft),
              filter .9s var(--spring-soft);
  filter: blur(6px);
}
.reveal.visible { filter: blur(0); }

/* ── Metallic type ───────────────────────────────────────── */
.metal-text {
  background: var(--metal-sheen);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: metalDrift 9s ease-in-out infinite;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.28))
          drop-shadow(0 2px 10px rgba(140,107,31,.28));
}
@keyframes metalDrift {
  0%,100% { background-position:   0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* stat numerals on the dark band get the brass treatment */
.stat-n, .fstat-n, .why-stat-big {
  background: var(--metal-sheen);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: metalDrift 11s ease-in-out infinite;
  filter: drop-shadow(0 2px 14px rgba(217,180,91,.30));
}
.stat-n span, .why-stat-big span { -webkit-text-fill-color: transparent; }

/* ── Specular card surfaces ──────────────────────────────── */
.tilt-card, .prog-card, .cert-card {
  position: relative;
  transition: transform .5s var(--spring), box-shadow .5s var(--spring);
}

/* thin brushed edge + inner light, so a card reads as a machined plate */
.prog-card, .cert-card, .mission-panel, .flagship-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(31,77,58,.06),
    0 18px 44px rgba(31,77,58,.10);
}
.prog-card.featured, .flagship-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(0,0,0,.22),
    0 26px 64px rgba(10,30,20,.34);
}

/* moving glare that tracks the pointer — the "polished metal" tell */
.tilt-card::before, .prog-card::before, .cert-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity .45s var(--spring);
  background: radial-gradient(
      420px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255,255,255,.34) 0%,
      rgba(255,255,255,.10) 26%,
      rgba(255,255,255,0) 58%);
  mix-blend-mode: soft-light;
}
.prog-card.featured::before, .flagship-card::before {
  background: radial-gradient(
      460px circle at var(--mx, 50%) var(--my, 50%),
      rgba(247,235,192,.30) 0%,
      rgba(217,180,91,.12) 28%,
      rgba(255,255,255,0) 60%);
  mix-blend-mode: screen;
}
.tilt-card:hover::before,
.prog-card:hover::before,
.cert-card:hover::before { opacity: 1; }

/* brushed hairline that lights up on approach */
.prog-card::after { z-index: 5; }
.cert-card::before { border-radius: inherit; }

/* ── Buttons: struck metal ───────────────────────────────── */
.btn-terra, .nav-cta, .btn-beige {
  position: relative; overflow: hidden;
  transition: transform .45s var(--spring), box-shadow .45s var(--spring), filter .45s var(--spring);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -2px 0 rgba(0,0,0,.16),
    0 8px 20px rgba(201,107,59,.22);
}
.btn-beige {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -2px 0 rgba(140,107,31,.18),
    0 8px 22px rgba(244,235,208,.22);
}
/* sheen sweep on hover */
.btn-terra::after, .btn-beige::after, .nav-cta::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg,
      transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  transform: skewX(-18deg);
  transition: left .75s var(--spring);
  pointer-events: none;
}
.btn-terra:hover::after, .btn-beige:hover::after, .nav-cta:hover::after { left: 130%; }
.btn-terra:hover, .btn-beige:hover { transform: translateY(-3px) scale(1.015); }

/* ── The emblem, in 3D ───────────────────────────────────── */
.mission-panel { perspective: 1100px; }
.mission-panel img {
  transform-style: preserve-3d;
  animation: emblemFloat 11s ease-in-out infinite;
  filter: drop-shadow(0 18px 26px rgba(31,77,58,.26));
  will-change: transform;
}
@keyframes emblemFloat {
  0%,100% { transform: perspective(1100px) rotateY(-9deg) rotateX(3deg) translateZ(0); }
  50%     { transform: perspective(1100px) rotateY(9deg)  rotateX(-3deg) translateZ(26px); }
}
/* brass halo behind the emblem */
.mission-panel::before {
  content: '';
  position: absolute; top: 34px; left: 50%;
  width: 260px; height: 260px; margin-left: -130px;
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(217,180,91,.26) 0%, rgba(217,180,91,.10) 42%, transparent 68%);
  filter: blur(14px);
  animation: haloPulse 7s ease-in-out infinite;
  pointer-events: none; z-index: 0;
}
@keyframes haloPulse {
  0%,100% { opacity: .55; transform: scale(.94); }
  50%     { opacity: 1;   transform: scale(1.06); }
}
.mission-panel > * { position: relative; z-index: 1; }

/* ── Nav mark: subtle metal lift on scroll ───────────────── */
nav.scrolled { box-shadow: 0 1px 0 rgba(217,180,91,.28), 0 6px 28px rgba(31,77,58,.10); }

/* ── Section seams: a hairline of brass between grounds ──── */
.stats-band, .cta-section, .flagship-card {
  position: relative;
}
.stats-band::before, .cta-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
      transparent 0%, rgba(217,180,91,.42) 22%,
      rgba(247,235,192,.62) 50%,
      rgba(217,180,91,.42) 78%, transparent 100%);
  z-index: 2;
}

/* ── Gallery tiles: depth + specular ─────────────────────── */
.g-item {
  transition: transform .6s var(--spring), box-shadow .6s var(--spring);
  box-shadow: 0 10px 30px rgba(31,77,58,.12);
}
.g-item:hover {
  transform: translateY(-6px) scale(1.008);
  box-shadow: 0 30px 64px rgba(31,77,58,.24);
}

/* ── Cursor-follow ambient light on dark bands ───────────── */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none; z-index: 55;
  background: radial-gradient(circle,
      rgba(247,235,192,.10) 0%, rgba(217,180,91,.05) 34%, transparent 66%);
  opacity: 0; transition: opacity .6s ease;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .metal-text, .stat-n, .fstat-n, .why-stat-big,
  .mission-panel img, .mission-panel::before { animation: none !important; }
  .reveal { filter: none !important; }
  .cursor-glow { display: none !important; }
}
