/* ==========================================================================
   TAC-X  ·  TACTICAL XCELLENCE
   Milsim · Tactical Shooters · 10+ Years In The Field
   ========================================================================== */

:root {
  --bg:           #0d1117;
  --bg-2:         #11161e;
  --surface:      #161b22;
  --surface-2:    #1c222b;
  --surface-3:    #232a34;
  --line:         #2a3340;
  --line-bright:  #3a4555;

  --text:         #e6edf3;
  --text-dim:     #c2c8d2;
  --text-muted:   #7d8794;

  --accent:       #c9a55c;        /* tactical gold / khaki */
  --accent-2:     #e2c280;
  --olive:        #8a9a3f;
  --olive-deep:   #6b8e23;
  --steel:        #5c6470;

  --good:         #4ade80;
  --warn:         #facc15;
  --bad:          #ef4444;

  --rule-w:       1px;
  --radius:       2px;

  --container:    1200px;

  --font-display: 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --shadow-sm:    0 1px 2px rgba(0,0,0,0.4);
  --shadow:       0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.55);

  --t-fast:       120ms ease;
  --t:            220ms ease;
}

/* --- reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.04em; }
p { margin: 0; }

/* --- base ---------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 90% -10%, rgba(201,165,92,0.10), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(138,154,63,0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* light dot grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(201,165,92,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  z-index: 1;
}

::selection { background: var(--accent); color: #000; }

/* --- layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section {
  padding: 96px 0;
  position: relative;
  z-index: 2;
}
.section--tight { padding: 64px 0; }
.section--alt {
  background: linear-gradient(to bottom, rgba(255,255,255,0.015), rgba(0,0,0,0.25));
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-lede {
  margin-top: 18px;
  max-width: 720px;
  font-size: 17px;
  color: var(--text-dim);
}

.section-head { margin-bottom: 56px; }

/* --- nav ----------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,17,23,0.82);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.brand__mark { width: 36px; height: 36px; }
.brand__name span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color var(--t-fast);
  position: relative;
}
.nav__link:hover { color: var(--text); }
.nav__link--active { color: var(--accent); }
.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--accent);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  transition: all var(--t-fast);
}
.nav__cta:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after  { top: 6px; }

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 120px 0 96px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.55) 100%),
    url("../img/hero-bg.svg") center / cover no-repeat;
  opacity: 0.92;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,165,92,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,165,92,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero__inner { position: relative; z-index: 2; }

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--line-bright);
  background: rgba(0,0,0,0.4);
}
.hero__tag .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 12px var(--olive);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero__title {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 140px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 60%, #fff5d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(201,165,92,0.35));
}

.hero__sub {
  margin-top: 24px;
  max-width: 640px;
  font-size: 18px;
  color: var(--text-dim);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--line-bright);
  color: var(--text);
  background: rgba(255,255,255,0.02);
  transition: all var(--t-fast);
  position: relative;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201,165,92,0.08);
}
.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-2);
  color: #000;
  border-color: var(--accent-2);
}
.btn .arrow { transition: transform var(--t-fast); }
.btn:hover .arrow { transform: translateX(3px); }

/* --- stat strip ---------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.stats__item {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}
.stats__item:last-child { border-right: 0; }
.stats__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  color: var(--accent);
  line-height: 1;
}
.stats__label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- pillars ------------------------------------------------------------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pillar {
  padding: 32px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-2) 100%);
}
.pillar__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.pillar__title {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pillar__text {
  margin-top: 12px;
  color: var(--text-dim);
}

/* --- features grid ------------------------------------------------------ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: all var(--t);
}
.feature::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t);
}
.feature:hover {
  border-color: var(--line-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature:hover::before { transform: scaleY(1); }
.feature__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(201,165,92,0.08);
  border: 1px solid rgba(201,165,92,0.25);
  color: var(--accent);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature__title {
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.feature__text { color: var(--text-dim); font-size: 15px; }

/* --- games rail --------------------------------------------------------- */
.games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.game {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
  transition: transform var(--t);
}
.game:hover { transform: translateY(-3px); border-color: var(--accent); }
.game__title {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.game__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 4px;
}
.game__years {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.game__years span {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 6px;
}
.game__desc {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 14px;
}

/* --- timeline ----------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 1px;
  background: var(--line-bright);
}
.tl {
  position: relative;
  padding-bottom: 32px;
}
.tl:last-child { padding-bottom: 0; }
.tl::before {
  content: "";
  position: absolute;
  left: -23px; top: 6px;
  width: 11px; height: 11px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}
.tl__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tl__title {
  margin-top: 4px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tl__text {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 14px;
}

/* --- roles -------------------------------------------------------------- */
.roles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.role {
  padding: 24px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  transition: all var(--t);
}
.role:hover { border-color: var(--accent); transform: translateY(-2px); }
.role__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.role__title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.role__text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

/* --- callout ------------------------------------------------------------ */
.callout {
  padding: 56px 48px;
  border: 1px solid var(--line-bright);
  background:
    radial-gradient(ellipse at top right, rgba(201,165,92,0.18), transparent 60%),
    var(--surface);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,165,92,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,165,92,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}
.callout__inner { position: relative; }
.callout h2 {
  font-size: clamp(28px, 4vw, 44px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.callout p {
  margin-top: 14px;
  color: var(--text-dim);
  max-width: 600px;
  margin-inline: auto;
}
.callout .btn-row {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* --- terminal ----------------------------------------------------------- */
.terminal {
  background: #06080b;
  border: 1px solid var(--line-bright);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--olive);
  position: relative;
  margin-top: 24px;
}
.terminal::before {
  content: "▎ TAC-X://comms/online";
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.terminal .ok { color: var(--good); }
.terminal .warn { color: var(--warn); }

/* --- footer ------------------------------------------------------------- */
.footer {
  margin-top: 80px;
  padding: 56px 0 32px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer__about p {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 14px;
  max-width: 360px;
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer__col li { margin-bottom: 10px; }
.footer__col a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color var(--t-fast);
}
.footer__col a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* --- prose -------------------------------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 36px; font-size: 24px; }
.prose h3 { margin-top: 28px; font-size: 18px; color: var(--accent); }
.prose p { margin-top: 14px; color: var(--text-dim); }
.prose ul {
  margin-top: 14px;
  padding-left: 18px;
  list-style: none;
}
.prose ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--text-dim);
}
.prose ul li::before {
  content: "▸";
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
}
.prose strong { color: var(--text); }

/* --- badge -------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(0,0,0,0.4);
}
.badge--gold { color: var(--accent); border-color: var(--accent); }
.badge--olive { color: var(--olive); border-color: var(--olive); }

/* --- contact form ------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 640px;
  margin: 32px auto 0;
}
.contact__field {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact__field--half { grid-column: span 1; }
.contact__field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.contact__field input,
.contact__field select,
.contact__field textarea {
  font: inherit;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--t-fast);
}
.contact__field input:focus,
.contact__field select:focus,
.contact__field textarea:focus { border-color: var(--accent); }
.contact__field textarea { resize: vertical; min-height: 120px; }
.contact__submit { grid-column: span 2; margin-top: 8px; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .games { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(2) { border-right: 0; }
  .stats__item:nth-child(1),
  .stats__item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact__field--half { grid-column: span 1; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__open .nav__links {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
  }
  .nav__open .nav__link--active::after { display: none; }
  .features { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 80px 0 64px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .callout { padding: 36px 22px; }
}

/* --- scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
