/* =========================================================================
   TRADECRAFT GUN WORKS — "The Precision Ledger"
   Matte black · Safety orange · Warm gray — tactical-but-refined.
   No Lenis, no Roman numerals. Reveals are fail-open.
   ========================================================================= */

:root {
  /* Core palette */
  --ink:        #0C0C0E;   /* matte black — primary bg */
  --gunmetal:   #1C1F24;   /* darker panel */
  --steel:      #363B43;   /* borders, dividers */
  --slate:      #5A6270;   /* mid-grey text */
  --bone:       #EAE6DC;   /* off-white body on dark */
  --paper:      #F5F2EA;   /* warm paper bg */
  --paper-ink:  #14171A;   /* dark ink for paper sections */

  /* Signature accents */
  --bronze:     #E8541A;   /* Safety Orange — the signature */
  --bronze-deep:#C43E0F;
  --od:         #5C6B55;   /* secondary — OD green */
  --brass:      #A87F3C;   /* used sparingly */

  /* Layout */
  --container:  1280px;
  --gutter:     clamp(16px, 3.2vw, 48px);
  --rule:       rgba(234, 230, 220, 0.14);
  --rule-strong:rgba(234, 230, 220, 0.32);
  --rule-paper: rgba(20, 23, 26, 0.18);

  /* Type */
  --f-display:  "Bebas Neue", "Druk Wide", "Inter Tight", system-ui, sans-serif;
  --f-headline: "Inter Tight", "Inter", system-ui, sans-serif;
  --f-body:     "Inter", system-ui, -apple-system, sans-serif;
  --f-mono:     "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--ink); }

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--bone);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bronze); }
::selection { background: var(--bronze); color: var(--ink); }

/* ============================ TYPOGRAPHY =============================== */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--bronze);
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.005em;
  color: var(--bone);
  text-transform: uppercase;
}
h1 { font-size: clamp(44px, 7.2vw, 120px); letter-spacing: -0.01em; }
h2 { font-size: clamp(34px, 5vw, 72px); }
h3 { font-size: clamp(22px, 2.2vw, 36px); letter-spacing: 0; }
h4 { font-size: clamp(16px, 1.4vw, 22px); letter-spacing: 0.04em; }

.headline-mix em {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--bronze);
  text-transform: none;
  letter-spacing: -0.01em;
}

p { color: var(--bone); }
p.lede {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.55;
  color: #DDD9CF;
  max-width: 62ch;
}
.section-gunmetal p.lede { color: #DDD9CF; }

.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.bench-tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze); display: inline-flex; align-items: center; gap: 8px; }

/* ============================ LAYOUT =================================== */

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.section-pad   { padding: clamp(72px, 9vw, 140px) 0; }
.section-pad-s { padding: clamp(48px, 6vw, 96px) 0; }

.section-paper   { background: var(--paper); color: var(--paper-ink); }
.section-paper p, .section-paper li, .section-paper td { color: #2A2D30; }
.section-paper h1, .section-paper h2, .section-paper h3, .section-paper h4 { color: var(--paper-ink); }
.section-paper .eyebrow { color: #6E7178; }
.section-gunmetal { background: var(--gunmetal); }
.section-bronze   { background: var(--bronze); color: var(--ink); }
.section-bronze h1, .section-bronze h2, .section-bronze h3,
.section-bronze p, .section-bronze .eyebrow, .section-bronze .mono { color: var(--ink); }

.masthead-bar {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.section-paper .masthead-bar { border-color: var(--rule-paper); color: #5C6168; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-head h2 { max-width: 12ch; }
.section-head .lede { justify-self: end; max-width: 48ch; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } .section-head .lede { justify-self: start; } }

/* ============================ NAV ====================================== */

.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter); max-width: var(--container); margin: 0 auto; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; color: var(--bone); }
.nav-brand .logo-mark {
  width: 36px; height: 36px; flex-shrink: 0; color: var(--bronze);
  transition: transform 0.5s cubic-bezier(0.2,0.7,0.2,1);
}
.nav-brand:hover .logo-mark { transform: rotate(45deg); }
.nav-brand .wordmark { font-family: var(--f-display); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; color: var(--bone); }
.nav-brand .submark { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--slate); margin-top: 4px; display: block; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bone); position: relative; padding: 4px 0; }
.nav-menu a:hover { color: var(--bronze); }
.nav-menu a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--bronze); }
.nav-cta { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; padding: 12px 18px; background: var(--bronze); color: var(--ink); border: none; cursor: pointer; transition: background 0.2s ease; }
.nav-cta:hover { background: var(--bone); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule-strong); color: var(--bone); width: 40px; height: 40px; cursor: pointer; font-family: var(--f-mono); font-size: 14px; }

@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-menu.open { display: flex; flex-direction: column; position: fixed; inset: 65px 0 auto 0; background: var(--ink); padding: 32px var(--gutter); gap: 20px; border-bottom: 1px solid var(--rule); align-items: flex-start; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-cta { display: none; }
}

