/* ── Container, plates, navigation, footer ────────────────────── */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.topbar, .mobile-nav, main, .footer { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ── Topbar ── */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 240ms ease, border-color 240ms ease;
}
.topbar.is-stuck {
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--rule);
}

.topbar__inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.monogram {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--ice);
  font-family: var(--mono);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-decoration: none;
}

.topbar__nav { display: none; gap: var(--s-6); }
@media (min-width: 900px) { .topbar__nav { display: flex; } }

.topbar__nav a {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  padding-block: 14px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.topbar__nav a:hover { color: var(--starlight); }
.topbar__nav a.is-current { color: var(--ice); border-bottom-color: var(--ice); }

.topbar__controls { display: flex; align-items: center; gap: var(--s-2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--mono);
  font-size: var(--t-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--starlight);
  background: transparent;
  border: 1px solid var(--rule-bright);
  border-radius: 2px;
  padding: var(--s-3) var(--s-6);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.btn:hover { border-color: var(--ice); color: var(--ice); }
.btn--ghost { border-color: var(--rule); color: var(--dim); }
.btn--ghost:hover { border-color: var(--ice); color: var(--ice); }
.btn--compact { padding: var(--s-1) var(--s-3); font-size: var(--t-xs); min-height: 44px; min-width: 44px; }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 11px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 1px;
  background: var(--starlight);
  transition: transform 200ms ease, opacity 200ms ease;
}
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-nav {
  position: fixed;
  top: 68px; left: 0; right: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  background: rgba(4, 6, 12, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  font-family: var(--mono);
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--starlight);
  text-decoration: none;
  padding: var(--s-4) var(--pad);
  border-bottom: 1px solid var(--rule);
}
.mobile-nav a:last-child { border-bottom: 0; }
@media (min-width: 900px) { .mobile-nav { display: none; } }

/* ── Plates (sections) ── */

.plate { padding-block: var(--s-24); }
@media (min-width: 900px) { .plate { padding-block: var(--s-40); } }
.plate--alt { background: var(--deepfield); }

.plate__head { margin-bottom: var(--s-12); }

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: var(--s-3);
}

.plate__title {
  font-size: var(--t-lg);
  color: var(--parchment);
}
@media (min-width: 900px) { .plate__title { font-size: var(--t-xl); } }

.plate__lead {
  margin-top: var(--s-4);
  color: var(--dim);
  max-width: var(--measure);
}

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms ease, transform 620ms ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-8);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.footer__mark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ice);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.22em;
}
.footer__note {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--dim);
  letter-spacing: 0.08em;
}
