:root {
    /* Palette from Design System */
    --color-offwhite: #FDFBF5;
    --color-sage: #8BA88E;
    --color-teal: #008080;
    --color-rose: #E8A8B8;
    --color-dark: #333333;
    --color-magenta: #C71585;
    --color-violet: #8A2BE2;
    --color-cyan: #00FFFF;
}

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

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #030303;
    /* Ultra dark background for cinematic borders */
    color: var(--color-offwhite);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 
           This container creates the initial scrollable height to allow the Hero text to fade out, 
           before revealing the next sections.
        */
.scroll-container {
    height: 120vh;
    width: 100vw;
}

/* The Hero section is fixed to act like an interactive viewport */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    /* dvh evita cortes na interface mobile */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    /* Passes scroll events to the body */
}

.hero-video-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #030303;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transform: scale(1.05);
    /* Slight scale to allow zoom-out animation */
    filter: blur(10px);
    /* Initial blur for fade-in */
    opacity: 0;
}

/* Elegant vignette and subtle dark wash over the video */
.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(3, 3, 3, 0.5) 0%,
            rgba(3, 3, 3, 0.1) 30%,
            rgba(3, 3, 3, 0.1) 60%,
            rgba(3, 3, 3, 0.65) 100%);
    z-index: 1;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
    mix-blend-mode: multiply;
}

/* UI layer for text and buttons to receive clicks */
.ui-layer {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

/* Top Central Header */
.header-center {
    position: absolute;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.header-center h2 {
    font-size: 0.85rem;
    /* Fonte aumentada */
    font-weight: 300;
    letter-spacing: 0.5em;
    color: rgba(253, 251, 245, 0.85);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Top Right Menu Stacked */
.menu-right {
    position: absolute;
    top: 5vh;
    right: 4vw;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    /* Espaçamento reduzido */
}

.menu-link {
    font-size: 0.65rem;
    /* Fonte reduzida */
    font-weight: 400;
    letter-spacing: 0.15em;
    color: rgba(253, 251, 245, 0.6);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.5s ease;
    position: relative;
    padding: 0.25rem 0;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-offwhite);
    transition: width 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.menu-link:hover {
    color: var(--color-offwhite);
}

.menu-link:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

/* Bottom Cinematic Title */
.bottom-title-container {
    position: absolute;
    bottom: 15vh;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    perspective: 1200px;
    /* Gives the text a slight 3D depth effect during animation */
}

.bottom-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    line-height: 1.1;
    color: var(--color-offwhite);
    margin: 0;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Element initialization states */
.intro-elem {
    opacity: 0;
    visibility: hidden;
}

.char {
    display: inline-block;
    will-change: transform, opacity, filter;
    visibility: hidden;
}

/* Responsiveness */
@media (max-width: 768px) {
    .menu-right {
        top: 4vh;
        right: 1.5rem;
        gap: 0.25rem;
        /* Espaçamento reduzido no mobile */
    }

    .header-center {
        top: 4vh;
    }

    .header-center h2 {
        font-size: 0.7rem;
        /* Fonte aumentada no mobile */
        letter-spacing: 0.3em;
    }

    .bottom-title-container {
        bottom: 12vh;
    }

    .menu-link {
        padding: 0.25rem 0;
        font-size: 0.55rem;
        /* Fonte reduzida no mobile */
    }

    .hero-video {
        object-fit: contain !important;
    }
}

/* --- Design System 08 Classes (Sessão 2) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 128, 128, 0.1);
    box-shadow: 0 10px 40px -10px rgba(0, 128, 128, 0.05);
    transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 128, 128, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 15px 50px -10px rgba(0, 128, 128, 0.1);
}

.btn-elegant {
    background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
    color: var(--color-offwhite);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: 9999px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-elegant:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0, 128, 128, 0.6);
}

.btn-outline {
    border: 1px solid var(--color-magenta);
    color: var(--color-magenta);
    background: transparent;
    transition: all 0.4s ease;
    border-radius: 9999px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: rgba(199, 21, 133, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(199, 21, 133, 0.3);
}

.text-gradient-vibrant {
    background: linear-gradient(135deg, var(--color-magenta), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.perspective-1000 {
    perspective: 1000px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Butterfly Shower System */
.butterfly-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    /* Guaranteed to float over the entire page */
    overflow: hidden;
}

.butterfly {
    position: absolute;
    bottom: -10%;
    will-change: transform, opacity;
    opacity: 0;
    animation: butterfly-rise linear forwards;
    filter: drop-shadow(0 4px 6px rgba(0, 128, 128, 0.15));
}

@keyframes butterfly-rise {
    0% {
        transform: translateY(0) translateX(0) rotate(15deg) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 0.15;
        transform: translateY(-15vh) translateX(5vw) rotate(0deg) scale(0.8);
    }

    50% {
        opacity: 0.25;
        transform: translateY(-50vh) translateX(-5vw) rotate(-15deg) scale(1);
    }

    85% {
        opacity: 0.15;
        transform: translateY(-85vh) translateX(5vw) rotate(-5deg) scale(0.8);
    }

    100% {
        transform: translateY(-120vh) translateX(-10vw) rotate(15deg) scale(0.5);
        opacity: 0;
    }
}