/* ==========================================================================
   АРМИЯ — Военно-гарнизонная ММО RPG (В/Ч 54023)
   Визуальная система, выверенная по боевому интерфейсу snek.su/army/
   ========================================================================== */

:root {
  --bg-root: #11100d;
  --bg-elevated: #171410;
  --bg-card-top: #1b1914;
  --bg-card-bottom: #151410;
  --bg-panel-top: rgba(35, 30, 23, 0.96);
  --bg-panel-bottom: rgba(19, 17, 13, 0.98);

  --text-main: #ebe3d3;
  --text-bright: #f5eedc;
  --text-muted: #b4aa97;
  --text-dim: #8a7f6b;

  --gold: #cfa24c;
  --gold-bright: #e4bc69;
  --gold-soft: #f5d5a5;
  --gold-deep: #8c6622;

  --olive: #6e8f5b;
  --olive-bright: #92bf78;
  --olive-dark: #374c2c;

  --crimson: #b93832;
  --crimson-bright: #dc6b63;
  --crimson-dark: #86211f;

  --paper-top: #e7ddc4;
  --paper-bottom: #dbd0b3;
  --paper-ink: #211b14;

  --border-brass: rgba(173, 146, 98, 0.28);
  --border-brass-strong: rgba(207, 162, 76, 0.48);

  --font-display: 'Vollkorn', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background-color: var(--bg-root);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #992826;
  color: #f5eedc;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #171410;
}

::-webkit-scrollbar-thumb {
  background: #6c5733;
  border-radius: 999px;
  border: 2px solid #171410;
}

::-webkit-scrollbar-thumb:hover {
  background: #a58449;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Subtle film grain matching the game's SVG turbulence noise */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography helpers matching game classes */
.stencil-text {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 900;
  line-height: 1.15;
}

.typewriter {
  font-family: var(--font-mono);
}

.text-gold {
  color: var(--gold-bright);
}

.text-olive {
  color: var(--olive-bright);
}

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

/* Core game surfaces */
.dossier-card {
  background: linear-gradient(180deg, var(--bg-card-top), var(--bg-card-bottom));
  border: 1px solid rgba(173, 146, 98, 0.24);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 1px rgba(235, 220, 185, 0.05);
}

.rivet-panel {
  background: linear-gradient(180deg, var(--bg-panel-top), var(--bg-panel-bottom));
  border: 1px solid rgba(173, 146, 98, 0.36);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px rgba(244, 224, 175, 0.12), inset 0 -1px rgba(0, 0, 0, 0.65), 0 14px 34px rgba(0, 0, 0, 0.72);
}

.dossier-paper {
  position: relative;
  background: linear-gradient(180deg, var(--paper-top), var(--paper-bottom));
  color: var(--paper-ink);
  border: 1px solid #9d8861;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 0 32px rgba(139, 110, 62, 0.18);
  padding: 28px;
}

.combat-hud-bar {
  background: linear-gradient(180deg, rgba(28, 24, 19, 0.95), rgba(14, 12, 10, 0.97));
  border: 1px solid rgba(166, 132, 74, 0.42);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px rgba(244, 219, 168, 0.14), 0 6px 18px rgba(0, 0, 0, 0.75);
}

.medallion-bezel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #3a3123, #1d1913 65%, #110f0c);
  border: 2px solid #8a6c39;
  box-shadow: inset 0 2px 6px rgba(255, 230, 170, 0.16), inset 0 -3px 6px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  flex-shrink: 0;
}

.diorama-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(0, 0, 0, 0.05) 35%, rgba(10, 9, 7, 0.78)),
    linear-gradient(180deg, rgba(12, 11, 8, 0.55), rgba(12, 11, 8, 0) 20%, rgba(12, 11, 8, 0) 72%, rgba(12, 11, 8, 0.88));
}

/* Stamps */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.stamp-brass {
  border: 1px solid rgba(201, 154, 63, 0.65);
  color: #e4bc69;
  background: rgba(98, 72, 24, 0.25);
}

.stamp-red {
  border: 2px solid rgba(185, 56, 50, 0.82);
  color: #dc6b63;
  background: rgba(120, 25, 24, 0.24);
}

.stamp-olive {
  border: 1px solid rgba(111, 143, 92, 0.65);
  color: #9ec186;
  background: rgba(45, 64, 38, 0.35);
}

