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

:root {
  /* Radius */
  --radius: 8px;

  /* Color Palette (ACE444 – dark luxury with gold/blue accents) */
  --color-bg: #04080F;
  --color-bg-alt: #0A1220;
  --color-bg-card: #0C1624;

  --color-primary: #2B7FFF;       /* electric blue */
  --color-secondary: #8AC7FF;
  --color-accent: #C0C8D8;         /* silver */

  --color-text: #E8E8E8;           /* light on dark */
  --color-text-muted: #A0A0A0;
  --color-text-on-primary: #1A1A1A; /* contrast against primary (primary is dark-ish) */

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

  /* Typography scale (mandatory usage) */
  --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;
}

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

html, body { height: 100%; }

/* RESPONSIVE BASE (mobile-first) */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

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

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

a { color: var(--color-primary); text-decoration: none; }

.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* mandated: centered at every breakpoint */
  box-sizing: border-box;
}

/* SITE HEADER + NAV CALIBRATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px; /* not fixed height; content dictates height */
  overflow: visible;
  background: rgba(4, 8, 15, 0.92);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 14px rgba(0,0,0,0.25);
}

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

/* LOGO */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* MOBILE NAV TOGGLE (must implement per spec) */
.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);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory white bars */
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* MOBILE NAV PANEL */
.site-nav {
  display: none; /* mobile hidden by default */
  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;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  flex-direction: column; /* mobile: vertical list */
  align-items: stretch;
}
.nav-item { position: relative; }

.nav-link {
  font-size: var(--font-size-xs); /* mobile: smaller than body */
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.75rem 1rem;
  display: block;
}
.nav-link:hover { color: #fff; text-decoration: underline; }

/* NAV HOVER UNDERLINE EFFECT (animation) */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

/* DROPDOWN NAV (desktop/tablet hover/focus-within) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; text-decoration: none; color: var(--color-text); display: inline-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;
  color: var(--color-text);
}
.nav-dropdown-menu .nav-link:hover { background: var(--color-bg-alt); }

/* MOBILE: dropdown inside vertical nav should indent */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  .nav-link { font-size: var(--font-size-xs); }
  .nav-list { flex-direction: column; }
  .site-nav { position: absolute; top: 100%; left: 0; width: 100%; }
  .nav-toggle-label { display: flex; }
  .site-nav { display: none; }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  /* ensure dropdown stays usable on mobile when nav open */
  .nav-dropdown-menu { position: static; }
}

/* DESKTOP / TABLET LAYOUT (min-width: 768px) — NAV LAYOUT (logo-left, nav-centered) */
@media (min-width: 768px) {
  /* Centered logo-left layout while keeping content centered overall */
  .container {
    max-width: 960px;
    margin: 0 auto;
  }

  /* Hamburger hidden on tablet/desktop; nav visible and centered */
  .nav-toggle-label { display: none !important; }

  .site-nav {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
    flex: 1;
  }

  .nav-list {
    display: flex !important;
    flex-direction: row !important; /* tablet/desktop: horizontal */
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .nav-link {
    font-size: var(--font-size-sm); /* tablet/desktop: small nav text */
  }

  /* NAV LAYOUT: center the nav within header */
  .site-header .container {
    justify-content: flex-start; /* logo-left alignment baseline */
  }

  /* Table/desktop centering adjustments per spec: */
  .site-nav {
    display: flex;
  }

  .nav-list { justify-content: center; }

  /* Hero sizing for tablet/desktop expansions */
  .hero { min-height: 60vh; }

  /* Card grid on tablet/desktop */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
  }

  /* Card hover upgrade (soft glow) */
  .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 26px rgba(43,127,255,0.25);
  }

  /* Hero typography adjustments (tablet/desktop) for ACE444 branding */
  .hero-big-title { font-size: clamp(3rem, 8vw, 7rem); }

  /* Ensure container keeps centered width on larger screens */
  .container { margin: 0 auto; }
}

/* DESKTOP (min-width: 1024px) – additional tweaks */
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; }
  .hero { min-height: 70vh; }

  .hero-big-title { font-size: var(--font-size-hero); font-weight: 900; }

  .section { padding: 4rem 0; }
  .nav-link { font-size: var(--font-size-sm); }

  /* Fine-tune grid density */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
}

/* HERO LAYOUT EXTRA (exactly as requested) */
.hero { display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(43,127,255,0.25) 0%, rgba(2,8,20,0.95) 60%), var(--color-bg);
  color: #fff;
}
.hero-big-title { font-size: clamp(3rem, 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; }

@media (max-width: 767px) {
  .hero-sub-row { flex-direction: column; align-items: flex-start; }
  .hero-big-title { font-size: clamp(2.5rem, 10vw, 4rem); }
}

/* CARD SYSTEM (ACE444) */
.card {
  display: flex;
  flex-direction: column; /* MANDATORY: vertical card with image on top */
  border-radius: var(--radius);
  background: var(--color-bg-card);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(43,127,255,0.2); /* soft glow from primary color */
  border: 1px solid var(--color-border);
}
.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 GRID DEMO */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* FORM ELEMENTS */
label { display: block; font-weight: var(--font-weight-medium); margin-bottom: 0.25rem; color: var(--color-text); }
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: #0b1624;
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
}
textarea { min-height: 120px; resize: vertical; }
button, input[type="submit"] { cursor: pointer; }

/* BUTTONS */
.btn { display: inline-block; padding: 0.6rem 1rem; border-radius: 6px; border: none; font-family: inherit; font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium); text-align: center; text-decoration: none; transition: all 0.2s ease;
}
.btn-primary { background: var(--color-primary); color: var(--color-text-on-primary); }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn:hover { transform: translateY(-1px); opacity: 0.98; }
.btn-primary:hover { filter: brightness(0.92); }

/* FOOTER */
.site-footer { background: var(--color-bg); padding: 2rem 0; color: var(--color-text); border-top: 1px solid var(--color-border); }
.footer-inner { display:flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }

/* SECTION & TYPOGRAPHY HELPERS */
.section { padding: 2rem 0; }
.section-title { font-size: var(--font-size-2xl); font-weight: 700; margin: 0 0 1rem; color: var(--color-text); }

.hero-sub-row { margin-top: 1rem; }

/* FAQ ACCORDION (CSS-ONLY) */
.faq-section { padding: 2rem 0; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 8px);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.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); }

/* HAMBURGER NAV (MUST APPLY) — mobile navigation styling included above with mobile rules */

/* TABLES */
table { width: 100%; border-collapse: collapse; border: 1px solid var(--color-border); }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--color-border); text-align: left; }

/* UTILITIES */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* EXTRA GLOBAL INTERACTIONS */
/* Subtle glow for primary interactions on hover (buttons, primary links) */
a:hover, .nav-link:hover { color: #fff; text-decoration: none; }

/* HERO COLOR CONTRAST MANDATES (hero text on dark bg) */
.hero, .hero * { color: #FFFFFF; }

/* Ensure text remains legible on all sections with the dark background rule */
@media (prefers-color-scheme: dark) {
  /* Optional: respect user preference by slightly adjusting contrasts if needed */
}