/* =============================================================================
   ABOUT PAGE  (body[data-page="about"])
   Page-specific rules only - resets, tokens, topbar/nav, .page, .page-header/
   .page-title/.page-sub, .card/.card-hd, .section-label, .btn are already
   defined in /assets/css/styles.css and reused as-is.
   ============================================================================= */

/* ── Intro hero ──
   Deliberately louder than the standard .card: this is the page's one
   thesis statement, everything below it stays quiet and disciplined. */
.intro-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--accent-border);
  background:
    radial-gradient(ellipse 620px 260px at 8% -10%, rgba(255,204,0,.11), transparent 60%),
    linear-gradient(155deg, #1d1712 0%, var(--surface) 46%);
  padding: 34px 34px 30px;
  margin-bottom: 28px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -22px rgba(255,204,0,.18);
}
.intro-hero::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(255,204,0,0));
}
.intro-eyebrow {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.intro-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px 1px rgba(255,204,0,.7);
}
.intro-hero h1 {
  position: relative;
  font-size: 1.7rem; line-height: 1.18; font-weight: 800;
  letter-spacing: -.02em; color: #fff;
  max-width: 640px;
  margin-bottom: 16px;
}
.intro-hero p {
  position: relative;
  margin-bottom: 10px; line-height: 1.75; font-size: .89rem; color: var(--text);
  max-width: 640px;
}
.intro-hero p:last-child { margin-bottom: 0; }
.intro-facts {
  position: relative;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.intro-facts li {
  position: relative;
  padding-left: 16px;
  line-height: 1.7;
  font-size: .89rem;
  color: var(--text);
  max-width: 640px;
}
.intro-facts li::before { content: '•'; position: absolute; left: 0; color: var(--accent); }
.intro-facts .plain-b { color: #fff; font-weight: 600; }

@media (max-width: 640px) {
  .intro-hero { padding: 26px 20px 24px; }
  .intro-hero h1 { font-size: 1.32rem; }
}

/* ── Character pile ──
   Decorative pile of player-icon PNGs "fallen" into the empty space to
   the right of the intro text, placement/rotation generated by
   pile_sim.py (real gravity sim, not hand-picked).

   .intro-hero is a flex row: .intro-hero-text is capped at the same
   640px max-width the paragraph/list already used, and .char-pile takes
   whatever room is left and stretches to match the text column's height
   (default align-items: stretch) - so this adapts to the real rendered
   width instead of guessing a fixed pixel box, and the pile can never
   overlap the text since they're side-by-side siblings, not layers. */
.intro-hero {
  display: flex;
  align-items: stretch;
  gap: 24px;
  flex-wrap: wrap;
}
.intro-hero-text {
  position: relative;
  flex: 1 1 640px;
  max-width: 640px;
  min-width: 0;
}
.char-pile {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
  min-height: 400px;
  overflow: hidden;
  pointer-events: none;
}
.char-pile img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) rotate(var(--r));
  z-index: var(--z);
  display: block;
  height: auto;
}

@media (max-width: 900px) {
  .char-pile { display: none; } /* not enough spare width once the text column starts wrapping */
}


/* ── Sticky flicker fix ──
   Chrome can flicker/hide a sticky element that uses backdrop-filter when
   another sticky+backdrop-filter element is stacked right below it (exactly
   our topbar + rail-nav). Forcing both onto their own GPU layer stops it. */
body[data-page="about"] .topbar-outer {
  transform: translateZ(0);
  will-change: transform;
}

