/* ══════════════════════════════════════════════════════════════
   SCORCHED REACH — MARKETING SITE
   marketing.css
   ══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

/* ── Design tokens ── */
:root {
  --bg:        #080808;
  --amber:     #e8890c;
  --rust:      #c0440a;
  --danger:    #e83232;
  --text:      #d4c9a8;
  --text-dim:  #7a6e58;
  --panel:     #111008;
  --border:    #2a2318;
  --grit-opacity: 0.18;
  --nav-height: 48px;
}

/* ── Base ── */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  overflow-x: hidden;
}

/* Offset body content below the fixed global nav */
body {
  padding-top: var(--nav-height);
}

/* ── Scanline overlay — on top of everything except chyron ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--grit-opacity)) 2px,
    rgba(0, 0, 0, var(--grit-opacity)) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ══════════════════════════════════════════════════════════════
   HERO SECTION — MKT-1 + MKT-2
   ══════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  width: 100%;
  height: calc(100svh - var(--nav-height));
  min-height: 460px;
  overflow: hidden;
  background: var(--bg);
}

/* Full-bleed map fills the hero — intentionally non-interactive */
.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── Title overlay ── */
.hero-title-block {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  /* Dark gradient only behind the text area */
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 8, 0.92) 0%,
    rgba(8, 8, 8, 0.75) 60%,
    transparent 100%
  );
  padding: 28px 24px 48px;
}

.hero-title-inner {
  max-width: 640px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

.hero-title-line {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(64px, 18vw, 140px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber);
  text-shadow:
    0 0 40px rgba(232, 137, 12, 0.6),
    0 0 80px rgba(232, 137, 12, 0.25);
  text-transform: uppercase;
}

.hero-title-rule {
  width: 100%;
  max-width: 320px;
  height: 1px;
  background: var(--amber);
  opacity: 0.6;
  margin: 14px 0 14px;
}

.hero-tagline {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(11px, 2.2vw, 15px);
  color: var(--text);
  letter-spacing: 0.22em;
  line-height: 1.6;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(232, 137, 12, 0.35),
    0 0 40px rgba(232, 137, 12, 0.15);
}

/* ── Coordinate readout ── */
.coord-readout {
  position: absolute;
  bottom: 48px; /* above chyron */
  right: 12px;
  z-index: 10;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ── Map loading status ── */
.map-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.map-status.hidden {
  opacity: 0;
}

.map-status-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: pulse-dim 2s ease-in-out infinite;
}

@keyframes pulse-dim {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}

/* ── Leaflet overrides ── */

/* Remove default attribution styling, use ours */
.leaflet-control-attribution {
  background: rgba(8, 8, 8, 0.5) !important;
  color: var(--text-dim) !important;
  font-family: 'Share Tech Mono', monospace !important;
  font-size: 8px !important;
  letter-spacing: 0.04em !important;
  border: none !important;
  box-shadow: none !important;
  padding: 1px 4px !important;
  opacity: 0.4 !important;
}

.leaflet-control-attribution a {
  color: var(--text-dim) !important;
  text-decoration: none !important;
}

/* Remove zoom controls (we disable them in JS but handle CSS too) */
.leaflet-control-zoom {
  display: none !important;
}

/* Custom popup — brand system */
.leaflet-popup-content-wrapper {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.7) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: 'Share Tech Mono', monospace !important;
  color: var(--text) !important;
}

.leaflet-popup-tip-container {
  display: none !important;
}

.leaflet-popup-close-button {
  color: var(--text-dim) !important;
  font-size: 16px !important;
  right: 6px !important;
  top: 4px !important;
}

.leaflet-popup-close-button:hover {
  color: var(--amber) !important;
}

/* Ruin popup inner content */
.ruin-popup {
  padding: 10px 14px;
  min-width: 140px;
}

