/* ==========================================================================
   FOF — Force Opérationnelle Française
   Design tokens
   ========================================================================== */
:root {
  --fof-navy-950: #020914;
  --fof-navy-900: #071322;
  --fof-navy-850: #091827;
  --fof-navy-800: #0c2036;

  --fof-blue: #173f73;
  --fof-blue-light: #315f91;

  --fof-red: #d90000;
  --fof-red-dark: #a90d18;
  --fof-red-light: #ed2b36;

  --fof-white: #f7f8fa;
  --fof-gray-100: #d9dee5;
  --fof-gray-300: #aab4c0;
  --fof-gray-500: #7d8b9b;

  --fof-border: rgba(255, 255, 255, 0.12);
  --fof-border-strong: rgba(255, 255, 255, 0.2);

  /* Backwards-compatible aliases so every selector below can keep using
     the same short names while sharing the single --fof-* palette. */
  --navy-950: var(--fof-navy-950);
  --line: var(--fof-border);
  --line-strong: var(--fof-border-strong);
  --white: var(--fof-white);
  --gray-400: var(--fof-gray-300);
  --gray-500: var(--fof-gray-500);
  --red: var(--fof-red);
  --red-dark: var(--fof-red-dark);
  --header-height: 72px;
  --text-main: var(--fof-white);
  --text-muted: var(--fof-gray-300);
  --header-red: var(--fof-red);
  --header-blue: var(--fof-blue);

  /* Readability tiers — never use --text-muted for essential copy. */
  --text-primary: #f7f8fa;
  --text-secondary: #b8c2ce;
  --text-tertiary: #8795a5;

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1460px;
  --page-gutter: clamp(20px, 4vw, 72px);
  --section-space: clamp(48px, 5vw, 78px);
  --radius: 2px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { width: 100%; scroll-behavior: smooth; }
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--fof-navy-950);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--white);
}
p { margin: 0; }
button { font: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: var(--white);
  padding: 12px 18px;
  z-index: 999;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--container));
  margin-inline: auto;
}

:focus-visible {
  outline: 2px solid var(--fof-red-light);
  outline-offset: 3px;
}

/* Keeps anchor targets clear of the sticky header on jump-to-section links. */
section[id] {
  scroll-margin-top: calc(var(--header-height) + 18px);
}

/* Hidden-until-revealed state only applies once JS confirms it can restore
   visibility on scroll — keeps content visible for no-JS clients/crawlers. */
html.js-enabled .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
html.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  html.js-enabled .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Buttons — three levels, reused everywhere (header, hero, sections, CTA)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn svg { flex: none; }

/* Size modifiers */
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.76rem; }
.btn-lg { min-height: 60px; padding: 0 36px; font-size: 1rem; }

/* Level 1 — the only red button. Discord conversions only. */
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--fof-red-light);
  border-color: var(--fof-red-light);
  transform: translateY(-2px);
}

