/* ==========================================================================
   SMARTWORLD RESIDENCES BY ELIE SAAB — couture editorial treatment
   ----------------------------------------------------------------------
   Every rule is scoped under .es so nothing here can reach the rest of the
   site. The shared header, footer, enquiry modal and contact dock keep their
   own styling from site.css and are deliberately left alone.
   ========================================================================== */

.es {
  --es-ink:      #0B0B0C;   /* near-black, warmer than the site navy */
  --es-ink-2:    #141416;
  --es-ivory:    #F4F1EC;
  --es-champ:    #C9A96A;   /* champagne */
  --es-champ-lo: #8E7644;
  --es-line:     rgba(201, 169, 106, 0.28);
  --es-mute:     rgba(244, 241, 236, 0.58);
  --es-mute-dk:  rgba(11, 11, 12, 0.56);
  --es-serif:    var(--display);
  --es-sans:     var(--utility);
  --es-ease:     cubic-bezier(0.22, 0.61, 0.36, 1);

  background: var(--es-ink);
  color: var(--es-ivory);
  font-family: var(--es-sans);
}

.es section { position: relative; }
.es .shell { max-width: 1320px; }

/* --- shared editorial primitives ---------------------------------------- */
.es-band { padding-block: clamp(72px, 9vw, 148px); }
.es-band--ivory { background: var(--es-ivory); color: var(--es-ink); }
.es-band--ink   { background: var(--es-ink); }
.es-band--ink2  { background: var(--es-ink-2); }

.es-kicker {
  margin: 0 0 22px; display: flex; align-items: center; gap: 16px;
  font-size: 0.6rem; font-weight: 400; letter-spacing: 0.42em;
  text-transform: uppercase; color: var(--es-champ);
}
.es-kicker::before { content: ""; width: clamp(24px, 4vw, 54px); height: 1px; background: currentColor; flex: none; }
.es-kicker--mid { justify-content: center; }
.es-kicker--mid::after { content: ""; width: clamp(24px, 4vw, 54px); height: 1px; background: currentColor; flex: none; }

.es-h2 {
  margin: 0; font-family: var(--es-serif); font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.14;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.es-band--ivory .es-h2 { color: var(--es-ink); }

.es-lede { margin: 22px 0 0; max-width: 60ch; font-size: 1rem; font-weight: 300; line-height: 1.9; color: var(--es-mute); }
.es-band--ivory .es-lede { color: var(--es-mute-dk); }

.es-rule { width: 64px; height: 1px; background: var(--es-champ); margin: 30px 0; }

.es-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 38px; border: 1px solid var(--es-champ);
  font-size: 0.64rem; font-weight: 400; letter-spacing: 0.3em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  color: var(--es-champ); background: transparent; position: relative; overflow: hidden;
  transition: color 500ms var(--es-ease);
}
.es-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--es-champ);
  transform: translateY(101%); transition: transform 520ms var(--es-ease);
}
.es-btn:hover, .es-btn:focus-visible { color: var(--es-ink); }
.es-btn:hover::after, .es-btn:focus-visible::after { transform: translateY(0); }
.es-btn--solid { background: var(--es-champ); color: var(--es-ink); }
.es-btn--solid:hover { filter: brightness(1.1); color: var(--es-ink); }

/* --- hero ---------------------------------------------------------------- */
.es-hero { min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.es-hero__media { position: absolute; inset: 0; z-index: 0; }
.es-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.es-hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  /* Weighted through the middle as well as the base: the headline is centred
     and the render is bright behind it. */
  background:
    linear-gradient(to top, rgba(11,11,12,.90) 0%, rgba(11,11,12,.58) 30%, rgba(11,11,12,.46) 52%,
                    rgba(11,11,12,.30) 74%, rgba(11,11,12,.54) 100%),
    radial-gradient(72% 46% at 50% 46%, rgba(11,11,12,.42) 0%, rgba(11,11,12,0) 100%);
}
.es-hero__inner {
  position: relative; z-index: 2; width: 100%; max-width: 1320px; margin-inline: auto;
  padding: calc(var(--hdr-h) + 70px) var(--gutter) 130px; text-align: center;
}
.es-hero__x {
  margin: 0; font-family: var(--es-serif); font-weight: 400;
  font-size: clamp(1.1rem, 2.1vw, 1.7rem); letter-spacing: 0.44em;
  text-transform: uppercase; color: var(--es-champ);
}
.es-hero__h1 {
  margin: 22px 0 0; font-family: var(--es-serif); font-weight: 400;
  font-size: clamp(3rem, 9vw, 7.5rem); line-height: 0.94;
  letter-spacing: 0.02em; color: #fff;
}
.es-hero__sub {
  margin: 26px 0 0; font-size: 0.68rem; letter-spacing: 0.4em;
  text-transform: uppercase; color: rgba(244,241,236,.72);
}
.es-hero__acts { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.es-hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 0.54rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: rgba(244,241,236,.5); text-decoration: none;
}
.es-hero__scroll i { display: block; width: 1px; height: 52px; background: rgba(244,241,236,.28); position: relative; overflow: hidden; }
.es-hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--es-champ); animation: es-drop 2.6s var(--es-ease) infinite; }
@keyframes es-drop { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* --- editorial split ------------------------------------------------------ */
.es-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
.es-split--wide { grid-template-columns: 1.15fr 1fr; }
.es-figure { margin: 0; position: relative; overflow: hidden; }
.es-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-figure figcaption {
  margin-top: 14px; font-size: 0.56rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--es-mute);
}
.es-band--ivory .es-figure figcaption { color: var(--es-mute-dk); }

