/* First-legion | Battlefield 2 community site */

:root {
  --bg: #0b0e0a;
  --bg-alt: #111610;
  --panel: #171d14;
  --line: #36452b;
  --text: #ebe7d7;
  --muted: #a9b096;
  --accent: #e3a72f;
  --accent-hi: #f5c963;
  --ok: #9ad37d;
  --head: Bahnschrift, "DIN Alternate", "Arial Narrow", Impact, sans-serif;
  --body: "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 1rem/1.6 var(--body);
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent-hi); }

:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 3px; }

.wrap { width: min(1120px, 92%); margin: 0 auto; }

section { scroll-margin-top: 72px; }

h1, h2, h3, h4 {
  margin: 0 0 .6rem;
  font-family: var(--head);
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 10, 7, .94);
  border-bottom: 2px solid var(--accent);
}

.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font: 700 1.4rem/1 var(--head);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.emblem { flex: none; width: 32px; height: 37px; color: var(--accent); }

.site-nav { display: flex; flex-wrap: wrap; gap: .25rem; }

.site-nav a {
  padding: .5rem .8rem;
  border-radius: 4px;
  font-family: var(--head);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible { background: var(--panel); color: var(--accent-hi); }

/* Hero */
.hero {
  padding: clamp(4rem, 12vw, 8rem) 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 80% 10%, rgba(227, 167, 47, .22), transparent 55%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .025) 0 14px, transparent 14px 28px),
    linear-gradient(180deg, #1b2317, var(--bg));
}

.eyebrow {
  margin: 0 0 .5rem;
  font-family: var(--head);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.8rem, 11vw, 7.5rem);
  text-shadow: 0 4px 0 rgba(0, 0, 0, .45);
}

.lead {
  max-width: 40rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Buttons and tags */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-family: var(--head);
  font-size: 1.05rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #14160b; }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--accent-hi); }
.btn-ghost:hover { background: rgba(227, 167, 47, .12); }
.btn-disabled { border-color: var(--line); background: transparent; color: var(--muted); cursor: not-allowed; }

.tag {
  padding: .1rem .5rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--head);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-hi);
  white-space: nowrap;
}

/* Sections and cards */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intro { max-width: 46rem; color: var(--muted); }
.category { margin: 2.25rem 0 0; font-size: 1.3rem; color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
}

.card h3, .card h4 { margin: 0; font-size: 1.15rem; color: var(--text); }
.card p { margin: 0; color: var(--muted); }
.card .btn { align-self: flex-start; margin-top: auto; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }

.card .server-address {
  margin: 0;
  padding: .5rem .75rem;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: #080a07;
  font-family: Consolas, "Courier New", monospace;
  color: var(--ok);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: var(--muted);
}

.meta code { color: var(--text); word-break: break-all; }

/* Join steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: .75rem;
  max-width: 48rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding: .9rem 1rem .9rem 3.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--head);
  font-size: 1.6rem;
  color: var(--accent);
}

/* Footer and helpers */
.site-footer {
  padding: 2rem 0;
  background: #080a07;
  border-top: 2px solid var(--accent);
  font-size: .9rem;
  color: var(--muted);
}

.site-footer p { margin: .3rem 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: .5rem 1rem;
  background: var(--accent);
  color: #14160b;
}

.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; }

@media (max-width: 600px) {
  .site-nav a { padding: .4rem .55rem; font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