/* Level 2 — transparent, for discovery / internal navigation. */
.btn-secondary {
  background: rgba(2, 9, 20, 0.48);
  color: var(--fof-white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--fof-white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Level 3 — plain text link with an arrow, for secondary information. */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: auto;
  padding: 2px 0;
  background: none;
  border: none;
  color: var(--fof-red-light);
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-text svg { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.btn-text:hover,
.btn-text:focus-visible { color: var(--fof-white); }
.btn-text:hover svg,
.btn-text:focus-visible svg { transform: translateX(3px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-height);
  background: var(--fof-navy-900);
  border-bottom: 1px solid var(--line);
  overflow: visible;
  transition: background 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(7, 19, 34, 0.94);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  height: 100%;
  padding-inline-end: 140px;
}

/* Logo — grid column controls the slot width, image allowed to overflow
   the header's bottom edge (site-header has no overflow:hidden) so it
   overlaps the top of the hero below. */
.logo-wrapper {
  position: relative;
  align-self: stretch;
}
.logo-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 112px;
  height: auto;
  max-width: none;
  z-index: 5;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(20px, 2vw, 34px);
  height: 100%;
  min-width: 0;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-link {
  font-family: var(--font-head);
  font-size: clamp(12px, 0.9vw, 14px);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  display: inline-block;
  padding: 6px 0;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.nav-link:hover { color: var(--text-main); }
.nav-link.active { color: var(--text-main); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 56px;
  height: 2px;
  background: var(--header-red);
  transform: translateX(-50%);
}

.header-actions { display: flex; align-items: center; gap: 18px; flex: none; }

/* Header CTA reuses the shared .btn-secondary component (kept non-red so it
   never competes with the hero's primary red CTA — see button system). */
.header-cta { white-space: nowrap; }

.header-tricolor {
  display: flex;
  position: absolute;
  top: 0;
  right: 16px;
  width: 24px;
  height: 100%;
}
.header-tricolor span { flex: 1; }
.header-tricolor .blue { background: var(--header-blue); }
.header-tricolor .white { background: var(--fof-white); }
.header-tricolor .red { background: var(--header-red); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--white);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--fof-red-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: clamp(470px, 42vw, 760px);
  margin-top: 0;
  overflow: hidden;
  background: var(--fof-navy-950);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.42);
}
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../sources/img/hero/hero-01.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 72% center;
  transform: scale(1.01);
  transition: opacity 0.3s var(--ease);
}
.hero-background.is-swapping { opacity: 0; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(2, 9, 20, 0.96) 0%,
      rgba(2, 9, 20, 0.88) 26%,
      rgba(2, 9, 20, 0.6) 50%,
      rgba(2, 9, 20, 0.14) 78%,
      rgba(2, 9, 20, 0.08) 100%
    ),
    linear-gradient(
      0deg,
      rgba(2, 9, 20, 0.72) 0%,
      rgba(2, 9, 20, 0.12) 48%,
      rgba(2, 9, 20, 0.18) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: inherit;
}
.hero-content {
  position: relative;
  width: min(640px, 52%);
  padding-block: clamp(72px, 7vw, 120px);
  padding-inline-start: clamp(0px, 3vw, 48px);
}
.hero-eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--fof-red-light);
  text-transform: uppercase;
}
.hero-title {
  margin: 0;
  font-size: clamp(52px, 4vw, 72px);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fof-white);
  max-width: 640px;
}
.hero-flag {
  display: inline-flex;
  width: 58px;
  height: 22px;
  margin-left: 12px;
  vertical-align: middle;
  transform: translateY(-6px);
}
.hero-flag span { flex: 1; }
.hero-flag .blue { background: var(--header-blue); }
.hero-flag .white { background: var(--fof-white); }
.hero-flag .red { background: var(--header-red); }
.hero-description {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--fof-gray-100);
  font-size: clamp(1rem, 0.9vw, 1.15rem);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}
