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

:root {
  /* Branding & color palette (BD222 variant) */
  --radius: 4px;
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  --color-bg: #0A0412;             /* DARK bg */
  --color-bg-alt: #140B24;
  --color-bg-card: #141226;

  --color-primary: #FFE000;        /* arcade yellow */
  --color-secondary: #39FF14;      /* neon green accent */
  --color-accent: #39FF14;

  --color-text: #EDEDEE;            /* light text for dark bg */
  --color-text-muted: #A0A0A0;
  --color-text-on-primary: #111111;  /* dark text on light primary */

  --color-border: #2E1B4A;
  --color-shadow: rgba(0,0,0,0.6);

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* RESPONSIVE REQUIREMENT: prevent horizontal scroll on mobile */
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: var(--line-height-base);
  font-size: var(--font-size-base);
}

* { box-sizing: border-box; }

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

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

strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }

/* Layout base */
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* RESPONSIVE REQUIREMENT: always center content */
  max-width: 100%;
}

.section { padding: 2rem 0; }

/* Header & branding */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px; /* REQUIRED: not a fixed height */
  overflow: visible; /* REQUIRED: do not clip logo/text inside header */
  background: rgba(10, 4, 18, 0.92); /* dark translucent backdrop for contrast */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: saturate(120%) blur(2px);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile default padding per requirement */
  justify-content: flex-start; /* logo-left, nav-right via media query */
  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;           /* MANDATORY: height 44px, width:auto, max-width 160px */
  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; /* REQUIRED: always white bars */
  border-radius: 2px;
  transition: 0.2s ease;
}

.site-nav {
  display: none; /* MOBILE default hidden; shown on toggle */
  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 {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-list {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { display: list-item; }

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-size-sm); /* tablet/desktop: will be overridden to vary by breakpoint */
  color: var(--color-text);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: var(--color-text);
  text-decoration: none;
}

.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);
}

/* Baseline mobile first: mobile nav layout */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; } /* redundant but explicit per mobile requirement */
  .site-nav { display: none; }
  .nav-list { flex-direction: column; padding: 0; }

  /* Hamburger nav patterns (mobile) */
  .nav-toggle-label { display: flex; align-items: center; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  /* Ensure header sections align vertically centered on mobile */
  .site-header .container { align-items: center; padding: 0.5rem 1rem; }
  /* Hero adjustments for mobile: handled in responsive section below */
  .hero { min-height: 50vh; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { text-align: center; }
  table { display: block; overflow-x: auto; width: 100%; }
}

/* Tablet and up: 768px+ (logo-left, nav-right) */
@media (min-width: 768px) {
  /* Center content and split header into two sides */
  .container { max-width: 960px; padding: 0 1.5rem; margin: 0 auto; }

  .site-header .container { justify-content: space-between; }

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

  /* Show desktop-style navigation on tablet+ */
  .site-nav {
    display: flex;
    align-items: center;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-left: auto;
  }

  .nav-list { justify-content: flex-end; }

  /* Nav layout: horizontal across the header right side explicitly */
  .nav-list { display: flex !important; flex-direction: row !important; flex-wrap: nowrap; align-items: center; gap: 1.5rem; padding: 0; margin: 0; }

  .nav-link { font-size: var(--font-size-sm); padding: 0.5rem 0.75rem; }
  .nav-dropdown-menu { position: absolute; top: calc(100%); left: 0; min-width: 200px; }

  /* Dropdown behavior on desktop remains hover/focus-within */
  .nav-dropdown:hover > .nav-dropdown-menu,
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }

  /* Hero adjustments for tablet/desktop */
  .hero { min-height: 60vh; }

  /* Hero headings scale up on larger viewports (via dedicated hero rules below) */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Desktop: 1280px+ layout refinements */
@media (min-width: 1280px) {
  .container { max-width: 1280px; padding: 0 2rem; }

  .hero { min-height: 70vh; }

  .hero h1 { font-size: var(--font-size-hero); }

  .section { padding: 4rem 0; }
  .section-title { font-size: var(--font-size-2xl); }

  /* Ensure precise desktop nav alignment if needed */
  .site-nav { justify-content: flex-end; }

  /* Cards grid expands with width on large desktops */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Typography usage (headings) */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-sm) 0;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}
h1 { font-family: 'Playfair Display', serif; font-weight: var(--font-weight-bold); font-size: var(--font-size-3xl); }
h2 { font-family: 'Playfair Display', serif; font-weight: var(--font-weight-bold); font-size: var(--font-size-2xl); }
h3 { font-family: 'Playfair Display', serif; font-weight: var(--font-weight-bold); font-size: var(--font-size-xl); }
h4 { font-family: 'Playfair Display', serif; font-weight: var(--font-weight-bold); font-size: var(--font-size-lg); }

/* Body copy & text utility */
p { margin: 0 0 var(--space-md) 0; color: var(--color-text); font-size: var(--font-size-base); }

/* Links inside content */
p a { color: var(--color-primary); }

/* Button styles (base and primary/secondary) */
.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-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.btn-primary:hover { filter: brightness(0.95); }

/* Card components (MANDATORY structure) */
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.55); }

.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: var(--space-md); color: var(--color-text); }
.card-title { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); margin: 0 0 var(--space-xs) 0; }
.card-text { font-size: var(--font-size-base); color: var(--color-text-muted); }

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

/* Hero block (per exact hero layout rules) */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(10,4,18,0.95) 0%, rgba(20,8,36,0.95) 100%);
  background-size: cover;
  background-position: center;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
  display: flex;
  align-items: center;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 2rem 0;
}
.hero-content h1, .hero-content p { color: #ffffff; }
.hero-cta {
  justify-content: center;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
.hero h1 { font-size: var(--font-size-hero); margin: 0 0 var(--space-md) 0; line-height: 1.04; }
.hero p { font-size: var(--font-size-lg); margin: 0; }

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

/* Form elements */
label { display: block; margin-bottom: 0.25rem; font-weight: var(--font-weight-medium); }
input, textarea, select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #0b0a14;
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 224, 0, 0.25);
}
button[type="submit"] { cursor: pointer; }

/* Table styling */
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: var(--font-weight-bold); }

/* Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.hidden { display: none !important; }

/* Accessibility helpers for high contrast if hero bg is dark */
.hero-overlay, .hero-content { color: #fff; }

/* Ensure the logo and header stay visually centered across breakpoints (explicit centering on mobile) */
@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-right */
  .site-header .container { justify-content: space-between; }
  .site-nav { margin-left: auto; justify-content: flex-end; }
  .nav-list { justify-content: flex-end; }
}

/* Ensure the logo height never exceeds the specified max on all viewports (MANDATORY) */
@media (min-width: 0px) {
  .site-logo img { height: 44px; }
}