/* Landing page base: reset, type, layout primitives, buttons, reveals. */

html.lp-root {
    scroll-behavior: smooth;
    scroll-padding-top: var(--lp-nav-h, 4.5rem);
    -webkit-text-size-adjust: 100%;
}

body.lp {
    margin: 0;
    background: var(--lp-paper);
    color: var(--lp-fg);
    font-family: var(--lp-font);
    font-size: var(--lp-size-body);
    font-feature-settings: "ss01", "cv11";
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

.lp *,
.lp *::before,
.lp *::after {
    box-sizing: border-box;
}

/* Zero-specificity defaults, so any component class wins over them. */
:where(.lp) img,
:where(.lp) svg {
    display: block;
    max-width: 100%;
}

:where(.lp) a {
    color: inherit;
}

.lp :focus-visible {
    outline: 2px solid var(--lp-focus);
    outline-offset: 3px;
    border-radius: 4px;
}

.lp-skip {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--lp-black);
    color: var(--lp-white);
    font-size: var(--lp-size-small);
    font-weight: 500;
    text-decoration: none;
    transform: translateY(-200%);
}

.lp-skip:focus {
    transform: none;
}

/* Layout ------------------------------------------------------------------ */

.lp-container {
    width: 100%;
    max-width: var(--lp-max);
    margin-inline: auto;
    padding-inline: var(--lp-gutter);
}

.lp-scene {
    position: relative;
    background: var(--lp-bg);
    color: var(--lp-fg);
    transition: background-color var(--lp-slow) var(--lp-ease);
}

.lp-scene--full {
    display: flex;
    min-height: 100svh;
    align-items: center;
    padding-block: calc(var(--lp-nav-h) + var(--lp-space-5)) var(--lp-space-6);
}

.lp-scene--padded {
    padding-block: var(--lp-section-y);
}

/* Text sits in the left columns; the right is kept for the 3D stage. */
.lp-copy {
    position: relative;
    z-index: 2;
}

.lp-copy--narrow {
    max-width: 40rem;
}

/* Type -------------------------------------------------------------------- */

.lp-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 var(--lp-space-4);
    color: var(--lp-fg-3);
    font-family: var(--lp-mono);
    font-size: var(--lp-size-label);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lp-label-index {
    color: var(--lp-fg);
}

.lp-label::after {
    width: 2rem;
    height: 1px;
    background: var(--lp-line-strong);
    content: "";
}

.lp-display,
.lp-h2,
.lp-h3 {
    margin: 0;
    color: var(--lp-fg);
    font-weight: 500;
    text-wrap: balance;
}

.lp-display {
    font-size: var(--lp-size-display);
    letter-spacing: var(--lp-tracking-display);
    line-height: 0.96;
}

.lp-h2 {
    font-size: var(--lp-size-h2);
    letter-spacing: var(--lp-tracking-h2);
    line-height: 0.98;
}

.lp-h3 {
    font-size: var(--lp-size-h3);
    letter-spacing: var(--lp-tracking-h3);
    line-height: 1.08;
}

.lp-muted {
    color: var(--lp-fg-3);
}

.lp-lead {
    max-width: 34rem;
    margin: var(--lp-space-4) 0 0;
    color: var(--lp-fg-2);
    font-size: var(--lp-size-lead);
    letter-spacing: -0.012em;
    line-height: 1.5;
}

.lp-body {
    max-width: 36rem;
    margin: var(--lp-space-3) 0 0;
    color: var(--lp-fg-2);
    font-size: var(--lp-size-body);
    line-height: 1.65;
}

.lp-note {
    max-width: 32rem;
    margin: var(--lp-space-3) 0 0;
    color: var(--lp-fg-3);
    font-size: var(--lp-size-small);
    line-height: 1.55;
}

/* Buttons ----------------------------------------------------------------- */

.lp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lp-space-2) var(--lp-space-4);
    margin-top: var(--lp-space-5);
}

.lp-button {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--lp-button-bg);
    color: var(--lp-button-fg);
    font: 500 0.9375rem/1 var(--lp-font);
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform var(--lp-fast) var(--lp-ease),
        opacity var(--lp-fast) var(--lp-ease),
        background-color var(--lp-fast) var(--lp-ease);
}

.lp-button:hover {
    opacity: 0.86;
}

.lp-button:active {
    transform: scale(0.98);
}

.lp-button--small {
    min-height: 2.375rem;
    padding: 0 1.125rem;
    font-size: 0.875rem;
}

.lp-button--ghost {
    border-color: var(--lp-line-strong);
    background: transparent;
    color: var(--lp-fg);
}

.lp-button--ghost:hover {
    border-color: var(--lp-fg);
    opacity: 1;
}

.lp-button[aria-disabled="true"] {
    border-color: var(--lp-line);
    background: transparent;
    color: var(--lp-fg-3);
    cursor: not-allowed;
    opacity: 1;
}

.lp-link {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.5rem;
    color: var(--lp-fg);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.lp-link span {
    transition: transform var(--lp-fast) var(--lp-ease);
}

.lp-link:hover span {
    transform: translateY(2px);
}

/* Line reveals --------------------------------------------------------------
 * Each headline line is a mask; its inner span rises into place. Only with
 * JS (html.lp-js) and without a reduced-motion preference, so text is never
 * hidden from anyone who can't run the animation.
 */
.lp-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.lp-line > span {
    display: block;
}

/* Lines are broken by hand; on wide screens they never re-wrap. */
@media (min-width: 1024px) {
    .lp-line > span {
        white-space: nowrap;
    }
}

.lp-js .lp-reveal .lp-line > span {
    transform: translateY(108%);
    transition: transform 1100ms var(--lp-ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
}

.lp-js .lp-reveal .lp-fade {
    opacity: 0;
    transform: translateY(1rem);
    transition:
        opacity 900ms var(--lp-ease),
        transform 1100ms var(--lp-ease-out);
    transition-delay: calc(var(--i, 0) * 90ms + 240ms);
}

.lp-js .lp-reveal.is-revealed .lp-line > span,
.lp-js .lp-reveal.is-revealed .lp-fade {
    opacity: 1;
    transform: none;
}

/* On a phone the hand-made line breaks would re-wrap and look ragged, so
 * headlines flow and balance naturally and reveal as one block. */
@media (max-width: 760px) {
    .lp-line,
    .lp-line > span {
        display: inline;
        overflow: visible;
        padding: 0;
        margin: 0;
    }

    .lp-js .lp-reveal .lp-line > span {
        transform: none;
        transition: none;
    }

    .lp-js .lp-reveal :is(.lp-display, .lp-h2) {
        opacity: 0;
        transform: translateY(1.25rem);
        transition:
            opacity 900ms var(--lp-ease),
            transform 1100ms var(--lp-ease-out);
    }

    .lp-js .lp-reveal.is-revealed :is(.lp-display, .lp-h2) {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.lp-root {
        scroll-behavior: auto;
    }

    .lp-js .lp-reveal .lp-line > span,
    .lp-js .lp-reveal .lp-fade,
    .lp-js .lp-reveal :is(.lp-display, .lp-h2) {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .lp-scene {
        transition: none;
    }
}

.lp-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
