/* ==========================================================================
   MAR-MIL Technologies / STARK Systems — Core Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color tokens */
  --bg: #060912;
  --bg-alt: #0a0f1c;
  --surface: #0b1220;
  --card: #101b30;
  --card-hover: #142140;
  --border: #1c2b48;
  --border-bright: #294066;

  --cyan: #1cc8e1;
  --cyan-dim: #12899b;
  --cyan-glow: rgba(28, 200, 225, 0.35);
  --red: #d62839;
  --red-dim: #a01d2b;
  --red-glow: rgba(214, 40, 57, 0.35);

  --text: #eaf1fb;
  --text-muted: #8c9bb5;
  --text-faint: #566a85;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.45);
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background grid texture, applied via body::before for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(28,200,225,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,200,225,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(28,200,225,0.10), transparent 60%);
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: #01141a;
  box-shadow: 0 4px 24px var(--cyan-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--cyan-glow); }
.btn-outline {
  border: 1px solid var(--border-bright);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(28,200,225,0.06); }
.btn-red {
  background: linear-gradient(135deg, var(--red), var(--red-dim));
  color: #fff;
  box-shadow: 0 4px 24px var(--red-glow);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--red-glow); }
.btn-block { width: 100%; }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(6, 9, 18, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1240px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand img { height: 34px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; }
.brand-tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 9px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--cyan); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
.lang-switch button {
  padding: 7px 12px;
  color: var(--text-muted);
  transition: all var(--transition);
  font-weight: 600;
}
.lang-switch button.active {
  background: var(--cyan);
  color: #01141a;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Logo strip ---------- */
.logo-strip {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 22px 0;
}
.logo-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.logo-strip img {
  height: 46px;
  width: auto;
  opacity: 0.9;
  filter: grayscale(15%);
  transition: transform var(--transition), opacity var(--transition);
}
.logo-strip img:hover { transform: translateY(-2px); opacity: 1; }
.logo-strip .logo-slot-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- Sections ---------- */
section { padding: 96px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); margin-top: 14px; }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 16px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Cards grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  background: var(--card-hover);
}
.card:hover::before { opacity: 1; }
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(28,200,225,0.1);
  border: 1px solid rgba(28,200,225,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--cyan);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 14.5px; }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cyan);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.footer-brand img { height: 30px; }
.footer-brand span { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.footer-brand-tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.footer-col p, .footer-col li { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--cyan); }
.footer-legal {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-row a:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(28,200,225,0.08); }
.social-row svg { width: 17px; height: 17px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-lg { margin-top: 40px; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid, .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 65px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 2px;
    transform: translateY(-140%);
    opacity: 0;
    transition: all var(--transition);
    z-index: 400;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-links a { padding: 13px 14px; }
  .grid, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 64px 0; }
}
