:root {
    --mag-gold: #D4AF37;
    --mag-gold-dark: #aa8624;
    --mag-gold-light: #f5e4b1;
    --mag-bg: #06080b; /* Pure luxury deep dark */
    --mag-surface: #0a0d14; 
    --mag-text: #ffffff; 
    --mag-text-muted: #cfd8dc; 
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

body.magnolia-page {
    background-color: var(--mag-bg);
    color: var(--mag-text);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* TYPOGRAPHY */
.mag-h1, .mag-h2, .mag-h3, .mag-title {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.3;
}
.mag-h2 {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 1.2rem;
}
.mag-h2 span {
    color: var(--mag-gold);
    font-style: italic;
}
.mag-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--mag-gold);
    margin-bottom: 1.5rem;
    display: block;
    font-weight: 500;
}
.mag-p {
    font-family: var(--font-sans);
    font-size: 1.15rem; 
    font-weight: 300;
    line-height: 1.9;
    color: var(--mag-text-muted);
    text-align: justify;
    margin-bottom: 1.5rem;
}

/* SCROLL PROGRESS INDICATOR */
.scroll-progress-container {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 1px;
    background: rgba(255,255,255,0.1);
    z-index: 1000;
    display: none;
}
@media(min-width: 1200px) {
    .scroll-progress-container { display: block; }
}
.scroll-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--mag-gold);
    height: 0%;
    transition: height 0.1s ease-out;
}
.scroll-progress-label {
    position: absolute;
    top: -30px;
    left: -15px;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--mag-gold);
    transform: rotate(-90deg);
    font-weight: 500;
}

/* HERO SECTION */
.hero-cinematic {
    position: relative;
    width: 100vw;
    height: calc(100vh - 85px); /* Compensate for header */
    margin-left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}
.hero-cinematic video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    transform: scale(1.05);
}
.hero-cinematic-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(6,8,11,0.2) 0%, rgba(6,8,11,0.85) 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.hero-content {
    z-index: 3;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: 6vw;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
.hero-title .line {
    display: block;
    transform: translateY(100%);
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.hero-title.is-visible .line {
    transform: translateY(0);
}
.hero-subtitle-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--mag-gold);
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.5s ease 0.5s;
}
.hero-subtitle-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* SCROLL DOWN MOUSE */
.mouse-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease 1.5s;
}
.mouse-scroll.is-visible { opacity: 1; }
.mouse-icon {
    width: 26px; height: 40px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    position: relative;
}
.mouse-wheel {
    width: 4px; height: 6px;
    background: var(--mag-gold);
    border-radius: 2px;
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    animation: mouseScroll 1.5s infinite;
}
@keyframes mouseScroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* SECTION LAYOUTS */
.mag-section {
    padding: 120px 0;
    position: relative;
}
.giant-number {
    position: absolute;
    top: -60px;
    left: -2%;
    font-family: var(--font-serif);
    font-size: 35vw;
    color: rgba(212, 175, 55, 0.15); /* Much Brighter! */
    line-height: 0.8;
    pointer-events: none;
    z-index: 0;
}

/* EDITORIAL ASYMMETRY */
.editorial-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 0;
    align-items: center;
    position: relative;
    z-index: 1;
}
.editorial-grid.reverse {
    grid-template-columns: 7fr 5fr;
}
.editorial-img-col {
    position: relative;
    padding-right: 40px;
}
.editorial-grid.reverse .editorial-img-col {
    padding-right: 0;
    padding-left: 40px;
    order: 2;
}
.editorial-text-col {
    background: var(--mag-surface);
    padding: 60px 50px;
    margin-left: -100px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    z-index: 2;
    box-shadow: -10px 20px 40px rgba(0,0,0,0.6);
}
.editorial-grid.reverse .editorial-text-col {
    margin-left: 0;
    margin-right: -100px;
    box-shadow: 10px 20px 40px rgba(0,0,0,0.6);
    order: 1;
}

