/* Grumpy Vet Co — tactical luxury design system */
:root {
  --bg: #070806;
  --bg-elev: #0e100c;
  --bg-card: #12150f;
  --bg-soft: #181c14;
  --line: rgba(196, 163, 90, 0.18);
  --line-strong: rgba(196, 163, 90, 0.42);
  --olive: #6b7a45;
  --olive-deep: #3d4a28;
  --olive-bright: #9aaf62;
  --brass: #c4a35a;
  --brass-hot: #e0c47a;
  --sand: #e8e2d4;
  --sand-dim: #a8a396;
  --smoke: #8b9084;
  --white: #f5f2ea;
  --danger: #b54a3a;
  --radius: 4px;
  --radius-lg: 10px;
  --nav-h: 76px;
  --max: 1200px;
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Scoped — do NOT kill * all animations (that froze the marquee ribbon on iOS
   “Reduce Motion” / many phones). Only pause decorative motion that isn’t the
   ribbon; marquee must keep scrolling or it looks broken/stuck. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-logo-lockup,
  .operator-float,
  .mission-float {
    animation: none !important;
  }
  /* Marquee: slower loop instead of freeze */
  .marquee-track {
    animation-duration: 64s !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--sand);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Film grain + atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* Typography */
.eyebrow {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brass);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  /* 0.95 clipped Bebas caps on some Android WebViews — keep ≥1 */
  line-height: 1.05;
  color: var(--white);
  text-wrap: balance;
  font-synthesis: none;
}

/*
 * Accent words: STITCHED CLEAN, KIT, ARSENAL, etc.
 * background-clip:text is flaky on Android/Samsung without -webkit-text-fill-color,
 * and can leave text white/invisible. Always set a solid fallback first.
 */
.grad-text {
  font-style: normal;
  /* Fallback — always readable if clip fails */
  color: var(--brass-hot);
  -webkit-text-fill-color: var(--brass-hot);
  background-image: none;
  text-shadow: none;
  padding-right: 0.06em;
}

/* Desktop / capable browsers: brass → olive gradient fill */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .grad-text {
    background-image: linear-gradient(
      105deg,
      var(--brass-hot) 0%,
      var(--brass) 42%,
      var(--olive-bright) 100%
    );
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* last glyph safety */
    padding-right: 0.1em;
  }
}

/* Phones: solid accent (gradient fill still broken on many Android WebViews) */
@media (max-width: 980px) {
  .grad-text {
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: var(--brass-hot) !important;
    color: var(--brass-hot) !important;
    /* subtle depth so it still feels special next to white heads */
    text-shadow: 0 0 24px rgba(196, 163, 90, 0.25);
  }
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--sand-dim);
  max-width: 52ch;
  line-height: 1.65;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #e8c56a 0%, var(--brass) 45%, #a67c2d 100%);
  color: #0a0a08;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(196, 163, 90, 0.28);
  text-shadow: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f0d78a 0%, var(--brass-hot) 50%, var(--brass) 100%);
  box-shadow: 0 14px 36px rgba(196, 163, 90, 0.4);
  color: #000;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--sand);
}
.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--white);
  background: rgba(196, 163, 90, 0.06);
}
/* Nav CTA: high contrast at rest (was hard to read) */
.nav-cta.btn-primary,
a.nav-cta.btn-primary {
  background: var(--olive-deep);
  color: var(--brass-hot);
  border: 1px solid var(--brass);
  box-shadow: none;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.nav-cta.btn-primary:hover,
a.nav-cta.btn-primary:hover {
  background: linear-gradient(135deg, #e8c56a 0%, var(--brass) 100%);
  color: #0a0a08;
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(196, 163, 90, 0.3);
}
.btn-block { width: 100%; }

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 8, 6, 0.88);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 1.5px solid var(--brass);
  background: #000;
  box-shadow: 0 0 0 2px rgba(196, 163, 90, 0.15), 0 4px 14px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  color: var(--white);
  line-height: 1;
}
.brand-text span {
  display: block;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--brass);
  margin-top: 4px;
  font-weight: 600;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand-dim);
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.nav-cta { margin-left: 8px; min-height: 44px; padding: 0 18px; font-size: 13px; }
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--sand);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(107, 122, 69, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(196, 163, 90, 0.1), transparent 50%),
    linear-gradient(180deg, #050605 0%, var(--bg) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(var(--brass) 1px, transparent 1px),
    linear-gradient(90deg, var(--brass) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 40px));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(3.6rem, 9vw, 7.2rem);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  display: block;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.hero .lede { margin-bottom: 20px; }
