/* ---------- Self-hosted fonts ---------- */
/* IM Fell DW Pica — display */
@font-face {
  font-family: "IM Fell DW Pica";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/im-fell-dw-pica-400.woff2") format("woff2");
}
@font-face {
  font-family: "IM Fell DW Pica";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/im-fell-dw-pica-400-italic.woff2") format("woff2");
}

/* Crimson Pro — body */
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/crimson-pro-400.woff2") format("woff2");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/crimson-pro-500.woff2") format("woff2");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/crimson-pro-600.woff2") format("woff2");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/crimson-pro-400-italic.woff2") format("woff2");
}

/* JetBrains Mono — code/monospace */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-500.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --dust: #c4a577;
  --leather: #6b4423;
  --brass: #b08d57;
  --brass-bright: #d4b27a;
  --denim: #4d6373;
  --oxblood: #7a1e1e;
  --oxblood-deep: #5a1414;
  --bone: #ece2c8;
  --bone-warm: #e0d4b6;
  --ironwood: #2e2722;
  --ironwood-deep: #1a1612;
  --sky: #d8d6c2;
  --sky-haze: #cbc5a8;

  --display: "IM Fell DW Pica", "IM Fell English", Georgia, serif;
  --body: "Crimson Pro", "Crimson Text", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ironwood-deep);
  color: var(--bone);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    #b8b39a 0%,
    #cbc5a8 22%,
    #d4c69a 38%,
    #c4a577 55%,
    #a8865a 75%,
    #6b4423 100%
  );
  isolation: isolate;
}

/* Sun disc */
.hero-sun {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff5d6 0%,
    #f4dca0 25%,
    rgba(244, 220, 160, 0.55) 50%,
    rgba(244, 220, 160, 0) 75%
  );
  pointer-events: none;
  z-index: 1;
  filter: blur(2px);
}

/* Heat shimmer band */
.hero-shimmer {
  position: absolute;
  left: 0;
  right: 0;
  top: 48%;
  height: 60px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(216, 214, 194, 0) 0%,
    rgba(216, 214, 194, 0.18) 50%,
    rgba(216, 214, 194, 0) 100%
  );
  filter: blur(2px);
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: 0.7; }
  50% { transform: translateY(2px) scaleY(1.15); opacity: 1; }
}

/* Distant ridge */
.hero-ridge {
  position: absolute;
  left: 0; right: 0;
  bottom: 38%;
  height: 80px;
  z-index: 2;
  pointer-events: none;
}

/* Buildings flanking street */
.hero-buildings {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* Street plane */
.hero-street {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 42%;
  z-index: 4;
  pointer-events: none;
}

/* Opponent silhouette — inline in hero-content, viewport-centered horizontally */
.hero-opponent-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  pointer-events: none;
}
.hero-opponent {
  width: 22px;
  height: 56px;
  position: relative;
  z-index: 5;
}

.hero-opponent svg { width: 100%; height: 100%; display: block; }

/* Cast shadow under inline opponent */
.hero-opponent-shadow {
  margin-top: 2px;
  width: 28px;
  height: 6px;
  background: rgba(46, 39, 34, 0.55);
  border-radius: 50%;
  filter: blur(2px);
  transform: scaleX(1.4);
}

/* Dust particles canvas layer */
.hero-dust {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.55;
}

/* HUD revolver */
.hud-revolver {
  position: absolute;
  right: -20px;
  bottom: -40px;
  width: clamp(360px, 42vw, 640px);
  height: auto;
  z-index: 8;
  pointer-events: none;
  filter: drop-shadow(-12px -8px 0 rgba(26, 22, 18, 0.4));
  transform-origin: 80% 90%;
  transform: rotate(-12deg);
}

/* Hero foreground content */
.hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 24px 0;
  text-align: center;
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 14vw, 220px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  margin: 0;
  color: var(--ironwood-deep);
  text-shadow:
    1px 1px 0 rgba(176, 141, 87, 0.4),
    -1px 0 0 rgba(46, 39, 34, 0.5);
  /* "branded into wood" — slight irregularity */
  font-feature-settings: "dlig" 1, "liga" 1;
  position: relative;
}

.wordmark::before {
  /* faint burnt halo */
  content: "";
  position: absolute;
  inset: -8% -4%;
  background: radial-gradient(
    ellipse at center,
    rgba(46, 39, 34, 0.18) 0%,
    rgba(46, 39, 34, 0) 60%
  );
  z-index: -1;
}

.subtitle {
  margin: 18px 0 0;
  font-family: var(--body);
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ironwood);
  font-feature-settings: "smcp" 1;
}

.subtitle-rule {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: var(--ironwood);
  vertical-align: middle;
  margin: 0 14px;
  opacity: 0.6;
}