/* ── What is Ambush explainer (sits above the Community hero) ── */
.intro-explainer {
  margin-bottom: 20px;
}
.intro-explainer-hd {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.intro-explainer-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.intro-explainer-icon svg { width: 100%; height: 100%; display: block; }
.intro-explainer-hd .feature-title { font-size: 1.2rem; }
.intro-explainer p {
  font-size: .85rem; line-height: 1.75; color: var(--text);
  margin-bottom: 10px;
}
.intro-explainer ul {
  list-style: none; margin: 0; padding: 0;
}
.intro-explainer li {
  position: relative; padding-left: 16px; margin-bottom: 5px;
  font-size: .85rem; line-height: 1.75; color: var(--text);
}
.intro-explainer li:last-child { margin-bottom: 0; }
.intro-explainer li::before { content: '•'; position: absolute; left: 0; color: var(--muted2); }

/* ── Team rows ──
   Each team gets its own panel with a colored left rail (blue = Security,
   red = Insurgents) so the two sides read as distinct factions rather than
   two lines in the same list. */
.team-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 0; }
.team-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 14px 18px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.team-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 8px 0 0 8px;
}
.team-item.team-security::before { background: #4a90d9; }
.team-item.team-insurgents::before { background: #d9484a; }
.team-thumb {
  width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0;
  object-fit: cover; object-position: center;
}
.team-item-text { font-size: .85rem; line-height: 1.75; color: var(--text); }

/* ── Feature P.S. note ──
   A small aside tacked onto a feature card - visually set apart from the
   main bullet list so it reads as a "by the way" rather than another item. */
.feature-ps {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px dashed var(--border);
  background: var(--surface2);
  font-size: .82rem; line-height: 1.7; color: var(--muted);
}
.feature-ps-tag {
  flex-shrink: 0;
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}

/* ── Command usage block ──
   Pulls a feature's core /command syntax out of prose and into its own
   terminal-styled block, so the exact usage is scannable at a glance. */
.cmd-usage {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  background: #0d1114;
  border: 1px solid var(--border);
}
.cmd-usage-row {
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
}
.cmd-usage-label {
  flex-shrink: 0;
  width: 60px;
  font-family: var(--mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted2);
}
.cmd-usage-row code {
  font-size: .82rem;
  color: var(--accent);
  background: none;
  padding: 0;
}

/* Uses the shared .page max-width (1060px) — no override, so About lines
   up with every other route. */

/* ── About layout: vertical rail sidebar + content column ── */
.about-layout {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.about-content {
  flex: 1;
  min-width: 0;
}

/* ── Section rail nav ──
   Sticky vertical stepper: numbered nodes on a connecting line running down
   the side instead of a horizontal row. Scroll-spy (see script at page
   bottom) toggles .active on the node nearest the viewport while scrolling. */
.rail-nav {
  position: sticky;
  top: 80px;
  z-index: 40;
  flex-shrink: 0;
  width: 168px;
  height: calc(100vh - 100px);
  background: #16181f;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 16px;
  display: flex;
  overflow-y: auto;
  transform: translateZ(0);
  will-change: transform;
}
.rail-nav::-webkit-scrollbar { width: 0; }
.rail-track {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  flex: 1;
}
.rail-track::before {
  content: '';
  position: absolute;
  top: 9px; bottom: 9px; left: 9px;
  width: 1px;
  background: var(--border);
  z-index: 0;
}
.rail-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 7px 0;
}
.rail-node {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted2);
  font-family: var(--mono); font-size: .58rem; font-weight: 500;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.rail-item svg { width: 10px; height: 10px; display: block; }
.rail-label {
  font-family: var(--mono); font-size: .62rem; text-align: left;
  color: var(--muted2); letter-spacing: .01em; line-height: 1.3;
  transition: color .15s;
}
.rail-item:hover .rail-node { border-color: rgba(255,255,255,.25); color: var(--text); }
.rail-item:hover .rail-label { color: var(--muted); }
.rail-item.active .rail-node {
  background: var(--accent-dim); border-color: var(--accent);
  color: var(--accent); transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(255,204,0,.12);
}
.rail-item.active .rail-label { color: var(--accent); }

/* Compact select fallback for narrow viewports - the sidebar doesn't have
   room to breathe below ~900px, so swap to a native dropdown there. */
.rail-select-wrap { display: none; }
.rail-select {
  width: 100%; height: 42px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-family: var(--mono); font-size: .78rem;
}
@media (max-width: 900px) {
  .rail-nav { display: none; }
  .about-layout { display: block; }
  .rail-select-wrap { display: block; margin-bottom: 24px; }
}
/* Phones don't get a jump-to-section control at all - not the sticky rail,
   not the dropdown fallback. Just scroll the page. */
@media (max-width: 640px) {
  .rail-select-wrap { display: none; }
}

/* ── Feature section ── */
.feature {
  scroll-margin-top: 130px;
  margin-bottom: 18px;
}
.feature-hd {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.feature-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  color: var(--accent);
}
.feature-icon.feature-icon--discord { color: #5865F2; }
.feature-icon svg { width: 17px; height: 17px; display: block; }
.feature-icon img { max-width: 22px; max-height: 22px; width: auto; height: auto; object-fit: contain; display: block; }
.feature-title { font-size: .98rem; font-weight: 500; color: var(--text); letter-spacing: -.01em; }
.feature-tag {
  font-family: var(--mono); font-size: .6rem; color: var(--muted2);
  border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px;
  text-transform: uppercase; letter-spacing: .06em; margin-left: 2px;
}
.feature-body { font-size: .85rem; line-height: 1.75; color: var(--text); }
.feature-body p { margin-bottom: 10px; }
.feature-body p:last-child { margin-bottom: 0; }
.feature-body ul { list-style: none; margin: 6px 0 12px; padding: 0; }
.feature-body li { position: relative; padding-left: 16px; margin-bottom: 5px; color: var(--text); }
.feature-body li::before { content: '•'; position: absolute; left: 0; color: var(--muted2); }
.feature-body code, .feature-body b, .feature-body strong { color: var(--accent); font-weight: 500; font-family: var(--mono); font-size: .85em; }
.feature-body .plain-b { color: var(--text); font-weight: 600; font-family: inherit; }
.feature-body a.yt-link, .feature-body a.inline-link { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent-border); }
.feature-body a.yt-link:hover, .feature-body a.inline-link:hover { border-bottom-style: solid; }

/* ── YouTube button ── */
.yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: var(--text);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s, color .15s;
}
.yt-btn svg { width: 18px; height: 18px; flex-shrink: 0; display: block; color: #ff0000; }
.yt-btn:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.2);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Timer table ── */
.timer-table-wrap { overflow-x: auto; margin: 10px 0 12px; }
.timer-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .76rem; }
.timer-table th {
  text-align: left; padding: 8px 12px; background: var(--surface2);
  color: var(--muted2); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: .6rem;
  border-bottom: 1px solid var(--border2); white-space: nowrap;
}
.timer-table td { padding: 8px 12px; border-bottom: 1px solid var(--border2); color: var(--text); white-space: nowrap; vertical-align: middle; }
.timer-table tr:last-child td { border-bottom: none; }
.feature-body > .timer-table-wrap:last-child { margin-bottom: 0; }

