/* ==========================================================================
   TaskPilot Landing — Scrollytelling
   Struktur: Hero → 3 gepinnte Story-Szenen (Canvas-Partikel) → Features → CTA
   ========================================================================== */

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

:root {
    --lp-accent: #f97316;
    --lp-accent-2: #fb923c;
    --lp-accent-hover: #ea580c;
    --lp-accent-soft: rgba(249, 115, 22, 0.12);
    --lp-accent-soft-2: rgba(249, 115, 22, 0.22);
    --lp-accent-glow: rgba(249, 115, 22, 0.18);

    --lp-bg: #0b0b0d;
    --lp-bg-alt: #111114;
    --lp-bg-panel: #16161c;

    --lp-surface: rgba(255, 255, 255, 0.03);
    --lp-surface-2: rgba(255, 255, 255, 0.05);
    --lp-surface-3: rgba(255, 255, 255, 0.07);

    --lp-border: rgba(255, 255, 255, 0.08);
    --lp-border-soft: rgba(255, 255, 255, 0.05);
    --lp-border-strong: rgba(255, 255, 255, 0.14);
    --lp-border-accent: rgba(249, 115, 22, 0.28);

    --lp-text-1: #fafafc;
    --lp-text-2: #d9d9df;
    --lp-text-3: #a3a3ad;
    --lp-text-4: #71717e;

    --lp-success: #22c55e;

    --lp-radius-sm: 10px;
    --lp-radius: 16px;
    --lp-radius-lg: 24px;

    --lp-max: 1160px;
    --lp-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --lp-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

    --lp-shadow-md: 0 20px 50px rgba(0, 0, 0, 0.35);
    --lp-shadow-lg: 0 40px 100px rgba(0, 0, 0, 0.45);

    --lp-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --lp-nav-h: 72px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: var(--lp-font);
    background: radial-gradient(1200px 800px at 70% -10%, #131318 0%, var(--lp-bg) 55%);
    color: var(--lp-text-2);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

.lp-container {
    width: 100%;
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 0 28px;
}

/* --------------------------------------------------------------------------
   Skip-Link
   -------------------------------------------------------------------------- */

.lp-skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 200;
    padding: 10px 18px;
    background: var(--lp-accent);
    color: #fff;
    border-radius: var(--lp-radius-sm);
    font-weight: 600;
    transition: top 0.2s var(--lp-ease);
}

.lp-skip-link:focus {
    top: 12px;
}

/* --------------------------------------------------------------------------
   Story-Canvas (fixiert, hinter allem Inhalt)
   -------------------------------------------------------------------------- */

#lp-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main,
.lp-footer {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Scroll-Progress (dünne Linie oben)
   -------------------------------------------------------------------------- */

.lp-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 120;
    background: transparent;
}

.lp-progress__fill {
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--lp-accent), var(--lp-accent-2));
    box-shadow: 0 0 12px var(--lp-accent-glow);
    will-change: transform;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.lp-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s var(--lp-ease), border-color 0.3s var(--lp-ease);
    border-bottom: 1px solid transparent;
}

.lp-nav.scrolled {
    background: rgba(11, 11, 13, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--lp-border-soft);
}

.lp-nav__inner {
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 0 28px;
    height: var(--lp-nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lp-nav__logo-img {
    height: 34px;
    width: auto;
}

.lp-nav__logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--lp-text-1);
}

.lp-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sprach-Toggle */

.lp-lang {
    display: flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--lp-border);
    border-radius: 999px;
    background: var(--lp-surface);
    margin-right: 4px;
}

.lp-lang__btn {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--lp-text-4);
    transition: color 0.2s var(--lp-ease), background 0.2s var(--lp-ease);
}

.lp-lang__btn:hover {
    color: var(--lp-text-2);
}

.lp-lang__btn.is-active {
    background: var(--lp-accent-soft-2);
    color: var(--lp-accent-2);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.2s var(--lp-ease), background 0.2s var(--lp-ease),
        border-color 0.2s var(--lp-ease), box-shadow 0.2s var(--lp-ease);
}

.lp-btn--primary {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-hover));
    color: #fff;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.25);
}

.lp-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35);
}

.lp-btn--ghost {
    border: 1px solid var(--lp-border-strong);
    color: var(--lp-text-2);
    background: var(--lp-surface);
}

.lp-btn--ghost:hover {
    border-color: var(--lp-border-accent);
    color: var(--lp-text-1);
    background: var(--lp-surface-2);
}

.lp-btn--sm { padding: 8px 18px; font-size: 0.85rem; }
.lp-btn--lg { padding: 14px 30px; font-size: 1rem; }
.lp-btn--xl { padding: 17px 40px; font-size: 1.1rem; }

.lp-btn__arrow {
    transition: transform 0.2s var(--lp-ease);
}

.lp-btn:hover .lp-btn__arrow {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.lp-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--lp-nav-h) + 40px) 28px 80px;
}

.lp-hero__inner {
    max-width: 860px;
}