/* Form */
.telegraph-form {
  margin-top: 56px;
  display: flex;
  align-items: stretch;
  background: rgba(236, 226, 200, 0.92);
  border: 1px solid var(--ironwood);
  box-shadow:
    0 0 0 1px rgba(176, 141, 87, 0.4),
    8px 8px 0 rgba(46, 39, 34, 0.3);
  width: min(560px, 92vw);
  position: relative;
}

.telegraph-form::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(46, 39, 34, 0.25);
  pointer-events: none;
}

.telegraph-label {
  position: absolute;
  left: 12px;
  top: -10px;
  background: var(--bone);
  padding: 0 8px;
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ironwood);
  border: 1px solid var(--ironwood);
  z-index: 2;
}

.telegraph-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 18px 16px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ironwood);
  letter-spacing: 0.02em;
  min-width: 0;
}

.telegraph-input::placeholder { color: rgba(46, 39, 34, 0.45); }
.telegraph-input:focus { outline: none; }

.telegraph-button {
  border: none;
  border-left: 1px solid var(--ironwood);
  background: var(--ironwood);
  color: var(--bone);
  padding: 0 26px;
  font-family: var(--display);
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.24em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-transform: uppercase;
  transition: background 200ms ease, color 200ms ease;
}

.telegraph-button::after {
  /* brass border glint */
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--brass);
  pointer-events: none;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.telegraph-button:hover,
.telegraph-button:focus-visible {
  background: var(--oxblood);
}

.telegraph-button:hover::after,
.telegraph-button:focus-visible::after {
  border-color: var(--brass-bright);
  box-shadow:
    inset 0 0 12px rgba(212, 178, 122, 0.4),
    0 0 0 1px rgba(212, 178, 122, 0.3);
}

.telegraph-button:disabled,
.telegraph-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.telegraph-error {
  flex-basis: 100%;
  margin: 12px 0 0;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--oxblood);
  background: rgba(122, 30, 30, 0.06);
  border: 1px solid rgba(122, 30, 30, 0.35);
  border-left: 3px solid var(--oxblood);
}

.telegraph-button .glint {
  position: absolute;
  top: 0; bottom: 0;
  width: 30px;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 245, 214, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-200%);
  pointer-events: none;
}

.telegraph-button:hover .glint,
.telegraph-button:focus-visible .glint {
  animation: glint 1.4s ease-out;
}

@keyframes glint {
  0% { transform: translateX(-200%); }
  100% { transform: translateX(800%); }
}

.form-helper {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ironwood);
  opacity: 0.7;
  font-style: italic;
}

/* Success state */
.telegraph-success {
  margin-top: 56px;
  width: min(620px, 92vw);
  border-top: 2px solid var(--ironwood);
  border-bottom: 2px solid var(--ironwood);
  padding: 22px 16px;
  text-align: center;
  background: rgba(236, 226, 200, 0.95);
  position: relative;
}

.telegraph-success::before,
.telegraph-success::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--ironwood);
}
.telegraph-success::before { top: 4px; }
.telegraph-success::after { bottom: 4px; }

.telegraph-success-eyebrow {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 6px;
}

.telegraph-success-headline {
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 32px);
  color: var(--ironwood);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ironwood);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scroll-cue-line {
  display: inline-block;
  width: 1px;
  height: 26px;
  background: var(--ironwood);
  animation: scrollCue 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollCue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Below the fold ---------- */
.below {
  background: var(--bone);
  color: var(--ironwood);
  position: relative;
  padding: 120px 24px 80px;
}

.below::before {
  /* hard transition rule */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--ironwood) 0 24px,
      var(--bone) 24px 28px
    );
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.about {
  max-width: 760px;
  margin: 0 auto 140px;
  text-align: center;
}

.section-eyebrow {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--oxblood);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--oxblood);
}

.about-body {
  font-family: var(--body);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.5;
  color: var(--ironwood);
  text-wrap: pretty;
  margin: 0;
}

.about-body em {
  font-style: italic;
  color: var(--oxblood);
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 140px;
  border-top: 1px solid var(--ironwood);
  border-bottom: 1px solid var(--ironwood);
  padding: 60px 0;
  position: relative;
}

.pillars::before,
.pillars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--ironwood);
}
.pillars::before { top: 4px; }
.pillars::after { bottom: 4px; }

.pillar {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  position: relative;
}

.pillar + .pillar::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: var(--ironwood);
  opacity: 0.25;
}

.pillar-icon {
  width: 64px;
  height: 64px;
  color: var(--ironwood);
}

.pillar-number {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--oxblood);
}

