.site-header {
  position: sticky;
  top: 0;
  background: rgba(17, 20, 24, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(8px);
  z-index: 10;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #cfd7df;
}

.brand__text {
  font-weight: 700;
  letter-spacing: .3px;
}

.nav a {
  color: #cfd7df;
  margin-left: 16px;
}

.nav a:hover {
  color: white;
}

.hero {
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
}

.hero__copy h1 {
  font-size: 42px;
  line-height: 1.05;
  margin-bottom: 10px;
}

.hero__copy p {
  color: #cfd7df;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  gap: 12px;
}

.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.section__title {
  font-size: 26px;
  margin-bottom: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  background: #141920;
  border: 1px solid #222834;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 6px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  color: #b5bec8;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile-specific tweaks */
@media (max-width: 600px) {
  .hero__copy h1 {
    font-size: 1.6rem;
  }

  .actions { flex-direction: column; align-items: stretch; }

  .cards { grid-template-columns: 1fr; }

  .nav { display: none; }
  .nav[aria-hidden="false"] { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }

  .header__inner { padding: 12px 0; }
}

/* Nav toggle */
.nav-toggle {
  display: none;
  background: transparent; border: 0; color: var(--text); cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; }
}

/* Dropdown behavior for mobile nav: when hamburger is shown, display the nav as an overlay dropdown */
@media (max-width: 900px) {
  .header__inner { position: relative; }

  .nav {
    display: none; /* default hidden on small screens */
    /* Use fixed so nav floats above other stacking contexts (fixes webview clipping) */
    position: fixed;
    left: 8px;
    right: 8px;
    top: 64px; /* place under the header bar; adjust if your header height differs */
    background: rgba(17,20,24,0.98);
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.45);
    border-radius: 12px;
    transform-origin: top center;
    opacity: 0;
    transform: scaleY(0.95);
    transition: opacity .18s ease, transform .18s ease;
    z-index: 99999;
  }

  .nav.is-open {
    display: flex;
    opacity: 1;
    transform: scaleY(1);
  }

  /* Make nav links large enough for touch */
  .nav a, .nav .btn { padding: 12px 10px; font-size: 1rem; }

  /* When nav is open, prevent background scrolling */
  body.nav-open { overflow: hidden; }
}

/* Backdrop to capture outside taps and darken background */
.nav-backdrop {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99990;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.nav-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* Debug outline (visible only when nav-debug is enabled; toggled via JS) */
.nav.debug-outline { outline: 3px dashed rgba(255,255,255,.6); }