:root {
  --ba-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ba-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ba-duration-press: 140ms;
  --ba-duration-ui: 220ms;
  --ba-duration-panel: 360ms;
  --ba-duration-reveal: 640ms;
  --ba-nav-safe: clamp(88px, 8vw, 116px);
}

html.black-atlas-returning .cinematic-intro,
html.black-atlas-returning .black-atlas-entry-poster,
html.black-atlas-returning .black-atlas-cinematic-video,
html.black-atlas-returning .black-atlas-cinematic-copy-layer,
html.black-atlas-returning .black-atlas-cinematic-blackout {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body::before {
  position: fixed;
  z-index: 84;
  top: 0;
  right: 0;
  left: 0;
  height: 104px;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgba(5, 7, 8, .98) 0 62%, rgba(5, 7, 8, .78) 74%, transparent 100%);
  transition: opacity 320ms var(--ba-ease-out), background-color var(--ba-duration-ui) ease;
}

body.map-active::before { opacity: 1; }
body[data-shell-tone="light"]::before {
  background: linear-gradient(180deg, rgba(244, 240, 232, .98) 0 62%, rgba(244, 240, 232, .78) 74%, transparent 100%);
}
body[data-shell-tone="light"] .atlas-site-header,
body[data-shell-tone="light"] .atlas-contact-menu { --atlas-shell-ink: #161819; }

.atlas-site-header {
  transition:
    color var(--ba-duration-ui) ease,
    opacity 420ms var(--ba-ease-out),
    transform 480ms var(--ba-ease-out),
    visibility 0s linear;
}

.atlas-contact-menu__toggle {
  transition:
    color var(--ba-duration-ui) ease,
    opacity 320ms var(--ba-ease-out),
    transform 360ms var(--ba-ease-out),
    visibility 0s linear;
}

.atlas-contact-menu__backdrop { transition: opacity 280ms var(--ba-ease-out); }
.atlas-contact-menu__panel { transition: transform var(--ba-duration-panel) var(--ba-ease-drawer); }

.atlas-contact-menu__close,
.atlas-contact-menu__cta,
.atlas-contact-menu__links a,
.atlas-contact-menu__contacts a,
button,
[role="button"] { -webkit-tap-highlight-color: transparent; }

.atlas-contact-menu__close:active,
.atlas-contact-menu__cta:active,
.cinematic-intro__skip:active,
.project-controls button:active,
.ready-controls button:active,
.curated-catalog__request:active,
.ready-catalog-request:active,
#lead-form button:active {
  transform: scale(.97);
  transition: transform var(--ba-duration-press) var(--ba-ease-out);
}

#projects,
#curated-catalog,
#ready-homes,
#site-showcase,
#services,
#lead,
#journal,
.editorial-stories,
[data-editorial-scene] { scroll-margin-top: var(--ba-nav-safe); }

#projects .section-head,
#curated-catalog .curated-catalog__head,
#ready-homes > .collection-head,
#services .section-head,
#journal .section-head {
  position: relative;
  z-index: 3;
}

body .collection-section.ready-homes { padding-top: max(88px, var(--ba-nav-safe)); }
body .services-section,
body .journal-section { padding-top: max(104px, var(--ba-nav-safe)); }

.atlas-reveal .collection-head,
.atlas-reveal .project-coverflow__head,
.atlas-reveal .editorial-scene__copy,
.atlas-reveal .services-head,
.atlas-reveal .lead-copy,
.atlas-reveal .journal-head,
.premium-reveal .curated-catalog__head > *,
.premium-reveal .collection-head > *,
.premium-reveal#lead .lead-service-column > .eyebrow,
.premium-reveal#lead .lead-service-column > h2 {
  transform: translate3d(0, 20px, 0);
  filter: none;
  transition:
    opacity var(--ba-duration-reveal) var(--ba-ease-out),
    transform var(--ba-duration-reveal) var(--ba-ease-out);
}

.atlas-reveal .premium-editorial__cell,
.atlas-reveal .district-card,
.atlas-reveal .ready-choice,
.atlas-reveal .article-card,
.atlas-reveal .service-item,
.atlas-reveal.is-revealed .premium-editorial__cell:nth-child(2),
.atlas-reveal.is-revealed .district-card:nth-child(2),
.atlas-reveal.is-revealed .ready-choice:nth-child(2) { transition-delay: 60ms; }
.atlas-reveal.is-revealed .premium-editorial__cell:nth-child(3),
.atlas-reveal.is-revealed .district-card:nth-child(3),
.atlas-reveal.is-revealed .ready-choice:nth-child(3) { transition-delay: 120ms; }
.atlas-reveal.is-revealed .premium-editorial__cell:nth-child(4),
.atlas-reveal.is-revealed .district-card:nth-child(4),
.atlas-reveal.is-revealed .ready-choice:nth-child(4) { transition-delay: 180ms; }
.atlas-reveal.is-revealed .premium-editorial__cell:nth-child(n+5),
.atlas-reveal.is-revealed .ready-choice:nth-child(n+5) { transition-delay: 240ms; }

.architecture-panel img,
.curated-catalog__panel-image,
.premium-swap-card img,
.ready-feature > img,
.ready-choice img,
.project-card img,
.article-card img { transition: transform 520ms var(--ba-ease-out); }

.black-atlas-cinematic-copy-layer { transition: opacity 520ms var(--ba-ease-out); }

