@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Oxanium:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - 3. PzGrenBtl 112 Milsim Brand */
  --background: #06070a;
  --background-rgb: 6, 7, 10;

  --foreground: #eef2f6;
  --foreground-rgb: 238, 242, 246;

  /* Primary brand accent: Deep Burgundy Crimson */
  --primary: #8f1230;
  --primary-rgb: 143, 18, 48;
  --primary-hover: #b01a3f;
  --primary-glow: rgba(143, 18, 48, 0.4);

  /* Secondary brand accent: Tactical Gold / Bronze */
  --accent: #c5a044;
  --accent-rgb: 197, 160, 68;
  --accent-hover: #e0b74f;
  --accent-glow: rgba(197, 160, 68, 0.35);

  /* Tactical dark panels */
  --bg-panel: rgba(14, 17, 24, 0.85);
  --bg-panel-solid: #0e1118;
  --bg-card: rgba(22, 26, 36, 0.6);
  --bg-card-hover: rgba(30, 36, 50, 0.8);

  /* Borders and elements */
  --border-color: rgba(197, 160, 68, 0.2);
  --border-color-hover: rgba(197, 160, 68, 0.5);
  --border-glow: rgba(197, 160, 68, 0.15);
  --text-muted: #8e9bb0;

  /* Utility status */
  --success: #38b000;
  --warning: #ffb703;
  --error: #d90429;

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-title: 'Oxanium', sans-serif;

  /* Header spacing */
  --nav-height: 80px;
}

/* ─── Reset & Core Layout ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  /* Prevent any child element from creating horizontal scroll */
  overflow-x: hidden;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  /* Hard-clamp horizontal overflow at the body level */
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  position: relative;
}

/* Subtle HUD grid texture — fixed so it never shifts layout */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), 0.05) 0%, transparent 80%),
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.04));
  background-size: 100% 100%, 100% 4px, 6px 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #07090e; }
::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 68, 0.25);
  border: 2px solid #07090e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(197, 160, 68, 0.5); }

/* ─── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--foreground);
  line-height: 1.2;
  /* Prevent long words from breaking layout on mobile */
  overflow-wrap: break-word;
  word-break: break-word;
}

p {
  color: var(--text-muted);
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--primary);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.875rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px var(--primary-glow);
  white-space: nowrap;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 25px rgba(143,18,48,0.7), 0 0 5px var(--accent);
  transform: translateY(-2px);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: transparent;
  color: var(--accent);
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.btn-secondary:hover {
  background-color: rgba(197,160,68,0.08);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-2px);
  color: var(--accent-hover);
}

/* Mobile: let buttons wrap and fill width if needed */
@media (max-width: 480px) {
  .btn-primary,
  .btn-secondary {
    padding: 11px 18px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
  }
}

/* ─── Layout Utilities ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;   /* slightly tighter on mobile */
}

@media (min-width: 640px) {
  .container { padding: 0 24px; }
}

.section-padding { padding: 90px 0; }

@media (max-width: 900px) { .section-padding { padding: 70px 0; } }
@media (max-width: 640px) { .section-padding { padding: 50px 0; } }

/* ─── HUD Cards ───────────────────────────────────────────────── */
.hud-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 28px 24px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  /* Ensure card never exceeds its column */
  min-width: 0;
}

@media (max-width: 480px) {
  .hud-card { padding: 20px 16px; }
}

.hud-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.hud-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(197,160,68,0.05);
  transform: translateY(-4px);
}
.hud-card:hover::before { transform: scaleX(1); }

/* ─── Tactical Corner Brackets ───────────────────────────────── */
.hud-brackets { position: relative; }

.hud-brackets::before,
.hud-brackets::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--accent);
  border-style: solid;
  pointer-events: none;
  transition: all 0.3s ease;
}
.hud-brackets::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}
.hud-brackets::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}
.hud-card:hover .hud-brackets::before,
.hud-card:hover .hud-brackets::after {
  width: 16px; height: 16px;
  border-color: var(--accent-hover);
}

/* ─── Section Titles ──────────────────────────────────────────── */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  display: inline-block;
  position: relative;
  padding: 8px 16px;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 20%;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.section-subtitle {
  font-family: var(--font-title);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
  display: block;
}

@media (max-width: 480px) {
  .section-title-wrapper { margin-bottom: 32px; }
}

/* ─── Glow Utilities ──────────────────────────────────────────── */
.text-glow       { text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5); }
.text-glow-primary { text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.8); }

/* ─── Scanner Animation ───────────────────────────────────────── */
@keyframes scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.scanner-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(197,160,68,0)    0%,
    rgba(197,160,68,0.08) 50%,
    rgba(197,160,68,0)    100%
  );
  pointer-events: none;
  animation: scanline 6s linear infinite;
  z-index: 1;
}

/* ─── blink & fadeInDown (formerly inline JSX) ───────────────── */
@keyframes blink {
  from, to { color: transparent; }
  50%       { color: var(--accent); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
