/* ============================================================================
   Counter-Strike 1.6 local build — gateway.css
   The homepage gateway only. Classic VGUI2 look: olive-gray beveled panels, small
   Tahoma-style type, square corners, no decorative shadows.

   Colours are taken from Valve's shipped TrackerScheme.res, the same palette
   menu.css uses, so the gateway and the launcher read as one product:
     ControlBG 76,88,68 · WindowBG 62,70,55
     BorderBright 136,145,128 · BorderDark 40,46,34

   This file is standalone: it does not load menu.css and shares no class names
   with it beyond the .vgui-button contract.
   ========================================================================= */

:root {
  --cs-base:   #4c5844;
  --cs-light:  #5a6a50;
  --cs-bright: #889180;
  --cs-dark:   #282e22;
  --cs-darker: #3e4637;
  --cs-text:   #d8ded3;
  --cs-dim:    #c2cabd;
  --cs-warn:   #ffd479;
  --cs-error:  #ff9a8a;
  --cs-ok:     #8fd07a;

  --cs-font: Tahoma, Verdana, "DejaVu Sans", "Liberation Sans", Geneva, sans-serif;
  --cs-narrow: "Arial Narrow", "Liberation Sans Narrow", "DejaVu Sans Condensed",
    "Helvetica Neue Condensed", Tahoma, Verdana, sans-serif;
  --cs-mono: "Lucida Console", "DejaVu Sans Mono", Consolas, monospace;

  --bevel-up: inset 1px 1px 0 var(--cs-bright), inset -1px -1px 0 var(--cs-dark);
  --bevel-in: inset 1px 1px 0 var(--cs-dark), inset -1px -1px 0 var(--cs-bright);

  --gw-max: 880px;
}

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

[hidden] { display: none !important; }

html {
  background: #0d0e0c;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  padding: clamp(14px, 2.6vw, 26px) clamp(12px, 4vw, 40px) 20px;
  font-family: var(--cs-font);
  font-size: 12px;
  line-height: 1.4;
  color: var(--cs-text);
  -webkit-font-smoothing: antialiased;
}

/* Global keyboard focus: the VGUI dotted ring, legible on olive. */
:focus-visible {
  outline: 1px dotted #ffffff;
  outline-offset: 2px;
}

code {
  font-family: var(--cs-mono);
  font-size: 11px;
  color: var(--cs-bright);
}

/* ------------------------------------------------------------------ layers */
.gw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #2b2c27;
  /* Readability wash, then the launcher's own menu art, then a gradient
     fallback that stands on its own if that image is missing. */
  background-image:
    linear-gradient(180deg, rgba(14,15,12,.44) 0%, rgba(14,15,12,.74) 100%),
    url("assets/menu-background.jpg"),
    radial-gradient(135% 105% at 16% 4%, #96978a 0%, #6b6c60 42%, #34352d 100%);
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
}

.gw-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 95% at 50% 42%, rgba(0,0,0,0) 46%, rgba(0,0,0,.52) 100%);
}

.gw-shell {
  position: relative;
  z-index: 1;
  max-width: var(--gw-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* ------------------------------------------------------------------ header */
/* Compact hero: the brand, the one heading and one lead line stay short so both
   pack choices and their totals sit above the fold on a laptop screen. */
.gw-header { margin: 0; }

.gw-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.85);
}

.gw-brand-name {
  font-family: var(--cs-narrow);
  font-stretch: condensed;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #f4f2ea;
}

.gw-brand-version {
  padding: 1px 5px;
  background: var(--cs-base);
  border: 1px solid #000;
  box-shadow: var(--bevel-up);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.gw-brand-sep { color: rgba(216,222,211,.5); }

.gw-brand-sub {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cs-dim);
}

.gw-title {
  margin: 0;
  font-family: var(--cs-narrow);
  font-stretch: condensed;
  font-size: clamp(22px, 3.6vw, 31px);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.02;
  text-transform: uppercase;
  color: #f4f2ea;
  text-shadow: 2px 2px 0 rgba(0,0,0,.85), 0 0 26px rgba(0,0,0,.55);
}

