/* Final unlayered header cascade. This file intentionally loads after legacy styles. */
[data-site-header] {
  --header-dark-capsule-radius: 999px;
  --header-surface: linear-gradient(135deg, rgb(7 10 13 / .88), rgb(25 29 34 / .72));
  --header-ink: #fffdf8;
  --header-border: rgb(239 212 160 / .24);
  --header-wordmark-font: var(--serif);
  align-items: center !important;
  backdrop-filter: blur(18px);
  background: var(--header-surface) !important;
  border: 1px solid var(--header-border) !important;
  border-radius: var(--header-dark-capsule-radius) !important;
  box-shadow: 0 16px 44px rgb(0 0 0 / .24) !important;
  color: var(--header-ink) !important;
  display: flex !important;
  gap: 14px !important;
  inset: 18px auto auto 50% !important;
  justify-content: space-between !important;
  min-height: 72px !important;
  min-width: 0;
  padding: 10px 16px !important;
  position: fixed !important;
  transform: translateX(-50%) !important;
  width: min(1320px, calc(100% - 48px)) !important;
  z-index: 9000 !important;
}

[data-site-header][data-header-theme="light"] {
  --header-surface: linear-gradient(135deg, rgb(255 253 248 / .92), rgb(245 240 231 / .78));
  --header-ink: #141519;
  --header-border: rgb(20 21 25 / .1);
}

[data-site-header]::before,
[data-site-header]::after {
  display: none !important;
}

[data-site-header] .editorial-wordmark {
  color: #f4e6c8 !important;
  font-family: var(--header-wordmark-font) !important;
  font-size: clamp(1.05rem, 1.5vw, 1.38rem) !important;
  font-weight: 500 !important;
  letter-spacing: .2em !important;
  line-height: 1 !important;
  margin-right: auto !important;
  text-decoration: none !important;
  white-space: nowrap;
}

[data-site-header][data-header-theme="light"] .editorial-wordmark {
  color: #1c1b18 !important;
}

[data-site-header] .language-current {
  align-items: center;
  background: rgb(255 255 255 / .08) !important;
  border: 1px solid rgb(239 212 160 / .26) !important;
  border-radius: 999px !important;
  color: inherit !important;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
  padding: 0 13px;
}

[data-site-header] .editorial-contact-actions {
  align-items: center !important;
  display: flex !important;
  gap: 8px !important;
}

[data-site-header] .editorial-icon-action {
  align-items: center !important;
  background: rgb(255 255 255 / .08) !important;
  border: 1px solid rgb(239 212 160 / .26) !important;
  border-radius: 50% !important;
  color: inherit !important;
  display: inline-flex !important;
  height: 44px !important;
  justify-content: center !important;
  min-width: 44px !important;
  padding: 0 !important;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
  width: 44px !important;
}

[data-site-header] .editorial-icon-action:hover,
[data-site-header] .editorial-icon-action:focus-visible {
  background: rgb(239 212 160 / .18) !important;
  border-color: rgb(239 212 160 / .68) !important;
  color: #fff7e3 !important;
  transform: translateY(-1px);
}

[data-site-header] .editorial-icon-action[data-glass-contact-icon] {
  background: linear-gradient(135deg, #d8b36f, #f1d693) !important;
  border-color: rgb(255 241 205 / .9) !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / .2) !important;
  overflow: hidden;
}

[data-site-header] .editorial-icon-action[data-glass-contact-icon] svg {
  display: block;
  fill: #17181b !important;
  height: 20px;
  pointer-events: none;
  stroke: none !important;
  width: 20px;
}

[data-site-header] .editorial-icon-action[data-glass-contact-icon] svg path {
  fill: #17181b !important;
  stroke: none !important;
}

[data-site-header] .editorial-icon-action[data-glass-contact-icon]:hover,
[data-site-header] .editorial-icon-action[data-glass-contact-icon]:focus-visible {
  filter: brightness(1.06);
}

