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

html,
body {
    height: 100%;
    width: 100%;
}

body {
    background-color: #0a0a0a;
    /* Premium dark background */
    color: #e5e5e5;
    /* Soft white text */
    font-family: 'Baskervville', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    width: 100%;
    padding: 0 1rem;
    text-align: center;
}

/* Quote Styles */
#quote {
    font-size: 6vw;
    /* Responsive size based on viewport width */
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

@media (min-width: 1200px) {
    #quote {
        font-size: 5rem;
        /* Cap size on very large screens */
    }
}

/* Animation Styles */
.cursor {
    display: inline-block;
    width: 0;
    height: 1em;
    vertical-align: baseline;
    position: relative;
    /* transform-origin removed, no container rotation needed */
}

/* The visual cursor is the pseudo-element */
.cursor::after {
    content: '';
    display: block;
    position: absolute;
    left: 2px;
    top: 0.18em;
    width: 2px;
    height: 0.9em;
    background-color: #e5e5e5;
    animation: blink 1s step-end infinite;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0;
}

.cursor.typing::after {
    animation: none;
}

/* MELT STATE: Shrink to a dot at the baseline */
.cursor.falling::after {
    animation: none;
    height: 0.15em;
    width: 0.15em;
    border-radius: 50%;
    top: 0.85em;
}

/* ROLL OUT STATE: Expand dots to the right */
.cursor.morphed::after {
    /* Main dot stays put */
    animation: none;
    height: 0.15em;
    width: 0.15em;
    border-radius: 50%;
    /* 
       Adjust top to align with baseline. 
       Using em ensures it scales with font size.
    */
    top: 0.85em;

    /* The rolling dots */
    box-shadow:
        0.3em 0 0 0 #e5e5e5,
        0.6em 0 0 0 #e5e5e5;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.word {
    opacity: 0;
    transform: translateY(20px);
    display: inline-block;
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-right: 0.25em;
    /* Add specific spacing between inline-block words */
    filter: blur(10px);
}

.word.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}