:root {
  --bg: #0b0908;
  --surface: #13100e;
  --ink: #efe6d5;
  --ink-muted: #b8aa96;
  --ink-dim: #7c6f5e;
  --line: rgba(239, 230, 213, 0.14);
  --line-strong: rgba(212, 162, 76, 0.42);
  --crimson: #b91c1c;
  --crimson-bright: #dc2626;
  --brass: #d4a24c;
  --discord: #5865f2;

  --font-display: 'Cinzel', Georgia, serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* RDR2 Sunset Backdrop + Three.js WebGL + Western Grain */
.rdr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('/assets/rdr2/rdr2-bg.jpg');
  background-size: cover;
  background-position: center 35%;
  opacity: 0.22;
  filter: contrast(1.12) saturate(1.1);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.055;
  background-image: radial-gradient(rgba(239, 230, 213, 0.65) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(11, 9, 8, 0.35) 18%, rgba(7, 5, 4, 0.92) 100%);
}

header, main, footer {
  position: relative;
  z-index: 3;
}

/* Dead-Eye Crosshair Magnetic Cursor */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 120;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease, width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--crimson-bright);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(212, 162, 76, 0.55);
  display: grid;
  place-items: center;
}

.cursor-ring .cross-h,
.cursor-ring .cross-v {
  position: absolute;
  background: rgba(212, 162, 76, 0.45);
  transition: background 0.2s ease;
}

.cursor-ring .cross-h { width: 100%; height: 1px; }
.cursor-ring .cross-v { width: 1px; height: 100%; }

.cursor-ring.hovered {
  width: 54px;
  height: 54px;
  border-color: var(--crimson-bright);
}

.cursor-ring.hovered .cross-h,
.cursor-ring.hovered .cross-v {
  background: rgba(220, 38, 38, 0.65);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #080605;
  display: grid;
  place-items: center;
  border-bottom: 2px solid var(--crimson);
}

.preloader-inner {
  width: min(1280px, calc(100% - 3rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.preloader-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.preloader-icon {
  width: 44px;
  height: 44px;
  animation: spinSlow 4s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.preloader-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  color: var(--brass);
}

/* Layout & Typography */
.frame-grid {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
}

.mono-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.accent-txt { color: var(--brass); }

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.accent-word { color: var(--crimson-bright); }

/* Top Bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 9, 8, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.topbar.scrolled {
  background: rgba(11, 9, 8, 0.94);
  border-bottom-color: rgba(212, 162, 76, 0.28);
}

.topbar-inner {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-favicon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  transition: transform 0.5s var(--ease);
}

.brand-mark:hover .brand-favicon {
  transform: rotate(60deg);
}

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 0.08em;
}

.brand-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--brass);
  letter-spacing: 0.12em;
}

.nav-index {
  display: flex;
  align-items: center;
  gap: 1.85rem;
}

.nav-item {
  text-decoration: none;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.nav-item span {
  color: var(--brass);
  margin-right: 0.25rem;
}

.nav-item:hover {
  color: var(--ink);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.discord-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.44rem 0.85rem;
  border: 1px solid rgba(88, 101, 242, 0.55);
  background: rgba(88, 101, 242, 0.16);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}

.discord-pill:hover {
  border-color: var(--discord);
  background: rgba(88, 101, 242, 0.3);
  transform: translateY(-1px);
}

.discord-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0 8px;
  cursor: pointer;
}

.menu-toggle span {
  height: 1.5px;
  background: var(--ink);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #0b0908;
}

.mobile-nav.open { display: flex; }

.mobile-nav-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

/* Western Buttons */
.btn-editorial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.92rem 1.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease), transform 0.28s var(--ease);
}

.btn-fill {
  background: var(--crimson);
  color: var(--ink);
  border-color: var(--crimson);
}

.btn-fill:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: #0b0908;
  transform: translateY(-2px);
}

.btn-line {
  background: rgba(19, 16, 14, 0.82);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-line:hover {
  border-color: var(--ink);
  background: rgba(239, 230, 213, 0.08);
  transform: translateY(-2px);
}

/* HERO */
.hero-stage {
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 2.5rem;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-stage .frame-grid {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.2rem;
}

.hero-top-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  margin: auto 0;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 6.4vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0.02em;
  margin: 0 0 1.65rem;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.75);
}

.line-mask { display: block; overflow: hidden; }
.line-inner { display: block; }

.hero-headline .serif-italic {
  font-size: clamp(3.3rem, 7.2vw, 6.5rem);
  line-height: 0.98;
}

.hero-lead {
  margin: 0 0 1.85rem;
  font-size: 1.02rem;
  color: var(--ink-muted);
  max-width: 56ch;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Framed Arthur Morgan Portrait */
.hero-portrait-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  background: #0b0908;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.65);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: contrast(1.08) saturate(0.92);
  transition: transform 0.8s var(--ease);
}

