:root {
    --forest-dark: #0d1310;
    --forest-mid: #1a2420;
    --forest-light: #2a3a34;
    --off-white: #f4f4f4;
    --pure-white: #ffffff;
    --soft-black: #1a1a1a;
    --ease-quiet: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-precise: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
    background: var(--forest-dark);
    color: var(--off-white);
    font-family: "Inter", sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100%;
}

body {
    min-height: 100vh;
    position: relative;
}

/* Film grain overlay */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Hero stage */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layer 1 · Background image with ken-burns */
.bg-image {
    position: absolute;
    inset: -5%;
    z-index: 1;
    background: var(--forest-mid);
}
.bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenburns 28s ease-in-out infinite alternate;
    opacity: 0;
    transition: opacity 2.5s var(--ease-quiet);
}
.bg-image.is-loaded img {
    opacity: 0.42;
}
.bg-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at center,
            transparent 0%,
            rgba(13, 19, 16, 0.55) 65%,
            var(--forest-dark) 100%
        ),
        linear-gradient(
            to bottom,
            rgba(13, 19, 16, 0.75) 0%,
            transparent 22%,
            transparent 60%,
            rgba(13, 19, 16, 0.92) 100%
        );
    pointer-events: none;
}
@keyframes kenburns {
    0% {
        transform: scale(1.08) translate(-1.5%, -1%);
    }
    100% {
        transform: scale(1.18) translate(1.5%, 1%);
    }
}

/* Layer 2 · Ghost wordmark */
.bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    font-size: 24vw;
    line-height: 0.85;
    letter-spacing: -0.045em;
    color: var(--off-white);
    opacity: 0.045;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    transition: transform 0.9s var(--ease-quiet);
    will-change: transform;
}

/* Layer 3 · Foreground content */
.content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 720px;
    padding: 0 2rem;
    transition: transform 0.9s var(--ease-quiet);
    will-change: transform;
}

/* Top-left wordmark */
.wordmark {
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    z-index: 4;
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    font-size: 0.9375rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--off-white);
    opacity: 0;
    animation: fadeIn 1.2s var(--ease-quiet) 0.3s forwards;
}

/* Top-right spinning badge */
.badge {
    position: absolute;
    top: 2.25rem;
    right: 2.5rem;
    z-index: 4;
    width: 84px;
    height: 84px;
    opacity: 0;
    animation: fadeIn 1.5s var(--ease-quiet) 0.5s forwards;
}
.badge svg {
    width: 100%;
    height: 100%;
    animation: spin 28s linear infinite;
    transition: animation-duration 0.8s var(--ease-quiet);
}
.badge:hover svg {
    animation-duration: 10s;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Eyebrow */
.eyebrow {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(244, 244, 244, 0.55);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 1s var(--ease-quiet) 0.6s forwards;
}
.eyebrow::before {
    content: "";
    display: block;
    width: 32px;
    height: 1px;
    background: rgba(244, 244, 244, 0.3);
    margin: 0 auto 1.5rem;
}

/* Headline with line-mask-rise */
.headline {
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 0.92;
    letter-spacing: -0.028em;
    margin-bottom: 2.25rem;
}
.headline .line {
    display: block;
    overflow: hidden;
}
.headline .line .inner {
    display: block;
    transform: translateY(110%);
    animation: lineRise 1.3s var(--ease-emphasis) forwards;
}
.headline .line:nth-child(1) .inner {
    animation-delay: 0.85s;
}
.headline .line:nth-child(2) .inner {
    animation-delay: 1s;
}
@keyframes lineRise {
    to {
        transform: translateY(0);
    }
}

/* Sub paragraph */
.sub {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: rgba(244, 244, 244, 0.68);
    max-width: 460px;
    margin: 0 auto 3.5rem;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 1s var(--ease-quiet) 1.4s forwards;
}

/* Signup form */
.signup {
    display: flex;
    align-items: center;
    max-width: 440px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(244, 244, 244, 0.22);
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 1s var(--ease-quiet) 1.6s forwards;
    transition: border-color 0.4s var(--ease-quiet);
}
.signup:focus-within {
    border-color: rgba(244, 244, 244, 0.6);
}
.signup input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.95rem 0;
    color: var(--off-white);
    font-family: "Inter", sans-serif;
    font-size: 0.9375rem;
}
.signup input::placeholder {
    color: rgba(244, 244, 244, 0.38);
}
.signup button {
    background: transparent;
    border: none;
    color: var(--off-white);
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 0 0.95rem 1rem;
    transition: opacity 0.3s var(--ease-quiet);
}
.signup button:hover {
    opacity: 0.72;
}
.signup button .arrow {
    display: inline-block;
    transition: transform 0.4s var(--ease-quiet);
}
.signup button:hover .arrow {
    transform: translateX(5px);
}

.thank-you {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8125rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(244, 244, 244, 0.65);
    padding: 0.95rem 0;
}

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

/* Status footer */
.status {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(244, 244, 244, 0.42);
    opacity: 0;
    animation: fadeIn 1.5s var(--ease-quiet) 1.9s forwards;
    white-space: nowrap;
}
.status .indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.status .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #7a9b87;
    border-radius: 50%;
    animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(122, 155, 135, 0.45);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 0 7px rgba(122, 155, 135, 0);
    }
}
.status .sep {
    opacity: 0.4;
}

/* Mobile */
@media (max-width: 768px) {
    .wordmark {
        top: 1.5rem;
        left: 1.5rem;
        font-size: 0.8125rem;
    }
    .badge {
        top: 1.5rem;
        right: 1.5rem;
        width: 60px;
        height: 60px;
    }
    .status {
        font-size: 0.625rem;
        gap: 0.75rem;
        padding: 0 1rem;
    }
    .bg-text {
        font-size: 38vw;
    }
    .eyebrow {
        margin-bottom: 2rem;
        font-size: 0.6875rem;
    }
    .eyebrow::before {
        margin-bottom: 1.2rem;
    }
    .sub {
        font-size: 0.9375rem;
        margin-bottom: 2.5rem;
    }
    .signup button span:first-child {
        display: none;
    }
    .signup button {
        padding: 0.95rem 0 0.95rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .bg-image img {
        animation: none;
        opacity: 0.42;
    }
    .badge svg {
        animation: none;
    }
    .headline .line .inner {
        transform: translateY(0);
    }
    .eyebrow,
    .sub,
    .signup,
    .wordmark,
    .badge,
    .status {
        opacity: 1;
        transform: none;
    }
}
