/* ==========================================================================
   Totality Estates — Homepage
   Section-by-section styles. Depends on tokens.css + base.css.
   ========================================================================== */

/* ==========================================================================
   Hero
   ========================================================================== */
.te-hero {
  position: relative;
  min-height: min(760px, 100svh);
  background: var(--te-photo-base);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.te-hero__bg {
  position: absolute; inset: 0;
  background: var(--te-photo-base) center / cover no-repeat;
  /* Real skyline photograph drops in here (background-image) when supplied. */
}
.te-hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  border: 0;
}
/* Honour reduced-motion: hide the video, fall back to the poster still. */
@media (prefers-reduced-motion: reduce) {
  .te-hero__video { display: none; }
}
.te-hero__scrim { position: absolute; inset: 0; background: var(--te-scrim-hero); pointer-events: none; z-index: 0; }

/* Reserve space for the transparent over-hero header so centered content
   never slides under the nav (the bg/scrim are absolute and ignore padding). */
body.te-over-hero .te-hero { padding-top: clamp(116px, 13vh, 156px); }

.te-hero__inner {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 26px;
  width: 100%; max-width: var(--te-content-max); margin-inline: auto;
  padding: clamp(28px, 4vw, 44px) clamp(16px, 4vw, 24px) 40px;
}

.te-hero__eyebrow {
  font-size: var(--te-fs-14); font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--te-on-dark-72);
}
.te-hero__title {
  margin: 0; color: var(--te-white);
  font-size: var(--te-fs-d1); line-height: var(--te-lh-hero);
  letter-spacing: var(--te-track-hero); max-width: 20ch; text-wrap: balance;
}
.te-hero__sub {
  font-size: clamp(16.5px, 1.6vw, 21px); line-height: 1.55;
  color: var(--te-on-dark-88); max-width: 60ch;
}

.te-hero__trust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px 22px;
  font-size: var(--te-fs-135); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--te-on-dark-78);
}
.te-hero__trust-item { display: inline-flex; align-items: center; gap: 8px; }
.te-hero__trust-sep { color: var(--te-on-dark-border-24); }

.te-hero__search {
  display: flex; align-items: center;
  width: 100%; max-width: 640px;
  background: var(--te-white); border-radius: var(--te-r-14);
  padding: 9px 9px 9px 22px;
  box-shadow: var(--te-shadow-hero-search);
}
.te-hero__search input {
  flex: 1; min-width: 0; border: 0; background: none;
  font-size: var(--te-fs-17); color: var(--te-ink);
}
.te-hero__search input:focus { outline: none; }
.te-hero__search input::placeholder { color: var(--te-label); }
.te-hero__search button {
  width: 52px; height: 52px; flex-shrink: 0;
  background: var(--te-accent); border: 0; border-radius: var(--te-r-11);
  color: var(--te-white);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--te-hover-transition);
}
.te-hero__search button:hover { background: var(--te-accent-hover); }

.te-hero__or {
  display: flex; align-items: center; gap: 14px;
  color: var(--te-on-dark-62); font-size: var(--te-fs-14);
}
.te-hero__or::before, .te-hero__or::after {
  content: ""; width: 34px; height: 1px; background: rgba(255,255,255,0.4);
}

.te-hero__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--te-white); color: var(--te-accent);
  font-size: clamp(16px, 1.5vw, 19px); font-weight: 600;
  padding: 18px clamp(22px, 3vw, 40px); border-radius: var(--te-r-12);
  box-shadow: var(--te-shadow-hero-cta);
  transition: color var(--te-hover-transition);
}
.te-hero__cta:hover { color: var(--te-accent-hover); }

.te-hero__scroll {
  position: relative; z-index: 1; align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-bottom: 34px;
  color: var(--te-on-dark-78); font-size: var(--te-fs-15);
}
.te-hero__scroll-label { animation: te-scroll-fade 2.4s ease-in-out infinite; }
.te-hero__scroll-chevron { animation: te-scroll-bob 2.4s ease-in-out infinite; line-height: 1; }

@keyframes te-scroll-bob {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50%      { transform: translateY(7px); opacity: 1; }
}
@keyframes te-scroll-fade {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* ==========================================================================
   Why Dubai
   ========================================================================== */
.te-why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.te-why__h2 { margin: 18px 0 0; font-size: var(--te-fs-d2); line-height: 1.1; }
.te-why__h2 em { font-style: normal; color: var(--te-accent); }
.te-why__lead { margin: 20px 0 0; font-size: var(--te-fs-20); line-height: 1.6; color: var(--te-muted); }
.te-why__link { margin-top: 20px; }
.te-why__body > p { margin: 0; font-size: var(--te-fs-19); line-height: 1.65; color: var(--te-body); }
.te-why__body > p strong { color: var(--te-ink); font-weight: 700; }
.te-quote {
  margin-top: 28px; display: flex; gap: 14px; align-items: flex-start;
  background: var(--te-ink-strong); color: var(--te-white);
  border-radius: var(--te-r-16); border-left: 4px solid var(--te-accent);
  padding: 30px 34px;
}
.te-quote__icon { color: var(--te-accent); flex-shrink: 0; margin-top: 2px; }
.te-quote__text { margin: 0; font-style: italic; font-size: var(--te-fs-19); line-height: 1.6; }

/* ==========================================================================
   Featured Off-Plan
   ========================================================================== */
.te-featured__control { display: flex; justify-content: center; margin-top: 28px; }
.te-featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 28px; margin-top: 40px;
}
/* Match the reference card proportions (near square) instead of a tall fixed height. */
.te-featured__grid .te-pcard { height: auto; aspect-ratio: 18 / 19; }
.te-featured__grid .te-pcard[hidden] { display: none !important; }
.te-featured__empty { grid-column: 1 / -1; text-align: center; color: var(--te-muted); margin: 20px 0; }
.te-featured__empty[hidden] { display: none; }
.te-featured__foot { text-align: center; margin-top: 36px; }

