/* ══════════════════════════════════════════════════
   MAISAI REALTY — Luxury Design System
   ══════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
    --bg-dark: #0d0d0d;
    --bg-card: #151515;
    --bg-nav: rgba(13, 13, 13, 0.6);
    --bg-nav-scroll: rgba(13, 13, 13, 0.92);

    --gold: #c9a84c;
    --gold-dim: rgba(201, 168, 76, 0.35);
    --gold-glow: rgba(201, 168, 76, 0.25);
    --green-dark: #1b4d3e;

    --text-primary: #ffffff;
    --text-muted: #8a8a8a;
    --text-light: #c0c0c0;
    --divider: rgba(255, 255, 255, 0.08);

    --font-display: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
    --font-accent: 'Cormorant Garamond', serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --transition-smooth: 0.5s var(--ease-out-expo);
}

/* ── RESET ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}


/* ══════════════════════════════════════════════════
   1. NAVBAR
   ══════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 4vw, 60px);
    height: 80px;
    background: var(--bg-nav);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--divider);
    transition: background 0.6s ease, backdrop-filter 0.6s ease;

    /* Entry animation */
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeSlideDown 0.8s var(--ease-out-expo) 0.2s forwards;
}

.navbar.scrolled {
    background: var(--bg-nav-scroll);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-logo img {
    height: 72px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: clamp(20px, 3vw, 48px);
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    color: var(--text-light);
    position: relative;
    padding: 4px 0;
    transition: color 0.35s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.35s var(--ease-out-expo);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 12px 28px;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 2px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out-expo);
    z-index: -1;
}

.nav-cta:hover {
    color: var(--bg-dark);
}

.nav-cta:hover::before {
    transform: scaleX(1);
}


/* ══════════════════════════════════════════════════
   2. HERO SECTION
   ══════════════════════════════════════════════════ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: grid;
    grid-template-columns: 38% 1fr;
    overflow: hidden;
}

/* Ken Burns Background */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 18s linear infinite alternate;
    will-change: transform;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(13, 13, 13, 0.92) 0%,
            rgba(13, 13, 13, 0.78) 35%,
            rgba(13, 13, 13, 0.45) 60%,
            rgba(13, 13, 13, 0.30) 100%);
}

/* Left Panel */
.hero-left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 clamp(32px, 5vw, 80px);
    padding-top: 80px;
    /* navbar offset */
}

.hero-text-block {
    margin-bottom: 42px;
}

.hero-subtitle {
    display: block;
    font-family: var(--font-accent);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 6px;

    opacity: 0;
    transform: translateY(18px);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 0.4s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 7.5vw, 6.5rem);
    font-weight: 700;
    letter-spacing: 6px;
    line-height: 1;
    color: var(--text-primary);
}

/* Letter-by-letter reveal */
.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotateX(-30deg);
    animation: letterReveal 0.7s var(--ease-out-expo) forwards;
    animation-delay: calc(0.7s + var(--i) * 0.09s);
}

/* Learn More CTA */
.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 20px;

    opacity: 0;
    transform: translateY(12px);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 1.4s forwards;
}

.hero-cta-line {
    display: block;
    width: 48px;
    height: 1px;
    background: var(--gold);
}

.hero-cta-text {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--gold);
    transition: letter-spacing 0.4s var(--ease-out-expo), opacity 0.3s;
}

.hero-cta-text:hover {
    letter-spacing: 5px;
    opacity: 0.8;
}

/* Social — bottom left */
.hero-social {
    position: absolute;
    bottom: 36px;
    left: clamp(32px, 5vw, 80px);

    opacity: 0;
    animation: fadeIn 0.8s var(--ease-out-expo) 1.6s forwards;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    letter-spacing: 2.5px;
    color: var(--text-muted);
    transition: color 0.35s ease, text-shadow 0.35s ease;
}

.social-link svg {
    opacity: 0.6;
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.social-link:hover {
    color: var(--gold);
    text-shadow: 0 0 12px var(--gold-glow);
}

.social-link:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--gold-glow));
}


/* ══════════════════════════════════════════════════
   3. PROPERTY CAROUSEL (Right Panel)
   ══════════════════════════════════════════════════ */
.hero-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    padding-top: 80px;
}

.carousel-track {
    display: flex;
    gap: 18px;
    padding: 28px 28px 28px 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    align-items: stretch;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}


/* ── Property Card ── */
.property-card {
    flex: 0 0 clamp(260px, 22vw, 340px);
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;

    /* Staggered entry */
    opacity: 0;
    transform: translateX(80px);
    animation: cardSlideIn 0.8s var(--ease-out-expo) forwards;
}

.property-card[data-card="0"] {
    animation-delay: 1.0s;
}

.property-card[data-card="1"] {
    animation-delay: 1.18s;
}

.property-card[data-card="2"] {
    animation-delay: 1.36s;
}

.property-card[data-card="3"] {
    animation-delay: 1.54s;
}

.card-image-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
    will-change: transform;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.15) 55%,
            rgba(0, 0, 0, 0.05) 100%);
    transition: background 0.5s ease;
}

/* Card Content */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px;
    z-index: 2;
}

.card-name {
    font-family: var(--font-accent);
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-primary);
    transform: translateY(0);
    transition: transform 0.5s var(--ease-out-expo);
}

.card-plus {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--gold-dim);
    display: grid;
    place-items: center;
    color: var(--gold);
    opacity: 0.6;
    transition: all 0.45s var(--ease-out-expo);
}

