:root {
    --leitat-red: #E30613;
    --leitat-dark: #1a1a1a;
    --leitat-grey: #f4f4f4;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: #fff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Dynamic Background */
.background-fx {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(227, 6, 19, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 0, 0, 0.03) 0%, transparent 25%);
    z-index: -1;
    animation: pulseBg 10s infinite alternate;
}

.container {
    perspective: 1000px;
}

.dlab-title {
    font-size: 20vw;
    font-weight: 800;
    color: var(--leitat-dark);
    line-height: 1;
    display: flex;
    cursor: default;
    user-select: none;
    transition: transform 0.1s ease-out;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.1));
}

.letter {
    display: inline-block;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(to bottom, #333 0%, #000 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: calc(0.1s * var(--i));
    opacity: 0;
    transform: translateY(100px);
}

.letter:first-child {
    background: linear-gradient(to bottom, var(--leitat-red) 0%, #b00 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dot {
    display: inline-block;
    color: var(--leitat-red);
    -webkit-text-fill-color: var(--leitat-red);
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.6s;
    opacity: 0;
    transform: translateY(100px);
}

/* Hover Effects */
.dlab-title:hover .letter {
    filter: blur(0);
    transform: translateY(-20px) scale(1.05);
}

.letter:hover {
    -webkit-text-fill-color: var(--leitat-red);
    /* Color shift on individual hover */
    transform: translateY(-40px) scale(1.1) rotate(5deg) !important;
    z-index: 10;
}

.letter::after {
    content: attr(data-text);
    /* Shadow duplicate */
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(0, 0, 0, 0.1);
    z-index: -1;
    transform: translate(10px, 10px);
    opacity: 0;
    transition: all 0.3s;
}

.letter:hover::after {
    opacity: 1;
    transform: translate(20px, 20px);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseBg {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Responsiveness */
@media (min-width: 1200px) {
    .dlab-title {
        font-size: 12rem;
    }
}

@media (max-width: 768px) {
    .dlab-title {
        font-size: 25vw;
        flex-direction: column;
        line-height: 0.8;
    }

    .dot {
        display: none;
        /* Hide dot on mobile vertical layout if needed, or keep it */
    }
}