[data-site-header] .editorial-contact-cta {
  align-items: center !important;
  background: linear-gradient(135deg, #d8b36f, #f1d693) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: #17181b !important;
  display: inline-flex !important;
  font-size: .76rem !important;
  font-weight: 800 !important;
  justify-content: center !important;
  letter-spacing: .05em;
  min-height: 44px !important;
  padding: 13px 20px !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: filter 180ms ease-out, transform 180ms ease-out;
  visibility: visible !important;
  white-space: nowrap;
}

[data-site-header] .editorial-contact-cta:hover,
[data-site-header] .editorial-contact-cta:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

body:has(.editorial-hero) [data-site-header] {
  --header-dark-capsule-radius: var(--homepage-surface-radius);
}

@media (max-width: 767px) {
  /* Mobile header: one compact utility row, followed by the single conversion action. */
  body:has(.editorial-hero) [data-site-header] {
    --header-surface: #f1ede2;
    --header-ink: #102a53;
    --header-border: rgb(16 42 83 / .24);
    --header-mobile-action-columns: repeat(3, 32px);
    background: var(--header-surface) !important;
    box-shadow: 0 8px 18px rgb(16 42 83 / .1) !important;
    display: grid !important;
    gap: 8px 4px !important;
    grid-template-columns: minmax(0, 1fr) 46px var(--header-mobile-action-columns);
    inset: 10px auto auto 50% !important;
    min-height: 0 !important;
    padding: 10px !important;
    width: min(100% - 20px, 460px) !important;
  }

  [data-site-header] .editorial-wordmark {
    color: #102a53 !important;
    font-size: clamp(.8rem, 3.8vw, 1rem) !important;
    grid-column: 1;
    grid-row: 1;
    letter-spacing: .1em !important;
    margin-right: 0 !important;
    overflow: hidden;
  }

  [data-site-header] .language-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
  }

  [data-site-header] .language-current {
    background: #e8ddc8 !important;
    border-color: rgb(16 42 83 / .24) !important;
    color: #102a53 !important;
    font-size: .62rem;
    gap: 3px;
    min-height: 32px;
    padding: 0;
    width: 46px;
  }

  [data-site-header] .editorial-contact-actions {
    display: contents !important;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action {
    background: #102a53 !important;
    background-color: #102a53 !important;
    background-image: none !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
    grid-row: 1;
    height: 32px !important;
    min-height: 32px !important;
    min-width: 32px !important;
    width: 32px !important;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon] {
    background: #102a53 !important;
    background-color: #102a53 !important;
    background-image: none !important;
    border-color: #102a53 !important;
    box-shadow: none !important;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon="whatsapp"] {
    grid-column: 3;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon="telegram"] {
    grid-column: 4;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon="telephone"] {
    grid-column: 5;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon] svg {
    fill: #f7f5ef !important;
    height: 15px;
    width: 15px;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon] svg path {
    fill: #f7f5ef !important;
  }

  [data-site-header] .editorial-contact-cta {
    background: #102a53 !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
    font-size: .68rem !important;
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 42px !important;
    padding: 10px 13px !important;
    width: 100%;
  }

  body:has(.editorial-hero) .editorial-hero {
    background: #f1ede2;
    color: #102a53;
    padding-top: 132px !important;
  }

  body:has(.editorial-hero) .editorial-hero-media {
    border-color: rgb(16 42 83 / .3);
    box-shadow: 0 8px 20px rgb(16 42 83 / .12);
  }

  body:has(.editorial-hero) .editorial-hero-media::after {
    background: linear-gradient(180deg, transparent 56%, rgb(16 42 83 / .72));
  }

  body:has(.editorial-hero) .editorial-hero-copy h1 {
    color: #102a53 !important;
    font-size: clamp(2rem, 10vw, 2.8rem) !important;
    font-weight: 500 !important;
    letter-spacing: -.02em;
    line-height: .98 !important;
  }

  body:has(.editorial-hero) .editorial-hero-copy li {
    color: #102a53;
  }

  body:has(.editorial-hero) .editorial-hero-copy li::before {
    background: #c79a4b;
  }

  body:has(.editorial-hero) .editorial-hero-concierge {
    background: transparent;
    border-color: rgb(16 42 83 / .48);
    color: #102a53;
  }

  body:has(.editorial-hero) .editorial-hero-select-property {
    align-items: center;
    background: #c79a4b;
    border: 1px solid #c79a4b;
    border-radius: 999px;
    color: #102a53 !important;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: .08em;
    min-height: 48px;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: filter 180ms ease-out, transform 180ms ease-out;
  }

  body:has(.editorial-hero) .editorial-hero-select-property:hover,
  body:has(.editorial-hero) .editorial-hero-select-property:focus-visible {
    filter: brightness(1.07);
    transform: translateY(-2px);
  }

  body:has(.editorial-hero) .editorial-hero-contact {
    background: #102a53;
    border-color: #102a53;
    color: #f7f5ef !important;
  }
}

/* Desktop-only palette drawn from the private-offer form: warm cream, deep green and muted brass. */
@media (min-width: 768px) {
  body:has(.editorial-hero) [data-site-header] {
    --header-surface: linear-gradient(135deg, rgb(250 249 245 / .98), rgb(241 237 226 / .94));
    --header-ink: #102a53;
    --header-border: rgb(16 42 83 / .24);
    box-shadow: 0 16px 40px rgb(16 42 83 / .12) !important;
  }

  body:has(.editorial-hero) [data-site-header] .editorial-wordmark,
  body:has(.editorial-hero) [data-site-header] .language-current {
    color: #102a53 !important;
  }

  body:has(.editorial-hero) [data-site-header] .language-current {
    background: rgb(241 237 226 / .82) !important;
    border-color: rgb(16 42 83 / .24) !important;
  }

  body:has(.editorial-hero) [data-site-header] .editorial-icon-action[data-glass-contact-icon],
  body:has(.editorial-hero) [data-site-header] .editorial-contact-cta {
    background: #102a53 !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
  }

  body:has(.editorial-hero) [data-site-header] .editorial-icon-action[data-glass-contact-icon] svg,
  body:has(.editorial-hero) [data-site-header] .editorial-icon-action[data-glass-contact-icon] svg path {
    fill: #f7f5ef !important;
  }

  body:has(.editorial-hero) .editorial-hero {
    align-items: center;
    background: #f1ede2;
    color: #102a53;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body:has(.editorial-hero) .editorial-hero-media {
    border-color: rgb(16 42 83 / .3);
    box-shadow: 0 24px 60px rgb(16 42 83 / .16);
  }

  body:has(.editorial-hero) .editorial-hero-copy {
    max-width: 620px;
  }

  body:has(.editorial-hero) .editorial-hero-copy h1 {
    color: #102a53 !important;
    font-size: clamp(2.8rem, 3.65vw, 3.75rem) !important;
    line-height: .95 !important;
    text-wrap: initial;
    white-space: pre-line;
  }

  body:has(.editorial-hero) .editorial-hero-copy li {
    color: #102a53;
  }

  body:has(.editorial-hero) .editorial-hero-copy li::before {
    background: #c79a4b;
  }

  body:has(.editorial-hero) .editorial-hero-concierge {
    background: transparent;
    border-color: rgb(16 42 83 / .48);
    color: #102a53;
  }

  body:has(.editorial-hero) .editorial-hero-select-property {
    align-items: center;
    background: #c79a4b;
    border: 1px solid #c79a4b;
    border-radius: 999px;
    color: #102a53 !important;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: .08em;
    min-height: 48px;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: filter 180ms ease-out, transform 180ms ease-out;
  }

  body:has(.editorial-hero) .editorial-hero-select-property:hover,
  body:has(.editorial-hero) .editorial-hero-select-property:focus-visible {
    filter: brightness(1.07);
    transform: translateY(-2px);
  }

  body:has(.editorial-hero) .editorial-hero-contact {
    background: #102a53;
    border-color: #102a53;
    color: #f7f5ef !important;
  }
}

/* Desktop header: footer-derived wordmark and recognisable native messenger colours. */
@media (min-width: 768px) {
  body:has(.editorial-hero) [data-site-header] .editorial-wordmark {
    color: #102a53 !important;
    font-family: var(--sans) !important;
    font-weight: 700 !important;
    letter-spacing: .14em !important;
    text-shadow: 0 0 18px rgb(199 154 75 / .34), 0 0 2px rgb(247 245 239 / .72);
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon="whatsapp"] {
    background: #25d366 !important;
    border-color: #8ff2b8 !important;
    box-shadow: 0 8px 18px rgb(37 211 102 / .28) !important;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon="telegram"] {
    background: #229ed9 !important;
    border-color: #9adfff !important;
    box-shadow: 0 8px 18px rgb(34 158 217 / .28) !important;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon="telephone"] {
    background: #102a53 !important;
    border-color: #102a53 !important;
  }

  body:has(.editorial-hero) header[data-site-header] .editorial-icon-action[data-glass-contact-icon] :is(svg, svg path) {
    fill: #fff !important;
  }
}

/* Editorial home finish: predictable card CTAs and the same milk/navy system through residency. */
@media (min-width: 900px) {
  body:has(.editorial-hero) .homepage-destination-card[data-destination-theme] .homepage-destination-copy {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    height: 100%;
  }

  body:has(.editorial-hero) .homepage-destination-card[data-destination-theme] .homepage-destination-link {
    align-self: end;
  }
}

body:has(.editorial-hero) .residence-note {
  background: var(--editorial-cream);
  color: var(--editorial-ink);
}

body:has(.editorial-hero) .residence-panel {
  background: var(--editorial-cream);
  border-color: rgb(16 42 83 / .22);
  box-shadow: 0 18px 40px rgb(16 42 83 / .08);
  color: var(--editorial-ink);
}

body:has(.editorial-hero) .residence-panel::before {
  background: #c79a4b;
}

body:has(.editorial-hero) .residence-panel .section-kicker {
  color: #b68536;
}

body:has(.editorial-hero) .residence-panel p:not(.section-kicker),
body:has(.editorial-hero) .residence-warning {
  color: #385176 !important;
}

body:has(.editorial-hero) .residence-visual,
body:has(.editorial-hero) .residence-portrait {
  background: #102a53;
}

body:has(.editorial-hero) .residence-panel .primary-action {
  background: #102a53;
  border-color: #102a53;
  color: #f7f5ef;
}

/* Keep the selector panel above the catalog rather than inside its visual stack. */
body.property-page [data-site-header] {
  overflow: visible !important;
  z-index: 9000 !important;
}

body.property-page [data-site-header] .language-toggle {
  isolation: isolate;
  z-index: 9101;
}

body.property-page [data-site-header] .language-options {
  z-index: 9102 !important;
}

@media (min-width: 921px) {
  body:has(.editorial-hero) .residence-layout {
    grid-template-areas:
      "heading visual"
      "details visual"
      "details portrait";
  }
}

/* Desktop residence route: one panel on the shared page canvas, aligned with the other home surfaces. */
@media (min-width: 768px) {
  body:has(.editorial-hero) .residence-note {
    background: transparent;
    box-sizing: border-box;
    margin-top: clamp(18px, 2.4vw, 32px);
    max-width: none;
    padding: 0;
    width: var(--homepage-frame-width);
  }

  body:has(.editorial-hero) .residence-panel {
    box-sizing: border-box;
    margin: 0;
    max-width: none;
    width: 100%;
  }
}

/* Property catalog: use the homepage header treatment only on its opening surface. */
@media (min-width: 768px) {
  body.property-page [data-site-header] {
    --header-surface: linear-gradient(135deg, rgb(250 249 245 / .98), rgb(241 237 226 / .94));
    --header-ink: #102a53;
    --header-border: rgb(16 42 83 / .24);
    box-shadow: 0 16px 40px rgb(16 42 83 / .12) !important;
    position: absolute !important;
  }

  body.property-page [data-site-header] .editorial-wordmark,
  body.property-page [data-site-header] .language-current {
    color: #102a53 !important;
  }

  body.property-page [data-site-header] .language-current {
    background: rgb(241 237 226 / .82) !important;
    border-color: rgb(16 42 83 / .24) !important;
  }

  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon],
  body.property-page [data-site-header] .editorial-contact-cta {
    background: #102a53 !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
  }

  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon] svg,
  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon] svg path {
    fill: #f7f5ef !important;
  }

  body.property-page .property-catalog {
    padding-top: clamp(150px, 12vw, 190px) !important;
  }
}

