/* ==========================================================================
   Cesar House — cesarhouse.com
   Rebuilt from the original Wix site. Measurements taken from the live site
   at a 1425px content width; see NOTES.md.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --ink: #212121;
  --ink-soft: #1a1a1a;
  --line: #e8e6e6;
  --muted: #bfbfbf;
  --paper: #ffffff;
  --dark: #212121;

  --font: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;

  --max: 1440px;   /* outer bound of the full-bleed grid                    */
  --pad: 80px;     /* gutter either side of a full-bleed section            */
  --site: 980px;   /* the original Wix fixed site width                     */
  --header-h: 65px;

  --gallery-gap: 30px;
}

/* --- Reset -------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: normal; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Layout helpers ----------------------------------------------------- */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.narrow {
  max-width: var(--site);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--paper);
  padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 100px;
  gap: 24px;
}

.site-header__logo img { width: 334px; height: 34px; object-fit: contain; }

.nav { display: flex; align-items: center; gap: 0; }

.nav__item { position: relative; }

.nav__link {
  display: block;
  padding: 6px 13px;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav__link:hover,
.nav__link[aria-current="page"] { color: #5a5a5a; }

/* Availability sub-menu */
.nav__item--has-menu > .nav__link::after { content: ""; }

.nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  margin: 0;
  padding: 8px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.nav__item--has-menu:hover .nav__submenu,
.nav__item--has-menu:focus-within .nav__submenu,
.nav__submenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__submenu a {
  display: block;
  padding: 7px 20px;
  font-size: 18px;
  text-decoration: none;
}
.nav__submenu a:hover { background: var(--line); }

/* Mobile menu toggle — hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { margin-inline: auto; position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  height: 836px;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}

.hero__media,
.hero__media video,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__inner {
  position: relative;
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 100px;
}

.hero__address {
  position: absolute;
  top: 90px;
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero__headline {
  position: absolute;
  top: 213px;
  font-size: 60px;
  font-weight: 400;
  line-height: 1.2;
}

.hero__tagline {
  position: absolute;
  top: 442px;
  font-size: 22px;
}

.hero__cta {
  position: absolute;
  top: 572px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  text-decoration: none;
}
.hero__cta span { font-size: 60px; line-height: 1.2; }
.hero__cta img { width: 34px; height: 34px; filter: invert(1); }
.hero__cta:hover img { transform: translateY(4px); transition: transform 0.2s ease; }

/* --- Feature blocks (photo + overlapping white card) -------------------- */
.feature {
  position: relative;
  padding-block: 70px;
}

.feature__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
}

/* photo sits in the first 8 of 12 columns; card in the last 8, pushed down */
.feature__photo {
  grid-row: 1;
  grid-column: 1 / span 8;
  height: 362px;
  width: 100%;
  object-fit: cover;
}

.feature__card {
  grid-row: 1;
  grid-column: 5 / span 8;
  margin-top: 49px;
  background: var(--paper);
  padding: 74px 110px;
  z-index: 1;
}

/* mirrored variant: photo right, card left */
.feature--mirror .feature__photo { grid-column: 5 / span 8; }
.feature--mirror .feature__card  { grid-column: 1 / span 8; }

.feature__eyebrow {
  font-size: 16px;
  font-style: italic;
  margin-bottom: 4px;
}

.feature__title {
  font-size: 56px;
  line-height: normal;
  margin-bottom: 28px;
}
.feature__title--light { font-weight: 400; }

.feature__body { font-size: 16px; line-height: 1.8; }
.feature__body + .feature__body { margin-top: 28px; }
.feature__body strong { font-weight: 700; }

/* --- Icon row (Connected) ---------------------------------------------- */
.icon-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.icon-row__item { text-align: center; }

.icon-row__item img {
  width: 60px;
  height: 62px;
  margin: 0 auto 14px;
}

.icon-row__item p {
  font-size: 14px;
  line-height: normal;
}

/* --- Transit stats (Convenient) ---------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.stats__logo {
  height: 68px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.stats__logo img,
.stats__logo svg { max-height: 68px; width: auto; object-fit: contain; }

.stats__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stats__value b {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.4;
}
.stats__value span {
  font-size: 14px;
  line-height: 1.4;
}

/* --- The Extras --------------------------------------------------------- */
.extras { padding-block: 44px 0; }

.extras__title {
  font-size: 56px;
  text-align: center;
  margin-bottom: 68px;
}

.extras__icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 44px;
}

