.container {
  width: min(100% - 2.4rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.95rem 1.6rem;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) ease,
              background-color var(--duration-base) ease;
}

.site-header[data-scrolled] {
  background: rgba(10, 10, 11, 0.78);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.brand-word { line-height: 1; }

.primary-nav {
  display: none;
  margin-left: auto;
  gap: 1.4rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.primary-nav a {
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--duration-fast) ease;
}

.primary-nav a:hover { color: var(--text); }

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transition: right var(--duration-base) var(--ease-out-soft);
}

.primary-nav a:hover::after { right: 0; }

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

@media (min-width: 880px) {
  .primary-nav { display: inline-flex; }
  .header-cta { margin-left: 0; }
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255, 122, 69, 0.04));
}

.footer-grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
  padding-bottom: 4rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 3.5rem;
  }
}

.footer-tag {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 1rem 0 0;
  max-width: 24ch;
  line-height: 1.4;
}

.site-footer h4 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-quiet);
  font-family: var(--font-mono);
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.site-footer nav a {
  transition: color var(--duration-fast) ease;
}

.site-footer nav a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-quiet);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(92, 224, 168, 0.16);
}

/* ─── Mobile responsive (≤639px) ─────────────────────────────────────── */
@media (max-width: 639px) {
  .site-header {
    gap: 0.5rem;
    padding: 0.65rem 1rem;
  }

  /* Hide "Sign in" link on very small screens to prevent header overflow */
  .link-quiet { display: none; }

  .site-footer {
    padding-top: 3.5rem;
  }

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