/* CINEMATIC IMAGE REVEAL (NO CLIP-PATH) */
.img-mask-container {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1), transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.5s;
    border: 2px solid rgba(212, 175, 55, 0.15); /* Viền vàng kim mờ mặc định */
    border-radius: 10px;
}
.img-mask-container.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Skill: Hover nhấc bổng 3D & Viền phát sáng */
.img-mask-container:hover {
    border-color: var(--mag-gold) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(212, 175, 55, 0.6) !important;
}

/* VÀNG KIM GLOW CHO TILT EFFECT */
.js-tilt-glare-inner {
    background-image: linear-gradient(0deg, rgba(212,175,55,0) 0%, rgba(212,175,55,0.8) 100%) !important;
}

.img-mask-container img {
    width: 100%;
    display: block;
    transform: scale(1.1);
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Skill: Ken Burns timing */
}
.img-mask-container.is-visible img {
    transform: scale(1);
}
/* Skill: Ken Burns Zoom */
.img-mask-container:hover img {
    transform: scale(1.15) !important;
}

/* TEXT REVEAL */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* BESPOKE BUTTON (SKILL: SWEEP FILL) */
.btn-cinematic {
    position: relative;
    display: inline-block;
    padding: 15px 40px;
    color: var(--mag-gold);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid var(--mag-gold);
    transition: all 0.4s;
    background: transparent;
    z-index: 1;
}
.btn-cinematic::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #dfba6b 0%, #c59b48 100%);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.btn-cinematic:hover {
    color: #0b0c10 !important;
    border-color: transparent;
}
.btn-cinematic:hover::before {
    transform: scaleX(1);
}

/* LUXURY CARDS */
.card-luxury {
    background: var(--mag-surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-top: 1px solid rgba(212,175,55,0.3);
    padding: 30px 20px;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    text-align: center;
}
.card-luxury::before {
    content: '';
    position: absolute;
    top: -1px; left: 0; width: 0%; height: 1px;
    background: var(--mag-gold);
    transition: width 0.6s ease;
}
.card-luxury:hover {
    border-color: var(--mag-gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(212, 175, 55, 0.2); 
    transform: translateY(-8px);
    z-index: 2;
}
.card-luxury:hover::before { width: 100%; }
.card-luxury-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--mag-gold);
    margin-bottom: 10px;
}
.card-luxury-val {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* FLOATING ACTIONS & LUXURY FORM */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}
.btn-float {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-float:hover {
    transform: scale(1.1) translateY(-5px);
    color: #fff;
}
.btn-zalo { background: #0068ff; }
.btn-call {
    background: var(--mag-gold);
    animation: pulse-gold 2s infinite;
}
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}
.zalo-text { font-family: var(--font-sans); font-weight: 700; font-size: 15px; }

.luxury-form-container {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 15px;
    padding: 50px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.luxury-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s;
}
.luxury-input:focus {
    outline: none;
    border-color: var(--mag-gold);
}
.luxury-input::placeholder { color: rgba(255,255,255,0.3); }

/* LUXURY GRID EXTENSION */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-grid .img-mask-container {
    height: 350px;
    border: 1px solid rgba(212,175,55,0.15);
}

.gallery-grid .img-mask-container img {
    height: 100%;
    object-fit: cover;
}

/* 5-ITEM FLOORPLAN GALLERY */
.floorplan-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}
.floorplan-gallery > div {
    width: calc(33.333% - 20px);
}

/* 2x2 GRID */
.grid-2x2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}
.grid-2x2 > div {
    width: calc(50% - 15px);
}

@media (max-width: 991px) {
    .mag-section {
        padding: 60px 0;
    }
    .editorial-grid, .editorial-grid.reverse {
        grid-template-columns: 1fr;
    }
    .editorial-text-col, .editorial-grid.reverse .editorial-text-col {
        margin: 0;
        padding: 30px 15px;
        box-shadow: none;
        border: none;
        background: transparent;
    }
    .editorial-img-col, .editorial-grid.reverse .editorial-img-col {
        padding: 0;
        margin-bottom: 20px;
    }
    .floorplan-gallery > div {
        width: calc(50% - 15px);
    }
    .giant-number {
        font-size: 40vw;
        top: -20px;
    }
    .mag-h2 {
        font-size: 2.2rem;
    }
    .hero-title {
        font-size: 10vw;
    }
}