@media (max-width: 767px) {
  body.property-page [data-site-header] {
    --header-surface: #f1ede2;
    --header-ink: #102a53;
    --header-border: rgb(16 42 83 / .24);
    background: var(--header-surface) !important;
    box-shadow: 0 8px 18px rgb(16 42 83 / .1) !important;
    display: grid !important;
    gap: 6px 4px !important;
    grid-template-columns: minmax(0, 1fr) 44px repeat(3, 30px);
    inset: 8px auto auto 50% !important;
    min-height: 0 !important;
    padding: 8px !important;
    position: absolute !important;
    width: min(100% - 20px, 460px) !important;
  }

  body.property-page [data-site-header] .editorial-wordmark {
    color: #102a53 !important;
    font-size: clamp(.8rem, 3.8vw, 1rem) !important;
    grid-column: 1;
    grid-row: 1;
    letter-spacing: .1em !important;
    margin-right: 0 !important;
  }

  body.property-page [data-site-header] .language-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  body.property-page [data-site-header] .language-current {
    background: #e8ddc8 !important;
    border-color: rgb(16 42 83 / .24) !important;
    color: #102a53 !important;
    min-height: 30px;
    padding: 0;
    width: 44px;
  }

  body.property-page [data-site-header] .editorial-contact-actions {
    display: contents !important;
  }

  body.property-page [data-site-header] .editorial-icon-action {
    background: #102a53 !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
    grid-row: 1;
    height: 30px !important;
    min-height: 30px !important;
    min-width: 30px !important;
    width: 30px !important;
  }

  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon] {
    background: #102a53 !important;
    box-shadow: none !important;
  }

  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon="whatsapp"] { grid-column: 3; }
  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon="telegram"] { grid-column: 4; }
  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon="telephone"] { grid-column: 5; }

  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon] svg,
  body.property-page [data-site-header] .editorial-icon-action[data-glass-contact-icon] svg path {
    fill: #f7f5ef !important;
    height: 15px;
    width: 15px;
  }

  body.property-page [data-site-header] .editorial-contact-cta {
    background: #102a53 !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
    font-size: .68rem !important;
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 40px !important;
    padding: 8px 13px !important;
    width: 100%;
  }

  body.property-page .property-catalog {
    padding-top: 148px !important;
  }
}

