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

:root {
  /* Palette tailored for AB999: dark storm with gold/red accents */
  --color-bg: #08101A;
  --color-bg-alt: #0B1620;
  --color-bg-card: #111923;
  --color-primary: #FFD600;       /* lightning gold */
  --color-secondary: #1E88E5;     /* storm blue */
  --color-accent: #FF5A5A;
  --color-text: #EDEDED;           /* dark bg - high contrast light text */
  --color-text-muted: #A0A4B0;
  --color-text-on-primary: #111111; /* light primary -> dark text on primary per rule */
  --color-border: #2A2A2A;
  --color-shadow: rgba(0, 0, 0, 0.5);

  --radius: 4px;

  --font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

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

/* 1) CSS reset / base  */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* enforced by responsive rules below as part of mobile base */
}
img, video, iframe { max-width: 100%; height: auto; display: block; }

/* 3) Layout helpers */
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* must be centered at all breakpoints */
  box-sizing: border-box;
}
.site-header { position: relative; min-height: 64px; overflow: visible; }
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
}
.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;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.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; /* 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);
}
.site-nav .nav-list {
  flex-direction: column;
}
.nav-list { display: flex; flex-direction: column; gap: 0; padding: 0; margin: 0; list-style: none; }
.nav-item { }

.nav-link {
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--font-size-xs); /* mobile default per mobile-first rule */
  transition: color 0.2s ease, text-decoration 0.2s ease;
  padding: 0.75rem 1rem;
  display: block;
  border-bottom: 1px solid var(--color-border);
}
.nav-link:hover { color: var(--color-text); text-decoration: underline; }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; cursor: pointer; }
.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); }

/* 5) Typography (standalone) style tweaks */
h1, h2, h3, h4 { margin: 0 0 .75rem; font-weight: var(--font-weight-bold); color: var(--color-text); }
h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

/* 4) Base content styles for sections & typography */
p { margin: 0 0 1rem; color: var(--color-text); }
a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 6) Card components */
.card {
  display: flex;
  flex-direction: column; /* mandatory */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.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; }

/* 6) Card grid */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* 7) Buttons */
.btn { display: inline-block; padding: 0.75rem 1rem; border-radius: var(--radius); border: 1px solid var(--color-border); text-decoration: none; font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); transition: all 0.2s ease; background: var(--color-bg); color: var(--color-text); }
.btn-primary { background: var(--color-primary); color: var(--color-text-on-primary); border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }

/* 8) Section blocks */
.section { padding: 2rem 0; }

/* 9) Hero section */
.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.2)), var(--color-bg);
  color: var(--color-text);
}
.hero-inner { text-align: center; max-width: 1200px; width: 100%; }
.hero h1 { font-size: var(--font-size-hero); line-height: var(--line-height-tight); margin-bottom: .75rem; }
.hero p { font-size: var(--font-size-base); margin-bottom: 1rem; }

/* 9a) Hero diagonal variant (exact extra rules) */
.hero--diagonal {
  background: var(--color-primary); /* brand color as base */
  position: relative;
  overflow: hidden;
}
.hero--diagonal::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 52%;
  background: var(--color-bg);
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.hero--diagonal .hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 420px;
}
.hero-text { flex: 1 1 45%; }
.hero-media { flex: 1 1 48%; }
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 440px;
  display: block;
}
@media (max-width: 767px) {
  .hero--diagonal::after { display: none; }
  .hero--diagonal { background: var(--color-primary); }
  .hero--diagonal .hero-inner { flex-direction: column; }
  .hero-media { width: 100%; }
}

/* 9b) Minimal hero default (non-diagonal) to satisfy "gradient or solid brand-color background" */
@media (min-width: 768px) {
  .hero { min-height: 60vh; }
}
@media (min-width: 768px) {
  .hero h1 { font-size: var(--font-size-2xl); }
  .hero p { font-size: var(--font-size-base); }
}

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

/* 11) Forms */
input, textarea, select {
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: #0e1620;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  outline: none;
}
label { display: block; margin-bottom: .25rem; font-size: var(--font-size-sm); color: var(--color-text); }

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

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

/* 14) RESPONSIVE REQUIREMENTS */
@media (min-width: 768px) {
  /* Tablet rules — hamburger hidden, full nav visible, centered layout */
  .container { max-width: 960px; padding: 0 1.5rem; margin: 0 auto; }
  .site-header .container { justify-content: center; gap: 2rem; }

  /* Hamburger navigation becomes hidden on tablet+ */
  .nav-toggle-label { display: none; }

  /* Ensure site-nav is visible and properly laid out on tablet+ */
  .site-nav { display: flex; position: static; flex: 0 0 auto; align-items: center; background: transparent; border-top: none; box-shadow: none; }
  .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.4rem 0.75rem; border-bottom: none; }
  .hero { min-height: 60vh; }
  .hero h1 { font-size: var(--font-size-3xl); }

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

  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .section { padding: 4rem 0; }
}
@media (min-width: 1024px) {
  /* Desktop rules */
  .container { max-width: 1200px; padding: 0 2rem; margin: 0 auto; }
  .site-logo img { height: 44px; } /* ensure consistent logo sizing on desktop as well */
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (min-width: 1280px) {
  /* Extra large tweaks for spacious layouts */
  .container { max-width: 1400px; }
  .hero { min-height: 72vh; }
  .card { transform: translateZ(0); transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.35); }
  .card-grid { gap: 1.5rem; }
  .footer-inner { justify-content: space-between; }
}