:root {
    --burgundy: #582c37;
    --deep: #24181b;
    --ink: #171313;
    --ivory: #fff8ee;
    --beige: #e6d3bd;
    --rose: #b7838e;
    --muted: #7f6b64;
    --line: rgba(88, 44, 55, 0.18);
    --shadow: 0 28px 80px rgba(36, 24, 27, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--ivory);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(115deg, rgba(88, 44, 55, 0.08), transparent 32%),
        linear-gradient(180deg, #fff8ee 0%, #f5e9dc 44%, #fff8ee 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(88, 44, 55, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 44, 55, 0.08) 1px, transparent 1px);
    background-size: 72px 72px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 1000;
    padding: .75rem 1rem;
    background: var(--burgundy);
    color: white;
    border-radius: 8px;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(255, 248, 238, .82);
    border-color: var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--deep);
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 8px;
    color: var(--ivory);
    background: var(--burgundy);
    box-shadow: 0 14px 36px rgba(88, 44, 55, .25);
    font-size: .82rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.nav-links a {
    padding: .72rem .9rem;
    color: rgba(36, 24, 27, .76);
    border-radius: 8px;
    font-weight: 700;
    font-size: .92rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--burgundy);
    background: rgba(88, 44, 55, .08);
    outline: none;
}

.nav-links .nav-cta {
    color: var(--ivory);
    background: var(--burgundy);
    margin-left: .35rem;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.45);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--burgundy);
}

.hero-section {
    min-height: 100vh;
    padding: 112px 0 56px;
    display: grid;
    align-items: center;
}

.hero-grid,
.section,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.eyebrow {
    color: var(--burgundy);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

.hero-copy h1 {
    max-width: 820px;
    color: var(--deep);
    font-size: clamp(2.75rem, 4.5vw, 4.35rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 1.3rem;
}

.section-heading h2 {
    color: var(--deep);
    font-size: clamp(2rem, 4vw, 4.1rem);
    font-weight: 920;
    line-height: 1.02;
    letter-spacing: 0;
    margin-bottom: 1rem;
}

.feature-card h3,
.roadmap-item h3,
.dash-top h3 {
    font-size: 1.2rem;
    color: var(--deep);
    font-weight: 880;
    letter-spacing: 0;
}

.hero-lede,
.section-heading p,
.feature-card p,
.roadmap-item p,
.site-footer p {
    color: var(--muted);
}

.hero-lede {
    max-width: 690px;
    font-size: 1.12rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin: 2rem 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: .85rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 850;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.btn-primary {
    color: var(--ivory);
    background: var(--burgundy);
    box-shadow: 0 18px 40px rgba(88,44,55,.23);
}

.btn-secondary {
    color: var(--burgundy);
    background: rgba(255,255,255,.4);
    border-color: var(--line);
}

.language-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    color: var(--muted);
    font-size: .9rem;
}

.lang-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .42rem .78rem;
    color: var(--burgundy);
    background: rgba(255,255,255,.45);
    cursor: pointer;
}

.lang-pill.active {
    color: var(--ivory);
    background: var(--burgundy);
}

.architectural-visual {
    min-height: 520px;
    perspective: 1000px;
}

.property-frame {
    position: relative;
    min-height: 500px;
    border: 1px solid rgba(88, 44, 55, .24);
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(36,24,27,.92), rgba(88,44,55,.9)),
        linear-gradient(90deg, transparent 50%, rgba(255,255,255,.08));
    box-shadow: var(--shadow);
}

.property-frame::before {
    content: "";
    position: absolute;
    inset: 36px;
    border: 1px solid rgba(255,248,238,.2);
}

.property-frame::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 10%;
    bottom: 0;
    height: 78%;
    background:
        linear-gradient(90deg, rgba(255,248,238,.1) 1px, transparent 1px),
        linear-gradient(rgba(255,248,238,.12) 1px, transparent 1px);
    background-size: 52px 52px;
    clip-path: polygon(0 26%, 24% 8%, 48% 24%, 72% 0, 100% 18%, 100% 100%, 0 100%);
}

.skyline {
    position: absolute;
    left: 14%;
    right: 12%;
    bottom: 70px;
    display: grid;
    grid-template-columns: 1fr .7fr 1.15fr .85fr;
    gap: 16px;
    align-items: end;
    z-index: 2;
}

.skyline span {
    display: block;
    border: 1px solid rgba(255,248,238,.32);
    background: rgba(255,248,238,.1);
}