/* The header and content surfaces always share one responsive rail. */
body:has(.editorial-hero) [data-site-header] {
  max-width: none !important;
  width: var(--homepage-frame-width) !important;
}

/* Keep the established mobile reading order: video, actions, then the offer copy. */
@media (max-width: 767px) {
  body:has(.editorial-hero) .editorial-hero-copy {
    display: flex;
    flex-direction: column;
  }

  body:has(.editorial-hero) .editorial-hero-actions {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
    order: -1;
  }

body:has(.editorial-hero) .editorial-hero-actions .editorial-hero-contact {
    color: #f7f5ef !important;
    -webkit-text-fill-color: #f7f5ef;
  }
}

/* Only the home page and the property catalog own a site header. Detail pages stay content-first. */
body.property-page:not([data-property-page="catalog"]) .property-topbar,
body.property-page:not([data-property-page="catalog"]) [data-site-header] {
  display: none !important;
}

/* Desktop hero: the copy starts on the same line as the video and closes with its actions. */
@media (min-width: 768px) {
  body:has(.editorial-hero) .editorial-hero {
    align-items: start;
    min-height: 0;
    padding-bottom: clamp(44px, 5vw, 68px);
    padding-top: clamp(48px, 6vw, 84px);
  }

  body:has(.editorial-hero) .editorial-hero-copy {
    align-self: start;
    display: flex;
    flex-direction: column;
    height: min(66svh, 690px);
    max-width: none;
  }

  body:has(.editorial-hero) .editorial-hero-copy h1 {
    margin-top: 0 !important;
  }

  body:has(.editorial-hero) .editorial-hero-actions {
    align-self: start;
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 0;
    width: min(100%, 460px);
  }

  body:has(.editorial-hero) .editorial-hero-actions :is(.editorial-hero-select-property, .editorial-hero-concierge, .editorial-hero-contact) {
    white-space: nowrap;
  }

  body:has(.editorial-hero) .editorial-hero-actions .editorial-hero-select-property,
  body:has(.editorial-hero) .editorial-hero-actions .editorial-hero-concierge,
  body:has(.editorial-hero) .editorial-hero-actions .editorial-hero-contact {
    width: 100%;
  }

body:has(.editorial-hero) .editorial-hero-media-label {
  color: #f7f5ef;
}
}

