/* --- CORE SETUP --- */
html, body {
    margin: 0; padding: 0; width: 100%; height: 100%;
    overflow: hidden; background-color: #60229f;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    cursor: none; 
}

/* --- CUSTOM CURSOR --- */
#custom-cursor {
    position: fixed; width: 50px; height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%; pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%); backdrop-filter: blur(3px);
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1), height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: top, left;
}
#custom-cursor.hovering { width: 12px; height: 12px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(0px); }
#custom-cursor.active { width: 100px; height: 100px; background: rgba(255, 255, 255, 0.1); }

@media (max-width: 1024px) {
    /* Restore the default system cursor behavior for touch */
    html, body {
        cursor: auto !important;
    }
    
    /* Completely remove the custom cursor element from view */
    #custom-cursor {
        display: none !important;
    }
}

/* --- BACKGROUND LAYER --- */
.swirl-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #60229f; z-index: 1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5; animation: drift linear infinite alternate; }
.blob-1 { top: -10%; left: -10%; width: 90vw; height: 90vw; background: #9d4edd; animation-duration: 20s; }
.blob-2 { bottom: -10%; right: -10%; width: 80vw; height: 80vw; background: #3c096c; animation-duration: 25s; }

.shagwell-item {
    position: absolute; font-weight: 900; color: rgba(255, 255, 255, 0.25);
    white-space: nowrap; mix-blend-mode: overlay; will-change: transform;
    pointer-events: none; text-transform: lowercase; letter-spacing: -2px;
    transform: translate(calc(var(--mx, 0px) + var(--ex, 0px)), calc(var(--my, 0px) + var(--ey, 0px)));
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.inner-wrap { animation: flow var(--dur) ease-in-out infinite alternate var(--delay); }

@keyframes flow { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(4vw, 6vh) rotate(2deg); } }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(10%, 10%); } }

/* --- UI OVERLAYS --- */
.top-interface, .lower-interface {
    position: fixed; width: 100%; z-index: 20; pointer-events: none;
    display: flex; justify-content: space-between; padding: 30px 40px; box-sizing: border-box;
}
.top-interface { top: 0; align-items: flex-start; }
.lower-interface { bottom: 0; align-items: flex-end; }

.nav-link, .lang-btn {
    pointer-events: auto; color: rgba(255, 255, 255, 0.6);
    text-decoration: none; text-transform: lowercase; font-weight: 300;
    font-size: 0.8rem; letter-spacing: 3px; transition: color 0.3s, opacity 0.5s ease;
    background: none; border: none; padding: 0;
}
.nav-link:hover, .lang-btn:hover, .lang-btn.active { color: white; }
.lang-btn.active { font-weight: 700; }

.heart-svg {
    width: 24px;
    height: 24px;
    fill: rgba(255, 255, 255, 0.8);
    animation: heartPulse 1.2s infinite;
    transform-origin: center;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); } 
    30% { transform: scale(1.1); }
    45% { transform: scale(1.4); } 
    100% { transform: scale(1); }
}

/* --- CONTENT --- */
.centered-content { position: relative; z-index: 10; display: flex; justify-content: center; align-items: center; height: 100vh; pointer-events: none; }
.main-title { color: white; text-transform: lowercase; font-weight: 500; font-size: clamp(1.2rem, 4vw, 2.5rem); text-align: center; transition: opacity 0.5s ease; width: 80%; }
.fade-out { opacity: 0 !important; }

@media (max-width: 768px) {
    .mobile-break::before { content: "\A"; white-space: pre; }
    .top-interface, .lower-interface { padding: 20px 25px; }
}

/* --- SPLIT LAYOUT --- */
.hero-header {
    height: 33.33vh; /* Occupies top 1/3 */
    width: 100%;
    position: relative;
    background-color: #60229f;
    overflow: hidden;
    z-index: 1;
}

/* Ensure the swarm container stays inside the hero on about/contact pages */
.hero-header .swirl-container {
    position: absolute;
    height: 100%;
}

.white-section {
    min-height: 66.66vh; /* Occupies bottom 2/3 */
    background-color: #ffffff;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 80px 0;
    box-sizing: border-box;
}

.body-content {
    width: 66%; /* Desktop constraint */
    color: #1a1a1a;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Override for the main title on these subpages */
.subpage-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    z-index: 10;
    pointer-events: none;
    margin: 0;
    width: 100%;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .body-content {
        width: 85%; /* Tablet */
    }
}

@media (max-width: 768px) {
    .body-content {
        width: 90%; /* Mobile */
        padding: 0 20px;
        font-size: 1rem;
    }
    .hero-header {
        height: 25vh; /* Slightly smaller header on mobile to give more room to text */
    }
}

/* Define Variables for Light Mode (Default) */
:root {
    --bg-content: #ffffff;
    --text-main: #1a1a1a;
    --nav-accent: #60229f; /* Purple for white bg */
}

/* Define Variables for Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-content: #121212; /* Darker background */
        --text-main: #f0f0f0; /* Light text */
        --nav-accent: #9d4edd; /* Lighter purple for dark bg */
    }
}

/* Update White Section to use Variables */
.white-section {
    min-height: 66.66vh;
    background-color: var(--bg-content); /* Uses variable */
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 80px 0;
    box-sizing: border-box;
    transition: background-color 0.5s ease;
}

.body-content {
    width: 66%;
    color: var(--text-main); /* Uses variable */
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 300;
}

.body-header {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: var(--nav-accent);
}

/* Update Footer Nav & Heart for Inversion */
.lower-interface .nav-link, 
.lower-interface .heart-svg {
    color: var(--nav-accent) !important;
    stroke: var(--nav-accent) !important;
}
