:root {
    color-scheme: dark;
    --text: #fbfaf6;
    --muted: rgba(251, 250, 246, 0.76);
    --button-text: #202426;
    --button-bg: rgba(255, 255, 255, 0.94);
    --button-bg-hover: #ffffff;
    --button-border: rgba(255, 255, 255, 0.72);
    --focus: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Trebuchet MS", Arial, sans-serif;
}

.public-page {
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--text);
    background: #0e0f10;
}

.public-page::before {
    position: fixed;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 28%);
    mix-blend-mode: soft-light;
    opacity: 0;
    transform: translateX(-12%);
    animation: light-pass 2400ms cubic-bezier(0.16, 1, 0.3, 1) 320ms forwards;
}

.scene-bg,
.scene-cover {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.scene-bg {
    z-index: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: saturate(0.9) brightness(0.72) blur(8px);
    transform: scale(1.095);
    animation: bg-intro 3000ms cubic-bezier(0.16, 1, 0.3, 1) forwards, bg-breathe 30s ease-in-out 3s infinite alternate;
}

.fallback-bg {
    background:
        linear-gradient(115deg, rgba(184, 139, 55, 0.12), transparent 36%),
        linear-gradient(135deg, rgba(29, 33, 34, 0.98), rgba(7, 8, 9, 1) 60%),
        #0e0f10;
}

.scene-cover {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 32%, rgba(0, 0, 0, 0.18)),
        rgba(0, 0, 0, var(--overlay, 0.74));
    animation: cover-intro 2200ms ease-out forwards;
}

.brand-header {
    position: fixed;
    z-index: 4;
    top: 22px;
    left: 22px;
    width: min(250px, 27%);
    min-width: 148px;
    opacity: 0;
    transform: translateY(-16px);
    animation: soft-in 1250ms cubic-bezier(0.16, 1, 0.3, 1) 480ms forwards;
}

.brand-header img {
    display: block;
}

.brand-header img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.32));
}

.splash {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem 6rem;
    text-align: center;
}

.project-kicker {
    max-width: 820px;
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(14px);
    animation: soft-in 1200ms cubic-bezier(0.16, 1, 0.3, 1) 760ms forwards;
}

.project-kicker:empty {
    display: none;
}

.splash h1 {
    max-width: 1040px;
    margin: 0;
    font-size: 4.12rem;
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: 0;
    text-wrap: balance;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    animation: title-in 1600ms cubic-bezier(0.16, 1, 0.3, 1) 680ms forwards;
}

.button-grid {
    display: flex;
    width: min(1040px, 100%);
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.6rem;
    margin-top: 5.7rem;
    perspective: 1000px;
}

.share-button {
    position: relative;
    display: inline-flex;
    width: 168px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--button-border);
    border-radius: 4px;
    background: var(--button-bg);
    box-shadow: 0 18px 32px -20px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--button-text);
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.22;
    opacity: 0;
    padding: 0.64rem 0.95rem;
    text-align: center;
    text-decoration: none;
    transform: translateY(22px) rotateX(8deg) scale(0.96);
    transition: background-color 320ms ease, border-color 320ms ease, box-shadow 320ms ease, color 320ms ease, transform 320ms ease;
    animation: button-in 1250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(1080ms + (var(--i, 0) * 130ms));
    will-change: transform;
}

.share-button:hover,
.share-button:focus-visible {
    border-color: #ffffff;
    background: var(--button-bg-hover);
    box-shadow: 0 24px 42px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.18);
    transform: translateY(-4px) scale(1.035);
}

.share-button:active {
    transform: translateY(-1px) scale(1.01);
}

.share-button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.missing-copy {
    max-width: 36rem;
    margin: 1.1rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.5;
}

.legal-footer {
    position: fixed;
    z-index: 4;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(16px);
    animation: soft-in 1250ms cubic-bezier(0.16, 1, 0.3, 1) 1450ms forwards;
}

.legal-footer a {
    color: inherit;
    text-decoration: none;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
    transition: opacity 180ms ease, transform 180ms ease;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
    opacity: 0.82;
    transform: translateY(-1px);
}

@keyframes bg-intro {
    to {
        filter: saturate(1) brightness(1) blur(0);
        transform: scale(1.015);
    }
}

@keyframes bg-breathe {
    from {
        transform: scale(1.015) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.055) translate3d(-0.5%, -0.35%, 0);
    }
}

@keyframes cover-intro {
    from {
        opacity: 0.52;
    }

    to {
        opacity: 1;
    }
}

@keyframes light-pass {
    0% {
        opacity: 0;
        transform: translateX(-18%);
    }

    42% {
        opacity: 0.46;
    }

    100% {
        opacity: 0;
        transform: translateX(14%);
    }
}

@keyframes title-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes button-in {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

@keyframes soft-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 780px) {
    .brand-header {
        top: 18px;
        left: 18px;
        width: 172px;
    }

    .splash {
        justify-content: center;
        padding: 6rem 1.1rem 7.4rem;
    }

    .splash h1 {
        font-size: 2.7rem;
        line-height: 1.1;
    }

    .button-grid {
        gap: 0.78rem;
        margin-top: 3.35rem;
    }

    .share-button {
        width: min(100%, 340px);
        min-height: 50px;
    }

    .legal-footer {
        right: 1rem;
        left: 1rem;
        bottom: 0.9rem;
        justify-content: center;
        font-size: 1.16rem;
        gap: 0.65rem;
    }
}

@media (max-width: 420px) {
    .splash h1 {
        font-size: 2.22rem;
    }

    .brand-header {
        width: 154px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
