/* Shared navigation: a fixed, static white bar. Desktop: logo left, links and
   the License button right. It never collapses on scroll. Up to 720px the links
   move into the drawer menu; the License button stays in the bar next to the
   hamburger. */

body { padding-top: var(--site-header-height, 72px); }
@media (max-width: 720px) { body { padding-top: 64px; } }
body.menu-open { overflow: hidden; }

.site-header {
  --site-header-height: 72px;
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  right: 0;
  height: var(--site-header-height);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  color: #000;
  background: #fff;
  border-bottom: 1px solid var(--line, #ebe8e4);
  font-family: var(--body);
  line-height: 1.5;
}
.header-shell {
  width: 100%;
  max-width: var(--content, 1248px);
  min-width: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 32px);
  position: relative;
}
.header-left {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  padding: 0;
  color: #000;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s ease;
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(0,0,0,.06);
  outline: none;
}
.menu-icon {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-icon span {
  width: 100%;
  height: 2px;
  min-height: 2px;
  flex: 0 0 2px;
  display: block;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
  transition: transform .3s ease, opacity .2s ease;
}
body.menu-open .menu-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-icon span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
body.menu-open .menu-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  text-decoration: none;
}
.brand img {
  width: clamp(124px, 10vw, 150px);
  height: auto;
}
.nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 28px);
  margin: 0 auto; /* centred between the logo and the License button */
}
/* Wide screens: links sit on the true centre of the bar. */
@media (min-width: 1100px) {
  .nav {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    translate: -50% -50%;
  }
  .nav-cta { margin-left: auto; }
}
.nav > a {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .8px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav > a:not(.nav-cta):hover { text-decoration: underline; text-underline-offset: 6px; }
/* The one red button in the bar. */
.nav-cta {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(12px, 1.2vw, 16px);
  color: white;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .8px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, scale .32s cubic-bezier(.2,.8,.2,1);
}
.nav-cta:hover,
.nav-cta:focus-visible {
  background: #141414;
  border-color: #141414;
  outline: none;
}
@media (hover: hover) and (pointer: fine) {
  .nav-cta:hover {
    scale: 1.06;
    transition: background-color .2s ease, border-color .2s ease, scale .52s cubic-bezier(.34,1.9,.5,1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-cta:hover { scale: 1; }
}
/* Tablet: same bar, tighter type so logo, six links and the button share one row. */
@media (min-width: 721px) and (max-width: 960px) {
  .header-shell { gap: 12px; }
  .brand img { width: 112px; }
  .nav { gap: 10px; }
  .nav > a { font-size: 12px; letter-spacing: .4px; }
  .nav-cta { min-height: 36px; padding: 0 12px; font-size: 12px; letter-spacing: .5px; }
}

body.menu-open .site-header {
  opacity: 0;
  pointer-events: none;
}
.menu-overlay {
  position: fixed;
  z-index: 260;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background-color .45s ease, visibility 0s linear .76s;
}
.menu-drawer {
  --menu-last: 2; /* highest --menu-order in shared/header.html; used to reverse the close stagger */
  width: min(84vw, 1180px);
  height: 100dvh;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  padding: 28px clamp(28px, 4vw, 64px) 32px;
  color: #fff;
  background: #141414;
  font-family: var(--body);
  line-height: 1.5;
  border-radius: 0 24px 24px 0;
  box-shadow: 24px 0 64px rgba(0,0,0,.12);
  transform: translateX(-104%);
  transition: transform .76s cubic-bezier(.76,0,.24,1);
}
body.menu-open .menu-overlay {
  visibility: visible;
  background: rgba(0,0,0,.045);
  pointer-events: auto;
  transition-delay: 0s;
}
body.menu-open .menu-drawer { transform: translateX(0); }
/* Closing (base state): fade out on an ease-in while the drawer starts its
   slide, so the content leaves with the panel instead of before it. The
   offset snaps back only once the drawer is off screen. */
.menu-topbar {
  display: grid;
  grid-template-columns: 44px minmax(120px, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .32s cubic-bezier(.4,0,1,1) .1s, transform 0s linear .8s;
}
body.menu-open .menu-topbar {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .35s ease .24s, transform .5s cubic-bezier(.2,.8,.2,1) .24s;
}
.menu-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  position: relative;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.menu-close::before,
.menu-close::after {
  content: "";
  width: 24px;
  height: 2px;
  position: absolute;
  background: currentColor;
  border-radius: 999px;
}
.menu-close::before { transform: rotate(31deg); }
.menu-close::after { transform: rotate(-31deg); }
.menu-drawer-brand {
  width: fit-content;
  display: block;
  padding: 8px 0;
}
.menu-drawer-brand img {
  width: clamp(128px, 13vw, 168px);
  height: auto;
  filter: brightness(0) invert(1);
}
.menu-actions { display: flex; align-items: center; }
.menu-mail {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #111;
  background: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.menu-mail-icon { width: 19px; height: 19px; display: block; }
.menu-mail:hover,
.menu-mail:focus-visible { color: #141414; background: rgba(255,255,255,.72); outline: none; }
.menu-pages {
  display: grid;
  grid-template-columns: minmax(220px, .62fr) minmax(0, 1.38fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  margin-top: clamp(40px, 6vh, 72px);
}
/* Closing (base state): columns fade in reverse order of their entrance,
   all gone by ~480ms, while the drawer (760ms) carries them out. */
.menu-main-list,
.menu-directory-group {
  min-width: 0;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .36s cubic-bezier(.4,0,1,1) calc((var(--menu-last, 2) - var(--menu-order, 0)) * 60ms),
    transform 0s linear .8s;
}
body.menu-open .menu-main-list,
body.menu-open .menu-directory-group {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .42s ease, transform .58s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(300ms + var(--menu-order) * 70ms);
}
.menu-main-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(12px, 1.8vh, 20px);
}
.menu-main-list .menu-primary { font-size: clamp(27px, 2.7vw, 40px); }
.menu-main-list .menu-shop-link { color: #fff; }
.menu-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-left: clamp(32px, 5vw, 72px);
  border-left: 1px solid rgba(255,255,255,.18);
}
.menu-directory .menu-label { margin-bottom: 18px; font-size: 16px; }
.menu-directory .menu-links { gap: 8px; }
.menu-directory .menu-secondary { font-size: 14px; }
.menu-column {
  min-width: 0;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .36s cubic-bezier(.4,0,1,1) calc((var(--menu-last, 2) - var(--menu-order, 0)) * 60ms),
    transform 0s linear .8s;
}
body.menu-open .menu-column {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .42s ease, transform .58s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(300ms + var(--menu-order) * 70ms);
}
.menu-primary {
  width: fit-content;
  display: block;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: -.6px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.menu-group { margin-top: clamp(40px, 5vh, 64px); }
.menu-group--compact { margin-top: 34px; }
.menu-label {
  width: fit-content;
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}
.menu-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.menu-secondary {
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-decoration: none;
}
.menu-primary:hover,
.menu-primary:focus-visible,
.menu-label:hover,
.menu-label:focus-visible,
.menu-secondary:hover,
.menu-secondary:focus-visible {
  color: rgba(255,255,255,.62);
  outline: none;
}
.menu-drawer a[aria-current="page"],
.menu-drawer a[aria-current="location"] {
  color: #fff;
  text-decoration-line: underline;
  text-decoration-color: rgba(255,255,255,.64);
  text-decoration-thickness: 2px;
  text-underline-offset: .24em;
}
.menu-close:focus-visible,
.menu-drawer-brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.nav a[aria-current="page"],
.nav a[aria-current="location"] { text-decoration: underline; text-underline-offset: 6px; }

.brand:focus-visible,
.nav a:focus-visible,
.nav-cta:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid var(--ink, #141414);
  outline-offset: 3px;
}
.nav-cta:focus-visible { outline-color: #000; }

/* Mobile: logo left, License button and hamburger right; links live in the drawer. */
@media (max-width: 720px) {
  .site-header { --site-header-height: 64px; padding-inline: 16px; }
  .header-shell { gap: 10px; }
  .header-left { display: contents; }
  .brand { order: 1; min-width: 0; margin-right: auto; }
  .brand img { width: clamp(96px, 28vw, 122px); }
  .nav { display: none; }
  .nav-cta { order: 2; min-height: 38px; padding: 0 12px; font-size: 12px; letter-spacing: .5px; }
  .menu-toggle { order: 3; display: grid; width: 42px; height: 42px; }
}

@media (max-width: 900px) {
  .menu-pages { gap: 28px; }
  .menu-primary { font-size: clamp(26px, 3.8vw, 34px); }
  .menu-secondary { font-size: 12px; }
}

@media (max-width: 720px) {
  .menu-topbar { grid-template-columns: 40px minmax(104px, 1fr) auto; gap: 14px; }
  .menu-close { width: 38px; height: 38px; }
  .menu-drawer-brand img { width: clamp(112px, 31vw, 148px); }
  .menu-mail { width: 38px; height: 38px; }
  .menu-pages { grid-template-columns: 1fr; gap: 36px; margin-top: 40px; }
  .menu-directory { padding-top: 32px; padding-left: 0; border-top: 1px solid rgba(255,255,255,.18); border-left: 0; }
  .menu-primary { font-size: clamp(27px, 7vw, 36px); }
  .menu-group { margin-top: 36px; }
  .menu-group--compact { margin-top: 28px; }
}

@media (max-width: 640px) {
  .menu-drawer { width: 100%; padding: 20px 24px 28px; border-radius: 0; }
}

@media (max-width: 520px) {
  .menu-directory { grid-template-columns: 1fr; }
}

/* Honor the live preference class as well as the OS setting. No stagger remains. */
html.vp-reduced-motion { scroll-behavior: auto !important; }
html.vp-reduced-motion *,
html.vp-reduced-motion *::before,
html.vp-reduced-motion *::after {
  transition: none !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  animation: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  scroll-behavior: auto !important;
}
html.vp-reduced-motion .scroll-reveal,
html.vp-reduced-motion .scroll-reveal.is-revealed {
  opacity: 1;
  transform: none;
}
html.vp-reduced-motion .pointer-parallax-target {
  translate: none !important;
  rotate: none !important;
  scale: 1 !important;
  will-change: auto;
}
html.vp-reduced-motion .property-card.quack .quack-parallax .quack-layer {
  transform: scale(1.02);
  will-change: auto;
}
html.vp-reduced-motion [data-scramble].is-scramble-awaiting {
  color: inherit !important;
  text-shadow: inherit !important;
}
html.vp-reduced-motion .menu-motif-visual { display: none !important; }
html.vp-reduced-motion .menu-motif-reserve { visibility: visible !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    transition: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .pointer-parallax-target {
    rotate: none !important;
    will-change: auto;
  }
}