.ruin-popup-name {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ruin-popup-faction {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ruin-popup-type {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.ruin-popup-garrison {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════
   CHYRON — MKT-3
   ══════════════════════════════════════════════════════════════ */

.chyron {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #080808;
  border-top: 2px solid var(--border);
  z-index: 10000;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.chyron-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: scroll-left 60s linear infinite;
  will-change: transform;
}

.chyron:hover .chyron-track,
.chyron:focus-within .chyron-track {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Each event item in the chyron */
.chyron-item {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 2px;
  flex-shrink: 0;
}

.chyron-sep {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--border);
  padding: 0 6px;
  flex-shrink: 0;
  letter-spacing: 0;
}

.chyron-loading {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 16px;
  animation: pulse-dim 2s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   SECTION STUBS — remaining stubs (MKT-5, etc.)
   ══════════════════════════════════════════════════════════════ */

.section-stub {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: 1px dashed var(--border);
  outline-offset: -1px;
  margin: 0;
}

.stub-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   FACTION TEASERS — MKT-4
   ══════════════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
.factions-section {
  width: 100%;
  background: var(--bg);
  padding: 56px 0 64px;
  /* Bottom margin keeps chyron from covering last card */
  padding-bottom: calc(64px + 32px);
}

/* ── Section header ── */
.factions-header {
  padding: 0 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.factions-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.factions-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 14px;
}

.factions-subhead {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ── Grid ── */
.faction-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* ── Card base ── */
.faction-card {
  position: relative;
  display: block;
  border-top: 2px solid transparent; /* overridden per faction */
  overflow: hidden;
  transition: filter 0.2s ease;
}

/* Full-panel clickable link overlay */
.faction-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

/* Hover/tap: brightness lift on the card */
.faction-card:hover,
.faction-card:focus-within {
  filter: brightness(1.12);
}

/* Inner layout: glyph left, text right on mobile already stacks naturally */
.faction-card-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 24px 32px;
}

/* ── Glyph image ── */
.faction-glyph {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
  mix-blend-mode: screen;
}

/* ── Text block ── */
.faction-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faction-headline {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  /* color inherited from faction override */
}

.faction-body {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.04em;
  /* color inherited from faction override */
  max-width: 52ch;
}

.faction-cta {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  opacity: 0.75;
  /* color inherited from faction override */
}

/* ── Per-faction overrides ── */

.faction-card--ash-reavers {
  background: #140a04;
  border-top-color: #c0440a;
}
.faction-card--ash-reavers .faction-headline,
.faction-card--ash-reavers .faction-body,
.faction-card--ash-reavers .faction-cta {
  color: #f0c4a0;
}

.faction-card--ember-collective {
  background: #120c04;
  border-top-color: #e8890c;
}
.faction-card--ember-collective .faction-headline,
.faction-card--ember-collective .faction-body,
.faction-card--ember-collective .faction-cta {
  color: #f5e4b8;
}

.faction-card--iron-wardens {
  background: #080c12;
  border-top-color: #7b9fc4;
}
.faction-card--iron-wardens .faction-headline,
.faction-card--iron-wardens .faction-body,
.faction-card--iron-wardens .faction-cta {
  color: #d0e4f0;
}

.faction-card--verdant-dawn {
  background: #080f08;
  border-top-color: #4ade44;
}
.faction-card--verdant-dawn .faction-headline,
.faction-card--verdant-dawn .faction-body,
.faction-card--verdant-dawn .faction-cta {
  color: #c8f0c4;
}

/* ── Desktop: 2×2 grid ── */
@media (min-width: 768px) {
  .factions-section {
    padding: 72px 0 calc(80px + 32px);
  }

  .factions-header {
    padding: 0 48px 48px;
  }

  .faction-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
  }

  .faction-card-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    padding: 36px 32px 40px;
  }

  .faction-glyph {
    width: 160px;
    height: 160px;
  }

  .faction-headline {
    font-size: clamp(18px, 2vw, 26px);
  }

  .faction-body {
    font-size: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════
   SUBSCRIPTION — MKT-5
   ══════════════════════════════════════════════════════════════ */

.subscribe-section {
  width: 100%;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 24px calc(80px + 32px); /* bottom clears fixed chyron */
}

.subscribe-inner {
  max-width: 560px;
  margin: 0 auto;
}

/* ── Section label ── */
.subscribe-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ── Divider ── */
.subscribe-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

/* ── Subhead ── */
.subscribe-subhead {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 20px;
}

/* ── Body copy ── */
.subscribe-body {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 28px;
}

/* ── Pricing callout ── */
.subscribe-pricing {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

/* ── Form ── */
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Form label */
.subscribe-form-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Email input */
.subscribe-email-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.subscribe-email-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.subscribe-email-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(232, 137, 12, 0.18);
}

/* ── Stub CTA button ── */
.subscribe-btn-stub {
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px dashed var(--amber);
  color: var(--amber);
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: not-allowed;
  opacity: 0.55;
  position: relative;
  transition: opacity 0.2s ease;
  /* No border-radius — global reset handles it */
}

/* Waiting-for-signal animation: slow rhythmic border pulse */
.subscribe-btn-stub::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px dashed rgba(232, 137, 12, 0.25);
  pointer-events: none;
  animation: stub-signal 3s ease-in-out infinite;
}

@keyframes stub-signal {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

/* Tooltip rendered natively via title — styling via cursor is enough */
.subscribe-btn-stub:hover {
  opacity: 0.7;
}

/* ── Privacy disclaimer ── */
.subscribe-privacy {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-align: center;
  opacity: 0.6;
  margin-top: 4px;
}

.subscribe-privacy a {
  color: var(--amber);
  text-decoration: underline;
}

/* ── Inline confirmation ── */
.subscribe-confirm {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.5;
  padding: 32px 0 8px;
  animation: confirm-pulse 1.2s ease-out forwards;
}

/* One flash, then steady — amber in, settle */
@keyframes confirm-pulse {
  0%   { opacity: 0;    text-shadow: 0 0 32px rgba(232, 137, 12, 0.9); }
  35%  { opacity: 1;    text-shadow: 0 0 24px rgba(232, 137, 12, 0.7); }
  70%  { opacity: 0.85; text-shadow: 0 0 12px rgba(232, 137, 12, 0.4); }
  100% { opacity: 1;    text-shadow: 0 0 6px  rgba(232, 137, 12, 0.2); }
}

/* ── Desktop ── */
@media (min-width: 768px) {
  .subscribe-section {
    padding: 96px 48px calc(96px + 32px);
  }
}

/* ══════════════════════════════════════════════════════════════
   DESKTOP — generous version of the mobile canvas
   ══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  .hero {
    min-height: 70vh;
    height: calc(100svh - var(--nav-height));
  }

  .hero-title-block {
    padding: 36px 48px 64px;
  }

  .coord-readout {
    bottom: 44px;
    right: 20px;
    font-size: 11px;
  }
}

@media (min-width: 1200px) {
  .hero-title-block {
    padding: 48px 64px 80px;
  }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL NAV — injected by marketing-shared.js
   ══════════════════════════════════════════════════════════════ */

.mkt-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10001;
  display: flex;
  align-items: center;
}

.mkt-nav-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Wordmark — links home on all pages except home */
.mkt-nav-home {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.mkt-nav-home:hover {
  color: var(--text);
}

/* On home page the wordmark is a <span> — not interactive */
.mkt-nav-home--current {
  cursor: default;
  pointer-events: none;
}

/* Nav link list */
.mkt-nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 1;
  min-width: 0;
}

.mkt-nav-links::-webkit-scrollbar {
  display: none;
}

.mkt-nav-links a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
  display: block;
  padding: 4px 0;
}

.mkt-nav-links a:hover,
.mkt-nav-links a[aria-current="page"] {
  color: var(--amber);
}

@media (min-width: 768px) {
  .mkt-nav-inner {
    padding: 0 48px;
  }

  .mkt-nav-links {
    gap: 0 28px;
  }
}


/* ══════════════════════════════════════════════════════════════
   GLOBAL FOOTER — injected by marketing-shared.js
   ══════════════════════════════════════════════════════════════ */

.mkt-footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 48px 24px 40px;
}

/* Home page: extra bottom clears the fixed chyron (32px) */
.mkt-footer--home {
  padding-bottom: 72px;
}

.mkt-footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.mkt-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 24px;
  margin-bottom: 40px;
}

.mkt-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mkt-footer-col-label {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.mkt-footer-link {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  width: fit-content;
  transition: color 0.15s ease;
}

.mkt-footer-link:hover {
  color: var(--amber);
}

.mkt-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.mkt-footer-copy {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  display: block;
}

.mkt-footer-osm {
  margin-top: 6px;
}

.mkt-footer-osm .mkt-footer-link {
  display: inline;
  font-size: 10px;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .mkt-footer {
    padding: 64px 48px 48px;
  }

  .mkt-footer--home {
    padding-bottom: 80px;
  }

  .mkt-footer-cols {
    grid-template-columns: repeat(4, 1fr);
    gap: 0 32px;
  }
}