/* ==========================================================================
   How we work
   ========================================================================== */
.te-how__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  gap: 14px; margin-top: 44px;
}
.te-how__foot { text-align: center; margin-top: 40px; }

/* ==========================================================================
   Strategic Areas
   ========================================================================== */
.te-areas__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 26px; margin-top: 44px;
}
.te-areas__foot { text-align: center; margin-top: 36px; }

/* ==========================================================================
   Why Totality
   ========================================================================== */
.te-whyt__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px; margin-top: 44px;
}

/* ==========================================================================
   Led by experience
   ========================================================================== */
.te-led__grid {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: clamp(36px, 5vw, 76px); align-items: center;
}
.te-led__portrait { width: 280px; height: 280px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--te-photo-base) center / cover no-repeat; }
.te-led__h2 { font-size: var(--te-fs-d4); line-height: 1.1; margin: 0; }
.te-led__body { margin: 22px 0 0; }
.te-led__body p { margin: 0 0 16px; font-size: var(--te-fs-19); line-height: 1.65; color: var(--te-body); }
@media (max-width: 640px) {
  .te-led__grid { grid-template-columns: 1fr; justify-items: start; }
}

/* ==========================================================================
   Investment Pathways
   ========================================================================== */
.te-pathways__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px; margin-top: 44px;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.te-tst__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 26px; margin-top: 40px;
}
.te-tst__investors { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--te-border); text-align: center; }
.te-tst__investors-label { font-size: var(--te-fs-14); text-transform: uppercase; letter-spacing: 0.14em; color: var(--te-label); margin: 0 0 22px; }

/* ==========================================================================
   Insights & guides
   ========================================================================== */
.te-insights__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(36px, 5vw, 80px); margin-top: 12px;
}
.te-insights__colhead { font-size: var(--te-fs-22); margin: 0 0 24px; }
.te-articles { display: flex; flex-direction: column; gap: 22px; }
.te-article {
  display: grid; grid-template-columns: minmax(90px, 130px) 1fr auto;
  gap: 20px; align-items: center;
}
.te-article__thumb { height: 82px; border-radius: var(--te-r-8); background: var(--te-photo-base); }
.te-article__thumb--empty { background: none; }
.te-article__cat { font-size: var(--te-fs-14); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--te-accent); }
.te-article__title { margin: 6px 0 0; font-size: var(--te-fs-19); line-height: 1.35; }
.te-article__chevron { color: var(--te-chevron); }
.te-articles__foot { margin-top: 26px; }

.te-resources { display: flex; flex-direction: column; gap: 14px; }
.te-resource {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--te-divider); border-radius: var(--te-r-14);
  padding: 22px 24px; transition: border-color var(--te-hover-transition);
}
.te-resource:hover { border-color: var(--te-border-hover); }
.te-resource__chip { background: var(--te-fill); font-size: 14.5px; padding: 6px 12px; border-radius: var(--te-r-7); color: var(--te-ink); flex-shrink: 0; }
.te-resource__title { flex: 1; font-size: var(--te-fs-19); font-weight: 700; }
.te-resource__chevron { color: var(--te-chevron); }
.te-article__chevron svg, .te-resource__chevron svg { transform: rotate(-90deg); }

/* ==========================================================================
   FAQ (home)
   ========================================================================== */
.te-homefaq__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(36px, 5vw, 80px); align-items: start;
}
.te-homefaq__lead { margin: 16px 0 0; font-size: var(--te-fs-20); color: var(--te-muted); max-width: 36ch; line-height: 1.55; }
.te-homefaq__link { margin-top: 24px; }

/* ==========================================================================
   Closing CTA
   ========================================================================== */
.te-closing { text-align: center; }
.te-closing__inner { max-width: 900px; margin-inline: auto; padding-inline: var(--te-gutter); }
.te-closing__title { color: var(--te-white); font-size: var(--te-fs-d2); max-width: 18ch; margin: 0 auto; }
.te-closing__lead { margin: 22px auto 0; font-size: var(--te-fs-20); line-height: 1.6; color: var(--te-on-dark-72); max-width: 52ch; }
.te-closing__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 34px; }
.te-closing__fine { margin: 26px 0 0; font-size: var(--te-fs-16); color: var(--te-on-dark-45); }

/* Section head with kicker on dark */
.te-kicker--light .te-eyebrow { color: var(--te-accent-light); }
.te-kicker--light::before { background: var(--te-accent-light); }