.timer-table th:last-child, .timer-table td:last-child { text-align: center; }

/* ── Rank icon pair (from > to), used in the XP & Ranks table ── */
.rank-icon-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.rank-icon-pair .rank-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  object-position: center;
}
.rank-icon-pair .rank-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted2);
  flex-shrink: 0;
}
/* The 1-star source asset sits lower in its frame than the 5-star
   composite (it's positioned for the "center star" slot of the full
   5-star layout, which reads low against the taller 5-star cluster) -
   nudge it up so the "from" icon lines up with the "to" icon. */
.rank-icon-pair .rank-icon[src*="_star_1."] {
  transform: translateY(-28%);
}

/* ── Command list ── */
.cmd-list { display: flex; flex-direction: column; gap: 14px; }
.cmd-item { padding-left: 2px; }
.cmd-name { font-family: var(--mono); font-size: .85rem; color: var(--accent); margin-bottom: 3px; }
.cmd-desc { font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* Teamkill rule list reads dense with muted body text - bump to full
   text color so the descriptions aren't fighting the titles for attention. */
#teamkill .cmd-desc { color: var(--text); }

/* Closing note after a cmd-list needs visible separation, otherwise it
   reads as just another list item instead of a wrap-up statement. */
.feature-closing-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border2);
}

