/* ==========================================================================
   TaskPilot First-Run Intro — Vollbild-Sequenz im Landing-Stil
   Immer dunkel, Orange-Akzent, Partikel-Canvas im Hintergrund.
   ========================================================================== */

#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: radial-gradient(1200px 800px at 70% -10%, #131318 0%, #0b0b0d 55%);
    color: #d9d9df;
    overflow: hidden;
    cursor: pointer;
    animation: intro-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#intro-overlay.intro-leave {
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

@keyframes intro-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#intro-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Skip ───────────────────────────────────────────────────── */

.intro-skip {
    position: absolute;
    top: 22px;
    right: 26px;
    z-index: 3;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #a3a3ad;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.intro-skip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fafafc;
}

/* ── Bühne & Szenen ─────────────────────────────────────────── */

.intro-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.intro-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 24px 96px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(26px);
    transition:
        opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.55s;
}

.intro-scene.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.12s,
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.12s;
}

.intro-scene.is-past {
    transform: translateY(-22px);
}

.intro-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #f97316;
    margin-bottom: 10px;
}

.intro-title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 6vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #fafafc;
}

.intro-sub {
    margin: 0 0 34px;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: #a3a3ad;
    max-width: 520px;
    line-height: 1.55;
}

/* Kaskadierter Aufbau innerhalb der aktiven Szene */
.intro-scene .intro-kicker,
.intro-scene .intro-title,
.intro-scene .intro-sub,
.intro-scene .intro-mock,
.intro-scene .intro-logo-wrap,
.intro-scene .intro-actions {
    opacity: 0;
    transform: translateY(22px);
}

.intro-scene.is-active .intro-kicker,
.intro-scene.is-active .intro-title,
.intro-scene.is-active .intro-sub,
.intro-scene.is-active .intro-mock,
.intro-scene.is-active .intro-logo-wrap,
.intro-scene.is-active .intro-actions {
    animation: intro-rise 0.65s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.intro-scene.is-active .intro-kicker   { animation-delay: 0.15s; }
.intro-scene.is-active .intro-title    { animation-delay: 0.28s; }
.intro-scene.is-active .intro-sub      { animation-delay: 0.42s; }
.intro-scene.is-active .intro-mock,
.intro-scene.is-active .intro-logo-wrap,
.intro-scene.is-active .intro-actions  { animation-delay: 0.58s; }

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

/* ── Szene 1: Logo ──────────────────────────────────────────── */

.intro-logo {
    width: clamp(84px, 14vw, 128px);
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(249, 115, 22, 0.35));
}

/* ── Mini-Mockups (gemeinsam) ───────────────────────────────── */

.intro-mock {
    width: min(460px, calc(100vw - 48px));
}

/* ── Szene 2: Board-Struktur ────────────────────────────────── */

.intro-mock--board {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: left;
}

.im-assignment {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

.im-assignment-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.im-assignment-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #fafafc;
    letter-spacing: -0.02em;
}

.im-epic-pill {
    margin-left: auto;
    padding: 2px 11px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fb923c;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.28);
}

.im-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.im-col {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.im-col-head {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #71717e;
    margin-bottom: 8px;
}

.im-card {
    position: relative;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 7px;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
}

.im-card:last-child { margin-bottom: 0; }

.intro-scene.is-active .im-card {
    animation: intro-card-pop 0.45s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    animation-delay: var(--d, 1s);
}

@keyframes intro-card-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.im-card--done {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.25);
}

.im-card--done::after {
    content: "✓";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 800;
    color: #22c55e;
}

.im-card--ai {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.30);
}

.im-card--ai span {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    color: #fb923c;
}

/* ── Szene 3: Tagesplanung ──────────────────────────────────── */

.intro-mock--day {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.im-budget-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #a3a3ad;
    margin-bottom: 8px;
}

.im-budget-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.im-budget-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, #fb923c);
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.45);
}

.intro-scene.is-active .im-budget-fill {
    animation: intro-budget-fill 1.4s cubic-bezier(0.4, 0, 0.2, 1) 1s both;
}

@keyframes intro-budget-fill {
    from { width: 0; }
    to   { width: 68%; }
}

.im-week {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 20px;
}

.im-week span {
    flex: 1;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.im-week .im-week--today {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.25);
}

.im-week .im-week--off {
    opacity: 0.35;
}

/* ── Szene 4: Agents-Terminal ───────────────────────────────── */

.im-term {
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(13, 13, 17, 0.92);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.im-term-bar {
    display: flex;
    gap: 6px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.im-term-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.im-term-bar i:first-child { background: rgba(249, 115, 22, 0.55); }

.im-term-body {
    padding: 16px 18px 18px;
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 2;
}

.im-line {
    color: #a3a3ad;
    opacity: 0;
    transform: translateY(6px);
}

.intro-scene.is-active .im-line {
    animation: intro-line-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: var(--d, 1s);
}

@keyframes intro-line-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.im-line--cmd { color: #fafafc; }

.im-line--cmd::before {
    content: "$ ";
    color: #f97316;
    font-weight: 700;
}

.im-line--ok { color: #22c55e; }

/* ── Szene 5: Bereit ────────────────────────────────────────── */

.intro-scene--ready .intro-title {
    font-size: clamp(2.6rem, 8vw, 4.6rem);
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.intro-btn {
    height: 48px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.16s ease, color 0.16s ease;
}

.intro-btn--pri {
    border: none;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 12px 34px rgba(249, 115, 22, 0.35);
}

.intro-btn--pri:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(249, 115, 22, 0.45);
}

.intro-btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #d9d9df;
}

.intro-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fafafc;
}

/* ── Fortschritts-Dots ──────────────────────────────────────── */

.intro-dots {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.intro-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: background 0.25s ease, width 0.25s ease;
}

.intro-dot:hover { background: rgba(255, 255, 255, 0.35); }

.intro-dot.is-active {
    width: 26px;
    background: linear-gradient(90deg, #f97316, #fb923c);
}

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .intro-skip { top: 14px; right: 14px; }
    .intro-dots { bottom: 24px; }
    .im-columns { grid-template-columns: 1fr; }
}

/* ── Reduced Motion: statische Click-Through-Variante ───────── */

@media (prefers-reduced-motion: reduce) {
    #intro-overlay {
        animation: none;
    }

    #intro-overlay.intro-leave {
        transition: none;
    }

    .intro-scene,
    .intro-scene.is-active {
        transition: none;
        transform: none;
    }

    .intro-scene.is-active .intro-kicker,
    .intro-scene.is-active .intro-title,
    .intro-scene.is-active .intro-sub,
    .intro-scene.is-active .intro-mock,
    .intro-scene.is-active .intro-logo-wrap,
    .intro-scene.is-active .intro-actions,
    .intro-scene.is-active .im-card,
    .intro-scene.is-active .im-line,
    .intro-scene.is-active .im-budget-fill {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .intro-scene.is-active .im-budget-fill { width: 68%; }
}
