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

:root {
  /* COLOR PALETTE (ACE444) */
  --color-bg: #04080F;            /* dark midnight bg - DARK */
  --color-bg-alt: #0A1220;        /* alternate dark */
  --color-bg-card: #0F1624;        /* card background on dark surface */
  --color-primary: #2B7FFF;        /* electric blue brand color */
  --color-secondary: #C0C8D8;      /* silver accent */
  --color-accent: #C0C8D8;         

  --color-text: #E8E8F0;           /* light text on dark bg (ensures 4.5:1) */
  --color-text-muted: #A0A8B8;     /* muted text on dark bg (adjusted) */
  --color-text-on-primary: #1A1A1A;/* text on primary (since primary is dark) */

  --color-border: #2A3A58;
  --color-shadow: rgba(0,0,0,0.4);

  /* TYPOGRAPHY */
  --font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --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-black: 900;

  --radius: 12px;
}

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

html, body {
  height: 100%;
}

html, body {
  overflow-x: hidden; /* RESPONSIVE REQUIREMENT: prevent horizontal scroll on mobile */
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* LINKS */
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { text-decoration: underline; }

/* STRUCTURE BASES */
.container {
  width: 100%;
  margin: 0 auto; /* IMPORTANT: centers content at all breakpoints */
  padding: 0 1rem;
  box-sizing: border-box;
}
.section { padding: 2rem 0; }
.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

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

/* HEADER & NAV */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 64px; /* REQUIRED: do not fix height; this is min-height */
  overflow: visible;
  background: rgba(4,8,15,0.92);
}

/* header container (flex row) */
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile baseline padding */
  justify-content: flex-start; /* logo-left for mobile until tablet rule applies */
}

/* 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 (CSS-ONLY) */
.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; /* MUST be white for all states */
  border-radius: 2px;
  transition: 0.2s ease;
}

/* NAV SITE (right side) */
.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;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  align-items: stretch;
}
.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-xs);
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-item { }

/* DROPDOWN NAV (CSS-ONLY) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; white-space: nowrap; }
.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);
}
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu,
  .nav-dropdown:hover > .nav-dropdown-menu {
    display: none; /* closed by default on mobile; open via focus/keyboard path handled below */
  }
  .nav-list { flex-direction: column; } /* base mobile nav vertical by default */
  .site-nav { display: none; } /* mobile hidden; controlled by checkbox */
  .nav-dropdown-menu { display: none; padding-left: 1rem; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
}
@media (min-width: 768px) {
  /* TABLET RULES (nav always visible) */
  .site-nav { display: flex; align-items: center; position: static; background: transparent; border-top: none; box-shadow: none; flex: 1; }
  .nav-list { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
  .nav-toggle-label { display: none; } /* hamburger hidden on tablet+ */
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; }
  .site-header .container { justify-content: flex-start; }
  /* NAV LAYOUT adjustments for tablet/desktop (center nav) */
  .site-nav { flex: 1; justify-content: center; display: flex; }
  .nav-list { justify-content: center; }
  /* Dropdown open behavior on hover/focus preserved */
  .nav-dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 200px; }
  /* Ensure logo stays left and nav centered as per spec */
}
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; }
  .hero { min-height: 70vh; }
  .hero-big-title { font-size: clamp(3rem, 8vw, 7rem); }
}

/* TYPOGRAPHY SCALE USAGE (global) */
body { font-size: var(--font-size-base); }
h1 { font-size: var(--font-size-3xl); font-weight: 900; line-height: var(--line-height-tight); }
h2 { font-size: var(--font-size-2xl); font-weight: 700; }
h3 { font-size: var(--font-size-xl); font-weight: 700; }
h4 { font-size: var(--font-size-lg); font-weight: 700; }

p { font-size: var(--font-size-base); color: var(--color-text); }

/* HERO */
.hero {
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(2,6,15,0.95), rgba(2,6,15,0.85)),
              linear-gradient(135deg, rgba(43,127,255,0.25), rgba(2,2,2,0.6)),
              var(--color-bg);
}
.hero h1 {
  font-family: var(--font-family);
  font-weight: 900;
  font-size: var(--font-size-hero);
  line-height: 0.95;
  margin: 0 0 1rem;
  color: #FFFFFF;
}
.hero p { color: #F0F4FF; opacity: 0.95; }

/* HERO EXTREME LAYOUT (provided extra rules) */
.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 GRID & CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--color-bg-card);
  color: var(--color-text);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(43,127,255,0.2); /* soft glow on cards */
  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;
  font-weight: 700;
}
.card p { margin: 0; color: var(--color-text-muted); }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* PRIMARY BUTTON SPECIFIC */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-primary:hover {
  filter: brightness(0.92);
  box-shadow: 0 6px 16px rgba(43,127,255,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.04);
}

/* FOOTER */
.site-footer {
  background: #0b101a;
  padding: 2rem 0;
  color: #e8e8e8;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-inner a { color: #dfe6f6; }

/* 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 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 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); }

/* FORMS (inputs, textarea, select, labels) */
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: #0d1422;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
label { display: block; margin-bottom: 0.25rem; font-weight: 700; font-size: var(--font-size-xs); color: var(--color-text-muted); }
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(43,127,255,0.25);
}

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

/* RESPONSIVE SPECIFIC ADDITIONS (base/mobile first) */
@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-centered */
  .site-header .container {
    justify-content: flex-start;
  }
  .site-nav { display: flex; }
  .nav-list { justify-content: center; }
  .nav-link { font-size: var(--font-size-sm); }
  /* container centering already preserved by margin auto in all breakpoints */
  /* HERO: adjust typography for tablet sizes if needed */
  .hero { padding: 5rem 1rem; }
  .section { padding: 3rem 0; }
  .container { margin: 0 auto; }
}
@media (min-width: 1024px) {
  /* DESKTOP tweaks */
  .section { padding: 4rem 0; }
  .hero { min-height: 70vh; }
  .hero-big-title { font-size: clamp(3rem, 8vw, 7rem); }
  .container { padding: 0 2rem; }
}