/* ============================================
   SPATIAL UI - CM HOME DECOR
   Glassmorphism 2.0 Header + Spatial Canvas Hero
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
    --noir: #050505;
    --brand-red: #EF4444;
    --brand-red-glow: rgba(239, 68, 68, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --header-blur: 20px;
    --header-blur-scrolled: 25px;
}

/* === GLOBAL HEADER (Glassmorphism 2.0) === */
#spatial-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    z-index: 1000;
    width: calc(100% - 48px);
    max-width: 1200px;
    padding: 12px 32px;
    border-radius: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                backdrop-filter 0.4s ease,
                background 0.4s ease,
                box-shadow 0.4s ease,
                padding 0.3s ease;
    will-change: transform;
}

#spatial-header.scrolled {
    transform: translateX(-50%) scale(0.98);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(var(--header-blur-scrolled));
    -webkit-backdrop-filter: blur(var(--header-blur-scrolled));
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 10px 32px;
}

/* High-Contrast Logo in Header */
.header-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) !important;
    opacity: 0.95;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-logo:hover {
    opacity: 1;
    transform: scale(1.03);
}

/* App-style Segmented Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px !important;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.header-nav a {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #424245;
    text-decoration: none;
    padding: 8px 20px !important;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.header-nav a::after {
    display: none !important;
}

.header-nav a:hover {
    color: #1D1D1F;
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.header-nav a.active {
    color: #fff !important;
    background: #1D1D1F !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

#spatial-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #424245;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.1s ease;
}

#spatial-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

#spatial-menu-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.08);
}

/* === HERO SECTION (Split Layout — Studio White) === */
#spatial-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #F5F5F7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
}

/* Wireframe logo as subtle background watermark */
#wireframe-logo-container {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    width: 50vw;
    max-width: 600px;
    height: auto;
    z-index: 1;
    pointer-events: none;
    opacity: 0.04;
}

#wireframe-logo {
    width: 100%;
    height: auto;
}

#wireframe-logo path,
#wireframe-logo line,
#wireframe-logo polyline,
#wireframe-logo polygon,
#wireframe-logo rect {
    fill: none;
    stroke: #1D1D1F;
    stroke-width: 1;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawWireframe 3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawWireframe {
    to {
        stroke-dashoffset: 0;
        stroke: #1D1D1F;
    }
}

#wireframe-logo .logo-face-top {
    animation: drawWireframe 3s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

#wireframe-logo .logo-face-right {
    animation: drawWireframe 3s cubic-bezier(0.65, 0, 0.35, 1) 0.4s forwards;
}

/* Split grid container */
.hero-split {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    padding: 0 48px;
    margin: 0 auto;
}

/* Left content */
.hero-text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-red);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

/* Headline */
.hero-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    color: #1D1D1F;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero-headline .occlude-front {
    color: var(--brand-red);
}

.hero-headline .occlude-behind {
    color: #1D1D1F;
}

/* Subheadline */
.hero-subheadline {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #86868B;
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 480px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

/* Bullet points */
.hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #424245;
    letter-spacing: -0.01em;
}

.hero-features li .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.08);
    flex-shrink: 0;
}

.hero-features li .feature-icon svg {
    width: 14px;
    height: 14px;
    color: var(--brand-red);
}

/* CTA Button */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    background: #1D1D1F;
    padding: 16px 36px;
    border-radius: 14px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    z-index: 15;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-cta:hover {
    transform: scale(1.05);
    background: var(--brand-red);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-cta:hover::before {
    opacity: 1;
}

.hero-cta svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* Right image column */
.hero-image-col {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transform: translateX(40px);
    animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-image-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.04);
}

.hero-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Decorative accent on image */
.hero-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: var(--brand-red);
    opacity: 0.08;
    z-index: -1;
}

.hero-image-accent-2 {
    position: absolute;
    top: -16px;
    left: -16px;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    border: 2px solid rgba(239, 68, 68, 0.12);
    z-index: -1;
}

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

/* Cursor Light Source */
#cursor-light {
    display: none; /* Hidden on white theme */
}

/* Ambient particles — hidden on white theme */
#ambient-particles {
    display: none;
}

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

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

/* === ABOUT SECTION === */
.about-section {
    padding: 100px 0;
    background: #FFFFFF;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
}

.about-image-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.03);
}

.about-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.15;
    color: #1D1D1F;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
}

.about-content p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #424245;
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-content .about-highlights {
    list-style: none;
    padding: 0;
    margin: 24px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-content .about-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1D1D1F;
}

.about-content .about-highlights li svg {
    width: 20px;
    height: 20px;
    color: var(--brand-red);
    flex-shrink: 0;
}

.about-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #1D1D1F;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.about-cta:hover {
    background: var(--brand-red);
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}

