/* ============================================
   H&O Living — Site Chrome (Header / Footer / Nav)
   ============================================ */

/* ── Header ─────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem var(--pad-x);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  transition: padding 0.4s var(--ease-out), background 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header[data-scrolled="true"] {
  padding-block: 0.75rem;
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  border-bottom-color: var(--line);
}

.brand {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__amp { color: var(--accent); font-style: italic; font-weight: 400; }

.site-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: var(--fs-sm);
}
.site-nav a {
  color: var(--ink-muted);
  padding-block: 0.5rem;
  position: relative;
  transition: color 0.25s ease;
}
.site-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 0.25rem 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-cta {
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: background 0.25s ease, transform 0.25s ease;
}
.header-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out), opacity 0.2s ease;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 26px; }
body[data-menu-open="true"] .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body[data-menu-open="true"] .menu-toggle span:nth-child(2) { opacity: 0; }
body[data-menu-open="true"] .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile menu overlay ─────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 40;
  padding: 6rem var(--pad-x) 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
body[data-menu-open="true"] .mobile-menu {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-menu a {
  font-size: clamp(2rem, 8vw, 3.5rem);
  letter-spacing: -0.03em;
  font-weight: 500;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
body[data-menu-open="true"] .mobile-menu a {
  opacity: 1;
  transform: translateY(0);
}
body[data-menu-open="true"] .mobile-menu a:nth-child(1) { transition-delay: 0.05s; }
body[data-menu-open="true"] .mobile-menu a:nth-child(2) { transition-delay: 0.1s; }
body[data-menu-open="true"] .mobile-menu a:nth-child(3) { transition-delay: 0.15s; }
body[data-menu-open="true"] .mobile-menu a:nth-child(4) { transition-delay: 0.2s; }
body[data-menu-open="true"] .mobile-menu a:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu a span { color: var(--accent); font-size: var(--fs-xs); }
.mobile-menu__foot {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  color: var(--mute);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ── Footer ───────────────────────────────── */
.site-footer {
  padding: 5rem var(--pad-x) 2rem;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.footer-brand p {
  font-size: var(--fs-sm);
  color: var(--mute);
  margin-top: 1rem;
  max-width: 20rem;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: 0.65rem; }
.footer-col a { transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent-hover); }
.footer-legal {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--mute);
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-legal { flex-direction: column; gap: 0.5rem; }
}
