:root {
    /* DEFAULT DARK THEME */
    --bg-color: #0a0a0a;
    --text-color: #F5F5F5;
    --accent-color: #B8860B;
    --wave-fill-color: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

[data-theme="light"] {
    /* LIGHT THEME */
    --bg-color: #FDFDFD;
    --text-color: #222222;
    --wave-fill-color: #222222;
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Loader Styling --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease 1.2s, visibility 0.8s ease 1.2s;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-name {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 1vw;
    color: #fff;
}

.loader-name span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letter-reveal 0.6s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

.loader-name span:nth-child(1) {
    animation-delay: 0.1s;
}

.loader-name span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-name span:nth-child(3) {
    animation-delay: 0.3s;
}

.loader-name span:nth-child(4) {
    animation-delay: 0.4s;
}

.loader-name span:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes letter-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Main Content & Header --- */
#main-content {
    opacity: 0;
    transition: opacity 0.8s ease;
}

#main-content.visible {
    opacity: 1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    z-index: 1000;
}

.logo {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.theme-switcher {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.theme-switcher svg {
    width: 22px;
    height: 22px;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-switcher svg:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

body[data-theme="dark"] .theme-switcher .sun {
    display: block;
}

body[data-theme="dark"] .theme-switcher .moon {
    display: none;
}

body[data-theme="light"] .theme-switcher .sun {
    display: none;
}

body[data-theme="light"] .theme-switcher .moon {
    display: block;
}

/* --- Hero Section Styling --- */
.hero-section {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

.hero-content {
    z-index: 2;
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content .fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.hero-content h1.fade-in {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    color: var(--text-color);
    animation: fadeInText 1s ease-out forwards 1.5s;
}

.hero-content p.tagline.fade-in {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    animation: fadeInText 1s ease-out forwards 2.0s;
    margin-bottom: 2rem;
}

.hero-content p.status.fade-in {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--accent-color);
    animation: fadeInText 1s ease-out forwards 2.4s;
}

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

/* --- INTEGRATED WAVES CSS --- */
.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    margin-bottom: -7px;
    min-height: 100px;
    max-height: 150px;
    z-index: 1;
}

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
    fill: var(--wave-fill-color);
    transition: fill 0.4s ease;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
    opacity: 0.7;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
    opacity: 0.5;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
    opacity: 0.3;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
    opacity: 1;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* --- Mobile Styling --- */
@media (max-width: 768px) {
    .waves {
        height: 250px;
        min-height: 120px;
    }

    .hero-content h1.fade-in {
        font-size: 2rem;
    }

    /* NEW: Slow down waves on mobile to give a wider, grander feel */
    .parallax>use:nth-child(1) {
        animation-duration: 15s;
    }

    .parallax>use:nth-child(2) {
        animation-duration: 20s;
    }

    .parallax>use:nth-child(3) {
        animation-duration: 25s;
    }

    .parallax>use:nth-child(4) {
        animation-duration: 35s;
    }
}