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

:root {
  /* Typography scale */
  --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;

  /* Radius & gaps */
  --radius: 12px;
  --gap: 1.25rem;

  /* Color palette (BDTK66 variant) - DARK THEME with gold accents */
  --color-bg: #08101A;          /* very dark grey-blue (site background) */
  --color-bg-alt: #0A1220;       /* darker/alternate panels backdrop */
  --color-bg-card: #0D1A28;      /* card background (even sections) */
  --color-primary: #FFD600;      /* lightning gold */
  --color-secondary: #1E88E5;    /* storm blue accent */
  --color-accent: #FF5C00;       /* optional warm accent for highlights */

  --color-text: #E8E8E8;          /* light text for dark backgrounds (WCAG AA) */
  --color-text-muted: #A0A0A0;
  --color-text-on-primary: #111111;/* text color on light primary (since primary is light) */

  --color-border: #2A2A2A;
  --color-shadow: rgba(0, 0, 0, 0.5);
}

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

html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

ul, ol { margin: 0; padding: 0; }
ol { list-style-position: inside; }
li { margin: 0.25rem 0; }

/* Base reset & layout utilities */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.section {
  padding: 4rem 0;
  background: var(--color-bg);
}

.section-title {
  font-size: var(--font-size-2xl);
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

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

/* Card system */
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 2px solid var(--color-primary);
  overflow: hidden;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.card > * { /* ensure card children get breathing room if no .card-body is used */ }

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 0;
}
.card-body,
.card > :not(img) {
  padding: 1rem 1.25rem;
}
.card h3, .card h4 { margin-top: 0; margin-bottom: 0.5rem; color: var(--color-text); }
.card p { margin: 0; line-height: var(--line-height-base); color: var(--color-text-muted); }

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

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  min-height: 60vh;
  color: var(--color-text); /* hero on dark bg: enforced white by theme rule */
  background: linear-gradient(135deg, rgba(8,16,26,1) 0%, rgba(8,16,26,0.92) 60%), var(--color-bg);
}
.hero { color: #FFFFFF; } /* HERO TEXT RULE for dark bg */
.hero h1 { font-size: var(--font-size-hero); line-height: 1.08; margin: 0 0 .75rem; }
.hero p { font-size: var(--font-size-md); margin: 0 0 1rem; color: rgba(232,232,232,0.95); }
.hero a.btn { font-weight: var(--font-weight-bold); }

/* Hero extra layout as requested */
.hero-poster { position: relative; border-radius: var(--radius); overflow: hidden; max-height: 500px; margin: 1.5rem auto; }
.hero-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--color-primary); cursor: pointer; }
.hero-play svg { width: 72px; height: 72px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }

/* Hero headline CTA alignment helpers (as requested) */
.hero-headline { text-align: center; margin-bottom: 0.75rem; }
.hero-cta { display:flex; justify-content:center; margin-top: 1.5rem; }

/* Header / navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  min-height: 64px;
  overflow: visible;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  justify-content: space-between;
}
.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;
}
.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.5rem 0;
}
.nav-link {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--color-primary); text-decoration: underline; background: rgba(255,255,255,0.04); }

/* Dropdown nav */
.nav-item { position: relative; }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; white-space: nowrap; color: var(--color-text); text-decoration: none; padding: 0.5rem 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;
}
.nav-dropdown-menu .nav-link:hover { background: var(--color-bg-alt); }

/* Mobile dropdown adjustments */
@media (max-width: 767px) {
  .nav-list { flex-direction: column; }
  .site-nav { display: none; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; display: none; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  .nav-toggle-label { display: flex; }
  .nav-toggle-label:hover { background: rgba(0,0,0,0.55); }
  /* Ensure hero/backdrop remains accessible on mobile */
  .hero { padding: 3rem 1rem; min-height: 50vh; }
  .hero-headline { text-align: center; }
  .nav-link { padding: 0.6rem 0.75rem; }
  .site-nav { position: absolute; top: 100%; left: 0; width: 100%; }
  .nav-list { padding: 0.5rem 0; }
}

/* Tablet (min-width: 768px) rules - logo-left, nav-right, horizontal menu */
@media (min-width: 768px) {
  .site-header .container {
    display: flex;
    justify-content: space-between;
  }
  .nav-toggle-label { display: none; }
  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
    align-items: center;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    align-items: center;
  }
  .nav-link { font-size: var(--font-size-sm); }
  .nav-dropdown-menu { min-width: 220px; }
  /* Nav layout: logo on left, nav on right (tablet+) */
  .site-header .container { justify-content: space-between; }
  .site-nav { margin-left: auto; }
  .nav-list { justify-content: flex-end; }
  /* Ensure list items sit inline */
  .nav-item { display: inline-block; }
  /* In tablet, ensure sections still center content within container */
  .container { margin: 0 auto; }
  /* Card grid density for tablet view */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  /* Card hover lift stays */
  .hero { min-height: 60vh; }
  .hero-headline { text-align: center; }
  .hero h1 { font-size: calc(var(--font-size-hero) * 0.98); }
}

/* Desktop (min-width: 1024px) overrides */
@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; }
}

/* Section color alternation (strong rhythm) */
.section { background: var(--color-bg); }
.section:nth-child(even) {
  background: var(--color-bg-card);
  border-top: 2px solid var(--color-primary);
}
.site-footer { background: var(--color-bg-alt); color: var(--color-text); padding: 2rem 0; }

/* Footer inner layout */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}
.site-footer a { color: var(--color-text); }

/* Forms */
input,
textarea,
select {
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255,214,0,0.15);
}
label { display: block; font-size: var(--font-size-sm); color: var(--color-text); margin-bottom: 0.25rem; }

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

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

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

/* Visibility helpers */
.hidden { display: none !important; }

/* Accessibility helpers for header focus */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Ensure header and hero text readability on dark background overrides */
.hero .hero-text { color: var(--color-text); }

/* Final global adjustments for the required “nav layout” states */
@media (min-width: 768px) {
  /* NAV LAYOUT override: tablet+ */
  .site-header .container { justify-content: space-between; }
  .site-nav { margin-left: auto; justify-content: flex-end; }
  .nav-list { justify-content: flex-end; }
  .nav-link { font-size: var(--font-size-sm); }
}