/*
 * iFunnel — the application root.
 *
 * This page has no call to action, because there is nothing here to act on: a
 * funnel is reachable only by the link its organiser shared, and there is no
 * public listing of them. So the layout leads with the tagline and hands over the
 * one fact a stray visitor needs — the shape of a funnel's link.
 *
 * Amber appears exactly twice, mirroring the single amber card leaving the logo:
 * on the link's slug segment, and on `Curated`, the only stage that is an outcome.
 * Amber *text* uses --color-warning rather than the logo's lighter #EDB35F, which
 * does not carry enough contrast on the light ground.
 */

.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-2xl) var(--space-lg);
}

/* A left-aligned measure rather than a centred one: the text reads as a note left
 * for the visitor, not as a billboard. The column takes the free space and centres
 * its content within it, which leaves the footer resting on the bottom edge. */
.landing__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
}

.landing__logo {
    /* Without this the image would stretch to the column's full width: it is a
     * flex item in a column, and `align-items` defaults to `stretch`. */
    align-self: flex-start;
    height: 3rem;
    width: auto;
    margin-bottom: var(--space-xl);
}

.landing__title {
    font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.25rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 15ch;
}

.landing__lead {
    margin-top: var(--space-md);
    max-width: 38ch;
    font-size: 1.0625rem;
    color: var(--color-text-secondary);
}

/* ----- The link plate ----- */

.landing__linkbox {
    align-self: flex-start;
    max-width: 100%;
    margin-top: var(--space-2xl);
}

.landing__link {
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.landing__link-host {
    color: var(--color-text-muted);
}

.landing__link-slug {
    color: var(--color-warning);
    font-weight: 600;
}

.landing__note {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ----- The lifecycle ----- */

.landing__flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    list-style: none;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-text-muted);
}

.landing__flow li + li::before {
    content: "→";
    margin-right: var(--space-sm);
    color: var(--color-border);
}

/* The only stage that is an outcome rather than an activity. */
.landing__flow li:last-child {
    color: var(--color-warning);
    font-weight: 600;
}

/* ----- Footer ----- */

.landing__footer {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding-top: var(--space-2xl);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.landing__footer a {
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-color: var(--color-border);
}

.landing__footer a:hover {
    color: var(--color-accent);
    text-decoration-color: currentColor;
}

.landing__footer a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ----- Entrance ----- */

.landing__logo,
.landing__title,
.landing__lead,
.landing__linkbox,
.landing__flow {
    animation: landing-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.landing__logo { animation-delay: 0ms; }
.landing__title { animation-delay: 70ms; }
.landing__lead { animation-delay: 140ms; }
.landing__linkbox { animation-delay: 210ms; }
.landing__flow { animation-delay: 280ms; }

@keyframes landing-rise {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing__logo,
    .landing__title,
    .landing__lead,
    .landing__linkbox,
    .landing__flow {
        animation: none;
    }
}