.hero-reassurance {
  margin: 18px 0 0;
  color: var(--text-tertiary);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-pagination {
  position: absolute;
  z-index: 3;
  left: 14px;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transform: translateY(-50%);
}
.hero-pagination-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.hero-pagination-item:hover { color: rgba(255, 255, 255, 0.75); }
.hero-pagination-item.active { color: var(--red); }
.hero-pagination-item.active::after {
  content: "";
  display: block;
  width: 2px;
  height: 22px;
  margin: 8px auto 0;
  background: var(--fof-white);
}

/* ==========================================================================
   Key features band
   ========================================================================== */
.hero { margin-bottom: 0; }
.hero + .key-features { margin-top: 0; }

.key-features {
  position: relative;
  z-index: 5;
  width: 100%;
  background:
    linear-gradient(
      100deg,
      var(--fof-navy-900) 0%,
      var(--fof-navy-850) 48%,
      var(--fof-navy-900) 100%
    );
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.key-features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 178px;
}

.key-feature {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  min-width: 0;
  padding: 38px clamp(26px, 2.5vw, 48px);
}

.key-feature + .key-feature {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.key-feature-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 54px;
  padding-top: 4px;
  color: var(--fof-red-light);
}

.key-feature-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.key-feature-content {
  min-width: 0;
}

.key-feature h2,
.key-feature h3 {
  margin: 0 0 13px;
  color: var(--fof-white);
  font-family: "Oswald", sans-serif;
  font-size: clamp(17px, 1.1vw, 21px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.key-feature p {
  max-width: 260px;
  margin: 0;
  color: var(--text-secondary);
  font-family: "Inter", sans-serif;
  font-size: clamp(13px, 0.82vw, 15px);
  font-weight: 400;
  line-height: 1.65;
}

@media (hover: hover) {
  .key-feature {
    transition:
      background-color 180ms ease,
      transform 180ms ease;
  }

  .key-feature:hover {
    background: rgba(255, 255, 255, 0.025);
  }

  .key-feature:hover .key-feature-icon {
    transform: translateY(-2px);
  }

  .key-feature-icon {
    transition: transform 180ms ease;
  }
}

@media (max-width: 1024px) {
  .key-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .key-feature {
    min-height: 170px;
  }

  .key-feature:nth-child(3) {
    border-left: 0;
  }

  .key-feature:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .key-feature p {
    max-width: 340px;
  }
}

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

  .key-feature {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    min-height: auto;
    padding: 26px 4px;
  }

  .key-feature + .key-feature {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .key-feature-icon {
    width: 44px;
  }

  .key-feature-icon svg {
    width: 32px;
    height: 32px;
  }

  .key-feature h2,
  .key-feature h3 {
    font-size: 17px;
  }

  .key-feature p {
    max-width: none;
    font-size: 14px;
  }
}

/* ==========================================================================
   Editorial sections (communauté / infrastructure / scénarios)
   ========================================================================== */
.editorial-section {
  position: relative;
  width: 100%;
  padding-block: clamp(48px, 5vw, 86px);
  background: var(--fof-navy-950);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.editorial-section:nth-of-type(even) {
  background: #050d17;
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(48px, 5vw, 92px);
  align-items: center;
}

.editorial-section-reverse .editorial-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.editorial-grid > * { min-width: 0; }

.editorial-section::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4%;
  width: 280px;
  aspect-ratio: 1;
  background: url("../sources/img/logo.webp") center / contain no-repeat;
  opacity: 0.025;
  transform: translateY(-50%);
  pointer-events: none;
}

.editorial-section-reverse::after {
  right: auto;
  left: 4%;
}

/* Media */
.editorial-media {
  position: relative;
  min-height: clamp(340px, 30vw, 520px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--fof-navy-900);
}

.editorial-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 9, 20, 0.03), rgba(2, 9, 20, 0.22));
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.2);
}

.editorial-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.78) contrast(1.08) brightness(0.8);
  transition: transform 240ms ease;
}

@media (hover: hover) {
  .editorial-media:hover img { transform: scale(1.025); }
}

/* Content */
.editorial-content { position: relative; }

.section-kicker {
  margin: 0 0 12px;
  color: var(--fof-red-light);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--red);
}

.editorial-content h2 {
  max-width: 650px;
  margin: 0;
  color: var(--white);
  font-family: var(--font-head);
  font-size: clamp(32px, 2.5vw, 44px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.section-line {
  display: block;
  width: 46px;
  height: 3px;
  margin: 20px 0 28px;
  background: var(--red);
}

/* Feature list */
.feature-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--fof-red-light);
  border: 1px solid rgba(217, 0, 0, 0.4);
  background: rgba(217, 0, 0, 0.04);
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-list h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
}
.feature-list p {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
}

.feature-list-check li { grid-template-columns: 34px minmax(0, 1fr); }
.feature-list-check .feature-icon {
  width: 28px;
  height: 28px;
}
.feature-list-check .feature-icon svg { width: 15px; height: 15px; }

/* Mini feature cards (infrastructure) */
.mini-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.mini-feature {
  min-width: 0;
  min-height: 210px;
  padding: 26px 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(12, 32, 54, 0.9), rgba(5, 14, 24, 0.96));
  text-align: center;
}

.mini-feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  color: var(--white);
}
.mini-feature-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.mini-feature h3 {
  margin: 0 0 10px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.25;
  text-transform: uppercase;
}
.mini-feature p {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .editorial-grid,
  .editorial-section-reverse .editorial-grid {
    grid-template-columns: 1fr 1fr;
    gap: 42px;
  }

  .mini-feature-grid { grid-template-columns: 1fr; }
  .mini-feature { min-height: auto; text-align: left; }
  .mini-feature-icon { margin-inline: 0; }
}

