:root {
    --ink: #0b0612;
    --primary: #9F007E;
    --primary-light: #C43AA3;
    --secondary: #FF5630;
    --violet: #7A2FF0;
    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.74);
    --text-faint: rgba(255, 255, 255, 0.52);
    --display: 'DM Serif Display', Georgia, serif;
    --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --script: 'Caveat', cursive;
    --expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100svh;
    background: var(--ink);
    color: var(--text);
    font-family: var(--body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.stage {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem);
    isolation: isolate;
    overflow: hidden;
}

.backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 90% 70% at 50% 40%, rgba(122, 47, 240, 0.22), transparent 70%),
        radial-gradient(ellipse 70% 60% at 20% 70%, rgba(159, 0, 126, 0.2), transparent 70%),
        radial-gradient(ellipse 60% 50% at 82% 30%, rgba(255, 86, 48, 0.14), transparent 70%),
        var(--ink);
}

.bgfx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.bgfx.is-ready {
    animation: bgIn 1.8s var(--expo) forwards;
}

@keyframes bgIn {
    to { opacity: 1; }
}

.grain {
    position: absolute;
    inset: -50%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.14;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainDrift 7s steps(6) infinite;
}

@keyframes grainDrift {
    0%   { transform: translate(0, 0); }
    16%  { transform: translate(-4%, 2%); }
    33%  { transform: translate(3%, -3%); }
    50%  { transform: translate(-2%, 4%); }
    66%  { transform: translate(4%, 1%); }
    83%  { transform: translate(-3%, -2%); }
    100% { transform: translate(0, 0); }
}

.veil {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(8, 4, 16, 0.26), transparent 72%),
        radial-gradient(ellipse 120% 100% at 50% 50%, transparent 46%, rgba(6, 3, 12, 0.72) 100%);
}

.content::before {
    content: '';
    position: absolute;
    inset: -14% -20%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at center,
        rgba(8, 4, 16, 0.66) 0%,
        rgba(8, 4, 16, 0.46) 44%,
        transparent 74%);
}

.content {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 62rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    animation: rise 1.15s var(--expo) forwards;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mark {
    width: clamp(160px, 22vw, 240px);
    height: auto;
    margin-bottom: clamp(2rem, 5vw, 3.25rem);
    animation-delay: 0.05s;
}

.headline {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.25rem, 8.2vw, 6.4rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    text-wrap: balance;
    text-shadow: 0 4px 40px rgba(6, 3, 14, 0.5);
    animation-delay: 0.18s;
}

.headline em {
    display: block;
    font-style: italic;
    background: linear-gradient(100deg, #FFB09E 0%, #FF5630 26%, #C43AA3 58%, #9F007E 84%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-bottom: 0.08em;
}

.script {
    font-family: var(--script);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.6vw, 2.3rem);
    color: var(--primary-light);
    letter-spacing: 0.04em;
    margin-top: clamp(0.75rem, 2vw, 1.15rem);
    text-shadow: 0 0 26px rgba(196, 58, 163, 0.32);
    animation-delay: 0.28s;
}

.rule {
    position: relative;
    width: min(340px, 62%);
    height: 1px;
    margin: clamp(2.25rem, 5vw, 3.25rem) 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    overflow: hidden;
    animation-delay: 0.36s;
}

.rule::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    transform: translateX(-100%);
    animation: sweep 3.8s var(--expo) 1.6s infinite;
}

@keyframes sweep {
    0%   { transform: translateX(-100%); }
    55%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.blurb {
    max-width: 34rem;
    font-size: clamp(0.95rem, 1.6vw, 1.08rem);
    line-height: 1.75;
    color: var(--text-soft);
    text-shadow: 0 1px 14px rgba(6, 3, 14, 0.62);
    animation-delay: 0.44s;
}

.footer {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.75rem);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    animation-delay: 0.54s;
}

.mail {
    font-size: 0.86rem;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    text-decoration: none;
    text-shadow: 0 1px 14px rgba(6, 3, 14, 0.62);
    padding-bottom: 2px;
    background-image: linear-gradient(var(--primary-light), var(--primary-light));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: 0 100%;
    transition: color 0.45s var(--expo), background-size 0.45s var(--expo);
}

.mail:hover {
    color: var(--text);
    background-size: 100% 1px;
}

.pip {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
}

.socials {
    display: flex;
    gap: 0.6rem;
}

.socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition:
        transform 0.5s var(--expo),
        color 0.5s var(--expo),
        border-color 0.5s var(--expo),
        background 0.5s var(--expo),
        box-shadow 0.5s var(--expo);
}

.socials svg {
    width: 17px;
    height: 17px;
}

@media (hover: hover) and (pointer: fine) {
    .socials a:hover {
        transform: translateY(-3px);
        color: var(--text);
        border-color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 24px rgba(6, 3, 14, 0.42), 0 0 22px rgba(159, 0, 126, 0.22);
    }
}

.socials a:focus-visible,
.mail:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .grain {
        opacity: 0.1;
    }

    .socials a {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .footer {
        flex-direction: column;
        gap: 1.4rem;
    }

    .pip {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .grain,
    .rule::after {
        animation: none;
    }

    .bgfx.is-ready {
        opacity: 1;
        animation: none;
    }
}