.hero-stats {
  display: flex;
  max-width: 480px;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.hero-stats .stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.hero-stats .stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--brass);
  letter-spacing: 0.04em;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-top: 6px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(100%, 400px);
  margin-inline: auto;
  justify-self: center;
}

/* Operator videos (mission / quote accents) */
.operator-float {
  position: absolute;
  z-index: 3;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brass);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(196, 163, 90, 0.12);
  background: #000;
  pointer-events: none;
}
.operator-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mission {
  position: relative;
  overflow: hidden;
}
.mission-float {
  right: 4%;
  top: 12%;
  width: 100px;
  height: 100px;
  opacity: 0.92;
  animation: float-soft 6.5s ease-in-out infinite reverse;
}
.quote-operator {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--brass);
  margin: 0 0 16px auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: #000;
}
.quote-operator .operator-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== HERO: full logo in an upgraded tactical frame (not a plain black box) ===== */
.hero-logo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.hero-logo-lockup {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1;
  border-radius: 20px;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  animation: hero-logo-breathe 7s ease-in-out infinite;
  /* layered frame: deep plate + brass rim + olive wash */
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(107, 122, 69, 0.28), transparent 62%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(196, 163, 90, 0.12), transparent 55%),
    linear-gradient(160deg, #12150f 0%, #0a0b08 45%, #050605 100%);
  border: 1px solid rgba(196, 163, 90, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 0 6px rgba(196, 163, 90, 0.06),
    0 0 40px rgba(107, 122, 69, 0.18),
    0 28px 60px rgba(0, 0, 0, 0.55);
}
/* brass corner ticks — tactical badge feel */
.hero-logo-lockup::before,
.hero-logo-lockup::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 4;
  pointer-events: none;
  border-color: var(--brass);
  border-style: solid;
  opacity: 0.75;
}
.hero-logo-lockup::before {
  top: 10px;
  left: 10px;
  border-width: 2px 0 0 2px;
}
.hero-logo-lockup::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 2px 2px 0;
}
/* inner glass/vignette plate */
.hero-logo-media {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(20, 24, 14, 0.2), #000 70%);
  box-shadow:
    inset 0 0 0 1px rgba(196, 163, 90, 0.15),
    inset 0 0 40px rgba(0, 0, 0, 0.45);
}
.hero-logo-media .hero-logo-img,
.hero-logo-media .hero-logo-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  display: block;
  z-index: 1;
}
.hero-logo-vid { z-index: 2; }
/* soft top highlight sweep */
.hero-logo-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(232, 226, 212, 0.07) 0%,
    transparent 28%,
    transparent 72%,
    rgba(0, 0, 0, 0.25) 100%
  );
}
/* Prefer video when live; if autoplay is blocked, static poster stays visible */
.hero-logo-lockup.is-live .hero-logo-img { opacity: 0; pointer-events: none; }
.hero-logo-lockup:not(.is-live) .hero-logo-vid { opacity: 0; }

@keyframes hero-logo-breathe {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6) inset,
      0 0 0 6px rgba(196, 163, 90, 0.06),
      0 0 40px rgba(107, 122, 69, 0.18),
      0 28px 60px rgba(0, 0, 0, 0.55);
  }
  50% {
    transform: translateY(-8px);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6) inset,
      0 0 0 8px rgba(196, 163, 90, 0.1),
      0 0 56px rgba(107, 122, 69, 0.28),
      0 34px 70px rgba(0, 0, 0, 0.5);
  }
}

