@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

:root {
  /* Brand + mood colors */
  --color-bg: #04080F;
  --color-bg-alt: #0A1220;
  --color-bg-card: #0E1420;
  --color-primary: #2B7FFF;            /* electric blue */
  --color-secondary: #1A2A55;
  --color-accent: #C0C8D8;              /* silver accent */

  --color-text: #E8E8E8;                /* light on dark BG */
  --color-text-muted: #A8B6C5;
  --color-text-on-primary: #1A1A1A;      /* contrast on primary (dark primary) */

  --color-border: #1E2A46;
  --color-shadow: rgba(0, 0, 0, 0.5);

  /* Radius & spacing scale (all via variables) */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;

  /* Typography scale (mandatory) */
  --font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;

  --line-height-tight: 1.2;
  --line-height-base: 1.6;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --font-weight-900: 900;

  /* Hero helper gradient */
  --gradient-hero: linear-gradient(135deg, rgba(2,8,15,0.95), rgba(2,8,15,0.85));
  /* Glow for cards (soft outer glow) uses primary color with 20% opacity */
  --glow: 0 0 20px rgba(43,127,255,0.20);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

ul, ol {
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
  /* CENTER CONTENT AT ALL BREAKPOINTS (critical requirement) */
  margin-left: auto;
  margin-right: auto;
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  background: rgba(4, 8, 15, 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: saturate(1.2) blur(4px);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  justify-content: flex-start; /* mobile default; overridden in tablet/desktop */
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  height: auto;
}

.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
  transition: transform 0.2s ease;
  /* Hamburger bars are white */
}
.nav-toggle-label:hover {
  transform: translateY(-1px);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory white bars */
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.nav-list {
  display: flex;
  flex-direction: column; /* mobile default: vertical */
  gap: 0;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
}
.nav-item { }
.nav-link {
  font-size: var(--font-size-sm);
  padding: 0.75rem 1rem;
  display: block;
  color: var(--color-text);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover {
  color: #fff;
  text-decoration: underline;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  cursor: pointer;
  text-decoration: none;
  display: block;
  padding: 0.75rem 1rem;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}
@media (min-width: 768px) {
  /* Tablet +: hamburger hidden, nav centered/inline */
  .nav-toggle-label { display: none !important; }
  .nav-toggle-input { display: none; }

  .site-nav {
    display: flex;
    position: static;
    width: auto;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .nav-link { font-size: var(--font-size-sm); }

  /* Nav layout rule: center on tablet/desktop */
  .site-header .container {
    justify-content: flex-start;
  }
  .site-nav { flex: 1; justify-content: center; }
  .nav-list { justify-content: center; }

  /* Dropdown inside desktop tweaks */
  .nav-dropdown-menu { position: absolute; }
}

@media (min-width: 1024px) {
  /* Desktop adjustments */
  .container {
    max-width: 1200px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  min-height: 50vh;
  background: var(--gradient-hero), linear-gradient(135deg, rgba(2,8,15,0.95) 0%, rgba(2,8,15,0.95) 100%);
  color: #fff;
}
.hero h1 {
  font-size: var(--font-size-2xl);
}
.hero p {
  font-size: var(--font-size-base);
}
.hero-big-title { font-size: clamp(2.5rem, 8vw, 7rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; margin: 0 0 1.5rem; text-transform: uppercase; }
.hero-sub-row { display:flex; align-items:center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.hero-subtitle { flex: 1 1 300px; font-size: 1.1rem; }
.hero-cta { display:flex; gap: 1rem; flex-shrink: 0; flex-wrap: wrap; }

/* Section */
.section { padding: 2rem 0; }
.section-title { font-size: var(--font-size-2xl); margin: 0 0 1rem; }

@media (max-width: 767px) {
  .hero-sub-row { flex-direction: column; align-items: flex-start; }
  .hero-big-title { font-size: clamp(2.5rem, 10vw, 4rem); }
  .site-nav { display: none; } /* ensure mobile default hides nav panel unless toggled */
  .nav-list { flex-direction: column; }
  .nav-link { padding: 0.75rem 1rem; }
  .container { width: 100%; padding: 0 1rem; }
}

@media (min-width: 768px) {
  /* Tablet (hamburger hidden, nav visible) hints via base / mobile rules are overridden here where needed */
  /* NAV LAYOUT rules (provided in prompt) */
  .site-header .container { justify-content: flex-start; }
  .site-nav { flex: 1; justify-content: center; }
  .nav-list { justify-content: center; }
}

/* Cards & grid */
.card {
  display: flex;
  flex-direction: column; /* mandatory */
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 26px rgba(43,127,255,0.28);
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content {
  padding: 1rem;
}
.card h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 0.5rem;
  color: var(--color-text);
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  line-height: 1.6;
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover {
  filter: brightness(0.95);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* Footer */
.site-footer {
  background: #0b0f1a;
  padding: 2rem 0;
  color: var(--color-text-muted);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 767px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* FAQ Accordion (CSS-only) */
.faq-section {
  padding: 2rem 0;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(43,127,255,0.25);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] > .faq-question::after {
  content: "−";
}
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p {
  margin: 0.75rem 0 0;
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

/* Forms */
form, fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.25rem;
  color: var(--color-text);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #0b1220;
  color: var(--color-text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(43,127,255,0.15);
}
input[type="submit"],
button[type="submit"] {
  font-family: var(--font-family);
  cursor: pointer;
}
legend { padding: 0; margin-bottom: 0.5rem; }

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.hidden { display: none; }

/* Typography rules per system prompt */
body { font-weight: var(--font-weight-normal); }

/* Headings reuse brand weights where applicable */
h1, .hero-big-title { font-weight: 900; font-family: var(--font-family); }
h2, .section-title { font-weight: 900; }
h3 { font-weight: 700; }

/* Accessibility: ensure high contrast for hero on dark bg */
.hero, .hero * {
  color: #fff;
}
@media (min-width: 768px) {
  /* Tablet adjustments to hero typography via explicit classes if used */
  .hero-big-title { font-family: var(--font-family); }
}

/* Ensure a consistent base on all viewports for the brand ACE444 variant */
@media (min-width: 768px) {
  /* Tablet-specific tweaks can live here if needed in future extensions */
}

/* Extra: ensure card images respect visual priority on all viewports (already set by rule) */
.card img { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }

/* END */