/*!
 * Estatly – Real Estate & Property Listings HTML Template
 * Copyright (c) 2026 DesignVersa. All rights reserved.
 * https://designversa.com
 * Licensed for use under the DesignVersa Standard License (see LICENSE.txt).
 * Redistribution or resale of this template, in whole or in part, is prohibited.
 */

:root {
    --bg: #ffffff;
    --soft: #f3f6f9;
    --navy: #0f2a44;
    --ink: #0f1c2b;
    --text: #44546a;
    --muted: #7a8aa0;
    --line: #e3e9f0;
    --teal: #0ea5a0;
    --teal-dark: #0b8a86;
    --amber: #f5a524;
    --radius: 16px;
    --shadow: 0 12px 34px rgba(15, 42, 68, .10);
    --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
.section { padding: 96px 0; }
.soft { background: var(--soft); }
.eyebrow { color: var(--teal); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.head h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 8px 0 0; }
.head p { color: var(--muted); margin: 8px 0 0; max-width: 560px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 12px; font-weight: 700; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: background .2s, box-shadow .2s, transform .15s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 10px 24px rgba(14, 165, 160, .3); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 36px; height: 78px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; color: var(--navy); }
.logo i { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: var(--teal); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; place-items: center; cursor: pointer; }
.mobile-menu { display: none; }

/* Hero */
.hero { position: relative; padding: 70px 0 120px; background: linear-gradient(180deg, #eaf6f6 0%, #fff 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.4vw, 68px); margin: 14px 0 18px; }
.hero h1 span { color: var(--teal); }
.hero p.lead { font-size: 18px; max-width: 520px; }
.hero-scene { position: relative; height: 480px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.hero-badge { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.hero-badge b { display: block; color: var(--ink); }
.hero-badge .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #e6f7f6; color: var(--teal); font-weight: 800; }

/* Search */
.search { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 14px; margin-top: 34px; }
.search-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.search-tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 10px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.search-tabs button.active { background: var(--soft); color: var(--navy); }
.search-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; }
.search-row label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px 4px; }
.search-row input, .search-row select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; color: var(--ink); background: #fff; }
.search-row .btn { height: 48px; align-self: end; }

/* Listing cards */
.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card-media { position: relative; height: 230px; overflow: hidden; }
.card-media .scene { position: absolute; inset: 0; }
.card-tag { position: absolute; top: 14px; left: 14px; background: #fff; color: var(--navy); font-weight: 700; font-size: 12px; padding: 5px 11px; border-radius: 999px; }
.card-tag.sale { background: var(--teal); color: #fff; }
.card-fav { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .92); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.card-fav.on { color: #e11d48; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-price { font-size: 24px; font-weight: 800; color: var(--ink); }
.card-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.card-title { font-weight: 700; color: var(--ink); font-size: 17px; }
.card-addr { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.card-facts { display: flex; gap: 18px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px; font-size: 14px; color: var(--text); flex-wrap: wrap; }
.card-facts span { display: inline-flex; gap: 6px; align-items: center; }

/* House scene (illustration placeholder) */
.scene { background: linear-gradient(180deg, var(--sky1, #bfe3ff), var(--sky2, #eaf6ff)); }
.scene svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; }
.s1 { --sky1: #9ad3f5; --sky2: #e6f5ff; }
.s2 { --sky1: #fbcfa6; --sky2: #fff1e2; }
.s3 { --sky1: #b7e4c7; --sky2: #eefaf2; }
.s4 { --sky1: #c7c2f7; --sky2: #f1efff; }
.s5 { --sky1: #1e3a5f; --sky2: #56709a; }
.s6 { --sky1: #fde68a; --sky2: #fff9e1; }

/* Neighbourhoods */
.areas { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 220px; gap: 20px; }
.area { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; }
.area.big { grid-row: span 2; }
.area::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(15, 28, 43, .75)); z-index: 1; }
.area > * { position: relative; z-index: 2; }
.area b { font-size: 22px; }
.area span { opacity: .85; font-size: 14px; }
.a1 { background: linear-gradient(135deg, #0ea5a0, #0f2a44); }
.a2 { background: linear-gradient(135deg, #f5a524, #e05a2a); }
.a3 { background: linear-gradient(135deg, #6366f1, #0f2a44); }
.a4 { background: linear-gradient(135deg, #10b981, #065f46); }
.a5 { background: linear-gradient(135deg, #f472b6, #7c3aed); }

/* Why / stats */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.why-list { display: grid; gap: 18px; margin-top: 26px; }
.why-item { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.why-item .ic { width: 48px; height: 48px; border-radius: 12px; background: #e6f7f6; color: var(--teal); display: grid; place-items: center; flex: none; }
.why-item b { display: block; color: var(--ink); font-size: 17px; }
.stat-card { background: var(--navy); color: #cfd9e6; border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.stat-card b { display: block; color: #fff; font-size: 46px; font-weight: 800; letter-spacing: -.03em; }

/* Agents */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.agent { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-align: center; }
.agent .ava { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 28px; }
.agent small { color: var(--muted); display: block; }
.agent .deals { margin-top: 12px; font-size: 14px; color: var(--teal); font-weight: 700; }

/* CTA */
.cta { background: linear-gradient(120deg, var(--navy), #164d6f); color: #cfe3f0; border-radius: 28px; padding: 60px; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); margin: 0 0 8px; }

/* Listings page */
.page-hero { background: var(--soft); padding: 60px 0; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 52px); margin: 8px 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.toolbar select { height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pagination a { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; }
.pagination a.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* Property page */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 220px 220px; gap: 14px; }
.gallery .scene { position: relative; border-radius: var(--radius); overflow: hidden; }
.gallery .main { grid-row: span 2; }
.prop-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; margin-top: 40px; align-items: start; }
.prop-title { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: start; }
.prop-title h1 { font-size: clamp(30px, 3.6vw, 42px); }
.prop-price { font-size: 36px; font-weight: 800; color: var(--teal); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0; }
.fact { background: var(--soft); border-radius: 14px; padding: 16px; text-align: center; }
.fact b { display: block; color: var(--ink); font-size: 22px; }
.fact span { font-size: 13px; color: var(--muted); }
.amenities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; padding: 0; }
.amenities li { display: flex; gap: 10px; align-items: center; }
.amenities li::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; background: #e6f7f6; color: var(--teal); display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.side-card { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.agent-row { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.agent-row .ava { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--teal), var(--navy)); }
.form { display: grid; gap: 12px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font: inherit; color: var(--ink); background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(14, 165, 160, .12); }
.field .error { display: none; color: #dc2626; font-size: 13px; margin-top: 4px; }
.field.invalid input, .field.invalid textarea { border-color: #dc2626; }
.field.invalid .error { display: block; }
.form-success { display: none; background: #e6f7f6; color: var(--teal-dark); padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.map { height: 300px; border-radius: var(--radius); background: repeating-linear-gradient(0deg, #e8eef4 0 1px, transparent 1px 40px), repeating-linear-gradient(90deg, #e8eef4 0 1px, transparent 1px 40px), #f7fafc; position: relative; overflow: hidden; }
.map .pin { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -100%); width: 44px; height: 44px; border-radius: 50% 50% 50% 0; background: var(--teal); rotate: -45deg; box-shadow: var(--shadow); }
.map .road { position: absolute; background: #fff; }

/* Footer */
.footer { background: var(--navy); color: #a9bbcf; padding: 80px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer .logo { color: #fff; }
.footer .logo i { background: var(--teal); }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 50px; padding-top: 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1060px) {
    .hero-grid, .why, .prop-layout { grid-template-columns: 1fr; }
    .listings { grid-template-columns: 1fr 1fr; }
    .agents { grid-template-columns: 1fr 1fr; }
    .areas { grid-template-columns: 1fr 1fr; }
    .area.big { grid-row: span 1; grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .side-card { position: static; }
}
@media (max-width: 860px) {
    .nav-links, .nav-right .btn-line { display: none; }
    .menu-toggle { display: grid; }
    .mobile-menu.open { display: grid; padding: 8px 20px 20px; border-top: 1px solid var(--line); }
    .mobile-menu a { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
    .search-row { grid-template-columns: 1fr 1fr; }
    .search-row .btn { grid-column: span 2; }
}
@media (max-width: 600px) {
    .section { padding: 64px 0; }
    .listings, .agents, .areas, .amenities { grid-template-columns: 1fr; }
    .area.big { grid-column: span 1; }
    .facts { grid-template-columns: 1fr 1fr; }
    .search-row { grid-template-columns: 1fr; }
    .search-row .btn { grid-column: span 1; }
    .gallery { grid-template-columns: 1fr; grid-template-rows: 260px 140px 140px; }
    .gallery .main { grid-row: span 1; }
    .hero-scene { height: 320px; }
    .stat-card, .cta { padding: 30px; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-right .btn-teal { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------
   Shared page components (blog, auth, FAQ, team, gallery, legal, 404…)
   Colours come from the --x-* variables mapped above for this template.
   Copyright (c) 2026 DesignVersa. All rights reserved.
------------------------------------------------------------------- */
.x-center { text-align: center; }
.x-narrow { max-width: 760px; margin-inline: auto; }
.x-mt { margin-top: 40px; }
.x-muted { color: var(--x-muted); }
.x-grid-2, .x-grid-3, .x-grid-4 { display: grid; gap: 24px; }
.x-grid-2 { grid-template-columns: repeat(2, 1fr); }
.x-grid-3 { grid-template-columns: repeat(3, 1fr); }
.x-grid-4 { grid-template-columns: repeat(4, 1fr); }
.x-card { background: var(--x-card); border: 1px solid var(--x-line); border-radius: var(--x-radius); padding: 28px; }
.x-card h3 { font-size: 22px; margin-bottom: 8px; }
.x-card p:last-child { margin-bottom: 0; }
.x-icon { width: 52px; height: 52px; border-radius: calc(var(--x-radius) * .7); display: grid; place-items: center; background: color-mix(in srgb, var(--x-accent) 16%, transparent); color: var(--x-accent); margin-bottom: 18px; font-size: 22px; font-weight: 800; }
.x-title { font-size: clamp(30px, 4vw, 48px); margin: 10px 0 14px; }
.x-lead { font-size: 18px; color: var(--x-muted); max-width: 640px; }
.x-center .x-lead { margin-inline: auto; }
.x-head { margin-bottom: 44px; }

/* Placeholder artwork (swap for your own images) */
.x-art { position: relative; border-radius: var(--x-radius); overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(135deg, hsl(var(--h, 240) 80% 62%), hsl(calc(var(--h, 240) + 45) 75% 48%)); }
.x-art::before { content: ""; position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; right: -12%; top: -20%; border: 28px solid rgba(255, 255, 255, .18); }
.x-art::after { content: ""; position: absolute; width: 34%; aspect-ratio: 1; border-radius: 24%; left: 8%; bottom: -12%; background: rgba(255, 255, 255, .16); transform: rotate(14deg); }
.x-art.tall { aspect-ratio: 3 / 4; }
.x-art.wide { aspect-ratio: 21 / 9; }
.x-art.square { aspect-ratio: 1; }
.x-art span { position: absolute; left: 18px; bottom: 14px; z-index: 1; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }

/* Blog */
.x-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.x-post { display: flex; flex-direction: column; gap: 12px; }
.x-post .x-meta { font-size: 13px; color: var(--x-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.x-post h3 { font-size: 22px; line-height: 1.25; margin: 0; }
.x-post p { color: var(--x-muted); margin: 0; }
.x-post .x-more { color: var(--x-accent); font-weight: 700; }
.x-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--x-accent) 16%, transparent); color: var(--x-accent); }
.x-featured { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; margin-bottom: 60px; }
.x-featured h2 { font-size: clamp(28px, 3.4vw, 42px); }
.x-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 34px; }
.x-cats a, .x-cats button { border: 1px solid var(--x-line); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; background: transparent; color: var(--x-text); cursor: pointer; }
.x-cats .active { background: var(--x-accent); border-color: var(--x-accent); color: var(--x-on-accent); }

/* Article / prose */
.x-article { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.8; }
.x-article h2 { font-size: 30px; margin: 44px 0 14px; }
.x-article h3 { font-size: 23px; margin: 32px 0 10px; }
.x-article p { margin: 0 0 1.2em; }
.x-article ul, .x-article ol { padding-left: 22px; margin: 0 0 1.2em; }
.x-article li { margin-bottom: 8px; }
.x-article blockquote { margin: 32px 0; padding: 20px 26px; border-left: 4px solid var(--x-accent); background: var(--x-soft); border-radius: 0 var(--x-radius) var(--x-radius) 0; font-size: 21px; color: var(--x-ink); }
.x-article .x-art { margin: 30px 0; }
.x-author { display: flex; gap: 14px; align-items: center; margin: 22px 0 34px; }
.x-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; background: linear-gradient(135deg, hsl(var(--h, 240) 75% 55%), hsl(calc(var(--h, 240) + 50) 70% 42%)); }
.x-avatar.lg { width: 110px; height: 110px; font-size: 34px; }
.x-share { display: flex; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--x-line); align-items: center; flex-wrap: wrap; }
.x-share a { border: 1px solid var(--x-line); border-radius: 999px; padding: 8px 16px; font-weight: 600; }

/* FAQ (no JavaScript needed) */
.x-faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.x-faq details { background: var(--x-card); border: 1px solid var(--x-line); border-radius: var(--x-radius); padding: 20px 24px; }
.x-faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; color: var(--x-ink); display: flex; justify-content: space-between; gap: 16px; }
.x-faq summary::-webkit-details-marker { display: none; }
.x-faq summary::after { content: "+"; color: var(--x-accent); font-size: 24px; line-height: 1; }
.x-faq details[open] summary::after { content: "–"; }
.x-faq details p { margin: 12px 0 0; color: var(--x-muted); }
.x-faq-group { margin-bottom: 44px; }
.x-faq-group h2 { font-size: 26px; margin-bottom: 16px; max-width: 860px; margin-inline: auto; }

/* Auth pages */
.x-auth { min-height: 72vh; display: grid; place-items: center; padding: 60px 20px; }
.x-auth-card { width: min(460px, 100%); background: var(--x-card); border: 1px solid var(--x-line); border-radius: var(--x-radius); padding: 40px; box-shadow: 0 20px 50px rgba(0, 0, 0, .08); }
.x-auth-card h1 { font-size: 32px; margin: 0 0 6px; }
.x-auth-card form { display: grid; gap: 16px; margin-top: 26px; }
.x-field label { display: block; font-size: 14px; font-weight: 600; color: var(--x-ink); margin-bottom: 7px; }
.x-field input, .x-field select, .x-field textarea { width: 100%; border: 1px solid var(--x-line); background: var(--x-soft); color: var(--x-ink); border-radius: calc(var(--x-radius) * .6); padding: 13px 15px; font: inherit; }
.x-field input:focus, .x-field select:focus, .x-field textarea:focus { outline: none; border-color: var(--x-accent); }
.x-field .error { display: none; color: #dc2626; font-size: 13px; margin-top: 5px; }
.x-field.invalid input { border-color: #dc2626; }
.x-field.invalid .error { display: block; }
.x-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.x-row a, .x-link { color: var(--x-accent); font-weight: 600; }
.x-check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.x-divider { display: flex; align-items: center; gap: 12px; color: var(--x-muted); font-size: 13px; margin: 6px 0; }
.x-divider::before, .x-divider::after { content: ""; flex: 1; height: 1px; background: var(--x-line); }
.x-social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.x-social button { border: 1px solid var(--x-line); background: transparent; color: var(--x-ink); border-radius: calc(var(--x-radius) * .6); padding: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.x-full { width: 100%; }
.form-success.x-success, .x-success { display: none; background: color-mix(in srgb, var(--x-accent) 16%, transparent); color: var(--x-ink); padding: 12px 14px; border-radius: calc(var(--x-radius) * .6); font-weight: 600; }

/* 404 */
.x-404 { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 20px; }
.x-404 .code { font-size: clamp(110px, 22vw, 240px); font-weight: 800; line-height: .9; color: var(--x-accent); letter-spacing: -.05em; font-family: var(--x-heading); }
.x-404 h1 { font-size: clamp(28px, 4vw, 42px); margin: 16px 0 10px; }
.x-404 .x-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Team / people */
.x-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.x-member { text-align: center; }
.x-member .x-art { aspect-ratio: 4 / 5; margin-bottom: 16px; }
.x-member h3 { font-size: 20px; margin: 0 0 2px; }
.x-member p { color: var(--x-muted); margin: 0; font-size: 14px; }
.x-profile { display: grid; grid-template-columns: 320px 1fr; gap: 50px; align-items: start; }
.x-profile .x-art { aspect-ratio: 4 / 5; }
.x-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0; }
.x-stats div { background: var(--x-soft); border-radius: calc(var(--x-radius) * .8); padding: 18px; text-align: center; }
.x-stats b { display: block; font-size: 28px; color: var(--x-ink); font-family: var(--x-heading); }
.x-stats span { font-size: 13px; color: var(--x-muted); }

/* Lists, timeline, values */
.x-list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.x-list li { display: flex; gap: 12px; align-items: flex-start; }
.x-list li::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 900; background: color-mix(in srgb, var(--x-accent) 18%, transparent); color: var(--x-accent); }
.x-timeline { position: relative; display: grid; gap: 28px; padding-left: 34px; max-width: 760px; }
.x-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--x-line); }
.x-timeline div { position: relative; }
.x-timeline div::before { content: ""; position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--x-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--x-accent) 20%, transparent); }
.x-timeline b { display: block; color: var(--x-accent); font-family: var(--x-heading); font-size: 20px; }
.x-timeline h3 { font-size: 20px; margin: 2px 0 4px; }
.x-timeline p { margin: 0; color: var(--x-muted); }
.x-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.x-kpi { text-align: center; padding: 26px; border: 1px solid var(--x-line); border-radius: var(--x-radius); background: var(--x-card); }
.x-kpi b { display: block; font-size: 40px; color: var(--x-ink); font-family: var(--x-heading); line-height: 1.1; }
.x-kpi span { color: var(--x-muted); font-size: 14px; }

/* Gallery */
.x-gallery { columns: 3; column-gap: 20px; }
.x-gallery .x-art { break-inside: avoid; margin-bottom: 20px; }

/* Jobs / list rows */
.x-rows { display: grid; gap: 12px; }
.x-rowcard { display: grid; grid-template-columns: 1fr auto auto; gap: 20px; align-items: center; padding: 22px 26px; border: 1px solid var(--x-line); border-radius: var(--x-radius); background: var(--x-card); transition: border-color .2s; }
.x-rowcard:hover { border-color: var(--x-accent); }
.x-rowcard h3 { font-size: 20px; margin: 0 0 2px; }
.x-rowcard small { color: var(--x-muted); }

/* Pricing packages */
.x-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.x-plan { background: var(--x-card); border: 1px solid var(--x-line); border-radius: var(--x-radius); padding: 32px; display: flex; flex-direction: column; }
.x-plan.hot { border: 2px solid var(--x-accent); }
.x-plan .x-price { font-size: 44px; font-weight: 800; color: var(--x-ink); font-family: var(--x-heading); margin: 12px 0; }
.x-plan .x-price small { font-size: 15px; color: var(--x-muted); font-weight: 500; }
.x-plan .x-list { flex: 1; }

/* Calculator */
.x-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.x-calc-out { background: var(--x-soft); border-radius: var(--x-radius); padding: 30px; text-align: center; }
.x-calc-out b { display: block; font-size: 52px; color: var(--x-accent); font-family: var(--x-heading); line-height: 1.1; margin: 8px 0; }
.x-range { width: 100%; accent-color: var(--x-accent); }

/* Legal */
.x-legal { display: grid; grid-template-columns: 240px 1fr; gap: 50px; align-items: start; }
.x-toc { position: sticky; top: 110px; display: grid; gap: 8px; font-size: 14px; }
.x-toc a { color: var(--x-muted); }
.x-toc a:hover { color: var(--x-accent); }
.x-legal .x-article { margin: 0; font-size: 16px; }

/* Logo / partner row */
.x-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.x-logos div { border: 1px solid var(--x-line); border-radius: var(--x-radius); padding: 18px 26px; font-weight: 800; font-size: 18px; color: var(--x-ink); background: var(--x-card); min-width: 150px; text-align: center; }

/* Call to action band */
.x-cta { border-radius: var(--x-radius); padding: 56px; text-align: center; background: var(--x-soft); border: 1px solid var(--x-line); }
.x-cta h2 { font-size: clamp(28px, 3.6vw, 42px); }

@media (max-width: 1024px) {
    .x-grid-4, .x-team, .x-kpis { grid-template-columns: repeat(2, 1fr); }
    .x-grid-3, .x-posts, .x-plans { grid-template-columns: repeat(2, 1fr); }
    .x-featured, .x-profile, .x-calc, .x-legal { grid-template-columns: 1fr; }
    .x-toc { position: static; }
    .x-gallery { columns: 2; }
}
@media (max-width: 640px) {
    .x-grid-2, .x-grid-3, .x-grid-4, .x-posts, .x-team, .x-plans, .x-kpis { grid-template-columns: 1fr; }
    .x-gallery { columns: 1; }
    .x-rowcard { grid-template-columns: 1fr; }
    .x-auth-card, .x-cta { padding: 28px 22px; }
    .x-stats { grid-template-columns: 1fr 1fr; }
}
.page-hero .x-lead { margin-inline: auto; }
.x-center .x-author { justify-content: center; }
.x-center .x-author > div { text-align: left; }

/* Shared component colours for Estatly */
:root { --x-accent: var(--teal); --x-on-accent: #fff; --x-ink: var(--ink); --x-text: var(--text); --x-muted: var(--muted); --x-line: var(--line); --x-card: #fff; --x-soft: var(--soft); --x-radius: 16px; --x-heading: var(--font); }
.page-hero p.x-lead { margin-inline: 0; }
.page-hero .x-center p.x-lead { margin-inline: auto; }