.hero-portrait-frame:hover .portrait-img {
  transform: scale(1.04);
}

.portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(11, 9, 8, 0.92) 100%);
  pointer-events: none;
}

.portrait-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--brass);
  border-style: solid;
  z-index: 2;
  pointer-events: none;
}

.portrait-corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.portrait-corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.portrait-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.portrait-corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.portrait-caption {
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 1rem;
  z-index: 2;
}

.portrait-caption p {
  margin: 0.25rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
}

/* Metrics Rail */
.metrics-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric-cell {
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(19, 16, 14, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-cell.accent-cell {
  background: rgba(185, 28, 28, 0.14);
}

.metric-big {
  font-family: var(--font-display);
  font-size: 1.48rem;
  font-weight: 700;
  color: var(--brass);
}

.metric-sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Western Marquee Strip */
.western-marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #140f0c;
  padding: 0.75rem 0;
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: var(--brass);
  animation: marqueeScroll 28s linear infinite;
}

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

/* Sections */
.band {
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--line);
}

.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
}

.band-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.1vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.02;
  margin: 0.45rem 0 0;
}

.band-note {
  margin: 0;
  color: var(--ink-muted);
  max-width: 46ch;
  font-size: 0.94rem;
}

/* Manifesto Rows */
.manifesto-rows {
  border-top: 1px solid var(--line);
}

.manifesto-row {
  display: grid;
  grid-template-columns: 70px 1fr 1.35fr;
  gap: 1.5rem;
  padding: 2rem 0.75rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background 0.3s ease;
}

.manifesto-row:hover {
  background: rgba(239, 230, 213, 0.03);
}

.manifesto-row.highlight-row {
  background: rgba(185, 28, 28, 0.1);
}

.row-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brass);
  padding-top: 0.25rem;
}

.row-title h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.3rem;
}

.row-body {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.96rem;
}

.row-body strong {
  color: var(--ink);
}

/* Frontier Strip (Original RDR2 Game Gallery) */
.frontier-strip {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 9, 8, 0.72);
}

.strip-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.frontier-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.frontier-frame {
  margin: 0;
  position: relative;
  border: 1px solid var(--line);
  background: #0b0908;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  cursor: pointer;
}

.frontier-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.26) contrast(1.06);
  transition: transform 0.7s var(--ease), filter 0.5s ease;
}

.frontier-frame:hover img {
  transform: scale(1.06);
  filter: sepia(0) contrast(1.08);
}

.frontier-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, transparent, rgba(11, 9, 8, 0.92));
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--brass);
}

/* Vouches */
.vouches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.vouch-card {
  padding: 1.75rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(19, 16, 14, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.3s ease;
}

.vouch-card:hover {
  background: rgba(239, 230, 213, 0.04);
}

.vouch-card.featured-vouch {
  background: rgba(185, 28, 28, 0.1);
}

.vouch-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.vouch-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid var(--brass);
  color: var(--brass);
}

.vouch-card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  margin: 0;
}

.vouch-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  flex: 1;
}

.vouch-foot {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-dim);
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 800;
  line-height: 0.98;
  margin: 0.6rem 0 1.2rem;
}

.contact-copy {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
  max-width: 46ch;
}

.contact-channels {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.25s ease, padding-left 0.25s var(--ease);
}

.contact-row:hover {
  background: rgba(212, 162, 76, 0.07);
  padding-left: 1.5rem;
}

.contact-row-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--brass);
}

.contact-row strong {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  margin-left: auto;
  margin-right: 0.75rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  background: rgba(11, 9, 8, 0.92);
}

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

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.footer-actions a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-actions a:hover {
  color: var(--brass);
}

/* Lightbox */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(5, 4, 3, 0.9);
  backdrop-filter: blur(10px);
}

.lightbox-box {
  position: relative;
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.lightbox-box img {
  max-width: 100%;
  max-height: 78vh;
  border: 1px solid var(--brass);
  background: #0b0908;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--brass);
  background: #0b0908;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
}

.toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.72rem 1rem;
  background: var(--surface);
  border: 1px solid var(--brass);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-split,
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .metrics-rail,
  .frontier-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .manifesto-row {
    grid-template-columns: 48px 1fr;
  }
  .manifesto-row .row-body {
    grid-column: 2;
  }
  .vouches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 740px) {
  .nav-index { display: none; }
  .menu-toggle { display: flex; }
  .metrics-rail,
  .frontier-gallery,
  .vouches-grid {
    grid-template-columns: 1fr;
  }
  .manifesto-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .manifesto-row .row-body { grid-column: 1; }
}