/* The property CTA shares Concierge Service's compact action typography. */
body:has(.editorial-hero) .editorial-hero-select-property {
  font-family: var(--sans) !important;
  font-size: .84rem !important;
  font-weight: 800 !important;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

/* Keep the Brazil flag itself, but remove the inherited cream strip around it. */
body:has(.editorial-hero) .relocation-residency-flag {
  background: transparent;
  border: 0;
  box-shadow: none;
  flex: 0 0 26px;
  height: 17px;
  padding: 0;
  width: 26px;
}

body:has(.editorial-hero) .relocation-residency-flag img {
  display: block;
  height: 17px;
  width: 26px;
}

@media (max-width: 620px) {
  body:has(.editorial-hero) .relocation-residency-flag {
    flex-basis: 23px;
    height: 15px;
    width: 23px;
  }

  body:has(.editorial-hero) .relocation-residency-flag img {
    height: 15px;
    width: 23px;
  }
}

/* The three opening actions arrive as a single restrained cascade on each page load. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes editorialHeroActionEnter {
    from {
      opacity: 0;
      transform: translate3d(0, 18px, 0) scale(.985);
    }

    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }

  body:has(.editorial-hero) .editorial-hero-actions > a {
    animation: editorialHeroActionEnter 620ms cubic-bezier(.23, 1, .32, 1);
    animation-fill-mode: backwards;
    will-change: opacity, transform;
  }

  body:has(.editorial-hero) .editorial-hero-actions > a:nth-child(1) {
    animation-delay: 60ms;
  }

  body:has(.editorial-hero) .editorial-hero-actions > a:nth-child(2) {
    animation-delay: 140ms;
  }

body:has(.editorial-hero) .editorial-hero-actions > a:nth-child(3) {
  animation-delay: 220ms;
}
}

/* Home header is server-rendered in its final state to prevent a legacy first-paint flash. */
body:has(.editorial-hero) [data-site-header] .brief-link[data-header-contact] {
  align-items: center !important;
  background: #102a53 !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: #f7f5ef !important;
  display: inline-flex !important;
  font-size: .76rem !important;
  font-weight: 800 !important;
  justify-content: center !important;
  letter-spacing: .05em;
  min-height: 44px !important;
  padding: 13px 20px !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 767px) {
  body:has(.editorial-hero) [data-site-header] .brief-link[data-header-contact] {
    background: #102a53 !important;
    border-color: #102a53 !important;
    color: #f7f5ef !important;
    font-size: .68rem !important;
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 42px !important;
    padding: 10px 13px !important;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.editorial-hero) .editorial-hero-actions > a {
    animation: none;
  }
}

/* Desktop home rhythm: shared card baselines and one restrained display face. */
@media (min-width: 900px) {
  body:has(.editorial-hero) .homepage-destination-card[data-destination-theme] .homepage-destination-copy {
    align-content: start !important;
    padding: clamp(64px, 8.8vw, 128px) 24px 26px !important;
  }

  body:has(.editorial-hero) .relocation-section .relocation-residency-title h2,
  body:has(.editorial-hero) .residence-panel h2 {
    font-family: var(--sans) !important;
    font-weight: 500 !important;
    letter-spacing: -.015em;
  }

  body:has(.editorial-hero) .relocation-section .relocation-residency-title h2 {
    font-size: clamp(22px, 2.35vw, 32px) !important;
  }

  body:has(.editorial-hero) .residence-panel h2 {
    font-size: clamp(34px, 3vw, 48px);
    line-height: .98;
  }
}

/* Desktop home: the header belongs to the opening surface, not to the whole document. */
@media (min-width: 768px) {
body:has(.editorial-hero) [data-site-header] {
  position: absolute !important;
}

  body:has(.editorial-hero) .editorial-hero {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    padding-top: clamp(116px, 8vw, 136px);
  }

  body:has(.editorial-hero) .editorial-hero-copy h1 {
    font-size: clamp(2.25rem, 2.8vw, 3.25rem) !important;
    line-height: .98 !important;
    text-wrap: balance;
    white-space: normal;
  }

  body:has(.editorial-hero) .editorial-hero-actions .editorial-hero-contact {
    color: #f7f5ef !important;
    -webkit-text-fill-color: #f7f5ef;
  }

  /* The text-first desktop offer uses a full three-action row, rather than the
     compact vertical action stack retained for the mobile media composition. */
  body:has(.editorial-hero) .desktop-text-hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  body:has(.editorial-hero) .desktop-text-hero-actions :is(.editorial-hero-select-property, .editorial-hero-concierge, .editorial-hero-contact) {
    font-size: clamp(.63rem, .72vw, .74rem) !important;
    letter-spacing: .035em !important;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  body:has(.editorial-hero) .desktop-text-hero-route h2 {
    font-family: var(--sans) !important;
    font-size: clamp(1.9rem, 2.8vw, 3rem) !important;
    font-weight: 700 !important;
    letter-spacing: -.05em !important;
  }
}

/* Final desktop hero cascade. It lives in the final-loaded stylesheet so the
   supplied construction image cannot be superseded by an earlier cream theme. */
@media (min-width: 768px) {
  body:has(.editorial-hero) .editorial-hero {
    background: #0d1724 url("assets/hero-construction-investment.png") center / cover no-repeat !important;
    isolation: isolate;
    min-height: clamp(680px, 52vw, 810px);
    overflow: hidden;
    position: relative;
  }

  body:has(.editorial-hero) .editorial-hero::before {
    background:
      linear-gradient(90deg, rgb(9 22 42 / .94) 0%, rgb(9 22 42 / .76) 46%, rgb(9 22 42 / .14) 78%, rgb(9 22 42 / .24) 100%),
      linear-gradient(180deg, rgb(9 22 42 / .18), rgb(9 22 42 / .46));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
  }

  body:has(.editorial-hero) [data-desktop-text-hero] {
    display: block;
    margin: 0 auto;
    max-width: 1240px;
    position: relative;
    z-index: 1;
  }

  body:has(.editorial-hero) .desktop-text-hero-copy {
    max-width: min(760px, 66vw);
  }

  body:has(.editorial-hero) .desktop-text-hero-eyebrow {
    color: #e4bf75;
    text-shadow: 0 1px 10px rgb(0 0 0 / .34);
  }

  body:has(.editorial-hero) .desktop-text-hero-copy h1 {
    color: #f7f5ef !important;
    text-shadow: 0 5px 22px rgb(0 0 0 / .3);
    -webkit-text-fill-color: #f7f5ef !important;
  }

  body:has(.editorial-hero) .desktop-text-hero-summary {
    color: rgb(247 245 239 / .9);
    text-shadow: 0 2px 14px rgb(0 0 0 / .28);
    -webkit-text-fill-color: rgb(247 245 239 / .9);
  }

  body:has(.editorial-hero) .desktop-text-hero-services {
    max-width: 650px;
  }

  body:has(.editorial-hero) [data-hero-service] {
    background: rgb(10 24 45 / .58);
    backdrop-filter: blur(8px);
    border-color: rgb(247 245 239 / .22);
    box-shadow: 0 10px 26px rgb(0 0 0 / .12);
  }

  body:has(.editorial-hero) [data-hero-service] strong {
    color: #f7f5ef;
    -webkit-text-fill-color: #f7f5ef;
  }

  body:has(.editorial-hero) .desktop-text-hero-actions {
    border-top: 1px solid rgb(247 245 239 / .34);
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-top: clamp(28px, 3vw, 42px);
    max-width: 760px;
    padding-top: 22px;
  }

  body:has(.editorial-hero) .desktop-text-hero-actions > a {
    min-height: 54px;
    text-align: center;
    white-space: nowrap;
  }

  body:has(.editorial-hero) .desktop-text-hero-actions .editorial-hero-select-property {
    background: #d2a448;
    border-color: #d2a448;
    color: #102a53 !important;
    -webkit-text-fill-color: #102a53 !important;
  }

  body:has(.editorial-hero) .desktop-text-hero-actions .editorial-hero-concierge {
    background: rgb(247 245 239 / .1);
    border-color: rgb(247 245 239 / .68);
    color: #f7f5ef !important;
    -webkit-text-fill-color: #f7f5ef !important;
  }

  body:has(.editorial-hero) .desktop-text-hero-actions .editorial-hero-contact {
    background: #102a53;
    border-color: #102a53;
    color: #f7f5ef !important;
    -webkit-text-fill-color: #f7f5ef !important;
  }
}

/* Catalog header: supplied messenger marks keep their native circular artwork. */
body.property-page[data-property-page="catalog"] [data-site-header] .editorial-icon-action[data-native-contact-icon] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

body.property-page[data-property-page="catalog"] [data-site-header] .editorial-icon-action[data-native-contact-icon] img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body:has(.editorial-hero) [data-site-header] .editorial-icon-action[data-native-contact-icon] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

body:has(.editorial-hero) [data-site-header] .editorial-icon-action[data-native-contact-icon] img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media (min-width: 768px) {
  body:has(.editorial-hero) [data-site-header] .editorial-wordmark {
    background: linear-gradient(105deg, #102a53 0%, #102a53 40%, #d4a24b 50%, #102a53 60%, #102a53 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: editorialWordmarkFoil 9s ease-in-out infinite;
    color: #102a53 !important;
    text-shadow: 0 0 14px rgb(199 154 75 / .38), 0 1px 0 rgb(16 42 83 / .24);
  }

  body.property-page[data-property-page="catalog"] [data-site-header] .editorial-wordmark {
    color: #102a53 !important;
    font-family: var(--sans) !important;
    font-weight: 700 !important;
    letter-spacing: .14em !important;
    text-shadow: 0 0 18px rgb(199 154 75 / .34), 0 0 2px rgb(247 245 239 / .72);
  }
}

@keyframes editorialWordmarkFoil {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.editorial-hero) [data-site-header] .editorial-wordmark {
    animation: none;
    background-position: 50% 0;
  }
}

/* Full footer-derived signature for every visible light desktop header. */
@media (min-width: 768px) {
  [data-site-header][data-header-theme="light"] .editorial-wordmark {
    align-items: flex-start;
    animation: none !important;
    background: none !important;
    display: inline-flex !important;
    flex-direction: column;
    gap: .2rem;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    line-height: 1;
    text-shadow: none !important;
    white-space: normal;
  }

  [data-site-header][data-header-theme="light"] .editorial-wordmark-name {
    background: linear-gradient(105deg, #102a53 0%, #102a53 42%, #d4a24b 50%, #102a53 58%, #102a53 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: editorialWordmarkFoil 9s ease-in-out infinite;
    color: #102a53 !important;
    font-family: var(--sans) !important;
    font-size: clamp(1.05rem, 1.5vw, 1.38rem) !important;
    font-weight: 700 !important;
    letter-spacing: .14em !important;
    text-shadow: 0 0 14px rgb(199 154 75 / .32), 0 1px 0 rgb(16 42 83 / .24);
  }

  [data-site-header][data-header-theme="light"] .editorial-wordmark-descriptor {
    color: #d4a24b;
    font-family: var(--sans) !important;
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .22em;
    -webkit-text-fill-color: #d4a24b;
  }
}

@media (max-width: 767px) {
  [data-site-header] .editorial-wordmark-descriptor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-site-header] .editorial-wordmark-name {
    animation: none;
    background-position: 50% 0;
  }
}