/* Mobile menu */
#spatial-mobile-menu {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: calc(100% - 48px);
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#spatial-mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#spatial-mobile-menu a {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #424245;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: center;
}

#spatial-mobile-menu a:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #1D1D1F;
}

/* === RESPONSIVE === */
@media (max-height: 850px) {
    #spatial-hero {
        padding: 90px 0 40px;
    }
    .hero-headline {
        margin-bottom: 16px;
    }
    .hero-subheadline {
        margin-bottom: 20px;
    }
    .hero-features {
        margin-bottom: 24px;
    }
    .hero-badge {
        margin-bottom: 16px;
    }
}

@media (max-width: 1440px) {
    #spatial-hero {
        padding: 100px 0 60px;
    }
    .hero-split {
        gap: 40px;
        padding: 0 40px;
    }
    .hero-headline {
        font-size: clamp(2.2rem, 4.2vw, 4rem);
        margin-bottom: 16px;
    }
    .hero-subheadline {
        font-size: 1.05rem;
        margin-bottom: 24px;
        max-width: 420px;
    }
    .hero-features {
        margin-bottom: 30px;
        gap: 12px;
    }
    .hero-features li {
        font-size: 14px;
    }
    .hero-image-wrap {
        max-width: 460px;
    }
    .hero-badge {
        margin-bottom: 20px;
    }
}

@media (max-width: 1200px) {
    #spatial-hero {
        padding: 90px 0 50px;
    }
    .hero-split {
        gap: 30px;
    }
    .hero-headline {
        font-size: clamp(2rem, 4vw, 3.2rem);
        margin-bottom: 12px;
    }
    .hero-subheadline {
        font-size: 0.95rem;
        margin-bottom: 20px;
        max-width: 380px;
    }
    .hero-features {
        margin-bottom: 24px;
        gap: 10px;
    }
    .hero-features li .feature-icon {
        width: 24px;
        height: 24px;
    }
    .hero-features li .feature-icon svg {
        width: 12px;
        height: 12px;
    }
    .hero-image-wrap {
        max-width: 380px;
    }
    .hero-cta {
        padding: 14px 28px;
        font-size: 14px;
    }
}

@media (max-width: 1024px) {
    .hero-split {
        gap: 24px;
        padding: 0 32px;
    }
    .hero-text-col {
        align-items: flex-start;
    }
    .hero-headline {
        font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    }
    .hero-image-wrap {
        max-width: 340px;
    }
}

@media (max-width: 768px) {
    #spatial-header {
        width: calc(100% - 32px);
        padding: 10px 20px;
    }

    .header-nav {
        display: none;
    }

    #spatial-menu-btn {
        display: flex;
    }

    #wireframe-logo-container {
        display: none;
    }

    .hero-split {
        grid-template-columns: 1fr;
        grid-template-rows: 100vh;
        gap: 0;
        padding: 0;
    }

    .hero-text-col {
        grid-row: 1;
        grid-column: 1;
        z-index: 10;
        align-items: flex-start;
        text-align: left;
        align-self: center;
        justify-self: flex-start;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 32px 24px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-badge {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(8px);
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
    .hero-badge svg { color: #fff; }

    .hero-headline {
        color: #fff;
        text-shadow: 0 2px 16px rgba(0,0,0,0.8);
    }
    .hero-headline .occlude-front {
        color: var(--brand-red);
        text-shadow: 0 0px 16px rgba(239,68,68,0.5);
    }
    .hero-headline .occlude-behind { color: #fff; }

    .hero-features {
        align-items: flex-start;
        text-align: left;
        margin-bottom: 24px;
    }
    .hero-features li {
        color: #fff;
        text-shadow: 0 1px 6px rgba(0,0,0,0.8);
    }
    .hero-features li .feature-icon {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(4px);
    }
    .hero-features li .feature-icon svg {
        color: #fff;
    }

    .hero-subheadline {
        font-size: 0.95rem; /* Better readability for caps on mobile */
        margin-bottom: 20px;
        max-width: 100%;
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 1px 8px rgba(0,0,0,0.8);
    }

    .hero-image-col {
        grid-row: 1;
        grid-column: 1;
        justify-content: center;
        height: 100vh;
        width: 100%;
        opacity: 0;
        transform: none; /* remove slide on mobile for better blend */
        animation: fadeIn 1s ease forwards;
    }

    .hero-image-wrap {
        max-width: none;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .hero-image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .hero-image-wrap::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1;
    }
    
    .hero-image-accent, .hero-image-accent-2 {
        display: none;
    }

    #spatial-hero {
        padding: 0;
        align-items: center;
        min-height: 100vh;
    }

    .hero-cta {
        padding: 16px 32px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 24px;
    }

    .about-section {
        padding: 60px 0;
    }

    #cursor-light {
        display: none;
    }
}