.stamp-tilted {
  transform: rotate(-2.5deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 9px 15px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 14px;
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.cta-brass {
  background: linear-gradient(180deg, #b38634, #8c6622);
  border: 1px solid #d9ae58;
  color: #17120a;
  box-shadow: 0 6px 16px rgba(140, 102, 34, 0.35), inset 0 1px rgba(255, 245, 210, 0.3);
}

.cta-brass:hover {
  background: linear-gradient(180deg, #c7983e, #9b7228);
  box-shadow: 0 8px 22px rgba(212, 165, 78, 0.35), inset 0 1px rgba(255, 245, 210, 0.42);
}

.cta-olive {
  background: linear-gradient(180deg, #4b653d, #374c2c);
  border: 1px solid #6e8f5b;
  color: #f3eee1;
  box-shadow: 0 6px 16px rgba(55, 76, 44, 0.4), inset 0 1px rgba(220, 240, 205, 0.15);
}

.cta-olive:hover {
  background: linear-gradient(180deg, #587648, #415a34);
  border-color: #92bf78;
}

.cta-crimson {
  background: linear-gradient(180deg, #a6322f, #86211f);
  border: 1px solid #c95650;
  color: #faf3e5;
  box-shadow: 0 6px 18px rgba(134, 33, 31, 0.45), inset 0 1px rgba(255, 220, 210, 0.18);
}

.cta-crimson:hover {
  background: linear-gradient(180deg, #b83a36, #962624);
}

/* ==========================================================================
   TOP BAR (rivet-bar)
   ========================================================================== */
.rivet-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #27221b, #16140f 55%, #110f0c);
  border-bottom: 1px solid rgba(168, 134, 72, 0.35);
  box-shadow: inset 0 1px rgba(245, 222, 169, 0.1), 0 6px 20px rgba(0, 0, 0, 0.78);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 40px;
  height: 40px;
  padding: 6px;
}

.brand-badge .icon-svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.brand-unit {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--gold-bright);
  background: rgba(207, 162, 76, 0.09);
  border-color: rgba(207, 162, 76, 0.28);
}

.nav-code {
  font-size: 11px;
  color: var(--gold);
  opacity: 0.85;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0 8px;
  background: #1b1812;
  border: 1px solid var(--border-brass);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--gold-bright);
  border-radius: 2px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(168, 134, 72, 0.22);
  background: #14120e;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #1c1913;
  border: 1px solid rgba(173, 146, 98, 0.16);
  color: var(--text-main);
  font-size: 14px;
}

.mobile-nav-link .typewriter {
  color: var(--gold-bright);
  font-size: 12px;
}

.mobile-nav-cta {
  margin-top: 6px;
  width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 64px 0 76px;
  border-bottom: 1px solid rgba(168, 134, 72, 0.25);
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.26;
  filter: sepia(0.28) contrast(1.08) brightness(0.7);
}

.hero-vignette {
  background:
    radial-gradient(ellipse at 70% 45%, rgba(17, 16, 13, 0.35), rgba(17, 16, 13, 0.94) 78%),
    linear-gradient(180deg, rgba(17, 16, 13, 0.72), rgba(17, 16, 13, 0.45) 45%, #11100d 100%);
}

.radar-grid {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(to right, rgba(207, 162, 76, 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(207, 162, 76, 0.5) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 60% 45%, black, transparent 78%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 36px;
  align-items: center;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.3vw, 52px);
  color: var(--text-bright);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.75);
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-main);
  max-width: 580px;
}

.hero-lead strong {
  color: var(--gold-bright);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-olive {
  background: var(--olive-bright);
  box-shadow: 0 0 8px rgba(146, 191, 120, 0.65);
}

.dot-gold {
  background: var(--gold-bright);
  box-shadow: 0 0 8px rgba(228, 188, 105, 0.65);
}

.dot-red {
  background: var(--crimson-bright);
  box-shadow: 0 0 8px rgba(220, 107, 99, 0.65);
}

/* Hero Briefing Card */
.hero-briefing {
  padding: 18px;
}

.briefing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.briefing-code {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.briefing-scene-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(173, 146, 98, 0.3);
  height: 220px;
  background: #171410;
  margin-bottom: 14px;
}

.briefing-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.briefing-hud-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.hud-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
}

.hud-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.hud-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.hud-xp-block {
  background: rgba(15, 13, 10, 0.88);
  border: 1px solid rgba(166, 132, 74, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
}

.hud-xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.xp-track {
  height: 7px;
  background: #1e1912;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(173, 146, 98, 0.25);
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b6624, #cfa047, #f5d5a5);
  border-radius: 999px;
}

/* Rank ladder inside briefing */
.rank-ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  background: #14120e;
  border: 1px solid rgba(173, 146, 98, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.rank-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--text-muted);
  background: #1d1a14;
  border: 1px solid rgba(173, 146, 98, 0.16);
}

.rank-active {
  color: #9ec186;
  border-color: rgba(111, 143, 92, 0.65);
  background: rgba(45, 64, 38, 0.4);
}

.rank-top {
  color: var(--gold-bright);
  border-color: rgba(207, 162, 76, 0.6);
  background: rgba(140, 102, 34, 0.25);
}

.rank-sep {
  color: var(--text-dim);
  font-size: 11px;
}

.briefing-commanders {
  background: #14120e;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.briefing-cmd-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.mini-boss-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mini-boss-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.mini-medallion {
  width: 48px;
  height: 48px;
}

.mini-medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-boss-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.mini-boss-hp {
  font-size: 10px;
  color: var(--crimson-bright);
}

/* ==========================================================================
   SECTIONS COMMON
   ========================================================================== */
.section {
  padding: 84px 0;
  position: relative;
}

.section-tinted {
  background: linear-gradient(180deg, rgba(25, 22, 17, 0.72), rgba(17, 16, 13, 0.96));
  border-top: 1px solid rgba(168, 134, 72, 0.16);
  border-bottom: 1px solid rgba(168, 134, 72, 0.16);
}

.section-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-title {
  margin: 14px 0 12px;
  font-size: clamp(26px, 3.2vw, 38px);
  color: var(--text-bright);
}

.section-subtitle {
  margin: 0;
  font-size: 17px;
  color: var(--text-muted);
}

.card-kicker,
.card-step {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 8px;
}

.card-title {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text-bright);
}

.card-text {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.card-text:last-child {
  margin-bottom: 0;
}

.card-text strong {
  color: var(--text-bright);
}

.card-text em {
  color: var(--gold-soft);
  font-style: normal;
}

/* ==========================================================================
   SECTION 1: ABOUT + PAPER DOSSIER
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 26px;
  align-items: start;
}

.about-narrative {
  padding: 30px;
}

.sector-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.sector-chip {
  padding: 14px;
  background: #13110d;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sector-tag {
  font-size: 10px;
  color: var(--olive-bright);
  letter-spacing: 0.08em;
}

.sector-chip strong {
  font-size: 14px;
  color: var(--gold-bright);
}

.sector-chip span:last-child {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.paper-stamp-corner {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #9e2420;
  border-color: rgba(158, 36, 32, 0.75);
  background: rgba(158, 36, 32, 0.08);
}

.paper-header {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #6b5839;
  margin-bottom: 6px;
}

.paper-title {
  margin: 0 0 18px;
  font-size: 22px;
  color: #211b14;
  border-bottom: 2px solid rgba(124, 100, 62, 0.4);
  padding-bottom: 10px;
}

.paper-list {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paper-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(124, 100, 62, 0.35);
}

.paper-row dt {
  font-size: 10px;
  color: #6f5b3a;
  letter-spacing: 0.07em;
}

.paper-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f1912;
}

.paper-quote {
  background: rgba(139, 110, 62, 0.14);
  border-left: 3px solid #8c211f;
  padding: 12px 14px;
  border-radius: 0 6px 6px 0;
}

.paper-quote p {
  margin: 0 0 6px;
  font-size: 13px;
  font-style: italic;
  color: #2b2319;
}

.paper-quote span {
  font-size: 11px;
  color: #6f5b3a;
}

/* ==========================================================================
   SECTION 2: IDEA + CLOSED LOOP
   ========================================================================== */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

.idea-card {
  padding: 26px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.idea-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-brass-strong);
}

.idea-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  margin-bottom: 16px;
}

.idea-icon .icon-svg {
  width: 100%;
  height: 100%;
}

.loop-strip {
  padding: 22px 26px;
}

.loop-strip-head {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 16px;
}

.loop-nodes {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.loop-node {
  padding: 14px;
  background: #13110d;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loop-node strong {
  color: var(--gold-bright);
  font-size: 15px;
}

.loop-node span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.loop-arrow {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

/* ==========================================================================
   SECTION 3: GAMEPLAY DECK & COMMAND DOSSIER
   ========================================================================== */
.gameplay-deck {
  padding: 22px;
  margin-bottom: 30px;
}

.gameplay-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.gp-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  background: #14120e;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.gp-tab:hover {
  border-color: rgba(207, 162, 76, 0.5);
  color: var(--text-bright);
}

.gp-tab.is-active {
  background: linear-gradient(180deg, rgba(179, 134, 52, 0.24), rgba(140, 102, 34, 0.14));
  border-color: var(--gold-bright);
  color: var(--text-bright);
  box-shadow: 0 0 16px rgba(228, 188, 105, 0.18);
}

.gp-num {
  font-size: 11px;
  color: var(--gold);
}

.gp-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.gameplay-stage {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 26px;
  align-items: center;
  background: #13110d;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: var(--radius-md);
  padding: 20px;
}

.gp-visual {
  position: relative;
  height: 310px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(173, 146, 98, 0.3);
  background: #1a1611;
}

.gp-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: opacity 0.25s ease;
}

.gp-visual-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

.gp-kicker {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.gp-title {
  margin: 0 0 12px;
  font-size: 24px;
  color: var(--text-bright);
}

.gp-desc {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--text-muted);
}

.gp-bullets {
  margin: 0 0 18px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-main);
  font-size: 14px;
}

.gp-bullets li strong {
  color: var(--gold-soft);
}

.gp-formula {
  padding: 11px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gp-formula-label {
  font-size: 11px;
  color: var(--olive-bright);
}

.gp-formula-code {
  font-size: 13px;
  color: var(--gold-bright);
}

/* Command Dossier (Bosses & Arguments) */
.command-dossier {
  padding: 28px;
}

.command-dossier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.command-dossier-head .card-title {
  margin: 10px 0 0;
}

.command-hint {
  font-size: 12px;
  color: var(--text-dim);
}

.command-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: stretch;
}

.boss-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boss-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #14120e;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.boss-pill:hover {
  border-color: rgba(207, 162, 76, 0.52);
  background: #1c1913;
}

.boss-pill.is-active {
  border-color: var(--crimson-bright);
  background: linear-gradient(90deg, rgba(166, 50, 47, 0.22), rgba(20, 18, 14, 0.95));
  box-shadow: 0 0 14px rgba(167, 92, 79, 0.28);
}

.boss-pill-img {
  width: 44px;
  height: 44px;
}

.boss-pill-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.boss-pill span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.boss-pill strong {
  font-size: 14px;
  color: var(--text-bright);
}

.boss-pill small {
  font-size: 11px;
  color: var(--text-muted);
}

.boss-inspect {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.boss-hq-banner {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(173, 146, 98, 0.28);
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.boss-hq-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.boss-inspect-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.boss-main-portrait {
  width: 82px;
  height: 82px;
  border-color: var(--gold);
}

.boss-main-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.boss-inspect-meta {
  flex: 1;
}

.boss-inspect-name {
  margin: 8px 0 8px;
  font-size: 22px;
  color: var(--text-bright);
}

.boss-hp-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.boss-hp-track {
  height: 8px;
  background: rgba(15, 12, 10, 0.85);
  border-radius: 999px;
  border: 1px solid rgba(201, 86, 80, 0.45);
  overflow: hidden;
}

.boss-hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #7e1f1d, #b83834, #df6e68);
}

.boss-hp-text {
  font-size: 12px;
  color: #f3b1ac;
}

.boss-inspect-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.boss-reward-bar {
  font-size: 12px;
  padding: 10px 12px;
  background: #14120e;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: 6px;
  color: var(--text-main);
}

.boss-reward-bar strong {
  color: var(--gold-bright);
}

.arguments-label {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 10px;
}

.arguments-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.arg-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #14120e;
  border: 1px solid rgba(173, 146, 98, 0.22);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-main);
}