/* Standing orders — in document flow, never overlays logo */
.hero-badge {
  position: static;
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: left;
}
.hero-badge strong {
  display: block;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 6px;
}
.hero-badge span {
  font-size: 0.95rem;
  color: var(--sand-dim);
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .operator-float,
  .mission-float,
  .hero-logo-lockup { animation: none; }
  /* Do NOT display:none videos — that killed the hero loop on mobile/Windows
     when "reduce motion" is on. JS pauses instead; poster/static stays visible. */
  .operator-float,
  .quote-operator {
    background: #000 url("../images/web/brand/logo-icon.jpg") center/cover no-repeat;
  }
}
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--smoke);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--brass), transparent);
  display: block;
  animation: pulse-line 2s ease-in-out infinite;
}
@keyframes pulse-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* Marquee ribbon */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  padding: 14px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  flex-wrap: nowrap;
  animation: marquee-scroll 32s linear infinite;
  will-change: transform;
  /* Keep running when a tab is backgrounded / iOS is flaky with composited layers */
  transform: translate3d(0, 0, 0);
}
/* Pause only when the user explicitly isn’t looking — not on reduced-motion phones */
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
@media (hover: none) {
  .marquee:hover .marquee-track {
    animation-play-state: running;
  }
}
.marquee-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: nowrap;
}
.marquee-group span {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-dim);
  padding: 0 22px;
  white-space: nowrap;
}
.marquee-group span::after {
  content: "◆";
  margin-left: 22px;
  color: var(--olive);
  font-size: 9px;
  vertical-align: middle;
}
@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* Sections */
section { padding: 100px 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin-top: 14px;
}
.section-head p {
  max-width: 36ch;
  color: var(--sand-dim);
  text-align: right;
}

/* Services */
.services { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 50%, var(--bg) 100%); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px 30px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.service-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.service-card:hover::before { opacity: 1; }
.service-card.featured {
  grid-column: span 1;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(196, 163, 90, 0.12), transparent 50%),
    var(--bg-card);
  border-color: var(--line-strong);
}
.service-ico {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--brass);
  background: rgba(196, 163, 90, 0.05);
}
.service-ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.service-card h3 {
  font-size: 1.85rem;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}
.service-card p {
  color: var(--sand-dim);
  font-size: 0.98rem;
  margin-bottom: 18px;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
}

/* Gallery */
.gallery { background: var(--bg); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.filter-btn {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--sand-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--white); border-color: var(--line-strong); }
.filter-btn.active {
  background: var(--olive-deep);
  border-color: var(--olive);
  color: var(--white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  /* Pack singles into holes left by wide (2-col) tiles on desktop */
  grid-auto-flow: dense;
}
.g-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  cursor: zoom-in;
  opacity: 1;
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.g-item.hidden {
  display: none;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.g-item:hover img { transform: scale(1.06); }
.g-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.72) 100%);
  opacity: 0.85;
  pointer-events: none;
}
.g-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
}
.g-item.wide { grid-column: span 2; aspect-ratio: 2/1; }
/* When .wide is stripped for filtered views, images stay cover-cropped 1×1 */
.g-item.tall { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }

/* Mission */
.mission {
  background:
    radial-gradient(ellipse 60% 50% at 0% 50%, rgba(107, 122, 69, 0.12), transparent 55%),
    var(--bg-elev);
  border-block: 1px solid var(--line);
}
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.mission-copy h2 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin: 14px 0 20px;
}
.mission-copy .lede { margin-bottom: 28px; }
.mission-points {
  display: grid;
  gap: 16px;
}
.mission-points li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.mission-points .num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass);
  line-height: 1.1;
}
.mission-points strong {
  display: block;
  font-family: var(--font-label);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 4px;
}
.mission-points p { color: var(--sand-dim); font-size: 0.95rem; }
.mission-visual {
  position: relative;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.1fr 0.9fr;
}
.mission-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.mission-visual .m1 {
  grid-row: span 2;
  min-height: 420px;
  object-position: center;
}
.mission-visual .m2, .mission-visual .m3 { min-height: 200px; }

/* Process */
.process { background: var(--bg); }
.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-rail::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.process-step {
  padding: 0 18px;
  position: relative;
}
.process-step .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--brass);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px rgba(196, 163, 90, 0.12);
}
.process-step .step-n {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
}
.process-step h3 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}
.process-step p { color: var(--sand-dim); font-size: 0.95rem; }

