:root {
    --intro-lead: 0.3s;
    --intro-ground:
        radial-gradient(46% 52% at 18% 22%, #ffd2b0 0%, rgba(255, 210, 176, 0) 68%),
        radial-gradient(52% 48% at 82% 30%, #b6c7ff 0%, rgba(182, 199, 255, 0) 70%),
        radial-gradient(60% 60% at 50% 96%, #d9c2ff 0%, rgba(217, 194, 255, 0) 72%),
        #f4f1fb;
    --intro-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

html.is-intro {
    overflow: hidden;
    background-color: #f4f1fb;
}

.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: var(--space-10, 20px);
    background: var(--intro-ground);
    contain: strict;
    animation: intro-out 0.5s ease calc(var(--intro-lead) + var(--intro-life, 5.7s)) forwards;
}

.intro::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.5;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: var(--intro-grain);
}

@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

.intro__seq {
    position: relative;
    z-index: 1;
    display: grid;
    text-align: center;
}

.intro__seq > p {
    grid-area: 1 / 1;
    align-self: center;
    margin: 0;
    color: var(--text-title, #19171c);
    font-size: clamp(28px, 5.4vw, 60px);
    line-height: 1.34;
    font-weight: var(--fw-bold, 700);
    letter-spacing: -0.032em;
    opacity: 0;
}

.intro__word {
    display: inline-block;
    opacity: 0;
}

.intro__brand {
    display: inline-flex;
}

.intro__brand img {
    display: block;
    width: auto;
    height: clamp(30px, 4vw, 44px);
}

.intro__seq > p {
    animation: intro-line 1.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--intro-lead) + var(--l) * 1.25s);
}

@keyframes intro-line {
    0%, 68% { opacity: 1; transform: none;               filter: blur(0); }
    100%    { opacity: 0; transform: translateY(-0.6em); filter: blur(6px); }
}

.intro__seq > p:last-child {
    animation: intro-stay 0.5s linear forwards;
    animation-delay: calc(var(--intro-lead) + var(--l) * 1.25s);
}

@keyframes intro-stay { to { opacity: 1; } }

.intro__word {
    animation: intro-word 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--intro-lead) + var(--l) * 1.25s + var(--i, 0) * 0.075s + var(--j, 0) * 0.01s);
}

@keyframes intro-word {
    from { opacity: 0; transform: translateY(0.5em); filter: blur(5px); }
    to   { opacity: 1; transform: none;              filter: blur(0); }
}

.intro:not(.is-playing),
.intro:not(.is-playing) .intro__seq > p,
.intro:not(.is-playing) .intro__word {
    animation-play-state: paused;
}

.intro__skip {
    position: absolute;
    right: var(--space-10, 20px);
    bottom: var(--space-10, 20px);
    z-index: 2;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(25, 23, 28, 0.06);
    color: var(--text-body, #4a4750);
    font: inherit;
    font-size: 14px;
    line-height: 25px;
    cursor: pointer;
}

.intro__skip:hover { background: rgba(25, 23, 28, 0.12); }

@media (prefers-reduced-motion: reduce) {
    .intro { animation: intro-out 0.3s linear 1.6s forwards; }
    .intro__seq > p { animation: none; opacity: 0; }
    .intro__seq > p:last-child { opacity: 1; }
    .intro__word { animation: none; opacity: 1; }
}
