/* ==========================================================================
   Totality Estates — Shared components
   Section scaffolding, property/area/testimonial cards, badges, segmented
   control, pills. Reused across home + interior pages. Depends on tokens.css.
   ========================================================================== */

/* ---- Section scaffolding ---- */
.te-section { padding-block: clamp(56px, 8vw, 100px); }
.te-section--surface { background: var(--te-surface); }
.te-section--ink { background: var(--te-ink-strong); color: var(--te-white); }
.te-section--border-top { border-top: 1px solid var(--te-divider); }
.te-section__inner {
  width: 100%; max-width: var(--te-content-max);
  margin-inline: auto; padding-inline: var(--te-gutter);
}
.te-section__head { text-align: center; max-width: 760px; margin-inline: auto; }
.te-section__head--left { text-align: left; margin-inline: 0; }
.te-section__title {
  font-size: var(--te-fs-d3); line-height: 1.1; margin: 0;
}
.te-section__sub {
  margin: 16px auto 0; font-size: var(--te-fs-20);
  color: var(--te-muted); max-width: 44ch; line-height: 1.55;
}
.te-section__head--left .te-section__sub { margin-inline: 0; }

/* Text link with trailing chevron */
.te-textlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--te-accent);
}
.te-textlink:hover { color: var(--te-accent-hover); }

/* ---- Property card (home 520px / interior 440px) ---- */
.te-pcard {
  position: relative; height: 520px;
  border-radius: var(--te-r-18); overflow: hidden;
  background: var(--te-photo-base);
  display: flex;
}
.te-pcard--sm { height: 440px; border-radius: var(--te-r-16); }
.te-pcard__bg { position: absolute; inset: 0; background: var(--te-photo-base) center / cover no-repeat; }
.te-pcard__scrim { position: absolute; inset: 0; background: var(--te-scrim-property); pointer-events: none; }

.te-pcard__badges {
  position: absolute; top: 20px; left: 20px; z-index: 2;
  display: flex; flex-direction: column; gap: 9px;
}
.te-pcard--sm .te-pcard__badges { top: 18px; left: 18px; }
.te-badge {
  align-self: flex-start;
  background: var(--te-badge-fill); color: var(--te-white);
  font-size: var(--te-fs-135); padding: 7px 13px; border-radius: var(--te-r-7);
}
.te-badge--status { font-weight: 600; }

.te-pcard__fav {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  background: none; border: 0; color: var(--te-white);
  line-height: 1; padding: 2px;
}
.te-pcard--sm .te-pcard__fav { top: 18px; right: 18px; }

.te-pcard__body {
  position: relative; z-index: 2; width: 100%; margin-top: auto;
  padding: 26px; color: var(--te-white);
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.te-pcard--sm .te-pcard__body { padding: 24px; }
.te-pcard__title {
  margin: 0; color: var(--te-white);
  font-family: var(--te-font-display); font-weight: 700;
  font-size: 29px; letter-spacing: -0.015em;
}
.te-pcard--sm .te-pcard__title { font-size: 26px; }
.te-pcard__area { display: inline-flex; align-items: center; gap: 6px; font-size: var(--te-fs-16); color: var(--te-on-dark-88); }
.te-pcard__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
  margin: 2px 0; font-size: var(--te-fs-14);
}
.te-pcard__grid dt { color: var(--te-on-dark-72); margin: 0; }
.te-pcard__grid dd { margin: 0; color: var(--te-white); font-weight: 600; }
.te-pcard__specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 2px 0; }
.te-pcard__spec { display: inline-flex; align-items: flex-start; gap: 8px; font-size: var(--te-fs-15); color: var(--te-white); font-weight: 500; line-height: 1.35; }
.te-pcard__spec svg { flex: none; margin-top: 1px; color: var(--te-on-dark-72); }
.te-pcard__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.te-pcard__price-label { font-size: var(--te-fs-14); color: var(--te-on-dark-72); }
.te-pcard__price { font-family: var(--te-font-display); font-weight: 700; font-size: 26px; }
.te-pcard--sm .te-pcard__price { font-size: 24px; }
.te-pcard__cta {
  pointer-events: auto; flex-shrink: 0;
  background: var(--te-accent); color: var(--te-white);
  font-size: var(--te-fs-16); font-weight: 600;
  padding: 13px 22px; border-radius: var(--te-r-9);
  transition: background var(--te-hover-transition);
}
.te-pcard--sm .te-pcard__cta { padding: 12px 20px; font-size: var(--te-fs-15); }
.te-pcard__cta:hover { background: var(--te-accent-hover); color: var(--te-white); }

