:root {
    --ink: #141a17;
    --ash: #e7ece8;
    --mist: #c5d0cb;
    --ember: #d4652f;
    --ember-deep: #8f3a16;
    --ozone: #1f7a78;
    --ozone-deep: #0f3f3e;
    --seam: rgba(20, 26, 23, 0.55);
    --font-display: "Syne", sans-serif;
    --font-body: "Literata", serif;
}

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

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

body.welcome-body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ash);
    -webkit-font-smoothing: antialiased;
}

.welcome {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
}

.welcome__atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(120% 80% at 12% 18%, rgba(212, 101, 47, 0.28), transparent 55%),
        radial-gradient(90% 70% at 88% 12%, rgba(31, 122, 120, 0.26), transparent 50%),
        radial-gradient(70% 60% at 70% 85%, rgba(143, 58, 22, 0.18), transparent 45%),
        linear-gradient(165deg, #dfe8e3 0%, #c9d4ce 42%, #b7c5c2 100%);
}

.welcome__grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.35;
    background-image:
        linear-gradient(var(--seam) 1px, transparent 1px),
        linear-gradient(90deg, var(--seam) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

.welcome__shards {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.welcome__shard {
    transform-origin: center;
    animation: drift 18s ease-in-out infinite;
}

.welcome__shard--a {
    animation-delay: 0s;
}

.welcome__shard--b {
    animation-delay: -6s;
    animation-duration: 22s;
}

.welcome__shard--c {
    animation-delay: -11s;
    animation-duration: 26s;
}

.welcome__top {
    position: relative;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
}

.welcome__nav a {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    opacity: 0.72;
    transition: opacity 180ms ease;
}

.welcome__nav a:hover,
.welcome__nav a:focus-visible {
    opacity: 1;
}

.welcome__nav a + a {
    margin-left: 1.25rem;
}

.welcome__stage {
    position: relative;
    z-index: 4;
    display: grid;
    align-content: center;
    min-height: calc(100vh - 4.5rem);
    min-height: calc(100dvh - 4.5rem);
    padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
    max-width: 72rem;
}

.welcome__brand {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.4rem, 12vw, 7.5rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--ink);
    max-width: 11ch;
    animation: rise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.welcome__brand span {
    color: var(--ember-deep);
}

.welcome__line {
    margin: 1.35rem 0 0;
    max-width: 34rem;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    line-height: 1.45;
    color: color-mix(in srgb, var(--ink) 82%, transparent);
    animation: rise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.welcome__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
    animation: rise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 220ms both;
}

.welcome__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.35rem;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.welcome__btn:focus-visible {
    outline: 2px solid var(--ozone);
    outline-offset: 3px;
}

.welcome__btn--primary {
    background: var(--ink);
    color: var(--ash);
}

.welcome__btn--primary:hover {
    background: var(--ozone-deep);
    transform: translateY(-1px);
}

.welcome__btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.welcome__btn--ghost:hover {
    border-color: var(--ember);
    color: var(--ember-deep);
    transform: translateY(-1px);
}

.welcome__seam {
    position: absolute;
    z-index: 3;
    width: 140%;
    height: 2px;
    left: -20%;
    top: 62%;
    background: linear-gradient(90deg, transparent, var(--ember), var(--ozone), transparent);
    opacity: 0.55;
    transform: rotate(-8deg);
    animation: pulse-seam 5.5s ease-in-out infinite;
}

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

@keyframes drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(12px, -18px, 0) rotate(1.2deg);
    }
}

@keyframes pulse-seam {
    0%,
    100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.75;
    }
}

@media (max-width: 640px) {
    .welcome__stage {
        align-content: end;
        padding-bottom: 4rem;
    }

    .welcome__brand {
        max-width: 9ch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome__brand,
    .welcome__line,
    .welcome__actions,
    .welcome__shard,
    .welcome__seam {
        animation: none !important;
    }
}