/* ── CARD HOVER (THE MONEY SHOT) ── */
.property-card:hover .card-img {
    transform: scale(1.05);
}

.property-card:hover .card-overlay {
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.80) 0%,
            rgba(0, 0, 0, 0.28) 55%,
            rgba(0, 0, 0, 0.10) 100%);
}

.property-card:hover .card-name {
    transform: translateY(-8px);
}

.property-card:hover .card-plus {
    opacity: 1;
    border-color: var(--gold);
    transform: rotate(90deg);
    box-shadow: 0 0 14px var(--gold-glow);
}


/* ══════════════════════════════════════════════════
   4. CAROUSEL CONTROLS
   ══════════════════════════════════════════════════ */
.carousel-controls {
    position: absolute;
    bottom: 32px;
    right: clamp(24px, 3vw, 48px);
    z-index: 10;
    display: flex;
    gap: 14px;

    opacity: 0;
    animation: fadeIn 0.6s var(--ease-out-expo) 1.4s forwards;
}

.carousel-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    color: var(--text-light);
    transition: all 0.35s var(--ease-out-expo);
}

.carousel-arrow:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--gold-glow);
}

.carousel-arrow:active {
    transform: scale(0.95);
    transition-duration: 0.12s;
}


/* ══════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════ */
@keyframes fadeSlideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}


/* ══════════════════════════════════════════════════
   HAMBURGER MENU (Hidden on desktop)
   ══════════════════════════════════════════════════ */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 110;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.35s var(--ease-out-expo);
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--gold);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--gold);
}


/* ══════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤1024px)
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 100vh;
        min-height: 100svh;
    }

    .hero-bg-overlay {
        background: linear-gradient(to bottom,
                rgba(13, 13, 13, 0.88) 0%,
                rgba(13, 13, 13, 0.65) 40%,
                rgba(13, 13, 13, 0.50) 100%);
    }

    .hero-left {
        padding: 100px clamp(24px, 5vw, 60px) 24px;
        justify-content: flex-end;
    }

    .hero-text-block {
        margin-bottom: 24px;
    }

    .hero-right {
        padding-top: 0;
    }

    .hero-social {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 20px;
    }

    .carousel-controls {
        bottom: 16px;
        right: 16px;
    }

    .property-card {
        flex: 0 0 260px;
    }
}


/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤768px)
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        padding: 0 20px;
        height: 60px;
    }

    .nav-logo img {
        height: 46px;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    /* Mobile Nav Overlay */
    .nav-links {
        position: fixed;
        inset: 0;
        z-index: 105;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        background: rgba(13, 13, 13, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s var(--ease-out-expo);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s var(--ease-out-expo);
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.open li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.open li:nth-child(2) {
        transition-delay: 0.18s;
    }

    .nav-links.open li:nth-child(3) {
        transition-delay: 0.26s;
    }

    .nav-links.open li:nth-child(4) {
        transition-delay: 0.34s;
    }

    .nav-links.open li:nth-child(5) {
        transition-delay: 0.42s;
    }

    .nav-link {
        font-size: 1.1rem;
        letter-spacing: 4px;
        padding: 18px 0;
    }

    /* Hero Layout */
    .hero {
        grid-template-rows: 45vh 1fr;
        height: 100svh;
    }

    .hero-left {
        padding: 80px 24px 20px;
    }

    .hero-title {
        font-size: clamp(2.8rem, 12vw, 4rem);
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-text-block {
        margin-bottom: 18px;
    }

    .hero-cta-row {
        gap: 14px;
    }

    .hero-cta-line {
        width: 32px;
    }

    .hero-cta-text {
        font-size: 0.65rem;
    }

    /* Carousel */
    .hero-right {
        align-items: flex-start;
    }

    .carousel-track {
        padding: 12px 16px 60px 16px;
        gap: 12px;
    }

    .property-card {
        flex: 0 0 72vw;
        min-height: 200px;
        border-radius: 8px;
    }

    .card-name {
        font-size: 1rem;
    }

    .card-content {
        padding: 16px 16px;
    }

    .card-plus {
        width: 30px;
        height: 30px;
    }

    /* Carousel Controls */
    .carousel-controls {
        bottom: 12px;
        right: 12px;
        gap: 10px;
    }

    .carousel-arrow {
        width: 42px;
        height: 42px;
    }

    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }

    /* Social */
    .hero-social {
        margin-top: 14px;
    }

    .social-link {
        font-size: 0.62rem;
    }
}


/* ══════════════════════════════════════════════════
   RESPONSIVE — Small Phone (≤480px)
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .navbar {
        padding: 0 16px;
        height: 56px;
    }

    .nav-logo img {
        height: 40px;
    }

    .hero {
        grid-template-rows: 40vh 1fr;
    }

    .hero-left {
        padding: 72px 18px 16px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 14vw, 3.2rem);
        letter-spacing: 3px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .property-card {
        flex: 0 0 78vw;
    }

    .carousel-track {
        padding: 10px 12px 56px 12px;
        gap: 10px;
    }

    .carousel-arrow {
        width: 38px;
        height: 38px;
    }
}


/* ══════════════════════════════════════════════════
   Touch/Mobile: Disable hover effects, use active
   ══════════════════════════════════════════════════ */
@media (hover: none) {
    .property-card:active .card-img {
        transform: scale(1.03);
    }

    .property-card:active .card-name {
        transform: translateY(-4px);
    }

    .property-card:active .card-plus {
        opacity: 1;
        border-color: var(--gold);
    }

    .carousel-arrow:active {
        border-color: var(--gold);
        color: var(--gold);
    }
}