.extras__icon { text-align: center; }
.extras__icon img {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
}
.extras__icon p {
  font-size: 18px;
  line-height: normal;
  max-width: 170px;
  margin-inline: auto;
}

.extras__copy {
  max-width: 902px;
  margin: 68px auto 0;
  font-size: 18px;
  line-height: 1.4;
  text-align: justify;
}
.extras__copy p + p { margin-top: 25px; }
.extras__copy strong { font-weight: 700; }

/* --- Collage gallery (home) -------------------------------------------- */
.collage {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gallery-gap);
}

/* Reproduces the Wix Pro Gallery collage: a 3-unit row where a portrait
   cell takes 1 unit and a landscape cell takes 2, sharing one 30px gap. */
.collage__item {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  flex: 0 0 calc((100% - var(--gallery-gap)) / 3);
  aspect-ratio: 273 / 386;
}
.collage__item--wide {
  flex-basis: calc((100% - var(--gallery-gap)) / 3 * 2);
  aspect-ratio: 546 / 386;
}

.collage__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.collage__item:hover img { transform: scale(1.04); }

/* --- The Residences ----------------------------------------------------- */
.residences { padding-block: 44px 100px; }

.residences__title {
  font-size: 56px;
  font-weight: 400;
  text-align: center;
}

.residences__sub {
  font-size: 20px;
  text-align: center;
  margin-top: 4px;
  margin-bottom: 59px;
}

.residences__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.residence {
  display: grid;
  grid-template-columns: 344px 1fr;
  gap: 16px;
  padding: 0 0 0 0;
  margin-bottom: 0;
}
.residences__grid > .residence { padding: 0 32px 32px 0; }

.residence__photo {
  width: 344px;
  height: 344px;
  object-fit: cover;
}

.residence__body { padding-top: 86px; }

.residence__name {
  font-size: 35px;
  font-weight: 400;
  line-height: 1.4;
}
.residence__name a { text-decoration: underline; }

.residence__desc {
  font-size: 22px;
  line-height: 1.4;
  margin-top: 2px;
  min-height: 31px;
}

.residence__status {
  font-size: 16px;
  line-height: 1.4;
  margin-top: 24px;
}

/* --- Ready to Tour / contact ------------------------------------------- */
.tour {
  padding-block: 38px 0;
  text-align: center;
}

.tour__title {
  font-size: 50px;
  font-weight: 400;
  margin-bottom: 22px;
}

.button {
  display: inline-block;
  background: var(--dark);
  color: #fff;
  font-size: 18px;
  letter-spacing: 1.8px;
  line-height: 1.2;
  padding: 13px 34px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.button:hover { background: #3d3d3d; }

.tour__or {
  font-size: 22px;
  line-height: 1.4;
  margin-top: 25px;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-block: 12px 40px;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 100px;
}

.contact__brand img { width: 318px; height: 46px; object-fit: contain; }

.contact__list { margin-top: 36px; display: grid; gap: 28px; }

.contact__row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 42px;
  align-items: start;
  font-size: 16px;
}
.contact__row img { width: 24px; height: 24px; margin-top: 2px; }
.contact__row a { text-decoration: none; }
.contact__row a:hover { text-decoration: underline; }

/* --- Form --------------------------------------------------------------- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  max-width: 390px;
  margin-left: auto;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
}

.field input {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 4px 0;
  height: 28px;
}
.field input:focus {
  outline: none;
  border-bottom-width: 2px;
  padding-bottom: 3px;
}

.form__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.form__submit {
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
  padding: 8px 28px;
}

.form__note {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
  margin: 0;
}
.form__note[hidden] { display: none; }
.form__note--error { color: #c02626; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: #fff;
  padding-block: 18px;
}

.site-footer__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__by {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.site-footer__by em {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 26px;
  line-height: 1.2;
}
.site-footer__by img { width: 172px; height: 46px; object-fit: contain; }

.site-footer__legal { font-size: 12px; line-height: 1.4; }

/* --- Apartment detail pages -------------------------------------------- */
.unit-head {
  text-align: center;
  padding-block: 24px 30px;
}
.unit-head__title { font-size: 56px; font-weight: 400; }
.unit-head__price { font-size: 20px; margin-top: 4px; }
.unit-head__status { font-size: 18px; line-height: 1.8; }

.unit-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
  padding-bottom: 60px;
}