/* ============================ BUTTONS ================================== */

.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 26px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid var(--bone); background: transparent; color: var(--bone);
  cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden; z-index: 0;
}
.btn > * { position: relative; z-index: 2; }
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--bone);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.34s cubic-bezier(0.2,0.7,0.2,1); z-index: 0;
}
.btn:hover::before { transform: scaleX(1); }
.btn:hover { color: var(--ink); }
.btn--primary { background: var(--bronze); border-color: var(--bronze); color: var(--ink); }
.btn--primary::before { background: var(--bone); }
.btn--primary:hover { color: var(--ink); }
.btn::after { content: "→"; font-family: var(--f-body); letter-spacing: 0; position: relative; z-index: 2; }
.btn--ghost { border-color: var(--rule-strong); }
@media (prefers-reduced-motion: reduce) { .btn::before { transition: none; } }

/* ============================ HERO ===================================== */

.hero { position: relative; min-height: clamp(680px, 92vh, 920px); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.hero-bg {
  position: absolute; inset: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: contrast(1.05) saturate(0.85) brightness(0.58);
  transform: scale(1.05);
  animation: heroDrift 28s ease-in-out infinite alternate;
}
.hero-grain {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(232, 84, 26, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(12,12,14,0.5) 0%, rgba(12,12,14,0.35) 40%, rgba(12,12,14,0.94) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--container); margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 7vw, 96px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: end;
}
.hero-meta { display: flex; flex-direction: column; gap: 18px; }
.hero h1 { color: var(--bone); text-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.hero-meta .eyebrow { color: var(--bone); }
.hero-sub {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--slate); display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid var(--rule); padding-top: 18px;
}
.hero-sub .dot { width: 4px; height: 4px; background: var(--bronze); border-radius: 50%; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-side { align-self: end; text-align: right; }
.hero-side .mono-block {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone); line-height: 1.9;
  border: 1px solid var(--rule-strong); border-left: 2px solid var(--bronze);
  padding: 18px 22px; background: rgba(12,12,14,0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: left;
}
.hero-side .mono-block .label { color: var(--slate); display: block; font-size: 9px; }
.hero-side .mono-block .v { color: var(--bone); font-size: 12px; }
@keyframes heroDrift { 0% { transform: scale(1.05) translate3d(-1%, 0, 0); } 100% { transform: scale(1.08) translate3d(1%, -1%, 0); } }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } .hero-side { text-align: left; } }

/* ============================ TRUST BAR ================================ */

.trust { background: var(--gunmetal); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.trust-cell {
  padding: 24px clamp(16px, 2vw, 32px); text-align: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone); border-right: 1px solid var(--rule); transition: background 0.3s ease;
}
.trust-cell:last-child { border-right: none; }
.trust-cell:hover { background: rgba(232,84,26,0.12); }
.trust-cell .badge { display: inline-block; width: 6px; height: 6px; background: var(--bronze); border-radius: 50%; margin-right: 10px; vertical-align: middle; }
@media (max-width: 800px) { .trust-grid { grid-template-columns: 1fr 1fr; } .trust-cell:nth-child(2) { border-right: none; } .trust-cell:nth-child(1), .trust-cell:nth-child(2) { border-bottom: 1px solid var(--rule); } }

/* ============================ STAT STRIP =============================== */

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-cell { padding: clamp(28px, 4vw, 56px) clamp(16px, 2vw, 32px); border-right: 1px solid var(--rule); transition: background 0.3s ease; }
.stat-cell:last-child { border-right: none; }
.stat-cell:hover { background: rgba(232,84,26,0.06); }
.stat-value { font-family: var(--f-display); font-size: clamp(40px, 5.4vw, 88px); line-height: 1; color: var(--bone); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate); margin-top: 12px; }
.section-paper .stat-strip { border-color: var(--rule-paper); }
.section-paper .stat-cell { border-color: var(--rule-paper); }
.section-paper .stat-value { color: var(--paper-ink); }
.section-paper .stat-label { color: #5C6168; }
@media (max-width: 800px) { .stat-strip { grid-template-columns: 1fr 1fr; } .stat-cell:nth-child(2) { border-right: none; } .stat-cell:nth-child(1), .stat-cell:nth-child(2) { border-bottom: 1px solid var(--rule); } }

/* ============================ DIFFERENTIATORS ========================== */

.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.diff-cell { background: var(--ink); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 14px; transition: background 0.35s ease; }
.section-gunmetal .diff-cell { background: var(--gunmetal); }
.diff-cell:hover { background: rgba(232,84,26,0.08); }
.diff-cell .diff-idx { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--bronze); }
.diff-cell h3 { font-family: var(--f-display); font-size: clamp(22px, 2vw, 30px); line-height: 1; color: var(--bone); }
.diff-cell p { font-size: 14px; line-height: 1.7; color: #B7BAC0; }
.diff-cell .diff-icon { width: 40px; height: 40px; color: var(--bronze); margin-bottom: 6px; }
.diff-cell .diff-icon svg { width: 100%; height: 100%; }
@media (max-width: 900px) { .diff-grid { grid-template-columns: 1fr; } }

/* ============================ TESTIMONIALS ============================= */

.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.review-card { background: var(--ink); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; gap: 18px; transition: background 0.35s ease; }
.section-gunmetal .review-card { background: var(--gunmetal); }
.review-card:hover { background: rgba(232,84,26,0.07); }
.review-card .stars { display: flex; gap: 3px; color: var(--bronze); font-size: 14px; letter-spacing: 2px; }
.review-card .body { font-size: 15px; line-height: 1.72; color: var(--bone); flex-grow: 1; }
.review-card .body::before { content: "\201C"; font-family: "Fraunces", Georgia, serif; font-size: 60px; line-height: 0; color: var(--bronze); opacity: 0.35; display: block; height: 26px; margin-bottom: 4px; }
.review-card .attrib { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); border-top: 1px solid var(--rule); padding-top: 16px; }
.review-card .attrib strong { color: var(--bone); font-weight: 500; }
@media (max-width: 900px) { .reviews-grid { grid-template-columns: 1fr; } }

