/* ═══════════════════════════════════════════════════════
   ENRAX Systems — Main Stylesheet
   Light/Dark theme via CSS custom properties
   ═══════════════════════════════════════════════════════ */

/* Fonts loaded via <link> in HTML for better performance */

/* ── THEME: DARK (default) ── */
:root {
  --primary: #00C896;
  --primary-light: #00E0A8;
  --primary-dark: #007A5C;

  --bg: #0A0A0A;
  --bg-elevated: #111111;
  --bg-card: #181818;
  --bg-input: #222222;

  --text: #FFFFFF;
  --text-secondary: #BBBBBB;
  --text-muted: #888888;
  --text-faint: #444444;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(10, 10, 10, 0.92);

  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-logo: 'Arial Black', sans-serif;
}

/* ── THEME: LIGHT ── */
[data-theme="light"] {
  --bg: #F5F5F3;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #E8E8E4;

  --text: #111111;
  --text-secondary: #444444;
  --text-muted: #888888;
  --text-faint: #BBBBBB;

  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(245, 245, 243, 0.92);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── NAVIGATION ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
}
.nav-logo svg { width: 28px; height: 38px; }
.nav-wordmark {
  font-family: var(--font-logo);
  font-size: 18px; font-weight: 900;
  letter-spacing: 4px; color: var(--text);
}

.nav-links {
  display: flex; align-items: center; gap: 2rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--primary); }

.nav-controls {
  display: flex; align-items: center; gap: 1rem;
}

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover { color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Language selector */
.lang-select {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.lang-select:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Mobile menu */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 8px;
}
.nav-hamburger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding: 120px 5% 80px;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 50%, rgba(0, 200, 150, 0.05) 0%, transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.03;
  background-image:
    linear-gradient(var(--primary) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.hero-eyebrow::before {
  content: ''; width: 30px; height: 1px; background: var(--primary);
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 8vw, 100px);
  font-weight: 900; line-height: 0.95;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title .accent { color: var(--primary); }
.hero-subtitle {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.8; max-width: 520px;
  margin-bottom: 2.5rem; font-weight: 300;
}
.hero-actions {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--primary);
  color: #0A0A0A;
  font-family: var(--font-logo);
  font-size: 12px; font-weight: 900;
  letter-spacing: 2px;
  padding: 16px 32px;
  border-radius: 4px;
  display: inline-block;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover {
  background: var(--primary-light);
  color: #0A0A0A;
  transform: translateY(-1px);
}
.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 2px;
  padding: 15px 28px;
  border-radius: 4px;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── SECTIONS ── */
.section {
  padding: 100px 5%;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}
.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.8;
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px; height: 48px;
  background: rgba(0, 200, 150, 0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
}
.card-icon svg {
  width: 24px; height: 24px; color: var(--primary);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.card-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── ABOUT CONTENT ── */
.about-grid {
  max-width: 800px;
  margin: 0 auto;
}
.about-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.about-image .placeholder {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-faint);
  letter-spacing: 2px;
}

/* ── STATS ── */
.stats-row {
  display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 4rem;
}
.stat { text-align: center; }
.stat-value {
  font-family: var(--font-heading);
  font-size: 42px; font-weight: 900;
  color: var(--primary);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ── CERTIFICATIONS & PARTNERS ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}
.cert-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.cert-logo {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #0E1C36;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cert-logo-mark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  color: #FFFFFF;
  text-transform: lowercase;
}
.cert-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.cert-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cert-role {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item {
  display: flex; gap: 1rem; align-items: flex-start;
}
.contact-item-icon {
  width: 40px; height: 40px;
  background: rgba(0, 200, 150, 0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 18px; height: 18px; color: var(--primary); }
.contact-item-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.contact-item-value {
  font-size: 14px; color: var(--text);
}
.contact-form {
  display: flex; flex-direction: column; gap: 1rem;
}
.form-input, .form-textarea {
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ── FOOTER ── */
.footer {
  padding: 3rem 5%;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-left {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 2px;
  color: var(--text-faint);
}
.footer-right {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1px;
  color: var(--text-faint);
}
.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-right a:hover {
  color: var(--primary);
}

/* ── CTA BANNER ── */
.cta-banner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.cta-banner-title {
  font-family: var(--font-heading);
  font-size: 32px; font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.cta-banner-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    padding: 2rem 5%;
    border-bottom: 1px solid var(--border);
    gap: 1.5rem;
  }
  .hero { min-height: auto; padding: 140px 5% 60px; }
  .hero-title { font-size: clamp(36px, 10vw, 64px); }
  .section { padding: 60px 5%; }
  .cards-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 2rem; }
  .footer { flex-direction: column; text-align: center; }
}

/* ── UTILITY ── */
.container { max-width: 1200px; margin: 0 auto; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ── SKIP LINK (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: #0A0A0A;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
}

/* ── FOCUS STYLES (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── SCROLL REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── REDUCED MOTION ── */
@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 {
    opacity: 1;
    transform: none;
  }
}

/* ── PRINT STYLES ── */
@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --text-secondary: #333;
  }
  .nav, .theme-toggle, .lang-select, .nav-hamburger, .skip-link,
  .footer-right, .hero-bg, .hero-grid {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .footer {
    border-top: 1px solid #ccc;
    padding-top: 12px;
  }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #555; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }
}