/* ---- Segmented control ---- */
.te-segmented {
  display: inline-flex; background: var(--te-white);
  border: 1px solid var(--te-border); border-radius: var(--te-r-14);
  padding: 7px; box-shadow: var(--te-shadow-segmented);
}
.te-segmented__btn {
  background: none; border: 0; cursor: pointer;
  padding: 13px 26px; border-radius: var(--te-r-9);
  font-family: var(--te-font-body); font-size: var(--te-fs-16);
  font-weight: 500; color: var(--te-muted);
  transition: background var(--te-hover-transition), color var(--te-hover-transition);
}
.te-segmented__btn.is-active { background: var(--te-ink-strong); color: var(--te-white); font-weight: 600; }

/* ---- Numbered step card ---- */
.te-step {
  background: var(--te-white); border: 1px solid var(--te-divider);
  border-radius: var(--te-r-16); padding: 32px 26px 38px;
  display: flex; flex-direction: column; gap: 16px;
}
.te-step__num { font-family: var(--te-font-display); font-weight: 700; font-size: 36px; color: var(--te-numeral); line-height: 1; }
.te-step__title { font-size: var(--te-fs-21); line-height: 1.3; margin: 0; }
.te-step__body { font-size: var(--te-fs-16); line-height: 1.6; color: var(--te-muted); margin: 0; }

/* ---- Feature card (icon badge + title + body [+ link]) ---- */
.te-fcard {
  background: var(--te-white); border: 1px solid var(--te-divider);
  border-radius: var(--te-r-16); padding: 34px 32px 40px;
  display: flex; flex-direction: column; gap: 18px;
  transition: border-color var(--te-hover-transition);
}
.te-fcard:hover { border-color: var(--te-border-hover); }
.te-fcard__badge {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--te-border); color: var(--te-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-17);
}
.te-fcard__title { margin: 0; font-size: var(--te-fs-22); }
.te-fcard__body { margin: 0; font-size: var(--te-fs-17); line-height: 1.6; color: var(--te-muted); }
.te-fcard__link { margin-top: auto; }

/* ---- Area card (photo + scrim + title/blurb/link) ---- */
.te-acard {
  position: relative; height: 330px; display: flex;
  border-radius: var(--te-r-16); overflow: hidden;
  background: var(--te-photo-base);
}
.te-acard__bg { position: absolute; inset: 0; background: var(--te-photo-base) center / cover no-repeat; }
.te-acard__scrim { position: absolute; inset: 0; background: var(--te-scrim-area); pointer-events: none; }
.te-acard__badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: var(--te-badge-fill); color: var(--te-white);
  font-size: var(--te-fs-135); padding: 6px 12px; border-radius: var(--te-r-7);
}
.te-acard__body { position: relative; z-index: 2; margin-top: auto; padding: 26px; color: var(--te-white); }
.te-acard__title { margin: 0 0 8px; font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-24); color: var(--te-white); }
.te-acard__blurb { margin: 0 0 12px; font-size: 15.5px; line-height: 1.55; color: var(--te-on-dark-88); }
.te-acard__link { color: var(--te-white); font-size: var(--te-fs-16); font-weight: 600; }
.te-acard__link:hover { color: var(--te-accent-pale); }

/* ---- Bordered area-guide card (photo band + stats) ---- */
.te-gcard {
  background: var(--te-white); border: 1px solid var(--te-divider);
  border-radius: var(--te-r-16); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--te-hover-transition);
}
.te-gcard:hover { border-color: var(--te-border-hover); }
.te-gcard__photo { position: relative; height: 210px; background: var(--te-photo-base); }
.te-gcard__badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--te-badge-fill); color: var(--te-white);
  font-size: var(--te-fs-135); padding: 6px 12px; border-radius: var(--te-r-7);
}
.te-gcard__body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.te-gcard__title { margin: 0; font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-24); }
.te-gcard__blurb { margin: 0; font-size: var(--te-fs-16); line-height: 1.6; color: var(--te-muted); }
.te-gcard__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--te-divider-light); border-bottom: 1px solid var(--te-divider-light); }
.te-gcard__stat-label { display: block; font-size: var(--te-fs-135); text-transform: uppercase; letter-spacing: 0.08em; color: var(--te-label); margin-bottom: 4px; }
.te-gcard__stat-value { font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-20); }

