/* =====================================================================
   INFINITY EXIST — Home page ("Estate" redesign)
   Page-specific sections: hero, floating search, featured carousel, CTA.
   Pairs with design-system.css. Loaded ONLY on pages.non-secure.home.
   ===================================================================== */

.est-home { background: var(--bg); }

/* ---------- Hero ---------- */
.est-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    color: #fff;
    /* fallback shown until the video paints */
    background: linear-gradient(120deg, #123c3a 0%, #0d2530 60%, #101c26 100%);
    padding: 96px 0 120px;
}
.est-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.est-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(11, 22, 30, .82) 0%, rgba(11, 22, 30, .5) 55%, rgba(11, 22, 30, .3) 100%);
}
.est-hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
    width: 100%;
}
.est-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
    padding: 8px 16px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    margin-bottom: 26px;
}
.est-hero__eyebrow svg { width: 15px; height: 15px; }
.est-hero__title {
    font-size: 64px;
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.03em;
    max-width: 640px;
    margin-bottom: 20px;
}
.est-hero__sub {
    font-size: 19px;
    color: rgba(255, 255, 255, .82);
    max-width: 440px;
    margin-bottom: 34px;
    line-height: 1.5;
}

/* ---------- Floating search ---------- */
.est-searchwrap { max-width: var(--container); margin: -56px auto 0; padding-inline: 24px; position: relative; z-index: 20; }
.est-search {
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-float);
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: 10px;
}
.est-search__filter {
    width: 60px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease;
}
.est-search__filter:hover, .est-search__filter.is-open { border-color: var(--accent); color: var(--accent); }
.est-search__filter svg { width: 20px; height: 20px; }
/* the shared .est-adv panel sits under the hero search inside the same form */
.est-searchwrap .est-adv { border-radius: var(--r-lg); }
.est-search__field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    transition: background .16s ease;
}
.est-search__field + .est-search__field { border-left: 1px solid var(--border); }
.est-search__field:hover { background: var(--surface-alt); }
.est-search__icon {
    width: 40px; height: 40px;
    flex: none;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
}
.est-search__icon svg { width: 19px; height: 19px; }
.est-search__control { flex: 1; min-width: 0; }
.est-search__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 2px;
}
.est-search__control select,
.est-search__control input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    padding: 0;
    /* native select arrow removed; we draw our own */
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.est-search__control input { cursor: text; font-weight: 500; }
.est-search__field--select::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 9px; height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.est-search__btn { width: 100%; height: 100%; min-height: 60px; padding: 0 34px; }

/* ---------- Generic section spacing ---------- */
.est-section { padding: 84px 0; }
.est-section--tight { padding: 64px 0 84px; }

/* ---------- Featured carousel ---------- */
.est-featured { position: relative; max-width: 820px; margin-inline: auto; }
.est-featured__viewport { overflow: hidden; border-radius: var(--r); }
.est-featured__track {
    display: flex;
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.est-featured__slide { min-width: 100%; padding: 8px 8px 60px; }
.est-fcard { position: relative; }
.est-fcard__media {
    border-radius: var(--r);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow: var(--shadow-card);
    background: var(--surface-alt);
}
.est-fcard__media img { width: 100%; height: 100%; object-fit: cover; }
.est-fcard__info {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(88%, 560px);
    background: #fff;
    border-radius: var(--r);
    box-shadow: var(--shadow-float);
    padding: 20px 24px;
}
.est-fcard__badge { margin-bottom: 10px; }
.est-fcard__title { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -.01em; }
.est-fcard__loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.est-fcard__loc svg { width: 15px; height: 15px; color: var(--accent); }
.est-fcard__meta { display: flex; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.est-fcard__meta span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--body); }
.est-fcard__meta svg { width: 16px; height: 16px; color: var(--muted); }
.est-fcard__price { color: var(--accent); font-size: 20px; font-weight: 800; }

.est-featured__nav {
    position: absolute;
    top: 40%;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    display: grid;
    place-items: center;
    color: var(--ink);
    transition: background .16s ease, color .16s ease, transform .16s ease;
    z-index: 5;
}
.est-featured__nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.est-featured__nav svg { width: 22px; height: 22px; }
.est-featured__nav--prev { left: -26px; }
.est-featured__nav--next { right: -26px; }
.est-featured__empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- CTA band ---------- */
.est-cta { max-width: var(--container); margin: 0 auto; padding-inline: 24px; }
.est-cta__inner {
    background: var(--accent-soft);
    border: 1px solid #d4ece8;
    border-radius: var(--r-lg);
    padding: 30px 40px;
    display: flex;
    align-items: center;
    gap: 22px;
}
.est-cta__icon {
    width: 58px; height: 58px;
    flex: none;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px -10px var(--accent);
}
.est-cta__icon svg { width: 26px; height: 26px; }
.est-cta__text h3 { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.est-cta__text p { color: var(--body); font-size: 15px; margin-top: 4px; }
.est-cta__btn { margin-left: auto; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .est-hero__title { font-size: 46px; }
    .est-search { grid-template-columns: 1fr 1fr; }
    .est-search__field:nth-child(3) { border-left: 0; }
    .est-search__btn { grid-column: 1 / -1; }
    .est-featured__nav--prev { left: 6px; }
    .est-featured__nav--next { right: 6px; }
}
@media (max-width: 640px) {
    .est-hero { min-height: 480px; padding: 72px 0 100px; }
    .est-hero__title { font-size: 36px; }
    .est-hero__sub { font-size: 17px; }
    .est-search { grid-template-columns: 1fr; }
    .est-search__field + .est-search__field { border-left: 0; border-top: 1px solid var(--border); }
    .est-section { padding: 60px 0; }
    .est-cta__inner { flex-direction: column; text-align: center; padding: 30px 24px; }
    .est-cta__btn { margin-left: 0; }
    .est-cta__icon { margin: 0 auto; }
}