@media (max-width: 768px) {
  .editorial-section { padding-block: 64px; }

  .editorial-grid,
  .editorial-section-reverse .editorial-grid {
    display: flex;
    flex-direction: column;
    gap: 36px;
  }

  .editorial-content { order: 1; width: 100%; }
  .editorial-media { order: 2; width: 100%; min-height: 280px; }

  .editorial-content h2 { font-size: clamp(30px, 9vw, 42px); }

  .feature-list li { grid-template-columns: 42px minmax(0, 1fr); }

  .mini-feature-grid { grid-template-columns: 1fr; }

  .editorial-section::after { display: none; }
}

@media (max-width: 480px) {
  .editorial-media { min-height: 230px; }

  .feature-list li { grid-template-columns: 1fr; }
  .feature-icon { margin-bottom: 4px; }

  .mini-feature { padding: 22px 18px; }
}

/* ==========================================================================
   Section heading (servers / modes)
   ========================================================================== */
.section-heading { margin-bottom: 28px; }
.section-heading h2 {
  max-width: none;
  font-size: clamp(32px, 2.5vw, 44px);
  line-height: 1;
}

/* ==========================================================================
   Servers
   ========================================================================== */
.servers-section {
  width: 100%;
  padding-block: clamp(64px, 6vw, 100px);
  background: var(--fof-navy-950);
  border-top: 1px solid var(--line);
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.server-card {
  --server-image-height: 190px;
  position: relative;
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(10, 27, 43, 0.98), rgba(4, 12, 20, 0.98));
}

.server-card-media {
  position: relative;
  height: var(--server-image-height);
  overflow: hidden;
}
.server-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 9, 20, 0.84) 100%);
}
.server-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.08) brightness(0.8);
  transition: transform 240ms ease;
}

.server-card-body {
  display: block;
  min-height: 150px;
  padding-left: 102px;
}

