@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;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;

  /* COLOR PALETTE (6-digit hex) */
  --color-bg: #060A12;               /* DARK BG */
  --color-bg-alt: #0A0F1A;            /* DARK ALT (slightly lighter) */
  --color-bg-card: #0C1220;           /* DARK CARD BACKGROUND (slightly lighter than base for contrast) */

  --color-primary: #E8F4FF;           /* GLAZING WHITE / ICE */
  --color-secondary: #7EC8E3;         /* ICE BLUE ACCENT */
  --color-accent: #7EC8E3;            /* SYNERGISTIC ACCENT */

  --color-text: #FFFFFF;              /* BODY TEXT on darks (always light) */
  --color-text-muted: #8AAABB;         /* Muted text on darks */
  --color-text-on-primary: #111111;     /* Text on light primary (dark for legibility) */

  --color-border: #2C3E50;
  --color-shadow: #000000;

  /* RADIUS & SPACING */
  --radius: 12px;
  --gap: 1rem;
  --gap-sm: 0.75rem;
  --gap-md: 1.25rem;
  --radius-pill: 999px;
}

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

html, body {
  height: auto;
}

body {
  margin: 0;
  font-family: 'Nunito', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol { margin: 0; padding: 0; list-style: none; }

p { margin: 0 0 1rem; }

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* LAYOUT UTILITIES & BASE STRUCTURE */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto; /* CENTER CONTENT AT ALL BREAKPOINTS */
  padding: 0 1rem;
  box-sizing: border-box;
}

.section {
  padding: 4rem 0;
  background: var(--color-bg);
  /* DYNAMIC BACKGROUND SHIFT BETWEEN SECTIONS (via nth-child) */
}
.section:nth-child(even) {
  background: var(--color-bg-card);
  border-top: 2px solid var(--color-primary);
}
.section-title {
  font-size: var(--font-size-2xl);
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

/* HEADER & NAV */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  min-height: 64px;
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
}
.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;
  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; /* push to the right on mobile */
  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%;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 0;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item { }
.nav-link {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  text-decoration: none;
  padding: 0.75rem 1rem;
  display: block;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover {
  color: var(--color-secondary);
  text-decoration: none;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle { cursor: pointer; 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, 6px);
  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);
  color: var(--color-text);
}
.nav-dropdown-menu .nav-link:last-child { border-bottom: none; }

@media (min-width: 768px) {
  /* Tablet view: show horizontal nav and place nav on right */
  .site-header .container {
    justify-content: space-between; /* logo-left, nav-right */
  }
  .nav-toggle-label { display: none; } /* hide hamburger on tablet+ */
  .site-nav {
    display: flex;
    align-items: center;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; }
  .nav-dropdown-menu { position: absolute; }
  .container { max-width: 960px; padding: 0 1.5rem; }
  .site-nav { margin-left: auto; justify-content: flex-end; }
  /* Ensure the nav remains in a single row on tablet */
  .hero { min-height: 60vh; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .footer-inner { flex-direction: row; text-align: left; }
}
@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; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* HERO (IMMERSIVE) */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
  /* HERO GRADIENT RULE: DARK BG uses primary/secondary for gradient */
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-text);
  position: relative;
}
.hero { color: #FFFFFF; } /* HERO TEXT RULE for DARK BG */
.hero-ticker { overflow: hidden; background: var(--color-primary); padding: 0.5rem 0; width: 100%;
  color: #1A1A1A;
}
.hero-ticker-inner {
  display: inline-block;
  white-space: nowrap;
  color: #E8E8E8;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  animation: ticker-scroll 28s linear infinite;
  padding-left: 100%;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hero-content {
  text-align: center;
  padding-top: 2.5rem;
}
.hero-media {
  max-width: 680px;
  margin: 1.5rem auto;
}
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.hero-cta .btn { /* inherited from .btn styles below */ }

/* CARDS & CARDS GRID */
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: 0 8px 20px 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-body {
  padding: 1rem 1.25rem;
}
.card > :not(img) { padding: 1rem 1.25rem; } /* fallback if no .card-body */
.card h3, .card h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.card p {
  margin: 0;
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

/* FORM ELEMENTS */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #1A1A1A;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
label { display: block; margin-bottom: 0.25rem; font-size: var(--font-size-xs); color: var(--color-text); }

/* BUTTONS & CTA */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { filter: brightness(0.95); transform: translateY(-1px); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  transition: filter 0.2s ease;
}
.btn-primary:hover { filter: brightness(0.9); }

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  transition: background 0.2s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,0.04);
  color: #1A1A1A;
}

/* FOOTER */
.site-footer {
  background: var(--color-bg);
  color: var(--color-text-muted);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-inner .btn-primary,
.footer-inner .btn-secondary {
  color: var(--color-text-on-primary) !important;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* FAQ ACCORDION (CSS-ONLY) */
.faq-section { padding: 4rem 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: "−"; }
.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); }

/* HAMBURGER NAV (CSS-ONLY PATTERN) — rules must apply to mobile */
@media (max-width: 767.98px) {
  /* Mobile defaults
     - collapsed nav via checkbox
     - vertical nav list
  */
  .site-nav { display: none; }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .nav-list {
    flex-direction: column;
  }
  .site-nav { display: none; }
  .nav-list > .nav-item { border-bottom: 1px solid var(--color-border); }
  .nav-link { padding: 0.75rem 1rem; }
  .site-logo { margin-right: auto; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
}
@media (min-width: 768px) {
  /* Tablet+ adjustments already covered above; ensure nav visible by default */
  .nav-toggle-input { display: none; }
  .site-nav { display: flex; align-items: center; position: static; background: transparent; border-top: none; box-shadow: none; }
  .nav-list { flex-direction: row !important; justify-content: flex-end; gap: 1.5rem; padding: 0; margin: 0; }
  .nav-link { padding: 0.25rem 0.5rem; }
  .nav-dropdown-menu { position: absolute; top: 100%; left: 0; }
  /* Ensure image sizing in header is consistent on tablet/desktop */
  .site-logo img { height: 44px; }
}