.es-prose p { margin: 0 0 20px; font-size: 1rem; font-weight: 300; line-height: 1.95; color: var(--es-mute); max-width: 58ch; }
.es-prose p:last-child { margin-bottom: 0; }
.es-band--ivory .es-prose p { color: var(--es-mute-dk); }

.es-quote {
  margin: 0; font-family: var(--es-serif); font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem); line-height: 1.32; color: var(--es-champ);
}

/* --- full-bleed cinematic ------------------------------------------------- */
.es-cine { position: relative; min-height: clamp(420px, 68vh, 760px); display: grid; align-items: end; overflow: hidden; }
.es-cine img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.es-cine::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(11,11,12,.8), rgba(11,11,12,.05) 55%);
}
.es-cine__in { position: relative; z-index: 2; max-width: 1320px; margin-inline: auto; width: 100%; padding: 0 var(--gutter) clamp(40px, 5vw, 72px); }
.es-cine__st { margin: 0; font-family: var(--es-serif); font-weight: 400; font-size: clamp(1.6rem, 4vw, 3.2rem); line-height: 1.2; color: #fff; max-width: 20ch; }
.es-cine__cap { margin: 18px 0 0; font-size: 0.54rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(244,241,236,.55); }

/* --- highlight trio ------------------------------------------------------- */
.es-tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--es-line); border: 1px solid var(--es-line); }
.es-tri > div { background: var(--es-ink); padding: clamp(30px, 3.6vw, 52px); text-align: center; }
.es-tri .ico { width: 34px; height: 34px; margin-bottom: 22px; color: var(--es-champ); }
.es-tri dt { font-family: var(--es-serif); font-size: clamp(1.15rem, 1.8vw, 1.5rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--es-ivory); }
.es-tri dd { margin: 12px 0 0; font-size: 0.86rem; font-weight: 300; line-height: 1.7; color: var(--es-mute); }

/* --- connectivity timeline ------------------------------------------------ */
.es-time { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 44px); }
.es-time > div { position: relative; padding-top: 30px; border-top: 1px solid var(--es-line); }
.es-time dt { font-family: var(--es-serif); font-size: clamp(1.7rem, 3.4vw, 2.9rem); line-height: 1; color: var(--es-champ); }
.es-time dd { margin: 16px 0 0; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.7; color: var(--es-mute); }

/* --- exterior / interior switcher ---------------------------------------- */
.es-tabs { display: flex; justify-content: center; gap: 0; margin-bottom: clamp(28px, 3.4vw, 46px); }
.es-tab {
  appearance: none; background: none; border: 0; border-bottom: 1px solid transparent;
  padding: 12px 30px; cursor: pointer; font-family: var(--es-sans);
  font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--es-mute); transition: color 380ms var(--es-ease), border-color 380ms var(--es-ease);
}
.es-tab:hover { color: var(--es-ivory); }
.es-tab[aria-selected="true"] { color: var(--es-champ); border-bottom-color: var(--es-champ); }
.es-panel[hidden] { display: none !important; }
.es-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 1.6vw, 22px); }
.es-switch figure { margin: 0; overflow: hidden; }
.es-switch img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.6s var(--es-ease); }
.es-switch figure:hover img { transform: scale(1.04); }

