/* ===================================
   RESET & BASE
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --near-black: #0a0a0a;
    --dark-gray: #1a1a1a;
    --gold: #C9A961;
    --gold-dark: #A88F4D;
    --gold-light: #E8D7A8;
    --white: #FFFFFF;
    --off-white: #F5F5F5;
}

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Raleway', sans-serif;
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--gold);
    color: var(--black);
}

/* ===================================
   THREE.JS CANVAS
   =================================== */

#webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    outline: none;
}

/* ===================================
   GRAIN & VIGNETTE
   =================================== */

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(-20%, 10%); }
    90% { transform: translate(10%, 5%); }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.8) 100%);
}

/* ===================================
   CONTAINER
   =================================== */

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* ===================================
   TOP BAR
   =================================== */

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

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.15rem;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(201, 169, 97, 0.5);
    opacity: 0;
}

.tagline {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.4rem;
    color: var(--off-white);
    opacity: 0;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 4rem 4rem 4rem;
}

.hero-content {
    width: 100%;
    max-width: 1400px;
    text-align: center;
}

/* ===================================
   TITLE
   =================================== */

.title-wrapper {
    margin-bottom: 3rem;
    overflow: hidden;
    opacity: 0;
}

.main-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(4rem, 18vw, 14rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--white);
    text-transform: none;
    margin: 0;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #FFFFFF 0%, #E8D7A8 30%, #C9A961 60%, #FFFFFF 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(201, 169, 97, 0.4));
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Splitting.js character styling */
.main-title .char {
    display: inline-block;
    transform-origin: 50% 100%;
}

/* ===================================
   SUBTITLE
   =================================== */

.subtitle-wrapper {
    margin-bottom: 2rem;
    overflow: hidden;
    opacity: 0;
}

.subtitle {
    font-family: 'Allura', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1rem;
    color: var(--gold-light);
    text-transform: none;
    filter: drop-shadow(0 2px 10px rgba(232, 215, 168, 0.3));
}

.subtitle .char {
    display: inline-block;
}

/* ===================================
   DESCRIPTION
   =================================== */

.description {
    margin-bottom: 4rem;
    opacity: 0;
}

.desc-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    line-height: 2;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.03rem;
}

/* ===================================
   EMAIL FORM
   =================================== */

.form-container {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
}

.email-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.email-input {
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 169, 97, 0.2);
    color: var(--white);
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.1rem;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(10px);
}

.email-input:focus {
    outline: none;
    background: rgba(201, 169, 97, 0.05);
    border-color: var(--gold);
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.email-input:focus + .input-border {
    width: 100%;
}

.submit-button {
    padding: 1.5rem 3rem;
    background: var(--gold);
    border: none;
    color: var(--black);
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.submit-button:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(201, 169, 97, 0.4);
}

.submit-button:hover::before {
    left: 100%;
}

.button-icon {
    font-size: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.submit-button:hover .button-icon {
    transform: translateX(5px);
}

.form-notice {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.15rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    text-transform: uppercase;
}

/* ===================================
   BOTTOM BAR
   =================================== */

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    z-index: 100;
    opacity: 0;
}

.scroll-indicator {
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    order: 2;
}

.social-links {
    order: 1;
}

.copyright {
    order: 3;
}

.scroll-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--gold);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% {
        height: 0%;
        top: 0;
    }
    50% {
        height: 100%;
        top: 0;
    }
    100% {
        height: 0%;
        top: 100%;
    }
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15rem;
    color: var(--off-white);
    text-decoration: none;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.social-link:hover {
    opacity: 1;
    color: var(--gold);
    transform: translateY(-3px);
}

.social-link svg {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.social-link:hover svg {
    transform: rotate(45deg);
}

.copyright {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.1rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ===================================
   LOADING SCREEN
   =================================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.3rem;
    color: var(--gold);
    margin-bottom: 3rem;
    text-shadow: 0 0 60px rgba(201, 169, 97, 0.6);
}

.loading-bar {
    width: 300px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto 2rem;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    width: 0%;
    box-shadow: 0 0 20px var(--gold);
}

.loading-text {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.4rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    .top-bar,
    .bottom-bar {
        padding: 2rem;
    }

    .hero {
        padding: 6rem 2rem 2rem 2rem;
    }

    .logo {
        font-size: 1.2rem;
        letter-spacing: 0.2rem;
    }

    .tagline {
        font-size: 0.6rem;
        letter-spacing: 0.3rem;
    }

    .email-form {
        flex-direction: column;
    }

    .submit-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .bottom-bar {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .scroll-indicator {
        display: none;
    }

    .main-title {
        font-size: clamp(3rem, 15vw, 8rem);
    }

    .subtitle {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        letter-spacing: 0.08rem;
    }

    .loading-logo {
        font-size: 4rem;
    }

    .loading-bar {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .top-bar,
    .bottom-bar {
        padding: 1.5rem;
    }

    .hero {
        padding: 5rem 1.5rem 2rem 1.5rem;
    }

    .logo {
        font-size: 1rem;
        letter-spacing: 0.15rem;
    }

    .tagline {
        font-size: 0.5rem;
        letter-spacing: 0.25rem;
    }

    .desc-text {
        font-size: 0.9rem;
    }

    .email-input {
        padding: 1.2rem 1.5rem;
        font-size: 0.85rem;
    }

    .submit-button {
        padding: 1.2rem 2rem;
        font-size: 0.8rem;
    }

    .copyright {
        font-size: 0.6rem;
    }
}

/* ===================================
   CUSTOM CURSOR
   =================================== */

.custom-cursor {
    position: fixed;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(201, 169, 97, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 80px;
    height: 80px;
    border-color: var(--gold);
}

@media (max-width: 1024px) {
    .custom-cursor {
        display: none;
    }
}