.unit-plan { display: flex; justify-content: center; padding: 8px 40px; }
.unit-plan img { width: 491px; height: auto; object-fit: contain; }

.unit-specs { padding-right: 40px; }

.unit-specs h2 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: underline;
  margin-top: 28px;
}
.unit-specs h2:first-child { margin-top: 0; }

.unit-specs ul {
  list-style: disc;
  padding-left: 33px;
  margin-top: 2px;
}
.unit-specs li {
  font-size: 18px;
  line-height: 1.5;
}

.unit-gallery-title {
  font-size: 56px;
  font-weight: 400;
  text-align: center;
  padding-block: 40px 30px;
}

/* --- Slider gallery (apartment pages) ---------------------------------- */
.slider { max-width: var(--site); margin-inline: auto; padding-bottom: 60px; }

.slider__stage {
  position: relative;
  aspect-ratio: 980 / 602;
  background: var(--line);
  overflow: hidden;
}

.slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider__slide {
  flex: 0 0 100%;
  height: 100%;
}
.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 85%);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.slider__nav:hover { background: #fff; }
.slider__nav--prev { left: 14px; }
.slider__nav--next { right: 14px; }

.slider__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.slider__thumb {
  flex: 0 0 88px;
  height: 66px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.slider__thumb img { width: 100%; height: 100%; object-fit: cover; }
.slider__thumb:hover { opacity: 0.85; }
.slider__thumb[aria-current="true"] { opacity: 1; }

/* --- Lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(0 0 0 / 92%);
  display: none;
  place-items: center;
  border: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgb(0 0 0 / 92%); }

.lightbox__img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 120px);
  object-fit: contain;
}

.lightbox__btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgb(255 255 255 / 24%); }
.lightbox__btn--close { top: 20px; right: 20px; }
.lightbox__btn--prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.lightbox__btn--next  { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
}

/* --- Interest popup ----------------------------------------------------- */
.popup {
  border: 0;
  padding: 0;
  width: min(440px, calc(100vw - 40px));
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 60px rgb(0 0 0 / 30%);
}
.popup::backdrop { background: rgb(0 0 0 / 55%); }

.popup__inner { padding: 46px 40px 40px; text-align: center; }
.popup__logo { width: 210px; height: auto; margin: 0 auto 26px; }
.popup__title { font-size: 30px; font-weight: 700; line-height: 1.2; }
.popup__body { font-size: 14px; line-height: 1.6; margin-top: 12px; }
.popup__cta { margin-top: 24px; font-size: 14px; letter-spacing: 1.4px; padding: 12px 26px; }

.popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

/* ==========================================================================
   Responsive
   The original Wix site shipped a separate mobile layout. These breakpoints
   reproduce it: the overlapping cards stack, galleries collapse to one
   column, and the nav becomes a drawer.
   ========================================================================== */

@media (max-width: 1200px) {
  :root { --pad: 48px; }
  .site-header,
  .hero__inner,
  .contact,
  .site-footer__inner { padding-inline: 48px; }

  .feature__card { padding: 56px 64px; }
  .residence { grid-template-columns: 280px 1fr; }
  .residence__photo { width: 280px; height: 280px; }
  .residence__body { padding-top: 40px; }
}

@media (max-width: 900px) {
  /* The original mobile site was a 320px Wix canvas: 20px gutters, full-bleed
     photos, and cards stacked under their photo rather than overlapping. */
  :root { --pad: 0px; --header-h: 60px; }

  .site-header,
  .hero__inner,
  .contact,
  .site-footer__inner { padding-inline: 20px; }

  /* nav becomes a drawer */
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 8px 20px 24px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__link { padding: 14px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
  .nav__submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
  }
  .nav__submenu a { font-size: 17px; padding: 12px 0; border-bottom: 1px solid var(--line); }

  /* hero: flows instead of absolute positioning, 589px as on the original */
  .hero { height: 589px; }
  .hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    padding-block: 40px;
  }
  .hero__address,
  .hero__headline,
  .hero__tagline,
  .hero__cta { position: static; top: auto; }
  .hero__address, .hero__tagline { font-size: 18px; }
  .hero__headline { font-size: 26px; line-height: 1.3; }
  .hero__cta span { font-size: 26px; }
  .hero__cta img { width: 26px; height: 26px; }

  /* feature blocks: full-bleed photo, card stacked beneath it */
  .feature { padding-block: 0 40px; }
  .feature__grid { display: block; }
  .feature__photo,
  .feature--mirror .feature__photo { width: 100%; height: 190px; }
  .feature__card,
  .feature--mirror .feature__card {
    margin-top: 0;
    padding: 30px 20px 0;
  }
  .feature__title { font-size: 35px; margin-bottom: 18px; }
  .feature__eyebrow { margin-bottom: 0; }

  .icon-row,
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; margin-top: 40px; }
  .extras__icons { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; padding-inline: 20px; }

  .extras { padding-top: 30px; }
  .extras__title,
  .residences__title,
  .unit-gallery-title { font-size: 35px; padding-inline: 20px; }
  .extras__title { margin-bottom: 36px; }
  .residences__sub { font-size: 18px; margin-bottom: 34px; }
  .extras__copy {
    font-size: 16px;
    text-align: left;
    padding-inline: 20px;
    margin-top: 44px;
  }

  /* collage: full-bleed, stacked, natural aspect */
  .collage { gap: 16px; margin-top: 34px; }
  .collage__item,
  .collage__item--wide { flex-basis: 100%; aspect-ratio: auto; }
  .collage__item img { height: auto; }

  /* residences: single column */
  .residences { padding-bottom: 50px; }
  .residences__grid { grid-template-columns: 1fr; }
  .residences__grid > .residence { padding: 0 20px 30px; }
  .residence { grid-template-columns: 130px 1fr; gap: 16px; }
  .residence__photo { width: 130px; height: 130px; }
  .residence__body { padding-top: 0; }
  .residence__name { font-size: 28px; }
  .residence__desc { font-size: 18px; min-height: 0; }
  .residence__status { margin-top: 12px; }

  /* contact + footer */
  .tour { padding-inline: 20px; }
  .tour__title { font-size: 26px; }
  .tour__or { font-size: 18px; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .form { max-width: none; margin-left: 0; }
  .contact__brand img { width: 260px; height: auto; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .site-footer__legal { font-size: 11px; }

  /* apartment pages */
  .unit-head { padding-inline: 20px; }
  .unit-head__title { font-size: 35px; }
  .unit-body { grid-template-columns: 1fr; gap: 32px; padding-inline: 20px; }
  .unit-plan { padding: 0; }
  .unit-plan img { width: 100%; max-width: 491px; }
  .unit-specs { padding-right: 0; }
  .unit-specs li { font-size: 16px; }

  .slider { padding-inline: 20px; }
  .slider__thumb { flex-basis: 64px; height: 48px; }
  .lightbox__img { max-width: calc(100vw - 32px); max-height: calc(100vh - 140px); }
  .lightbox__btn--prev { left: 8px; }
  .lightbox__btn--next { right: 8px; }
}

@media (max-width: 560px) {
  .site-header__logo img { width: 240px; height: 24px; }
  .form { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Scroll motion
   Keyframes, easings and durations captured from the live Wix site's Web
   Animations API output, so these match the original frame for frame.
   Wix names them SlideIn / WinkIn / GlitchIn / FloatIn / BgReveal.
   All fire once, on viewport-enter at a 0.15 threshold.
   ========================================================================== */

/* SlideIn (bottom, "hard") — a mask opens upward as the element rises in. */
@keyframes ch-slide-in {
  from {
    clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
    transform: translate(0, 100%);
  }
  to {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transform: translate(0);
  }
}

/* WinkIn (vertical) — opens from a horizontal line, like an eye. */
@keyframes ch-wink-clip {
  from { clip-path: polygon(0% 50%, 100% 50%, 100% 50%, 0% 50%); }
  to   { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
}
@keyframes ch-wink-scale {
  from { transform: scale(1, 0); }
  to   { transform: scale(1); }
}
@keyframes ch-wink-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* GlitchIn — slides in by its own width (270°) or by 200px (180°). */
@keyframes ch-glitch-x {
  from { transform: translate(-100%, 0); }
  to   { transform: translate(0); }
}
@keyframes ch-glitch-y {
  from { transform: translate(0, 200px); }
  to   { transform: translate(0); }
}

/* FloatIn (bottom) — a short 60px lift with a fade. */
@keyframes ch-float-in {
  from { opacity: 0; transform: translate(0, 60px); }
  to   { opacity: 1; transform: translate(0); }
}

/* Hidden until revealed. Scoped to .js-motion so that without JavaScript
   every element simply renders, rather than staying invisible forever. */
.js-motion [data-reveal] { opacity: 0; }
.js-motion [data-reveal].is-revealed { opacity: 1; }

.js-motion [data-reveal="slide"].is-revealed,
.js-motion [data-reveal="slide-desktop"].is-revealed {
  animation: ch-slide-in 1200ms cubic-bezier(0.645, 0.045, 0.355, 1) both;
}

.js-motion [data-reveal="wink"].is-revealed {
  animation:
    ch-wink-clip  1200ms cubic-bezier(0.86, 0, 0.07, 1) both,
    ch-wink-scale 1020ms cubic-bezier(0.86, 0, 0.07, 1) both,
    ch-wink-fade  1200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.js-motion [data-reveal="glitch"].is-revealed {
  animation: ch-glitch-x 1200ms cubic-bezier(0.645, 0.045, 0.355, 1) both;
}

/* The hero elements and the Extras copy animate on mobile only — on desktop
   the original leaves them static. */
.js-motion [data-reveal="float-mobile"],
.js-motion [data-reveal="glitch-mobile"] { opacity: 1; }

@media (max-width: 900px) {
  .js-motion [data-reveal="float-mobile"],
  .js-motion [data-reveal="glitch-mobile"] { opacity: 0; }

  .js-motion [data-reveal="float-mobile"].is-revealed {
    animation: ch-float-in 1200ms cubic-bezier(0.445, 0.05, 0.55, 0.95) both;
  }
  .js-motion [data-reveal="glitch-mobile"].is-revealed {
    opacity: 1;
    animation: ch-glitch-y 1200ms cubic-bezier(0.645, 0.045, 0.355, 1) both;
  }

  /* Conversely, these are desktop-only in the original. */
  .js-motion [data-reveal="slide-desktop"] { opacity: 1; }
  .js-motion [data-reveal="slide-desktop"].is-revealed { animation: none; }
}

/* BgReveal — the hero video stays pinned to the viewport while the section
   scrolls over it. Driven from JS; this just keeps the paint cheap. */
.hero__media { will-change: transform; }

/* Anyone who has asked for less motion gets none of it. */
@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal],
  .js-motion [data-reveal].is-revealed {
    opacity: 1;
    animation: none;
  }
  .hero__media { will-change: auto; transform: none !important; }
}