.lp-hero__title {
    font-size: clamp(2.8rem, 7.5vw, 5.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--lp-text-1);
    animation: lp-rise 0.9s var(--lp-ease) both;
}

.lp-hero__sub {
    margin-top: 22px;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--lp-text-3);
    animation: lp-rise 0.9s 0.15s var(--lp-ease) both;
}

.lp-hero__actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    animation: lp-rise 0.9s 0.3s var(--lp-ease) both;
}

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

/* Scroll-Cue */

.lp-scroll-cue {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    transition: opacity 0.2s var(--lp-ease);
    animation: lp-rise 0.9s 0.6s var(--lp-ease) both;
}

.lp-scroll-cue:hover {
    opacity: 1;
}

.lp-scroll-cue__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--lp-text-4);
}

.lp-scroll-cue__mouse {
    width: 24px;
    height: 38px;
    border: 1.5px solid var(--lp-text-4);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 7px;
}

.lp-scroll-cue__mouse i {
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: var(--lp-accent);
    animation: lp-cue 1.8s var(--lp-ease) infinite;
}

@keyframes lp-cue {
    0% { opacity: 0; transform: translateY(-2px); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(10px); }
}

/* --------------------------------------------------------------------------
   Story-Szenen (gepinnt)
   Die Sektion ist hoch (Scroll-Strecke), der Pin bleibt 100vh sticky stehen.
   Beats + Visuals werden von landing.js über Inline-Styles getrieben.
   -------------------------------------------------------------------------- */

.lp-scene {
    position: relative;
    height: 190vh;
    contain: layout paint style;
}

/* Szene 02 braucht etwas mehr Strecke fürs Terminal-Typing */
#story-shift {
    height: 210vh;
}

.lp-scene--resolve {
    height: 250vh;
}

.lp-scene__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
}

.lp-scene__kicker {
    position: absolute;
    top: calc(var(--lp-nav-h) + 26px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--lp-text-4);
    white-space: nowrap;
}

.lp-scene__kicker b {
    font-family: var(--lp-mono);
    font-weight: 600;
    color: var(--lp-accent-2);
}

.lp-scene__kicker::before,
.lp-scene__kicker::after {
    content: "";
    width: 44px;
    height: 1px;
    background: var(--lp-border-strong);
}

.lp-scene__beats {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
}

.lp-scene__beats--upper {
    bottom: 55%;
    align-items: flex-end;
    padding-bottom: 4vh;
}

.lp-beat {
    position: absolute;
    max-width: 940px;
    text-align: center;
    font-size: clamp(1.9rem, 5.6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--lp-text-1);
    opacity: 0;
    transform: translate3d(0, 34px, 0);
    will-change: opacity, transform;
    padding: 0 28px;
}

/* --------------------------------------------------------------------------
   Szene 02 — Terminal-Fenster mit getippten Zeilen
   -------------------------------------------------------------------------- */

.lp-codewin {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate3d(0, 40px, 0) translateX(-50%);
    width: min(640px, 92vw);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    background: rgba(17, 17, 21, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--lp-shadow-lg);
    opacity: 0;
    will-change: opacity, transform;
    overflow: hidden;
}

.lp-codewin__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--lp-border-soft);
}

.lp-codewin__bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lp-surface-3);
}

.lp-codewin__bar em {
    margin-left: auto;
    font-family: var(--lp-mono);
    font-style: normal;
    font-size: 0.72rem;
    color: var(--lp-text-4);
}

.lp-codewin__body {
    padding: 18px 20px 22px;
    font-family: var(--lp-mono);
    font-size: clamp(0.78rem, 1.6vw, 0.92rem);
    line-height: 2;
    min-height: 200px;
}

.lp-codeline {
    color: var(--lp-text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-codeline--cmd::before {
    content: "$ ";
    color: var(--lp-accent-2);
}

.lp-codeline--ok {
    color: var(--lp-success);
}

.lp-codeline--warn {
    color: var(--lp-accent-2);
}

.lp-codeline.is-typing::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 1em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--lp-accent-2);
    animation: lp-caret 0.8s steps(1) infinite;
}