/* --- amenity gallery ------------------------------------------------------ */
.es-amen { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.es-amen figure { position: relative; margin: 0; overflow: hidden; }
.es-amen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.8s var(--es-ease); }
.es-amen figure:hover img { transform: scale(1.05); }
.es-amen figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 26px 24px;
  background: linear-gradient(to top, rgba(11,11,12,.88), rgba(11,11,12,0));
}
.es-amen h3 { margin: 0; font-family: var(--es-serif); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.es-amen p { margin: 8px 0 0; font-size: 0.84rem; font-weight: 300; line-height: 1.65; color: rgba(244,241,236,.68); max-width: 46ch; }
.es-amen-more { margin: clamp(24px, 3vw, 38px) 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.es-amen-more li {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  border: 1px solid var(--es-line); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--es-mute);
}
.es-amen-more .ico { width: 17px; height: 17px; color: var(--es-champ); }

/* --- vision statement ----------------------------------------------------- */
.es-vision { text-align: center; }
.es-vision__h {
  margin: 0 auto; max-width: 16ch; font-family: var(--es-serif); font-weight: 400;
  font-size: clamp(2rem, 5.4vw, 4.2rem); line-height: 1.14; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--es-ivory);
}

/* --- video ---------------------------------------------------------------- */
.es-video { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--es-line); background: var(--es-ink-2); }
.es-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- statistics ----------------------------------------------------------- */
.es-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--es-line); border: 1px solid var(--es-line); }
.es-stats > div { background: var(--es-ink); padding: clamp(26px, 3vw, 42px) clamp(18px, 2vw, 28px); }
.es-stats .ico { width: 26px; height: 26px; margin-bottom: 18px; color: var(--es-champ); }
.es-stats dt { font-family: var(--es-serif); font-size: clamp(1.3rem, 2.2vw, 1.9rem); line-height: 1.05; color: var(--es-ivory); }
.es-stats dd { margin: 12px 0 0; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1.6; color: var(--es-mute); }
.es-note { margin: 26px 0 0; font-size: 0.74rem; line-height: 1.8; color: rgba(244,241,236,.4); max-width: 96ch; }
.es-band--ivory .es-note { color: var(--es-mute-dk); }

/* --- reveal --------------------------------------------------------------- */
.es-rise { opacity: 0; transform: translateY(28px); }
.es-rise.is-in { opacity: 1; transform: none; transition: opacity 1s var(--es-ease), transform 1s var(--es-ease); }
@media (prefers-reduced-motion: reduce) {
  .es-rise { opacity: 1; transform: none; }
  .es-hero__scroll i::after { animation: none; }
  .es-switch img, .es-amen img { transition: none; }
}

/* --- responsive ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .es-stats { grid-template-columns: repeat(2, 1fr); }
  .es-time { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .es-split, .es-split--wide { grid-template-columns: 1fr; }
  .es-tri { grid-template-columns: 1fr; }
  .es-amen { grid-template-columns: 1fr; }
  .es-switch { grid-template-columns: 1fr; }
  .es-hero { min-height: 88svh; }
}
@media (max-width: 560px) {
  .es-stats { grid-template-columns: 1fr; }
  .es-time { grid-template-columns: 1fr; }
  .es-hero__acts .es-btn { flex: 1 1 auto; justify-content: center; }
  .es-tabs { flex-wrap: wrap; }
  .es-amen figcaption { padding: 30px 18px 18px; }
}

/* --- in-page anchor rail, sits under the site header ---------------------- */
.es-subnav {
  position: sticky; top: 74px; z-index: 40;
  background: rgba(11, 11, 12, 0.94); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--es-line);
}
.es-subnav__in {
  max-width: 1320px; margin-inline: auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: clamp(14px, 2vw, 34px);
  overflow-x: auto; scrollbar-width: none;
}
.es-subnav__in::-webkit-scrollbar { display: none; }
.es-subnav a {
  flex: none; padding: 17px 0; text-decoration: none; white-space: nowrap;
  font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--es-mute); border-bottom: 1px solid transparent;
  transition: color 340ms var(--es-ease), border-color 340ms var(--es-ease);
}
.es-subnav a:hover, .es-subnav a:focus-visible { color: var(--es-champ); border-bottom-color: var(--es-champ); }
.es-subnav__cta { margin-left: auto; color: var(--es-champ) !important; }
.es [id] { scroll-margin-top: 130px; }
@media (max-width: 860px) { .es-subnav { top: 74px; } .es-subnav__cta { margin-left: 0; } }