.arg-card img {
  width: 38px;
  height: 38px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid rgba(207, 162, 76, 0.4);
  flex-shrink: 0;
}

/* ==========================================================================
   SECTION 4: STANDOUT FEATURES & DEMBEL ALBUM
   ========================================================================== */
.standout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.standout-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.standout-wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.standout-media {
  position: relative;
  min-height: 230px;
  background: #171410;
}

.standout-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-stamp {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
}

.standout-body {
  padding: 26px;
}

.album-showcase {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 22px;
  background: #13110d;
  border-right: 1px solid rgba(173, 146, 98, 0.18);
  align-items: center;
}

.album-frame {
  position: relative;
  padding: 8px 8px 10px;
  background: #1b1812;
  border: 1px solid rgba(173, 146, 98, 0.28);
  border-radius: 6px;
  text-align: center;
}

.album-frame img,
.album-svg-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 6px;
}

.album-svg-art {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #2a2218, #14110c);
}

.album-svg-art svg {
  width: 100%;
  height: 100%;
}

.album-frame span:last-child {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-soft);
}

/* L-shaped gold corner brackets from the game's Dembel Album */
.corner-bracket {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--gold-bright);
  border-style: solid;
  pointer-events: none;
}

.cb-tl { top: 3px; left: 3px; border-width: 2px 0 0 2px; }
.cb-tr { top: 3px; right: 3px; border-width: 2px 2px 0 0; }
.cb-bl { bottom: 3px; left: 3px; border-width: 0 0 2px 2px; }
.cb-br { bottom: 3px; right: 3px; border-width: 0 2px 2px 0; }