.skyline span:nth-child(1) { height: 210px; }
.skyline span:nth-child(2) { height: 310px; }
.skyline span:nth-child(3) { height: 250px; }
.skyline span:nth-child(4) { height: 360px; }

.blueprint-lines {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 26%, rgba(230,211,189,.22), transparent 24%);
}

.mini-panel {
    position: absolute;
    z-index: 3;
    width: 190px;
    padding: 1rem;
    border: 1px solid rgba(255,248,238,.24);
    border-radius: 8px;
    color: var(--ivory);
    background: rgba(36,24,27,.72);
    backdrop-filter: blur(14px);
}

.mini-panel strong,
.mini-panel span {
    display: block;
}

.mini-panel span {
    color: var(--beige);
    font-size: .86rem;
}

.panel-one {
    left: -22px;
    top: 95px;
}

.panel-two {
    right: -18px;
    bottom: 120px;
}

.float-panel {
    animation: floatPanel 7s ease-in-out infinite;
}

.section {
    padding: 96px 0;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 2.4rem;
    text-align: center;
}

.section-heading.align-left {
    text-align: left;
    margin-left: 0;
}

.dashboard-preview,
.permission-matrix,
.chat-board,
.waitlist-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.58);
    box-shadow: var(--shadow);
}

.dashboard-preview {
    min-height: 620px;
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
}

.dash-sidebar {
    padding: 1.2rem;
    background: var(--deep);
    color: rgba(255,248,238,.74);
}

.dash-logo {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--burgundy);
    color: var(--ivory);
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.dash-sidebar a {
    display: block;
    padding: .82rem .75rem;
    border-radius: 8px;
}

.dash-sidebar a.active,
.dash-sidebar a:hover {
    color: var(--ivory);
    background: rgba(255,248,238,.12);
}

.dash-main {
    padding: clamp(1rem, 3vw, 2rem);
}

.dash-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.2rem;
}

.muted-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.dash-top h3 {
    margin: .2rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.status-badge,
.listing-status {
    display: inline-flex;
    align-items: center;
    padding: .36rem .62rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
}

.status-badge {
    color: var(--burgundy);
    background: rgba(88,44,55,.1);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
    margin-bottom: .9rem;
}

.stat-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,248,238,.7);
}

.stat-card span {
    display: block;
    color: var(--burgundy);
    font-size: 2rem;
    font-weight: 900;
}

.stat-card small {
    color: var(--muted);
}

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: .9rem;
}

.property-stack,
.control-panel,
.message-card {
    display: grid;
    gap: .9rem;
}

.property-card,
.control-panel,
.message-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.72);
}

.property-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 1rem;
    align-items: center;
}

.property-thumb {
    width: 88px;
    aspect-ratio: 1;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(88,44,55,.82), rgba(36,24,27,.3)),
        repeating-linear-gradient(90deg, transparent 0 12px, rgba(255,248,238,.2) 12px 14px);
}

.thumb-two {
    background:
        linear-gradient(135deg, rgba(183,131,142,.8), rgba(36,24,27,.45)),
        repeating-linear-gradient(0deg, transparent 0 12px, rgba(255,248,238,.22) 12px 14px);
}

.property-card h4,
.control-panel h4,
.message-card h4 {
    margin-bottom: .25rem;
}

.property-card p,
.message-card p {
    margin-bottom: .55rem;
    color: var(--muted);
}

.listing-status.live {
    color: #355544;
    background: #dfeee3;
}

.listing-status.review {
    color: var(--burgundy);
    background: rgba(183,131,142,.22);
}

.control-panel label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
}

input[type="checkbox"] {
    accent-color: var(--burgundy);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.52);
    transition: transform .2s ease, border-color .2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(88,44,55,.35);
}

.feature-number {
    color: var(--rose);
    font-weight: 950;
}

.permissions-layout,
.waitlist-layout {
    display: grid;
    grid-template-columns: .88fr 1.12fr;
    gap: clamp(1.4rem, 4vw, 4rem);
    align-items: center;
}

.permission-matrix {
    overflow: hidden;
}

.matrix-head,
.matrix-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr 72px;
    gap: .8rem;
    align-items: center;
    padding: .95rem 1rem;
}

