.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .nav {
  display: flex;
  min-height: var(--nav-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  background-image: url('/assets/opti-logo.png');
  background-size: 235%;
  background-position: center;
  background-repeat: no-repeat;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.brand-name {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-sub {
  color: var(--muted-2);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 120ms ease;
}

.site-header .nav-links a[data-page='status'] {
  display: none;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current='page'] {
  color: var(--text);
}

.nav-links a.active,
.nav-links a[aria-current='page'] {
  color: var(--green-2);
}

.nav-links a[data-page='download'] {
  margin-left: 8px;
  padding: 0 14px;
  border: 1px solid var(--line-green);
  border-radius: var(--radius);
  color: var(--green-2);
}

.nav-links a[data-page='download']:hover,
.nav-links a[data-page='download'].active {
  border-color: var(--green);
  color: var(--text);
}

.nav-actions,
.site-account-slot {
  position: relative;
  display: flex;
  min-width: 42px;
  align-items: center;
  justify-content: flex-end;
}

.site-account-slot:empty::after {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  content: '';
  background: var(--surface);
}

.mobile-toggle {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.mobile-toggle span,
.mobile-toggle span::before,
.mobile-toggle span::after {
  display: block;
  width: 16px;
  height: 1px;
  content: '';
  background: var(--text-soft);
  transition: transform 140ms ease, opacity 140ms ease;
}

.mobile-toggle span {
  position: relative;
}

.mobile-toggle span::before {
  position: absolute;
  top: -5px;
  left: 0;
}

.mobile-toggle span::after {
  position: absolute;
  top: 5px;
  left: 0;
}

.mobile-toggle.active span {
  background: transparent;
}

.mobile-toggle.active span::before {
  transform: translateY(5px) rotate(45deg);
}

.mobile-toggle.active span::after {
  transform: translateY(-5px) rotate(-45deg);
}

.page-main {
  min-height: calc(100vh - 120px);
  padding: calc(var(--nav-height) + 72px) 0 82px;
}

.page-hero {
  max-width: 700px;
  margin-bottom: 34px;
}

.page-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(2.8rem, 6vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer {
  padding: 38px 0 20px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 54px;
}

.footer-brand {
  max-width: 390px;
}

.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 0.71rem;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  gap: 56px;
}

.footer-column {
  display: grid;
  min-width: 100px;
  align-content: start;
  gap: 8px;
}

.footer-column h4 {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-column a {
  color: var(--muted);
  font-size: 0.7rem;
  transition: color 120ms ease;
}

.footer-column a:hover,
.footer-bottom-links a:hover {
  color: var(--green-2);
}

.footer-bottom {
  display: flex;
  margin-top: 30px;
  padding-top: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.61rem;
}

.footer-bottom-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    top: calc(var(--nav-height) + 1px);
    right: 0;
    left: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 10px 14px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-raised);
    box-shadow: var(--shadow);
  }

  .nav-links.mobile-open {
    display: grid;
  }

  .nav-links a {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .nav-links a[data-page='download'] {
    margin-left: 0;
  }

  .mobile-toggle {
    display: grid;
  }
}

@media (max-width: 720px) {
  .brand-copy {
    display: none;
  }

  .site-account-slot {
    min-width: 0;
  }

  .page-main {
    padding-top: calc(var(--nav-height) + 54px);
  }

  .page-hero h1 {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-links {
    gap: 36px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .nav-links {
    grid-template-columns: 1fr;
  }
}