@keyframes lp-caret {
    50% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Szene 03 — Auflösung: Wordmark + Tagline + CTA
   -------------------------------------------------------------------------- */

.lp-resolve {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0 28px;
    text-align: center;
}

.lp-resolve__wordmark {
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale(0.96);
    will-change: opacity, transform;
    filter: drop-shadow(0 0 44px var(--lp-accent-glow));
}

.lp-resolve__logo {
    width: clamp(300px, 52vw, 660px);
    height: auto;
    margin: 0 auto;
}

.lp-resolve__logo-text {
    font-size: clamp(3.4rem, 11vw, 8.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(120deg, var(--lp-text-1) 30%, var(--lp-accent-2) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lp-resolve__tagline {
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    color: var(--lp-text-2);
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    will-change: opacity, transform;
}

.lp-resolve__cta {
    margin-top: 14px;
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    will-change: opacity, transform;
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.lp-features {
    padding: 130px 0 90px;
    background: linear-gradient(180deg, transparent 0%, rgba(11, 11, 13, 0.75) 18%, rgba(11, 11, 13, 0.75) 100%);
}

.lp-features__head {
    max-width: 640px;
    margin: 0 auto 64px;
    text-align: center;
}

.lp-features__head h2 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--lp-text-1);
    line-height: 1.15;
}

.lp-features__head p {
    margin-top: 16px;
    color: var(--lp-text-3);
    font-size: 1.05rem;
}

.lp-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.lp-feature {
    padding: 28px 24px;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-lg);
    background: var(--lp-surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s var(--lp-ease), border-color 0.25s var(--lp-ease),
        background 0.25s var(--lp-ease);
}

.lp-feature:hover {
    transform: translateY(-4px);
    border-color: var(--lp-border-accent);
    background: var(--lp-surface-2);
}

.lp-feature__icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--lp-accent-soft);
    color: var(--lp-accent-2);
    margin-bottom: 18px;
}

.lp-feature__icon svg {
    width: 24px;
    height: 24px;
}

.lp-feature h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lp-text-1);
    margin-bottom: 8px;
}

.lp-feature p {
    font-size: 0.9rem;
    color: var(--lp-text-3);
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */

.lp-cta {
    padding: 60px 0 140px;
    background: rgba(11, 11, 13, 0.75);
}

.lp-cta__inner {
    text-align: center;
    padding: 72px 40px;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-lg);
    background:
        radial-gradient(600px 300px at 50% -20%, var(--lp-accent-soft) 0%, transparent 70%),
        var(--lp-surface);
}

.lp-cta__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--lp-text-1);
    line-height: 1.1;
}

.lp-cta__sub {
    margin-top: 16px;
    color: var(--lp-text-3);
    font-size: 1.05rem;
}

.lp-cta__actions {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

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

.lp-footer {
    border-top: 1px solid var(--lp-border-soft);
    padding: 48px 0 32px;
    background: var(--lp-bg);
}

.lp-footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.lp-footer__logo {
    height: 30px;
    width: auto;
    margin-bottom: 12px;
}

.lp-footer__tagline {
    font-size: 0.88rem;
    color: var(--lp-text-4);
    max-width: 340px;
}

.lp-footer__links {
    display: flex;
    gap: 26px;
    font-size: 0.88rem;
    color: var(--lp-text-3);
}

.lp-footer__links a:hover {
    color: var(--lp-text-1);
}

.lp-footer__bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--lp-border-soft);
    font-size: 0.8rem;
    color: var(--lp-text-4);
}

/* --------------------------------------------------------------------------
   Reveal (IntersectionObserver in landing.js)
   -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--lp-ease), transform 0.7s var(--lp-ease);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .lp-features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .lp-container,
    .lp-nav__inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .lp-nav__actions .lp-btn--ghost {
        display: none;
    }

    .lp-features__grid {
        grid-template-columns: 1fr;
    }

    .lp-scene__beats--upper {
        bottom: 58%;
    }

    .lp-codewin {
        top: 44%;
    }

    .lp-codewin__body {
        min-height: 170px;
    }

    .lp-cta__inner {
        padding: 52px 24px;
    }

    .lp-footer__inner {
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
   Exit-Übergang zur App: Inhalt fadet auf das dunkle Body-Schwarz, während
   der Partikel-Staub auf dem Canvas weiterwirbelt (drawExitSwirl in landing.js);
   /app malt im selben Ton weiter (Dark-First-Paint in index.html)
   -------------------------------------------------------------------------- */

body.lp-exit main,
body.lp-exit .lp-nav,
body.lp-exit .lp-footer,
body.lp-exit .lp-progress {
    opacity: 0;
    transition: opacity 0.42s var(--lp-ease);
}

/* --------------------------------------------------------------------------
   Reduced Motion — Story wird statisch untereinander gezeigt
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .lp-hero__title,
    .lp-hero__sub,
    .lp-hero__actions,
    .lp-scroll-cue {
        animation: none;
    }

    .lp-scroll-cue__mouse i {
        animation: none;
        opacity: 1;
    }

    .lp-scene,
    .lp-scene--resolve {
        height: auto;
    }

    .lp-scene__pin {
        position: static;
        height: auto;
        overflow: visible;
        flex-direction: column;
        gap: 40px;
        padding: 110px 28px;
    }

    .lp-scene__kicker {
        position: static;
        transform: none;
    }

    .lp-scene__beats,
    .lp-scene__beats--upper {
        position: static;
        flex-direction: column;
        gap: 40px;
        padding: 0;
    }

    .lp-beat {
        position: static;
        opacity: 1;
        transform: none;
    }

    .lp-codewin {
        position: static;
        transform: none;
        opacity: 1;
    }

    .lp-resolve {
        position: static;
    }

    .lp-resolve__wordmark,
    .lp-resolve__tagline,
    .lp-resolve__cta {
        opacity: 1;
        transform: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