.pillar-label {
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.2;
  color: var(--ironwood);
  margin: 0;
  max-width: 240px;
}

/* Roster */
.roster {
  margin-bottom: 140px;
}

.roster-header {
  text-align: center;
  margin-bottom: 48px;
}

.roster-stage {
  position: relative;
  background: linear-gradient(
    to bottom,
    var(--sky-haze) 0%,
    var(--dust) 65%,
    #a8865a 100%
  );
  border: 1px solid var(--ironwood);
  padding: 80px 32px 0;
  height: 360px;
  overflow: hidden;
}

.roster-stage::before {
  /* haze */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(196, 165, 119, 0.5) 0%,
    rgba(196, 165, 119, 0) 50%
  );
  pointer-events: none;
}

.roster-stage::after {
  /* ground line removed */
  content: none;
}

.roster-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  height: 100%;
  position: relative;
  z-index: 1;
}

.roster-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: 60px;
  position: relative;
}

.roster-figure svg {
  height: 220px;
  width: auto;
  display: block;
}

.roster-figure-shadow {
  position: absolute;
  bottom: 50px;
  width: 100px;
  height: 8px;
  background: rgba(46, 39, 34, 0.45);
  filter: blur(3px);
  border-radius: 50%;
}

.roster-caption {
  margin-top: 22px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(16px, 1.4vw, 19px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ironwood);
}

.roster-caption-sub {
  margin-top: 8px;
  font-family: var(--body);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ironwood);
  opacity: 0.75;
}

.roster-names {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
  border-top: 1px solid var(--ironwood);
  border-bottom: 1px solid var(--ironwood);
  padding: 14px 0;
}

.roster-name {
  text-align: center;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ironwood);
  border-right: 1px solid rgba(46, 39, 34, 0.25);
}

.roster-name:last-child { border-right: none; }

/* Repeated form section */
.repeat-form-section {
  background: var(--ironwood);
  color: var(--bone);
  margin: 0 -24px -80px;
  padding: 100px 24px;
  text-align: center;
  position: relative;
}

.repeat-form-section::before,
.repeat-form-section::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--brass) 0 18px,
      var(--ironwood) 18px 22px
    );
}
.repeat-form-section::before { top: 0; }
.repeat-form-section::after { bottom: 0; }

.repeat-form-headline {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 44px);
  color: var(--bone);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.repeat-form-sub {
  font-family: var(--body);
  font-style: italic;
  font-size: 16px;
  color: var(--bone-warm);
  opacity: 0.8;
  margin: 0 0 36px;
}

.repeat-form-section .telegraph-form {
  margin: 0 auto;
  background: rgba(236, 226, 200, 0.96);
}

/* ---------- Footer ---------- */
footer.fine {
  background: var(--ironwood-deep);
  color: var(--bone-warm);
  padding: 36px 24px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

footer.fine .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

footer.fine a {
  color: var(--brass-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 178, 122, 0.4);
  padding-bottom: 1px;
}

footer.fine a:hover { border-bottom-color: var(--brass-bright); }

.footer-mark {
  font-family: var(--display);
  letter-spacing: 0.4em;
  font-size: 14px;
  color: var(--bone);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hud-revolver { width: 320px; right: -40px; bottom: -50px; }
  .pillars {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 40px 0;
  }
  .pillar + .pillar::before { display: none; }
  .pillar + .pillar { border-top: 1px solid rgba(46, 39, 34, 0.25); padding-top: 40px; }
  .roster-stage { height: 320px; padding: 60px 16px 0; }
  .roster-figure svg { height: 180px; }
  .roster-figure-shadow { width: 70px; }
  .roster-names { grid-template-columns: repeat(2, 1fr); }
  .roster-name {
    padding: 10px 0;
    border-right: 1px solid rgba(46, 39, 34, 0.25);
    border-bottom: 1px solid rgba(46, 39, 34, 0.25);
  }
  .roster-name:nth-child(2n) { border-right: none; }
  .roster-name:nth-last-child(-n+2) { border-bottom: none; }
  .below { padding: 80px 20px 60px; }
  .telegraph-form { flex-direction: column; }
  .telegraph-button { border-left: none; border-top: 1px solid var(--ironwood); padding: 16px 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 200ms !important;
  }
  .hero-shimmer { animation: none; opacity: 0.4; }
  .hero-dust { display: none; }
  .scroll-cue-line { animation: none; transform: scaleY(0.7); }
}

body.reduced-motion .hero-shimmer { animation: none; opacity: 0.4; }
body.reduced-motion .hero-dust { display: none; }
body.reduced-motion .scroll-cue-line { animation: none; transform: scaleY(0.7); }
body.reduced-motion .hammer-twitch { animation: none !important; }
