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

:root {
  /* Brand / mood palette (dark thunderstorm with gold/red accents) */
  --color-bg: #08101A;
  --color-bg-alt: #0F1A28;
  --color-bg-card: #0B1420;
  --color-primary: #FFD600; /* lightning yellow */
  --color-accent: #1E88E5; /* storm blue */
  --color-text: #EDEFF4;
  --color-text-muted: #A0A6B3;
  --color-text-on-primary: #111111; /* primary is light, so use dark text on primary */
  --color-border: #2A2A2A;
  --color-shadow: rgba(0,0,0,0.6);

  --radius: 4px;

  /* Typography scale (mandatory) */
  --font-family: 'Barlow Condensed', system-ui, -apple-system, "Segoe UI", Roboto, 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;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 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);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* RESPONSIVE RULES covered later, base mobile-first */
}

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

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto; /* mandatory: center at every breakpoint */
  padding: 0 1rem;
  box-sizing: border-box;
  display: block;
}

.section { padding: 2rem 0; }

.h1, h1, h2, h3, h4, p, a, strong, em, ul, ol { margin: 0; padding: 0; }

a { color: inherit; text-decoration: none; }

.text-center { text-align: center; }

/* Typography rules (per contract) */
body { font-family: var(--font-family); font-weight: var(--font-weight-normal); font-size: var(--font-size-base); line-height: var(--line-height-base); color: var(--color-text); }

h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); font-weight: 800; margin-bottom: 0.25rem; color: var(--color-text); }
h2 { font-size: var(--font-size-2xl); font-weight: 700; margin: 0.25rem 0 0.5rem; color: var(--color-text); }
h3 { font-size: var(--font-size-xl); font-weight: 600; margin: 0.25rem 0; color: var(--color-text); }
h4 { font-size: var(--font-size-lg); font-weight: 600; color: var(--color-text); }

p { font-size: var(--font-size-base); color: var(--color-text); margin-bottom: 0.5rem; }

.card { display: flex; flex-direction: column; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.25); transition: transform 0.2s ease, box-shadow 0.2s ease; }

.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.45); }

.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 inside the card */
.card-content { padding: 1rem; }

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

/* Hero section (layout overridden by exact rules below) */
.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  min-height: 50vh;
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 60%), var(--color-bg);
  color: #fff;
}

.hero-content { text-align: center; }

/* Extra hero layout rules (mandatory per prompt) */
.hero-countdown { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 1.5rem auto; }
.hero-cd-block { display: flex; flex-direction: column; align-items: center; background: rgba(0,0,0,0.35); border: 1px solid var(--color-primary); border-radius: 6px; padding: 0.6rem 1.1rem; min-width: 64px; }
.hero-cd-block strong { font-size: 2.2rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.hero-cd-block span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-top: 0.3rem; }
.hero-cd-sep { font-size: 2rem; font-weight: 700; color: var(--color-primary); padding-bottom: 1rem; }
.hero-cta { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.hero-media { max-width: 700px; margin: 0 auto; }
.hero-img { width: 100%; border-radius: var(--radius, 12px); object-fit: cover; display: block; }

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

/* Site header and navigation (mandatory markup) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  min-height: 64px;
  overflow: visible;
  background: linear-gradient(to right, rgba(8,16,26,0.96), rgba(8,16,26,0.92));
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  margin: 0 auto;
  width: 100%;
}
.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;
  border-radius: 2px;
  transition: 0.2s ease;
}
/* Mobile nav panel (hidden by default) */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 500;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
}
.nav-item { list-style: none; }
.nav-link {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease, border-color 0.2s ease;
  display: block;
}
.nav-link:hover { color: #fff; border-bottom-color: var(--color-primary); }

/* Dropdown nav (shared) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; 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); }

/* Mobile adjustments for dropdowns (indented under toggle) */
@media (max-width: 767px) {
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
  .nav-list { flex-direction: column; }
  .site-nav { display: block; }
  .hero { padding: 2.5rem 1rem; min-height: 40vh; }
}
@media (min-width: 768px) {
  /* Tablet +: logo-left, nav-centered layout rules */
  .site-header .container { justify-content: flex-start; }
  .site-nav {
    position: static;
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }
  .nav-toggle-label { display: none !important; } /* hide hamburger on tablet+ */
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; border-bottom: none; }
  /* ensure nav dropdown behaves horizontally within center-aligned nav */
  .nav-dropdown-menu { white-space: nowrap; }
  /* Nav layout adjustments per rules */
  .container { margin: 0 auto; } /* maintain centering at tablet/desktop as well */
  .hero { min-height: 60vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .footer-inner { flex-direction: row; text-align: left; }
  /* Nav layout specifics for tablet+ */
  .site-nav { justify-content: center; }
  .nav-list { justify-content: center; }
}
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
}

/* Forms */
label { display: inline-block; font-size: var(--font-size-sm); font-weight: 500; margin-bottom: 0.25rem; color: var(--color-text); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #0e1a28;
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea { min-height: 120px; resize: vertical; }
input:focus,
textarea:focus,
select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(30,136,229,0.15); }

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

/* Utilities (2) */
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; }

/* Footer */
.site-footer { background: #0e111a; padding: 2rem 0; color: var(--color-text); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }

/* Hide utility */
.hidden { display: none !important; }

/* Hover underlines / subtle animations for nav */
.site-nav, .nav-list { transition: opacity 0.2s ease; }

/* Ensure hero text contrast on dark background per CONTRAST rules */
.hero h1, .hero p, .hero .btn { color: #fff; }