.g-rating { display: inline-flex; align-items: center; gap: 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone); }
.g-rating .score { font-family: var(--f-display); font-size: 30px; color: var(--bronze); line-height: 1; }
.g-rating .stars { color: var(--bronze); letter-spacing: 2px; }

/* ============================ IMAGE INTERACTIONS ======================= */

.recent-card { overflow: hidden; }
.recent-card .photo { transition: transform 0.7s cubic-bezier(0.2,0.7,0.2,1), filter 0.5s ease; }
.recent-card:hover .photo { transform: scale(1.05); filter: brightness(1.08); }
.recent-card:hover .platform { color: var(--bronze); }

.service-card { transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease; position: relative; overflow: hidden; }
.service-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--bronze); transform: scaleY(0); transform-origin: top; transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1); }
.service-card:hover::after { transform: scaleY(1); }
.service-card:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .recent-card:hover .photo, .service-card:hover { transform: none; }
  .hero-bg { animation: none; }
  .reveal, .reveal--hidden, .reveal--shown { opacity: 1; transform: none; transition: none; }
  .reveal--shown[data-stagger] > * { transition-delay: 0ms !important; }
}

/* ============================ ABOUT / FOOTER =========================== */

.about-portrait .placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1C1F24 0%, #363B43 50%, #1C1F24 100%);
  display: flex; align-items: center; justify-content: center;
}
.about-portrait .placeholder::before { content: ""; position: absolute; inset: 28px; border: 1px solid var(--rule); }

.footer { background: var(--ink); border-top: 1px solid var(--rule); padding: clamp(56px, 6vw, 88px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(24px, 4vw, 56px); padding-bottom: 48px; border-bottom: 1px solid var(--rule); }
.footer-grid h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--slate); margin-bottom: 18px; }
.footer-grid a, .footer-grid p, .footer-grid li { color: var(--bone); font-size: 13px; line-height: 1.85; list-style: none; }
.footer-grid a:hover { color: var(--bronze); }
.footer-brand .lockup { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.footer-brand .lockup .logo-mark { width: 52px; height: 52px; color: var(--bronze); }
.footer-brand .name { font-family: var(--f-display); font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-brand .blurb { color: var(--bone); font-size: 13px; line-height: 1.7; max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); flex-wrap: wrap; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ============================ REVEAL =================================== */

.reveal { opacity: 1; transform: translateY(0); transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal--hidden { opacity: 0; transform: translateY(28px); }
.reveal--shown  { opacity: 1; transform: translateY(0); }
.reveal[data-stagger] > * { transition-delay: 0ms; }
.reveal--shown[data-stagger] > *:nth-child(1) { transition-delay: 40ms; }
.reveal--shown[data-stagger] > *:nth-child(2) { transition-delay: 90ms; }
.reveal--shown[data-stagger] > *:nth-child(3) { transition-delay: 140ms; }
.reveal--shown[data-stagger] > *:nth-child(4) { transition-delay: 190ms; }
.reveal--shown[data-stagger] > *:nth-child(5) { transition-delay: 240ms; }
.reveal--shown[data-stagger] > *:nth-child(6) { transition-delay: 290ms; }
.reveal--shown[data-stagger] > *:nth-child(7) { transition-delay: 340ms; }
.reveal--shown[data-stagger] > *:nth-child(8) { transition-delay: 390ms; }
.reveal--shown[data-stagger] > *:nth-child(9) { transition-delay: 440ms; }

/* ============================ ACCESSIBILITY ============================ */

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
