/* ============================================================
   Handle · Shared Layout (header, footer, nav)
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 245, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  background: var(--sky-tint);
  color: var(--sky-dark);
}

.main-nav a.active {
  background: var(--ink);
  color: var(--paper);
}

.nav-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -7px;
}

.nav-toggle span::after {
  position: absolute;
  top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Footer --- */

.site-footer {
  background: var(--ink);
  color: rgba(251, 250, 245, 0.7);
  padding: 56px 0 28px;
  margin-top: 120px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(251, 250, 245, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer-tagline {
  max-width: 320px;
  font-size: 14px;
  margin-top: 10px;
  color: rgba(251, 250, 245, 0.55);
}

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

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: rgba(251, 250, 245, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-col a, .footer-col p {
  display: block;
  font-size: 14px;
  color: rgba(251, 250, 245, 0.75);
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--sky);
}

.footer-bottom {
  padding-top: 24px;
  font-size: 13px;
  color: rgba(251, 250, 245, 0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Responsive nav --- */

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 20px var(--gutter);
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav a {
    text-align: center;
    padding: 14px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
  }
}