.gw-lead {
  max-width: 84ch;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--cs-dim);
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
}

.gw-lead strong { color: #ffffff; }

.gw-compatibility {
  margin: 9px 0 0;
  padding-left: 9px;
  border-left: 2px solid #d1c68e;
  color: #eee5bb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
}

/* ------------------------------------------------------- status + retry row */
.gw-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 6px 10px;
  background: rgba(40,46,34,.88);
  border: 1px solid #000;
  border-left: 3px solid var(--cs-light);
  box-shadow: var(--bevel-in);
}

.gw-statusbar[data-tone="ready"] { border-left-color: var(--cs-ok); }
.gw-statusbar[data-tone="error"] { border-left-color: var(--cs-error); }

.gw-status {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11.5px;
  color: var(--cs-text);
}

.gw-status::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--cs-warn);
  border: 1px solid #000;
}

.gw-statusbar[data-tone="ready"] .gw-status::before { background: var(--cs-ok); }

.gw-statusbar[data-tone="error"] .gw-status::before { background: var(--cs-error); }

.gw-statusbar[data-tone="loading"] .gw-status::before {
  animation: gw-pulse 1.1s ease-in-out infinite;
}

.gw-statusbar[data-tone="error"] .gw-status { color: var(--cs-warn); }

.gw-noscript {
  margin: 0;
  padding: 6px 10px;
  background: rgba(40,46,34,.88);
  border: 1px solid #000;
  border-left: 3px solid var(--cs-warn);
  box-shadow: var(--bevel-in);
  color: var(--cs-warn);
  font-size: 11.5px;
}

/* ------------------------------------------------------------------- cards */
.gw-packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.gw-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px;
  background: rgba(62,70,55,.95);
  border: 1px solid #000;
  box-shadow: var(--bevel-up);
  color: var(--cs-text);
  text-decoration: none;
  transition: background-color .12s linear;
}

.gw-card:hover:not([aria-disabled="true"]) { background: rgba(90,106,80,.97); }

.gw-card:active:not([aria-disabled="true"]) { box-shadow: var(--bevel-in); }

.gw-card:focus-visible { outline: 1px dotted #ffffff; outline-offset: 2px; }

/* Disabled entry: dimmed art, muted type, no pointer affordance. The status
   line above the cards carries the reason and the retry control. */
.gw-card[aria-disabled="true"] {
  background: rgba(52,58,46,.92);
  cursor: not-allowed;
}

.gw-card[aria-disabled="true"] .gw-card-img { opacity: .5; filter: saturate(.55); }

.gw-card[aria-disabled="true"] .gw-card-title { color: rgba(216,222,211,.72); }

.gw-card[aria-disabled="true"] .gw-card-cta {
  background: #5c5b53;
  color: rgba(255,255,255,.45);
  text-shadow: none;
}

.gw-card[aria-disabled="true"] .gw-card-note { color: var(--cs-warn); }

/* ------------------------------------------------------------------- art */
/* The art is decorative and capped, so the pack names, totals and entry buttons
   stay above the fold on a laptop screen. */
.gw-card-art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  max-height: 190px;
  background: #1c1e19;
  border: 1px solid #000;
  box-shadow: var(--bevel-in);
  overflow: hidden;
}

.gw-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keep the overview and its embedded attribution intact at wide aspect ratios. */
#card-poolday .gw-card-img { object-fit: contain; }

.gw-card-count {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 7px;
  background: rgba(20,22,17,.92);
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffffff;
}

/* ------------------------------------------------------------------ body */
.gw-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  padding: 8px 8px 7px;
  min-width: 0;
}

.gw-card-title {
  font-family: var(--cs-narrow);
  font-stretch: condensed;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .015em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.85);
}

.gw-card-sub {
  font-size: 11px;
  color: var(--cs-dim);
}

.gw-card-size {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(40,46,34,.8);
  border: 1px solid #000;
  box-shadow: var(--bevel-in);
}

.gw-size-value {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.85);
  font-variant-numeric: tabular-nums;
}