/* ---- Testimonial card ---- */
.te-tcard {
  background: var(--te-white); border: 1px solid var(--te-divider);
  border-radius: var(--te-r-16); padding: 32px;
  display: flex; flex-direction: column; gap: 22px;
}
.te-tcard__mark { font-family: var(--te-font-display); font-size: 44px; line-height: 0.7; color: var(--te-numeral); }
.te-tcard__quote { flex: 1; margin: 0; font-size: var(--te-fs-17); line-height: 1.65; color: var(--te-body); }
.te-tcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.te-tcard__who { display: flex; align-items: center; gap: 12px; }
.te-tcard__avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--te-photo-base); flex-shrink: 0; }
.te-tcard__name { font-size: 16.5px; font-weight: 700; }
.te-tcard__role { font-size: var(--te-fs-15); color: var(--te-muted-light); }
.te-tcard__stars { color: var(--te-warning); font-size: var(--te-fs-15); letter-spacing: 1px; white-space: nowrap; }

/* ---- Pills row ---- */
.te-pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.te-pill-row--center { justify-content: center; }
.te-pill {
  background: var(--te-white); border: 1px solid var(--te-border);
  border-radius: var(--te-r-pill); padding: 14px 24px; font-size: 16.5px; color: var(--te-ink);
}

/* ---- Sort bar ---- */
.te-sortbar { background: var(--te-white); border-bottom: 1px solid var(--te-divider); }
.te-sortbar__inner {
  max-width: var(--te-content-max); margin-inline: auto;
  padding: 12px var(--te-gutter);
  display: flex; justify-content: flex-end;
}
.te-sort {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--te-white); border: 1px solid var(--te-border); border-radius: var(--te-r-9);
  padding: 10px 16px; font-size: var(--te-fs-15); color: var(--te-body); cursor: pointer;
}
.te-sort:hover { border-color: var(--te-border-hover); }

/* ---- Listing head ---- */
.te-listing-title { margin: 0; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; }
.te-listing-count { margin: 8px 0 0; font-size: var(--te-fs-18); color: var(--te-muted); }

/* ---- Filter chips ---- */
.te-chips { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.te-chip {
  background: var(--te-white); border: 1px solid var(--te-border); border-radius: var(--te-r-pill);
  padding: 9px 18px; font-size: var(--te-fs-15); font-weight: 500; color: var(--te-ink); cursor: pointer;
  transition: background var(--te-hover-transition), color var(--te-hover-transition), border-color var(--te-hover-transition);
}
.te-chip:hover { border-color: var(--te-border-hover); }
.te-chip.is-active { background: var(--te-accent-tint); color: var(--te-accent); border-color: var(--te-accent-tint-border); }
.te-chip--clear { background: none; border: 0; color: var(--te-muted); padding: 9px 8px; font-size: var(--te-fs-15); cursor: pointer; }
.te-chip--clear:hover { color: var(--te-ink); }

/* Area-link pills (developer "where they build", and similar cross-links) */
.te-arealinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.te-arealink {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border: 1px solid var(--te-border); border-radius: var(--te-r-pill);
  font-size: var(--te-fs-15); font-weight: 500; line-height: 1; color: var(--te-ink);
  text-decoration: none; white-space: nowrap;
  transition: border-color var(--te-hover-transition), color var(--te-hover-transition);
}
.te-arealink:hover { border-color: var(--te-accent); color: var(--te-accent); }
.te-arealink svg { color: var(--te-accent); flex: none; }

/* ---- Pagination ---- */
.te-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.te-page-btn {
  min-width: 38px; height: 38px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--te-border); border-radius: var(--te-r-9);
  background: var(--te-white); color: var(--te-ink); font-size: var(--te-fs-15);
}
.te-page-btn:hover { border-color: var(--te-border-hover); color: var(--te-ink); }
.te-page-btn.is-current { background: var(--te-accent); color: var(--te-white); border-color: var(--te-accent); font-weight: 600; }
.te-page-btn--nav { color: var(--te-label); }
.te-page-ellipsis { min-width: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--te-label); }

/* Card hidden by client-side filter */
.te-pcard[hidden], .te-gcard[hidden] { display: none; }

/* ---- FAQ accordion (single-open) ---- */
.te-faq { display: flex; flex-direction: column; gap: 16px; }
.te-faq__item { background: var(--te-white); border: 1px solid var(--te-divider); border-radius: var(--te-r-14); padding: 26px 28px; }
.te-faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; background: none; border: 0; text-align: left; cursor: pointer;
  font-family: var(--te-font-display); font-weight: 700; font-size: var(--te-fs-20); color: var(--te-ink);
}
.te-faq__caret { flex-shrink: 0; color: var(--te-muted); transition: transform var(--te-hover-transition); }
.te-faq__q[aria-expanded="true"] .te-faq__caret { transform: rotate(180deg); }
.te-faq__a { margin: 18px 0 0; font-size: 17.5px; line-height: 1.6; color: var(--te-muted); }
.te-faq__a[hidden] { display: none; }
