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

:root {
  /* COLOR PALETTE - ACE365 ThunderStorm variant */
  --color-bg: #08101A;
  --color-bg-alt: #0B1620;
  --color-bg-card: #111923;
  --color-primary: #FFD600; /* lightning yellow */
  --color-secondary: #1E88E5; /* storm blue */
  --color-accent: #4FC3F7;
  --color-text: #FFFFFF; /* default for dark bg per contrast mandate */
  --color-text-muted: #A0A0A0;
  --color-text-on-primary: #111111; /* primary is light -> dark text on primary per rule */
  --color-border: #2A3A50;
  --color-shadow: rgba(0, 0, 0, 0.5);

  --radius: 12px;

  /* TYPOGRAPHY SCALE (mandatory) */
  --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;
}

/* 3. RESET / BASE */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--color-bg); color: var(--color-text); font-family: 'Exo 2', system-ui, -apple-system, "Segoe UI", Roboto, Arial; line-height: var(--line-height-base); }
html, body { overflow-x: hidden; max-width: 100%; }
img, video, iframe { max-width: 100%; height: auto; display: block; }

/* 5. LAYOUT UTILITIES / BASE STRUCTURE */
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* crucial: centers content at all breakpoints */
  box-sizing: border-box;
}
.section {
  padding: 2rem 0;
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
}

/* 4. TYPOGRAPHY (global) */
h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: var(--font-weight-bold); color: var(--color-text); }
p { margin: 0 0 1rem; color: var(--color-text); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }

/* 6. CORE COMPONENT STYLES (MUST) */

/* Header / Logo / Nav base */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  overflow: visible;
  background: var(--color-bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  justify-content: flex-start; /* mobile: logo-left layout; overridden at breakpoints */
}
.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;
}
.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: 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;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-direction: column; /* mobile: vertical menu by default */
}
.nav-item { }
.nav-link {
  font-size: var(--font-size-xs); /* mobile: smaller than body */
  color: var(--color-text);
  text-decoration: none;
  padding: 0.75rem 1rem;
  display: block;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--color-accent); }

/* Dropdown nav (always present) */
.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;
}
.nav-dropdown-menu .nav-link:hover { background: var(--color-bg-alt); }

/* Hero / Layout helpers */
.hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(8,16,26,0.95) 0%, rgba(10,18,30,0.95) 60%), var(--color-bg);
  /* gradient or brand color LED accent works with dark bg */
}
.hero-ticker { overflow: hidden; background: var(--color-primary); padding: 0.5rem 0; }
.hero-ticker-inner { display: inline-block; white-space: nowrap; color: var(--color-text-on-primary); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; animation: ticker-scroll 28s linear infinite; padding-left: 100%; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero-content { text-align: center; padding-top: 2.5rem; }
.hero-media { max-width: 680px; margin: 1.5rem auto; }
.hero-img { width: 100%; border-radius: var(--radius); object-fit: cover; display: block; }
.hero-cta { justify-content: center; display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Cards / grid */
.card {
  display: flex;
  flex-direction: column; /* mandatory: vertical card composition */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block; /* mandatory */
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content { padding: 1rem; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column */
  gap: 1rem;
  width: 100%;
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { filter: brightness(0.95); }
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Sections / header footer */
.site-footer { background: var(--color-bg-alt); color: var(--color-text); padding: 2rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; padding: 0 1rem; }
}
.faq-section { padding: 2rem 0; }

/* FAQ accordion (CSS-only) */
.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 */
.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); }

/* Form elements */
input,
textarea,
select,
button[type="submit"],
label {
  font-family: inherit;
  font-size: var(--font-size-base);
}
label { display: block; margin-bottom: 0.25rem; color: var(--color-text-muted); }
input,
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #0b1620;
  color: var(--color-text);
}
input:focus,
textarea:focus,
select:focus { outline: none; border-color: var(--color-accent); }

/* Tables */
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
th, td { padding: 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; }

/* 9. RESPONSIVE REQUIREMENTS (MOBILE-FIRST, THEN TABLET, THEN DESKTOP) */

/* Base mobile-first: ≤767px (already encoded by default styles above) */
/* Specific mobile rules to ensure correct layout and typography per requirements are embedded above */

@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-centered */
  .site-header .container {
    justify-content: flex-start;
  }
  .site-nav { display: flex; flex: 1; justify-content: center; align-items: center; padding: 0; height: 100%; }
  .nav-list { flex-direction: row !important; flex-wrap: nowrap; align-items: center; justify-content: center; padding: 0; margin: 0; }
  .nav-link { font-size: var(--font-size-sm); padding: 0.5rem 0.75rem; }
  .nav-toggle-label { display: none !important; } /* hide hamburger on tablet+ */
  /* Desktop tablet layout specifics for nav visibility */
}
@media (min-width: 1024px) {
  /* Desktop container sizing */
  .container { max-width: 1200px; padding: 0 2rem; }
  /* HERO typography on large screens */
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  /* Section spacing */
  .section { padding: 4rem 0; }
  /* Card grid adapt for larger screens */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  /* Desktop header footer alignment (nav centered) */
  .footer-inner { padding: 0 2rem; }
  .text-left { text-align: left; }
}

/* 9. ADDITIONAL HERO RESPONSIVE ADJUSTMENTS (optional tuning) */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero { padding: 3rem 1.5rem; }
  .hero h1 { font-size: var(--font-size-3xl); }
}