/* Site shell — Ink & Ember */

#site-header:empty,
#site-footer:empty {
  min-height: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  margin: 0;
  max-width: none;
  padding: 0;
}
.site-header.is-scrolled,
body[data-page="security"] .site-header {
  border-bottom-color: rgba(29, 29, 31, 0.06);
  background: rgba(255, 255, 255, 0.78);
}

.site-header-inner {
  max-width: var(--content, 1120px);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header .header-nav a.nav-active,
.site-header .header-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}
.site-header .header-nav a.nav-active::after,
.site-header .header-nav a[aria-current="page"]::after {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.site-header.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15, 20, 25, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.mobile-nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 510;
  width: min(300px, 85vw);
  padding: calc(72px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(15, 20, 25, 0.14);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.mobile-nav-panel.is-open { transform: translateX(0); }
.mobile-nav-panel a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 650;
  padding: 12px 10px;
  border-radius: 12px;
}
.mobile-nav-panel a:hover,
.mobile-nav-panel a.nav-active { background: var(--accent-soft); }
.mobile-nav-label {
  margin: 16px 10px 4px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.mobile-nav-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-hi);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}
.mobile-nav-panel .btn-primary {
  margin-top: 16px;
  justify-content: center;
}

body.nav-open { overflow: hidden; }

.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  background: #0f1419;
  color: #c5cad1;
  padding: 52px 24px 28px;
}
.site-footer-grid {
  max-width: 1120px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}
.footer-brand img {
  height: 36px;
  width: auto;
  display: block;
  margin-bottom: 12px;
  filter: brightness(1.15);
}
.footer-brand p {
  color: #9aa3ad;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8490;
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  color: #e8eaef;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 550;
  padding: 5px 0;
}
.footer-col a:hover { color: #ff8a5c; }
.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #7a8490;
}
.footer-bottom a { color: #9aa3ad; text-decoration: none; }
.footer-bottom a:hover { color: #ff8a5c; }

@media (max-width: 900px) {
  .site-header .header-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-badge { display: none; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-header-inner { padding: 12px 16px; }
  .site-footer-grid { grid-template-columns: 1fr; }
  .header-cta { display: none; }
}