.matrix-head {
    color: var(--ivory);
    background: var(--deep);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.matrix-row {
    border-top: 1px solid var(--line);
}

.toggle {
    width: 48px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    padding: 3px;
    cursor: pointer;
    background: rgba(36,24,27,.18);
    transition: background .2s ease;
}

.toggle span {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    transition: transform .2s ease;
}

.toggle.on {
    background: var(--burgundy);
}

.toggle.on span {
    transform: translateX(20px);
}

.chat-board {
    display: grid;
    grid-template-columns: 260px 1fr;
    overflow: hidden;
}

.channel-list {
    display: grid;
    align-content: start;
    gap: .55rem;
    padding: 1rem;
    background: var(--deep);
}

.channel {
    padding: .72rem .8rem;
    border-radius: 8px;
    color: rgba(255,248,238,.72);
}

.channel.active {
    color: var(--ivory);
    background: rgba(255,248,238,.12);
}

.chat-window {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 2rem);
}

.chat-bubble {
    max-width: 680px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,248,238,.74);
}

.chat-bubble.agent {
    justify-self: end;
    background: rgba(88,44,55,.08);
}

.chat-bubble.system {
    max-width: none;
    border-color: rgba(88,44,55,.28);
}

.roadmap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.roadmap-item {
    position: relative;
    padding: 1.25rem;
    border-left: 3px solid var(--burgundy);
    background: rgba(255,255,255,.5);
}

.roadmap-item span {
    color: var(--rose);
    font-weight: 950;
}

.waitlist-section {
    padding-bottom: 112px;
}

.waitlist-form {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.waitlist-form label {
    display: grid;
    gap: .4rem;
    color: var(--deep);
    font-size: .9rem;
    font-weight: 850;
}

.waitlist-form input,
.waitlist-form textarea {
    width: 100%;
    border: 1px solid rgba(88,44,55,.22);
    border-radius: 8px;
    padding: .85rem .9rem;
    color: var(--deep);
    background: rgba(255,248,238,.76);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.waitlist-form input:focus,
.waitlist-form textarea:focus {
    outline: none;
    border-color: var(--burgundy);
    box-shadow: 0 0 0 4px rgba(88,44,55,.11);
}

.waitlist-form textarea,
.waitlist-form > label {
    margin-top: 1rem;
}

.field-error {
    min-height: 1.1rem;
    color: #8b2033;
    font-size: .8rem;
    font-weight: 700;
}

.form-submit {
    margin-top: 1rem;
    width: 100%;
}

.form-alert {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.58);
}

.form-alert.success {
    color: #31543e;
    border-color: rgba(49,84,62,.25);
    background: #e8f2e8;
}

.form-alert.error {
    color: #8b2033;
    border-color: rgba(139,32,51,.24);
    background: #f7e7ea;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-footer {
    padding: 56px 0 32px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr .9fr;
    gap: 2rem;
}

.site-footer h2 {
    font-size: 1rem;
    margin-bottom: .8rem;
}

.site-footer a:not(.brand) {
    display: block;
    color: var(--muted);
    margin-bottom: .42rem;
}

.copyright {
    margin: 2rem 0 0;
    color: var(--muted);
    font-size: .9rem;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .75s ease, transform .75s ease;
    transition-delay: var(--delay, 0ms);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .section-heading.align-left {
    text-align: right;
}

html[dir="rtl"] .toggle.on span {
    transform: translateX(-20px);
}

@keyframes floatPanel {
    0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
    50% { transform: translateY(-12px) rotateX(1deg) rotateY(-1.5deg); }
}

@media (max-width: 980px) {
    .hero-grid,
    .permissions-layout,
    .waitlist-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .architectural-visual {
        min-height: 460px;
    }

    .property-frame {
        min-height: 440px;
    }

    .feature-grid,
    .roadmap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid,
    .dashboard-preview,
    .chat-board {
        grid-template-columns: 1fr;
    }

    .dash-sidebar {
        display: flex;
        overflow-x: auto;
        align-items: center;
    }

    .dash-logo {
        flex: 0 0 48px;
        margin: 0 .7rem 0 0;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        min-height: 68px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: .75rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(255,248,238,.96);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .nav-cta {
        margin-left: 0;
        text-align: center;
    }

    .hero-section {
        padding-top: 104px;
    }

    .hero-copy h1 {
        font-size: clamp(2.45rem, 11vw, 3.2rem);
        line-height: 1.05;
        overflow-wrap: break-word;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .feature-grid,
    .roadmap,
    .stat-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .matrix-head {
        display: none;
    }

    .matrix-row {
        grid-template-columns: 1fr 72px;
    }

    .matrix-row span:nth-child(2),
    .matrix-row span:nth-child(3) {
        grid-column: 1 / -1;
        color: var(--muted);
        font-size: .9rem;
    }

    .property-card {
        grid-template-columns: 68px 1fr;
    }

    .property-thumb {
        width: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
