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

:root {
    --bg-base: #ebedf2;
    --text-primary: #1e242c;
    --text-muted: #6b778c;
    --font-heading: 'Montserrat', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
}

html, body {
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-heading);
    overflow-x: hidden;
    position: relative;
}

#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: auto;
    display: block;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.5rem;
    pointer-events: none;
}

.words-container {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    max-width: 1100px;
    width: 100%;
    text-align: center;
}

.lead-phrase {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.25rem, 3.2vw, 2.1rem);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    animation: fadeInDown 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.words-window {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: clamp(130px, 22vw, 210px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0 1rem;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 18%, rgba(0, 0, 0, 1) 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 18%, rgba(0, 0, 0, 1) 82%, transparent 100%);
}

.word-item {
    position: absolute;
    width: 100%;
    max-width: 850px;
    font-weight: 900;
    font-size: clamp(1.8rem, 5.2vw, 4.2rem);
    line-height: 1.18;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    color: #1a1e24;
    background: linear-gradient(180deg, #2d333b 0%, #161a1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.08));
    user-select: none;
    will-change: transform, opacity, filter;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.word-item.enter-from-top {
    transform: translateY(-130%);
    opacity: 0;
    filter: blur(8px);
}

.word-item.active {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
}

.word-item.exit-to-bottom {
    transform: translateY(130%);
    opacity: 0;
    filter: blur(8px);
}

.divider {
    width: 50px;
    height: 3px;
    background: rgba(0, 0, 0, 0.12);
    margin: 1rem 0;
    border-radius: 99px;
}

.signature {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.15rem, 2.6vw, 1.6rem);
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: 0.8rem;
    opacity: 0.9;
    user-select: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