/* Quote / Contact */
.command {
  background:
    radial-gradient(ellipse 70% 60% at 80% 20%, rgba(196, 163, 90, 0.1), transparent 50%),
    var(--bg-elev);
  border-top: 1px solid var(--line);
}
.command-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.command-copy h2 {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  margin: 14px 0 18px;
}
.command-copy .lede { margin-bottom: 28px; }
.command-list {
  display: grid;
  gap: 12px;
}
.command-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--sand-dim);
  font-size: 0.98rem;
}
.command-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--olive-bright);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.quote-panel {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.quote-panel h3 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.quote-panel .sub {
  color: var(--smoke);
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.field-label {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-dim);
  margin-bottom: 10px;
  display: block;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--sand-dim);
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--line-strong); color: var(--white); }
.chip.active, .chip[aria-pressed="true"] {
  background: rgba(107, 122, 69, 0.35);
  border-color: var(--olive);
  color: var(--white);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.12);
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23c4a35a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field { margin-bottom: 4px; }
.field label {
  display: block;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 7px;
}
.form-note {
  font-size: 0.85rem;
  color: var(--smoke);
  margin: 14px 0 18px;
  line-height: 1.45;
}
.form-status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.form-status.ok {
  display: block;
  background: rgba(107, 122, 69, 0.2);
  border: 1px solid var(--olive);
  color: var(--sand);
}
.form-status.err {
  display: block;
  background: rgba(181, 74, 58, 0.15);
  border: 1px solid var(--danger);
  color: var(--sand);
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  background: #050605;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}
.footer .brand-text { font-size: 1.8rem; }
.footer p {
  color: var(--smoke);
  font-size: 0.95rem;
  margin-top: 12px;
  max-width: 34ch;
}
.footer h4 {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
}
.footer a {
  display: block;
  color: var(--sand-dim);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  place-items: center;
  padding: 24px;
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

/* Reveal — snappier; hero never uses this */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ========== Mobile / tablet ========== */
@media (max-width: 980px) {
  :root { --nav-h: 64px; }

  /* Nav */
  .brand-mark { width: 40px; height: 40px; }
  .brand-text {
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    line-height: 1.1;
  }
  .brand-text span {
    font-size: 8px;
    letter-spacing: 0.12em;
    margin-top: 2px;
    white-space: nowrap;
  }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: rgba(7, 8, 6, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 18px 20px;
    border-bottom: 1px solid var(--line);
    display: none;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 10px; font-size: 15px; }
  .nav-cta { margin: 8px 0 0; width: 100%; min-height: 48px; }
  .nav-toggle { display: grid; }

  /* ---- HERO: copy + CTA first, logo second ---- */
  .hero {
    min-height: 0;
    padding: calc(var(--nav-h) + 14px) 0 36px;
    place-items: start center;
    overflow-x: hidden;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    width: min(var(--max), calc(100% - 28px));
    text-align: center;
    justify-items: center;
  }
  /* Natural DOM order: copy (with CTA) then logo — no order:-1 */
  .hero-visual {
    order: 0;
    width: min(100%, 280px);
    gap: 10px;
    margin-inline: auto;
  }
  .hero-logo-lockup {
    width: min(100%, 260px);
    padding: 10px;
    border-radius: 16px;
    animation-duration: 8s;
  }
  .hero-logo-lockup::before,
  .hero-logo-lockup::after {
    width: 16px;
    height: 16px;
  }
  .hero-logo-lockup::before { top: 8px; left: 8px; }
  .hero-logo-lockup::after {
    top: auto;
    left: auto;
    bottom: 8px;
    right: 8px;
  }
  .hero-logo-media { border-radius: 10px; }
  .hero-badge {
    position: static;
    max-width: 100%;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
  }
  .hero-badge strong { font-size: 11px; margin-bottom: 4px; }
  .hero-badge span { font-size: 0.86rem; line-height: 1.35; }

  .hero-copy {
    width: 100%;
    text-align: center;
  }
  .hero-copy .eyebrow {
    justify-content: center;
    margin-bottom: 10px;
    font-size: 11px;
    letter-spacing: 0.14em;
    max-width: 100%;
  }
  .hero-copy .eyebrow::before { width: 18px; }
  /* Display heads: size + tracking tuned so Bebas matches desktop feel on phone */
  .hero h1 {
    font-size: clamp(2.75rem, 12vw, 3.5rem);
    margin-bottom: 14px;
    line-height: 1.02;
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow-wrap: normal;
    hyphens: none;
  }
  .hero h1 em,
  .hero h1 .grad-text {
    font-style: normal;
    display: block;
    line-height: 1.05;
    /* reaffirm mobile accent color (overrides any clip leftovers) */
    color: var(--brass-hot) !important;
    -webkit-text-fill-color: var(--brass-hot) !important;
    background-image: none !important;
  }
  /* Sitewide section titles on mobile */
  h2, h3, .display {
    line-height: 1.08;
    letter-spacing: 0.02em;
  }
  /* CTA immediately under headline — first tappable action */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 52px;
  }
  .hero .lede {
    margin: 0 auto 14px;
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 36ch;
  }
  .hero-stats {
    max-width: 100%;
    margin-inline: auto;
  }
  .hero-stats .stat { padding: 12px 6px; }
  .stat-num { font-size: 1.4rem; }
  .stat-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-top: 4px;
  }
  .scroll-cue { display: none; }
  .marquee { padding: 12px 0; }
  .marquee-group span {
    font-size: 12px;
    padding: 0 16px;
    letter-spacing: 0.16em;
  }

  /* Rest of site */
  .mission-float { display: none; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .g-item.wide { grid-column: span 2; }
  .mission-grid, .command-grid { grid-template-columns: 1fr; gap: 28px; }
  .process-rail { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .process-rail::before { display: none; }
  .section-head { grid-template-columns: 1fr; margin-bottom: 28px; }
  .section-head p { text-align: left; max-width: none; }
  .section-head h2 {
    font-size: clamp(2.35rem, 9.5vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: 0.02em;
    margin-top: 10px;
  }
  .eyebrow {
    letter-spacing: 0.16em;
    font-size: 12px;
  }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .quote-panel { padding: 20px 16px; }
  .filters { gap: 6px; }
  .filter-btn { padding: 9px 12px; font-size: 12px; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 24px)); }
  section { padding: 56px 0; }

  .hero {
    padding: calc(var(--nav-h) + 10px) 0 28px;
  }
  .hero-inner { gap: 16px; width: min(var(--max), calc(100% - 24px)); }
  .hero-visual { width: min(100%, 240px); gap: 8px; }
  .hero-logo-lockup {
    width: min(100%, 228px);
    padding: 8px;
    border-radius: 14px;
  }
  .hero h1 {
    font-size: clamp(2.35rem, 11.5vw, 3rem);
    margin-bottom: 12px;
  }
  .hero-actions { margin-bottom: 12px; }
  .hero .lede {
    font-size: 0.92rem;
    margin-bottom: 12px;
  }
  .hero-stats .stat { padding: 10px 4px; }
  .hero-badge { padding: 10px 12px; }
  .hero-badge span {
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .service-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .process-rail { grid-template-columns: 1fr; gap: 20px; }
  .process-step { padding: 0; }
  .process-step h3 { font-size: 1.45rem; }
  .g-item.wide { grid-column: span 1; aspect-ratio: 1; }
  .mission-visual { grid-template-columns: 1fr; }
  .mission-visual .m1 { grid-row: auto; min-height: 220px; }
  .mission-visual .m2,
  .mission-visual .m3 { min-height: 140px; }
  .command-list { text-align: left; }
  .chip { padding: 9px 12px; font-size: 12px; }
  .lightbox { padding: 12px; }
  .lightbox-close { top: 10px; right: 10px; width: 44px; height: 44px; }
  .footer { padding: 32px 0 24px; }
  .footer-bottom { font-size: 11px; gap: 8px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero-visual { width: min(100%, 200px); }
  .hero-logo-lockup { width: min(100%, 190px); padding: 6px; }
  .stat-num { font-size: 1.2rem; }
  .stat-label { font-size: 9px; letter-spacing: 0.06em; }
  .brand-text span { display: none; }
}
