/* =========================================================
   layout.css — header/nav, footer, grid utilities
   ========================================================= */

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease, backdrop-filter 300ms ease;
}
.site-header.scrolled {
  background: var(--surface);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  width: min(var(--container), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  gap: 1.5rem;
}

.nav__brand {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; letter-spacing: 0.14em; font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.nav__brand span { color: var(--gold); font-weight: 300; }
.nav__brand img { height: 28px; width: auto; }

.nav__links {
  display: flex; align-items: center; gap: 2rem;
}
.nav__links a {
  font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--gold);
  transition: width 250ms ease;
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { width: 100%; }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--gold); }

.nav__actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent; color: var(--gold);
  display: grid; place-items: center;
  cursor: pointer; transition: all 250ms ease;
  font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--gold); background: var(--surface-alt); }

/* hamburger */
.nav__hamburger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  cursor: pointer; border-radius: 4px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__hamburger span {
  display: block; width: 20px; height: 1.5px; background: var(--text);
  transition: transform 250ms ease, opacity 250ms ease;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile overlay */
.nav__overlay {
  position: fixed; inset: var(--nav-height) 0 0 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.6rem; padding: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity 300ms ease;
  z-index: 99;
}
.nav__overlay.is-open { opacity: 1; pointer-events: auto; }
.nav__overlay a {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: 0.06em; color: var(--text);
  opacity: 0; transform: translateY(12px);
  transition: opacity 300ms ease, transform 300ms ease, color 250ms ease;
}
.nav__overlay.is-open a { opacity: 1; transform: translateY(0); }
.nav__overlay a:hover { color: var(--gold); }

/* ---------- FOOTER ---------- */
.site-footer {
  background: #050505; /* always black — anchors brand */
  color: #B8B2A5;
  padding: 4rem 0 0;
  border-top: 1px solid rgba(216,179,90,0.15);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer__brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; letter-spacing: 0.16em; color: #F8F4EA;
}
.footer__brand em { color: var(--gold); font-style: normal; font-weight: 300; }
.footer__tagline { margin-top: 0.6rem; font-size: 0.9rem; color: #8A857C; line-height: 1.6; }
.footer__heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.footer__links a, .footer__contact li {
  font-size: 0.9rem; line-height: 2; color: #B8B2A5;
  transition: color 200ms ease;
}
.footer__links a:hover { color: var(--gold); }
.footer__socials { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.footer__socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(216,179,90,0.35);
  display: grid; place-items: center;
  color: var(--gold); font-size: 0.85rem;
  transition: all 250ms ease;
}
.footer__socials a:hover { background: var(--gold); color: #050505; border-color: var(--gold); }

.newsletter { display: flex; gap: 0; border-bottom: 1px solid rgba(216,179,90,0.35); margin-top: 0.4rem; }
.newsletter input {
  flex: 1; background: transparent; border: none; color: #F8F4EA;
  padding: 0.7rem 0; font-family: 'Montserrat', sans-serif; font-size: 0.9rem;
}
.newsletter input::placeholder { color: #6B665C; }
.newsletter input:focus { outline: none; }
.newsletter button {
  background: transparent; border: none; color: var(--gold);
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; cursor: pointer; padding-left: 0.6rem;
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.2rem 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.8rem; color: #6B665C;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav__links, .nav__actions .btn--nav { display: none; }
  .nav__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  :root { --gutter: 18px; }
}