/* ==========================================================================
   SECTION 5: WHY FUN & INTERACTIVE SIMULATOR
   ========================================================================== */
.why-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

.why-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
}

.why-num {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(179, 134, 52, 0.16);
  border: 1px solid rgba(207, 162, 76, 0.45);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.simulator-card {
  padding: 24px;
  position: sticky;
  top: 90px;
}

.sim-head .card-title {
  margin: 12px 0 6px;
}

.sim-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.sim-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
}

.sim-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-range {
  width: 100%;
  accent-color: var(--gold-bright);
  cursor: pointer;
}

.sim-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.sim-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sim-rank {
  font-size: 20px;
  color: var(--text-bright);
}

.sim-hp {
  font-size: 20px;
}

.sim-hp-bar-wrap {
  margin-bottom: 16px;
}

.sim-hp-track {
  height: 10px;
  background: #13110d;
  border-radius: 999px;
  border: 1px solid rgba(111, 143, 92, 0.4);
  overflow: hidden;
  margin-bottom: 8px;
}

.sim-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #4b6b3b, #8ab06e);
  transition: width 0.25s ease;
}

.sim-formula-note {
  font-size: 11px;
  color: var(--text-dim);
}

.sim-milestone {
  padding: 14px;
}

.milestone-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--olive-bright);
  margin-bottom: 4px;
}