.server-card-badge {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: calc(var(--server-image-height) - 12px);
  width: 72px;
  height: 132px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 28px;
  color: var(--fof-white);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.server-card-badge-red {
  background: linear-gradient(180deg, #ef3346 0%, #d72638 70%, #bd1e2e 100%);
}
.server-card-badge-blue {
  background: linear-gradient(180deg, #4c7ee3 0%, #3867c9 70%, #2e55aa 100%);
}
.server-card-badge-green {
  background: linear-gradient(180deg, #4b8b72 0%, #39755e 70%, #2e5f4d 100%);
}
.server-card-badge svg {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.server-card-content { padding: 26px 24px 20px 0; }
.server-card-content h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-size: 22px;
}
.server-card-content p {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.server-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.server-tags span {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  color: var(--fof-gray-300);
  font-family: var(--font-head);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

@media (hover: hover) {
  .server-card:hover .server-card-media img { transform: scale(1.035); }

  .server-card-badge {
    transition:
      transform 180ms ease,
      filter 180ms ease;
  }
  .server-card:hover .server-card-badge {
    transform: translateY(-3px);
    filter: brightness(1.06);
  }
}

@media (min-width: 1600px) {
  .server-card-badge {
    width: 78px;
    height: 142px;
  }
  .server-card-badge svg {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Game modes
   ========================================================================== */
.modes-section {
  padding-block: 0 clamp(72px, 6vw, 110px);
  background: #030911;
}

.modes-intro {
  max-width: 65ch;
  margin: -6px 0 28px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}
.modes-intro .btn-text { margin-left: 4px; }

.modes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.mode-card {
  position: relative;
  min-width: 0;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--fof-navy-900);
}
.mode-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.08) brightness(0.8);
  transition: transform 240ms ease;
}
.mode-card-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 9, 20, 0.96) 0%,
      rgba(2, 9, 20, 0.85) 38%,
      rgba(2, 9, 20, 0.34) 100%
    );
}
.mode-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: inherit;
  padding: 28px 30px;
}
.mode-card-icon {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 68px;
  height: 108px;
  padding-top: 24px;
  color: var(--fof-white);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.mode-card-icon-red {
  background: var(--red);
}
.mode-card-icon-blue {
  background: var(--fof-blue-light);
}
.mode-card-icon svg {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}
.mode-card h3 {
  margin: 0 0 7px;
  font-family: var(--font-head);
  font-size: clamp(24px, 2vw, 32px);
}
.mode-card p {
  max-width: 460px;
  margin: 0;
  color: var(--fof-gray-300);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}

@media (hover: hover) {
  .mode-card:hover > img { transform: scale(1.04); }

  .mode-card-icon {
    transition:
      transform 180ms ease,
      filter 180ms ease;
  }
  .mode-card:hover .mode-card-icon {
    transform: translateY(-3px);
    filter: brightness(1.06);
  }
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.join-cta {
  position: relative;
  width: 100%;
  min-height: 290px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.join-cta-background {
  position: absolute;
  inset: 0;
  background-image: url("../sources/img/cta/cta-background.webp");
  background-size: cover;
  background-position: center;
}
.join-cta-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(7, 19, 34, 0.95),
      rgba(12, 32, 54, 0.84),
      rgba(7, 19, 34, 0.95)
    );
}
.join-cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  padding-block: 56px;
  text-align: center;
}
.join-cta h2 {
  margin: 0;
  font-size: clamp(32px, 2.7vw, 44px);
  line-height: 1;
}
.join-cta p {
  max-width: 65ch;
  margin: 14px 0 0;
  color: var(--fof-gray-100);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}
.join-cta-trust {
  margin: var(--space-4) 0 var(--space-6);
  color: var(--text-tertiary);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Final CTA button = .btn .btn-primary .btn-lg + this thin modifier for the
   extra depth/icon size a hero-level CTA deserves — no separate button system. */
.join-cta-button {
  gap: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.join-cta-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.join-cta-button:active {
  transform: translateY(-1px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  width: 100%;
  background: #030911;
  border-top: 1px solid var(--line);
}

.footer-main {
  display: grid;
  grid-template-columns:
    minmax(280px, 1.6fr)
    minmax(160px, 0.9fr)
    minmax(200px, 1fr);
  gap: clamp(32px, 4vw, 72px);
  padding-block: 54px 44px;
}

.footer-brand {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.footer-logo { width: 84px; height: auto; }

.footer-brand h2,
.footer-column h3,
.footer-social h3 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
}
.footer-brand h2 { font-size: 16px; text-transform: none; }
.footer-brand p {
  max-width: 310px;
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
}

.footer-column { display: flex; flex-direction: column; align-items: flex-start; }
.footer-column a {
  margin-bottom: 8px;
  color: var(--gray-500);
  font-family: var(--font-body);
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease;
}
.footer-column a:hover { color: var(--white); }

.footer-social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social-links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  color: var(--fof-white);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.footer-social-links a:hover {
  border-color: var(--red);
  background: rgba(217, 0, 0, 0.08);
}
.footer-social-links svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
}
.footer-bottom p,
.footer-signature {
  margin: 0;
  color: var(--gray-500);
  font-family: var(--font-body);
  font-size: 12px;
}
.footer-signature { display: flex; align-items: center; gap: 14px; }

.footer-flag { display: inline-flex; width: 28px; height: 16px; }
.footer-flag span { flex: 1; }
.footer-flag .blue { background: var(--header-blue); }
.footer-flag .white { background: var(--fof-white); }
.footer-flag .red { background: var(--header-red); }

/* ==========================================================================
   Focus-visible states (bottom sections)
   ========================================================================== */
.footer-column a:focus-visible,
.footer-social-links a:focus-visible,
.join-cta-button:focus-visible {
  outline: 2px solid var(--fof-red-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Servers / modes / CTA / footer — responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .servers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-card:last-child { grid-column: 1 / -1; }

  .server-card { --server-image-height: 170px; }
  .server-card-badge {
    left: 14px;
    width: 64px;
    height: 118px;
    padding-top: 24px;
  }
  .server-card-body { padding-left: 92px; }
  .server-card-badge svg {
    width: 34px;
    height: 34px;
  }

  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .servers-grid,
  .modes-grid {
    grid-template-columns: 1fr;
  }
  .server-card:last-child { grid-column: auto; }

  .mode-card { min-height: 240px; }

  .footer-main { grid-template-columns: 1fr; gap: 36px 24px; }

  .footer-bottom-inner {
    flex-direction: column;
    justify-content: center;
    padding-block: 20px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .server-card { --server-image-height: 155px; }
  .server-card-badge {
    left: 12px;
    top: calc(var(--server-image-height) - 8px);
    width: 56px;
    height: 100px;
    padding-top: 20px;
  }
  .server-card-body {
    min-height: 138px;
    padding-left: 82px;
  }
  .server-card-content { padding: 20px 16px 16px 0; }
  .server-card-badge svg {
    width: 30px;
    height: 30px;
  }

  .mode-card-content { grid-template-columns: 52px minmax(0, 1fr); padding: 24px 18px; }
  .mode-card-icon {
    width: 52px;
    height: 82px;
    padding-top: 18px;
  }
  .mode-card-icon svg {
    width: 26px;
    height: 26px;
  }

  .join-cta-inner { align-items: stretch; }
  .join-cta h2,
  .join-cta p { text-align: center; }
  .join-cta-button { width: 100%; }

  .footer-main { grid-template-columns: 1fr; }
  .footer-brand,
  .footer-social { grid-column: auto; }
  .footer-brand { grid-template-columns: 70px minmax(0, 1fr); }
  .footer-logo { width: 64px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1800px) {
  :root {
    --page-gutter: clamp(32px, 4vw, 72px);
  }
}

@media (max-width: 1440px) {
  :root {
    --page-gutter: 32px;
  }
}

@media (max-width: 1180px) {
  .header-inner { padding-inline-end: 90px; }
  .hero-content { width: min(560px, 58%); }
}

@media (max-width: 1024px) {
  :root { --page-gutter: 24px; }
}

@media (max-width: 900px) {
  html.nav-is-open { overflow: hidden; }

  /* Without JS the toggle can never fire, so the menu must stay in normal,
     always-visible flow — collapsing it behind a dead button would make
     primary navigation unreachable. Row 2 lets the stacked list grow the
     header naturally instead of overlapping the hero below it. Only
     js-enabled clients switch to the fixed/hidden overlay pattern plus
     the toggle button that drives it, and get the compact fixed-height
     header back. */
  .site-header { height: auto; }
  .header-inner {
    grid-template-columns: 120px 1fr auto;
    grid-template-rows: var(--header-height) auto;
    height: auto;
    padding-inline: 0 48px;
  }
  .logo-wrapper, .header-actions { grid-row: 1; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav-link { display: block; padding: 14px 4px; font-size: 1.05rem; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-link.active::after { display: none; }

  html.js-enabled .site-header { height: var(--header-height); }
  html.js-enabled .header-inner { grid-template-rows: var(--header-height); height: 100%; }
  html.js-enabled .main-nav {
    grid-row: 1;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    display: block;
    background: rgba(6, 12, 20, 0.98);
    backdrop-filter: blur(16px);
    padding: 30px 24px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  /* visibility:hidden removes the closed-menu links from the tab order —
     without it, keyboard users can Tab into an invisible menu. */
  html.js-enabled .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0s;
  }

  .header-cta span { display: none; }
  .header-cta { width: 44px; height: 44px; min-height: 44px; padding: 0; }
  html.js-enabled .nav-toggle { display: flex; }

  .hero { min-height: 560px; }
  .hero-background { background-position: 70% center; }
  .hero-content { width: min(560px, 74%); padding-block: 88px 48px; }
  .hero-title { font-size: clamp(2.2rem, 8vw, 3.4rem); }
  .hero-pagination { display: none; }
}

@media (max-width: 640px) {
  .site-header { --header-height: 68px; }
  .header-inner { grid-template-columns: 96px 1fr auto; padding-inline: 0 44px; }
  .logo-wrapper img { width: 78px; }

  .hero { min-height: 620px; }
  .hero-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(2, 9, 20, 0.94) 0%,
        rgba(2, 9, 20, 0.82) 45%,
        rgba(2, 9, 20, 0.55) 75%,
        rgba(2, 9, 20, 0.4) 100%
      ),
      linear-gradient(90deg, rgba(2, 9, 20, 0.9) 0%, rgba(2, 9, 20, 0.2) 100%);
  }
  .hero-background { background-position: 78% center; }
  .hero-content { width: 100%; padding-block: 100px 40px; }
  .hero-title { font-size: clamp(2.1rem, 13vw, 2.9rem); }
  .hero-description { font-size: 0.94rem; max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}