/* ── Mutator category groups ── */
.mutator-cat-title {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin: 22px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border2);
}
.mutator-cat-title:first-child { margin-top: 4px; }
.mutator-cat-count {
  font-weight: 400; color: var(--muted2); letter-spacing: normal;
}

/* ── Chat commands grid ──
   Each command is a card: the command itself as a code-styled chip up
   top, description below. Two columns on wide screens so the list reads
   as a scannable reference instead of a long single-file list. */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cmd-card {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.cmd-card .cmd-name {
  display: inline-block;
  font-family: var(--mono); font-size: .8rem; font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.cmd-card .cmd-desc { font-size: .81rem; color: var(--muted); line-height: 1.6; }

/* Same fix as .mutator-grid below: an odd count leaves the last card alone
   in the left column with dead space beside it. Span it full-width instead. */
.cmd-grid > .cmd-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .cmd-grid { grid-template-columns: 1fr; }
}

/* ── Mutator cards ──
   Replaces the old wall-of-code alias lists: the mutator name leads, a
   short effect line follows, and aliases collapse into a compact, muted
   tag row so they read as metadata rather than headline content. */
.mutator-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mutator-card {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.mutator-card-name {
  font-size: .85rem; font-weight: 600; color: var(--text);
  margin-bottom: 4px;
}
.mutator-card-name .plain-b {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  color: var(--muted); margin-left: 6px;
}
.mutator-card-desc {
  font-size: .81rem; color: var(--muted); line-height: 1.55;
  margin-bottom: 9px;
}
.mutator-aliases {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.mutator-alias {
  font-family: var(--mono); font-size: .68rem; color: var(--muted2);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ── Achievement tier chips ──
   Same palette as the profile page's .tp-* / .ach-tier-chip tier colors
   (see /assets/css/styles.css) - reused here so a tier reads identically
   wherever it shows up on the site, just restyled as a filled pill
   instead of a small colored dot next to a card. */
.tier-chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tier-chip {
  font-family: 'Inter', sans-serif; font-size: .71rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 11px; border-radius: 20px; border: 1px solid;
  line-height: 1.4;
}
.tier-chip.t-wood     { background: rgba(166,124,78,.14);  color: #c99f70; border-color: rgba(166,124,78,.4); }
.tier-chip.t-iron     { background: rgba(90,96,112,.16);   color: #9aa2b3; border-color: rgba(90,96,112,.4); }
.tier-chip.t-bronze   { background: rgba(138,92,46,.14);   color: var(--bronze); border-color: rgba(138,92,46,.4); }
.tier-chip.t-silver   { background: rgba(122,136,152,.14); color: var(--silver); border-color: rgba(122,136,152,.4); }
.tier-chip.t-gold     { background: rgba(197,146,42,.14);  color: var(--gold);   border-color: rgba(197,146,42,.4); }
.tier-chip.t-platinum { background: rgba(106,179,200,.14); color: #6ab3c8; border-color: rgba(106,179,200,.4); }
.tier-chip.t-diamond  { background: rgba(124,156,245,.14); color: #7c9cf5; border-color: rgba(124,156,245,.4); }
.tier-chip.t-warlord  { background: rgba(196,79,79,.14);   color: #e07a7a; border-color: rgba(196,79,79,.4); }
.tier-chip.t-secret   { background: rgba(136,96,208,.14);  color: #a688e8; border-color: rgba(136,96,208,.4); }


/* If a category has an odd number of mutators, the last card is a lone
   item in the left column with an empty gap next to it. Stretching it
   across both columns instead reads as an intentional "featured" closer
   rather than a leftover slot - and needs no markup/count changes when
   mutators are added or removed. */
.mutator-grid > .mutator-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .mutator-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .feature-title { font-size: .9rem; }
  .feature-body { font-size: .82rem; }
}