.black-atlas-story-play {
  filter: none;
  will-change: opacity, transform;
  transition:
    opacity 420ms var(--ba-ease-out),
    transform 480ms var(--ba-ease-out),
    background var(--ba-duration-ui) ease;
}

.atlas-marker {
  filter: brightness(calc(1 + var(--district-emphasis, 0) * .16));
  will-change: opacity, transform;
  transition:
    opacity 280ms var(--ba-ease-out),
    transform 280ms var(--ba-ease-out),
    background 180ms ease,
    box-shadow 280ms var(--ba-ease-out);
}

.black-atlas-cinematic-copy--opening,
.black-atlas-cinematic-copy,
.black-atlas-cinematic-title-frame {
  filter: none;
  transition:
    opacity 640ms var(--ba-ease-out),
    transform 720ms var(--ba-ease-out);
}

.atlas-map-reveal .map-poster { transition: opacity 640ms var(--ba-ease-out); }
.black-atlas-cinematic-title-frame { transform: translate3d(0, 16px, 0); }

.black-atlas-cinematic-copy-layer.is-main-exit .black-atlas-cinematic-title-frame {
  filter: none;
  transition:
    opacity 280ms var(--ba-ease-out),
    transform 320ms var(--ba-ease-out);
}

body.black-atlas-map-copy-reveal .atlas-map-reveal .hero-copy,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .topbar,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .status,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .map-card,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .orbit-hint,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .map-fallback,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .property-filter,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .maplibregl-ctrl,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .map-poi-markers,
body.black-atlas-map-chrome-reveal .atlas-map-reveal .map-zone-switcher {
  filter: none;
  transition:
    opacity 640ms var(--ba-ease-out),
    transform 720ms var(--ba-ease-out);
}

body.black-atlas-map-ui-suppressed .atlas-map-reveal .topbar,
body.black-atlas-map-ui-suppressed .atlas-map-reveal .hero-copy,
body.black-atlas-map-ui-suppressed .atlas-map-reveal .status,
body.black-atlas-map-ui-suppressed .atlas-map-reveal .map-card,
body.black-atlas-map-ui-suppressed .atlas-map-reveal .orbit-hint,
body.black-atlas-map-ui-suppressed .atlas-map-reveal .map-fallback,
body.black-atlas-video-ui-preview:not(.black-atlas-map-copy-reveal) .atlas-map-reveal .hero-copy,
body.black-atlas-video-ui-preview:not(.black-atlas-map-chrome-reveal) .atlas-map-reveal .topbar,
body.black-atlas-video-ui-preview:not(.black-atlas-map-chrome-reveal) .atlas-map-reveal .status,
body.black-atlas-video-ui-preview:not(.black-atlas-map-chrome-reveal) .atlas-map-reveal .map-card,
body.black-atlas-video-ui-preview:not(.black-atlas-map-chrome-reveal) .atlas-map-reveal .property-filter { filter: none; }

@media (min-width: 761px) {
  .site-showcase__copy {
    transition:
      opacity 640ms var(--ba-ease-out) 80ms,
      transform 720ms var(--ba-ease-out) 80ms;
  }
  .site-showcase__hero-title {
    transform: translate3d(0, -24px, 0);
    transition:
      opacity 640ms var(--ba-ease-out) 60ms,
      transform 760ms var(--ba-ease-out) 60ms;
  }
  .site-showcase__meta,
  .site-showcase__facts {
    transition:
      opacity 560ms var(--ba-ease-out) 120ms,
      transform 640ms var(--ba-ease-out) 120ms;
  }
  .site-showcase__media img {
    filter: saturate(.92) contrast(1.02) brightness(.82);
    transition: transform 900ms var(--ba-ease-out);
  }
  .site-showcase__slide.is-entered .site-showcase__media img {
    filter: saturate(.92) contrast(1.02) brightness(.82);
  }
}

@media (hover: none), (pointer: coarse) {
  .project-card:hover img,
  .premium-swap-card:hover img,
  .ready-choice:hover img,
  .article-card:hover img,
  .architecture-panel:hover img,
  .curated-catalog__panel:hover .curated-catalog__panel-image { transform: none; }
}

@media (max-width: 760px) {
  :root {
    --ba-nav-safe: 72px;
    --ba-duration-reveal: 520ms;
  }

  body .collection-section.ready-homes,
  body .services-section,
  body .journal-section { padding-top: 76px; }

  .mobile-reveal {
    transform: translate3d(0, 20px, 0);
    transition:
      opacity var(--ba-duration-reveal) var(--ba-ease-out),
      transform var(--ba-duration-reveal) var(--ba-ease-out);
    will-change: auto;
  }

  .mobile-story-complete #projects {
    animation-duration: 720ms;
    animation-timing-function: var(--ba-ease-out);
  }

  body::before { height: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }

  .atlas-reveal .collection-head,
  .atlas-reveal .project-coverflow__head,
  .atlas-reveal .editorial-scene__copy,
  .atlas-reveal .premium-editorial__cell,
  .atlas-reveal .district-card,
  .atlas-reveal .ready-choice,
  .atlas-reveal .article-card,
  .atlas-reveal .service-item,
  .premium-reveal .curated-catalog__panel,
  .mobile-reveal {
    transform: none !important;
    transition: opacity 200ms ease !important;
  }

  .atlas-contact-menu__panel { transition: opacity 200ms ease; }
}
