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

:root {
  /* radius */
  --radius: 12px;

  /* color palette - neon cyber for D666 */
  --color-bg: #08080F;
  --color-bg-alt: #0B0E1A;
  --color-bg-card: rgba(255, 255, 255, 0.08);

  --color-primary: #00F5FF; /* neon cyan */
  --color-secondary: #00E6FF;
  --color-accent: #FF007F;  /* hot pink */

  --color-text: #EAF6FF;
  --color-text-muted: #BFD6FF;
  --color-text-on-primary: #001019;

  --color-border: rgba(255, 255, 255, 0.25);
  --color-shadow: rgba(0, 0, 0, 0.4);

  /* 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. CSS Reset / Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  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);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 4. Typography rules */
h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); margin: 0 0 .5rem; font-weight: var(--font-weight-bold); color: var(--color-text); }
h2 { font-size: var(--font-size-2xl); margin: 0 0 .5rem; font-weight: var(--font-weight-bold); color: var(--color-text); }
h3 { font-size: var(--font-size-xl); margin: 0 0 .5rem; font-weight: var(--font-weight-bold); color: var(--color-text); }
p  { margin: 0 0 1rem; color: var(--color-text); }
strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }

/* lists */
ul, ol { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* 5. Layout utilities / Base containers */
.container {
  width: 100%;
  margin: 0 auto; /* mandatory: centers content at every breakpoint */
  padding: 0 1rem;
}

/* sections / hero / cards */
.section { padding: 2rem 0; }
.section-title { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); margin-bottom: .75rem; color: var(--color-text); }

/* 6. Required component styles (exact class contracts) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 8, 15, 0.95);
  overflow: visible; /* important per spec */
  /* not a fixed height - content dictates height */
  width: 100%;
  box-shadow: none;
}

.site-header .container {
  display: flex;
  align-items: center; /* vertical centering of logo, hamburger, nav */
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile padding per spec */
  width: 100%;
}

/* logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.site-logo a { text-decoration: none; }

/* hamburger nav (mobile toggle) */
.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: solid white bars */
  border-radius: 2px;
  transition: 0.2s ease;
}

/* site nav */
.site-nav {
  display: none; /* mobile collapsed 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);
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
}
.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-xs);
  color: var(--color-text);
  position: relative;
}
.nav-link:hover { color: var(--color-primary); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  height: 2px;
  width: 0;
  background: var(--color-primary);
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

/* dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; }
.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;
  border-bottom: none;
  width: 100%;
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}
@media (max-width: 767px) {
  .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-dropdown-menu .nav-link { padding: 0.5rem 1.25rem; }
  /* mobile dropdown open via focus-within acts as toggle */
}

.hero {
  width: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 20% 20%, rgba(0,245,255,0.15), transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(255,0,127,0.15), transparent 40%),
              linear-gradient(135deg, rgba(0,0,0,0.0), rgba(0,0,0,0.0)),
              linear-gradient(135deg, rgba(8,8,15,0.95), rgba(8,8,15,0.95));
  color: var(--color-text);
}
.hero h1 {
  font-size: var(--font-size-hero);
  line-height: 1.05;
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.6);
}
.hero p { font-size: var(--font-size-lg); opacity: 0.95; }

/* glassmorphism card visuals */
.card {
  display: flex;
  flex-direction: column; /* mandatory */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-card);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.card:hover { transform: translateY(-4px); border-color: rgba(0,255,255,0.8); }

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

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

/* button styles */
.btn {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #006a8a);
  color: #021018;
  border: 1px solid rgba(0,0,0,0.0);
  padding: 0.6rem 1rem;
}
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.9rem;
}
.btn:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* header nav alignment for desktop/tablet */
@media (min-width: 768px) {
  .site-nav {
    display: flex;
    position: static;
    margin-left: auto;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }

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

  .nav-list {
    flex-direction: row; /* tablet/desktop horizontal nav */
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .nav-link {
    font-size: var(--font-size-sm); /* tablet/desktop: small text, not heading size */
    padding: 0.4rem 0.75rem;
    border-bottom: none;
  }

  /* keep container centered at tablet/desktop */
  .container { margin: 0 auto; }

  /* dropdown menu behavior on desktop/tablet */
  .nav-dropdown-menu {
    top: 100%;
    left: 0;
  }

  /* dropdown adjustments for desktop: normal absolute dropdown */
}
@media (min-width: 1280px) {
  /* desktop-specific tweaks */
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }

  .hero {
    min-height: 70vh;
  }

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

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

  .section { padding: 4rem 0; }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
@media (min-width: 768px) and (max-width: 1279px) {
  /* Tablet-specific adjustments (768px - 1279px) to align with the spec's two platforms */
  .site-header { background: rgba(8, 8, 15, 0.98); }
  .hero { padding: 2.5rem 1rem; }
  .hero h1 { letter-spacing: 0.5px; }
  .nav-link { font-size: var(--font-size-sm); }
  .container { margin: 0 auto; }
}

/* 9. Utility classes (minimal set required by spec) */
.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; }

/* 7. Form elements (basic) */
input, textarea, select {
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--color-primary); }

/* 8. Table basics (simple) */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--color-border); text-align: left; }

/* 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: 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: "−"; transform: rotate(0.25turn); }
.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. Nav hover underline for desktop */
@media (min-width: 768px) {
  .nav-link { color: var(--color-text); }
  .nav-link:hover { color: var(--color-primary); }
}