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

body {
    font-family: Arial, sans-serif;
    color: white;
    overflow: hidden; /* Prevent scrolling for the full-screen canvas */
    background-color: #f0f0f0;
}

/* Background Canvas */
#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Frosted Glass Overlay */
.glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
    z-index: 2;
}

/* Color Overlay */
.color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #733DFD;
    opacity: 0.6;
    mix-blend-mode: multiply; /* Blends the violet with the vibrant pastel shapes */
    z-index: 3;
}

/* Navigation Bar */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 10;
    background: transparent;
}

.logo {
    font-family: 'Lora', serif;
    font-size: 24px;
    font-weight: 700;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle .line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* Main Content */
.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through if needed, though active content might need it */
}

/* Typography */
.headline {
    font-family: 'Lora', serif;
    font-size: 4vw;
    font-weight: 400;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; /* Wrap on small screens */
    justify-content: center;
    text-shadow: 0 4px 0.2em rgba(0, 0, 0, 0.15); /* Subtle text drop shadow */
}

/* Rotating Words */
.rotating-words-wrapper {
    position: relative;
    height: 1.5em; /* Increased to accommodate hanging letters like 'g' and 'y' */
    width: 550px; /* Increased to prevent long phrases like 'digital strategy' from being cut off */
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    text-align: left;
}

.word {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center; /* Centers the text inside the 1.5em height bounds */
    opacity: 0;
    white-space: nowrap;
    transition: top 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.word.active {
    top: 0;
    opacity: 1;
}

.word.exit {
    top: -100%;
    opacity: 0;
}

@media (max-width: 768px) {
    .headline {
        font-size: 32px;
        flex-direction: column;
        line-height: 1.00; /* Decreased standard 1.2 line-height by ~15% */
        gap: 13px; /* Decreased 15px gap by 15% */
    }
    .rotating-words-wrapper {
        text-align: center;
        width: 100%;
    }
    .word {
        left: 50%;
        transform: translateX(-50%);
    }
}