.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section--tight-top {
  padding-top: 60px;
  padding-bottom: 0;
}

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--header-h);
  transform: translateY(0);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), height 0.4s var(--ease), box-shadow 0.4s var(--ease);
  background: transparent;
}

.site-header.is-sticky {
  height: 70px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

/* Content sits under fixed header; heroes are full-bleed behind it */
main {
  position: relative;
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.site-header__logo {
  justify-self: start;
}

.site-header__nav {
  justify-self: center;
}

.site-header__panel-btn {
  justify-self: end;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: inherit;
}

.site-header__mobile-btn {
  display: none;
  justify-self: end;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--c-ink);
}

.logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
  max-height: 46px;
}

.logo--light { color: var(--c-white); }
.logo--dark { color: var(--c-ink); }

.brand-logo {
  display: inline-flex;
  align-items: center;
  position: relative;
  line-height: 0;
  flex-shrink: 0;
  min-width: 118px;
  min-height: 36px;
}

.brand-logo__img {
  display: block;
  height: 36px;
  width: auto;
  max-height: 42px;
  max-width: 168px;
  object-fit: contain;
  object-position: left center;
}

.brand-logo__img--light {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

body.header-light .site-header:not(.is-sticky) .brand-logo__img--dark {
  opacity: 0;
}
body.header-light .site-header:not(.is-sticky) .brand-logo__img--light {
  opacity: 1;
}
body.header-light .site-header.is-sticky .brand-logo__img--light,
body.header-dark .site-header .brand-logo__img--light {
  opacity: 0;
}
body.header-light .site-header.is-sticky .brand-logo__img--dark,
body.header-dark .site-header .brand-logo__img--dark {
  opacity: 1;
}

/* Mobile header is always white — never show the light logo */
@media (max-width: 1024px) {
  body.header-light .site-header .brand-logo__img--light,
  body.header-light .site-header:not(.is-sticky) .brand-logo__img--light {
    opacity: 0 !important;
    visibility: hidden !important;
  }
  body.header-light .site-header .brand-logo__img--dark,
  body.header-light .site-header:not(.is-sticky) .brand-logo__img--dark {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .brand-logo {
    min-width: 104px;
    min-height: 30px;
  }
  .brand-logo__img {
    height: 28px;
    max-height: 30px;
  }
  .site-header__inner {
    padding: 0 18px 0 16px;
    align-items: center;
  }
}

.brand-logo--footer img {
  height: 42px;
  width: auto;
  margin: 0;
}

.side-panel__logo img {
  height: 40px;
  width: auto;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  position: relative;
}

.brand-mark__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-mark__the {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin-bottom: 5px;
  opacity: 0.72;
}

.brand-mark__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-mark--footer {
  align-items: center;
  text-align: center;
}

.brand-mark--footer .brand-mark__the,
.brand-mark--footer .brand-mark__name {
  width: 100%;
  text-align: center;
}

.brand-mark--footer .brand-mark__name {
  font-size: 28px;
  letter-spacing: 0.28em;
}

.brand-mark--panel .brand-mark__the {
  color: rgba(229, 231, 226, 0.65);
}

.brand-mark--panel .brand-mark__name {
  color: #E5E7E2;
  font-size: 24px;
}

body.header-light .site-header:not(.is-sticky) {
  color: var(--c-white);
}

body.header-light .site-header:not(.is-sticky) .brand-mark__inner--dark,
body.header-light .site-header.is-sticky .brand-mark__inner--light,
body.header-dark .site-header:not(.is-sticky) .brand-mark__inner--light {
  display: none;
}

body.header-light .site-header:not(.is-sticky) .brand-mark__inner--light,
body.header-light .site-header.is-sticky .brand-mark__inner--dark,
body.header-dark .site-header:not(.is-sticky) .brand-mark__inner--dark {
  display: flex;
}

body.header-light .site-header.is-sticky,
body.header-dark .site-header:not(.is-sticky) {
  color: var(--c-ink);
}

body.header-light .site-header.is-sticky .brand-mark__the {
  color: var(--c-taupe);
}

body.header-light .site-header.is-sticky .brand-mark__name {
  color: var(--c-ink);
}

.nav-list {
  display: flex;
  gap: 34px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: 3.3px;
  text-transform: uppercase;
  position: relative;
  transition: color var(--dur-fast) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--c-stone);
}

.nav-link:hover::after {
  width: 100%;
}

.icon-hamburger,
.icon-list-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.icon-hamburger i,
.icon-list-hamburger span {
  display: block;
  height: 1px;
  background: currentColor;
  width: 100%;
}

.icon-list-hamburger {
  width: 28px;
  position: relative;
}

.icon-list-hamburger span::before {
  content: "";
  position: absolute;
  left: -8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  margin-top: -1px;
}

/* Mobile header — solid white bar so dark logo stays readable */
@media (max-width: 1024px) {
  .site-header,
  body.header-light .site-header,
  body.header-light .site-header:not(.is-sticky),
  body.header-light .site-header.is-sticky {
    background: #fff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--c-ink) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  }

  .site-header.is-sticky {
    height: 60px;
  }

  .site-header__nav,
  .site-header__panel-btn {
    display: none;
  }

  .site-header__mobile-btn {
    display: block;
    color: var(--c-ink) !important;
  }

  .site-header__inner {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
    align-items: center;
  }

  body.header-light .site-header .brand-mark__inner--light { display: none; }
  body.header-light .site-header .brand-mark__inner--dark { display: flex; color: var(--c-ink); }
  body.header-light .site-header .brand-mark__name { color: var(--c-ink); font-size: 18px; }
  body.header-light .site-header .brand-mark__the { color: var(--c-taupe); }

  body.header-light .site-header .brand-logo__img--light {
    opacity: 0 !important;
    visibility: hidden !important;
  }
  body.header-light .site-header .brand-logo__img--dark {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .brand-logo__img { height: 28px; max-height: 30px; }

  .logo { font-size: 18px; max-height: 32px; }
}

/* —— Mobile menu —— */
.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 0;
  overflow: hidden;
  background: var(--c-white);
  z-index: 99;
  transition: height 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu.is-open {
  height: calc(100vh - 60px);
  height: calc(100svh - 60px);
}

.mobile-menu[hidden] {
  display: flex;
}

.mobile-menu__list {
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mobile-menu__list a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 4.2px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.mobile-menu.is-open .mobile-menu__list a {
  opacity: 1;
  transform: none;
}

.mobile-menu__meta {
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  font-family: var(--font-display);
  font-size: 18px;
}

/* —— Side panel —— */
.sidepanel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.sidepanel-overlay.is-visible {
  opacity: 1;
}

.sidepanel-overlay[hidden] {
  display: block;
  pointer-events: none;
}

/* Clip shell so the closed drawer never widens the page (iOS Safari gutter bug) */
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(405px, 100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--c-ink);
  color: #E5E7E2;
  padding: 60px 42px 30px 41px;
  z-index: 210;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.5s var(--ease), visibility 0s linear 0.5s;
  overflow-x: hidden;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
  contain: strict;
  will-change: transform;
}

.side-panel.is-open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.5s var(--ease), visibility 0s linear 0s;
}

@media (max-width: 767px) {
  .side-panel:not(.is-open) {
    /* Collapse closed drawer so it cannot create a right-side page gutter */
    width: 0;
    max-width: 0;
    padding: 0;
    border: 0;
    transform: none;
    overflow: hidden;
  }
}

.side-panel__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: 0;
  color: #E5E7E2;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}

.side-panel__close:hover {
  transform: rotate(90deg);
}

.side-panel__logo {
  margin-bottom: 28px;
  color: #E5E7E2;
}

.side-panel__blurb {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 25px;
  margin-bottom: 36px;
  max-width: 280px;
}

.side-panel__block {
  margin-bottom: 28px;
}

.side-panel__block .label {
  color: rgba(229, 231, 226, 0.55);
  margin-bottom: 4px;
}

.side-panel__block a {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: #E5E7E2;
}

/* —— Footer —— */
.site-footer {
  position: relative;
  color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(196, 162, 90, 0.12), transparent 55%),
    linear-gradient(165deg, #1c1e1a 0%, #0f100e 48%, #161814 100%);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1.4fr;
  gap: clamp(40px, 6vw, 96px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) var(--pad-x) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__brand {
  max-width: 420px;
}

.site-footer__logo {
  display: inline-flex;
  margin-bottom: 28px;
}

.site-footer__tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 28px;
}

.site-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-gold);
  border-bottom: 1px solid rgba(196, 162, 90, 0.45);
  padding-bottom: 6px;
  transition: color var(--dur-fast), border-color var(--dur-fast), gap var(--dur-fast);
}

.site-footer__cta:hover {
  color: #e2c37a;
  border-color: rgba(226, 195, 122, 0.8);
  gap: 14px;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-content: start;
  padding-top: 8px;
}

.site-footer__heading {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 18px;
}

.site-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__nav a,
.site-footer__social a,
.site-footer__link {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.86);
  transition: color var(--dur-fast);
}

.site-footer__nav a:hover,
.site-footer__social a:hover,
.site-footer__link:hover {
  color: var(--c-gold);
}

.site-footer__text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 14px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad-x) 28px;
}

.site-footer__bottom p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.site-footer__credit {
  letter-spacing: 0.06em !important;
  text-transform: none !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.32) !important;
}

@media (max-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .site-footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .site-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .site-footer__nav a,
  .site-footer__social a,
  .site-footer__link {
    font-size: 16px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 36px;
  }

  .brand-logo--footer img {
    height: 36px;
  }
}