.gw-size-label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cs-dim);
}

.gw-card-detail,
.gw-card-expand {
  display: block;
  font-size: 11px;
  color: var(--cs-dim);
}

.gw-card-maps { display: block; }

.gw-card-maps-head {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cs-bright);
}

.gw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.gw-chip {
  padding: 1px 5px;
  background: rgba(40,46,34,.85);
  border: 1px solid #000;
  box-shadow: var(--bevel-up);
  font-family: var(--cs-mono);
  font-size: 10px;
  color: var(--cs-dim);
}

.gw-card-note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--cs-dim);
}

.gw-card-cta {
  display: block;
  margin-top: auto;
  padding: 5px 12px;
  background: var(--cs-base);
  border: 1px solid #000;
  box-shadow: var(--bevel-up);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.75);
}

.gw-card:hover:not([aria-disabled="true"]) .gw-card-cta { background: var(--cs-light); }

/* CTA arrow drawn in CSS: no font-dependent glyph, nothing to mis-render. */
.gw-card-cta::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 7px;
  vertical-align: middle;
  border-left: 5px solid var(--cs-warn);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.gw-card[aria-disabled="true"] .gw-card-cta::after {
  border-left-color: rgba(255,255,255,.35);
}

/* --------------------------------------------------------------- footnote */
.gw-footnote {
  margin: 0;
  font-size: 11px;
  color: var(--cs-dim);
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
}

/* ----------------------------------------------------------------- notes */
.gw-notes {
  padding: 8px 10px;
  background: rgba(40,46,34,.72);
  border: 1px solid #000;
  box-shadow: var(--bevel-in);
}

.gw-notes-title {
  margin: 0 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cs-bright);
}

.gw-notes-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: var(--cs-dim);
}

.gw-notes-list li { position: relative; padding-left: 12px; }

.gw-notes-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .55em;
  width: 4px;
  height: 4px;
  background: var(--cs-light);
  border: 1px solid #000;
}

.gw-notes-list strong { color: var(--cs-text); }

/* ---------------------------------------------------------------- footer */
.gw-footer {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(199,197,190,.25);
}

.gw-footer-line {
  margin: 0;
  font-size: 11px;
  color: var(--cs-dim);
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
}

.gw-footer-sub {
  margin-top: 3px;
  max-width: 92ch;
  color: rgba(216,222,211,.72);
}

/* ---------------------------------------------------------------- button */
.vgui-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 12px;
  background: var(--cs-base);
  border: 1px solid #000;
  box-shadow: var(--bevel-up);
  color: var(--cs-text);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  text-shadow: 1px 1px 0 rgba(0,0,0,.75);
  cursor: pointer;
}

.vgui-button:hover:not(:disabled) { background: var(--cs-light); }

.vgui-button:active:not(:disabled) {
  background: var(--cs-darker);
  box-shadow: var(--bevel-in);
}

.vgui-button:disabled {
  color: rgba(255,255,255,.4);
  background: #5c5b53;
  cursor: default;
  text-shadow: none;
}

/* ------------------------------------------------------------ responsive */
/* Both packs fit side by side on the widths this launcher targets, so every
   entry stays above the fold without a wider breakpoint. */

@media (max-width: 620px) {
  body { padding: 12px 10px 16px; }
  .gw-packs { grid-template-columns: minmax(0, 1fr); }
  .gw-title { font-size: clamp(22px, 7.6vw, 30px); }
  .gw-brand-name { font-size: 14px; }
  .gw-statusbar { align-items: flex-start; }
  .gw-statusbar .vgui-button { flex: 0 0 auto; }
  .gw-card-title { font-size: 18px; }
}

/* Very short viewports: tighten the header so the first card stays in view. */
@media (max-height: 460px) {
  body { padding-top: 10px; }
  .gw-title { font-size: clamp(20px, 5.4vh, 28px); }
  .gw-lead { margin-top: 6px; }
}

/* -------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gw-card { transition: none; }
  .gw-statusbar[data-tone="loading"] .gw-status::before { animation: none; }
}

@keyframes gw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