.sim-milestone p {
  margin: 0;
  font-size: 13px;
  color: var(--text-main);
}

/* ==========================================================================
   FINAL CTA & FOOTER
   ========================================================================== */
.cta-section {
  padding: 40px 0 88px;
}

.final-cta-box {
  position: relative;
  text-align: center;
  padding: 46px 28px;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.final-cta-stamp {
  position: absolute;
  top: 22px;
  right: 24px;
}

.final-cta-kicker {
  display: inline-block;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.final-cta-title {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.6vw, 40px);
  color: var(--text-bright);
}

.final-cta-text {
  margin: 0 auto 28px;
  max-width: 620px;
  font-size: 16px;
  color: var(--text-muted);
}

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.site-footer {
  border-top: 1px solid rgba(168, 134, 72, 0.25);
  background: #0d0c0a;
  padding: 26px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-size: 18px;
  color: var(--gold-bright);
}

.footer-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold-bright);
}

.footer-play-link {
  font-size: 13px;
  color: var(--gold-bright);
  font-weight: 600;
}

/* Fallback if offline image fails */
img.is-fallback {
  opacity: 0;
}

/* Subtle reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .command-split,
  .why-layout,
  .gameplay-stage,
  .standout-wide {
    grid-template-columns: 1fr;
  }

  .gameplay-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .album-showcase {
    border-right: none;
    border-bottom: 1px solid rgba(173, 146, 98, 0.18);
  }

  .simulator-card {
    position: static;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .idea-grid,
  .standout-grid,
  .sector-chips,
  .arguments-cards {
    grid-template-columns: 1fr;
  }

  .standout-wide {
    grid-column: span 1;
  }

  .loop-nodes {
    grid-template-columns: 1fr;
  }

  .loop-arrow {
    text-align: center;
    transform: rotate(90deg);
  }

  .gameplay-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .album-showcase {
    grid-template-columns: repeat(3, 1fr);
  }

  .mini-boss-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .paper-stamp-corner,
  .final-cta-stamp {
    position: static;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-section {
    padding: 40px 0 56px;
  }

  .btn-lg {
    width: 100%;
  }

  .gameplay-tabs {
    grid-template-columns: 1fr;
  }

  .album-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}
