/* ═══════════════════════════════════════════════════════════════════════
   Landing Page — Robot entrance → Typing → Redirect (ported from TSX)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Container ───────────────────────────────────────────────────────── */
.landing-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base, #0a0e17);
    color: var(--text-primary, #e0e0e0);
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.4s ease;
}
.landing-container.fade-out {
    opacity: 0;
}

/* ── Background layers ───────────────────────────────────────────────── */
.landing-gradient-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,212,170,0.06) 0%, transparent 60%),
                radial-gradient(ellipse 60% 40% at 80% 100%, rgba(124,77,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.landing-grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
    pointer-events: none;
}

/* ── Corner decorations ──────────────────────────────────────────────── */
.landing-corner { position: absolute; opacity: 0.25; }
.landing-corner-tl { top: 2rem; left: 2rem; }
.landing-corner-br { bottom: 2rem; right: 2rem; }

.corner-ring {
    border: 2px solid;
    border-radius: 50%;
}
.ring-cw {
    width: 64px; height: 64px;
    border-color: var(--accent-teal, #00d4aa);
    opacity: 0.3;
    animation: spinCW 20s linear infinite;
}
.ring-ccw {
    width: 48px; height: 48px;
    border-color: var(--accent-purple, #7c4dff);
    opacity: 0.3;
    animation: spinCCW 15s linear infinite;
}

@keyframes spinCW  { to { transform: rotate(360deg); } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }

/* ── Center wrapper ──────────────────────────────────────────────────── */
.landing-center {
    position: relative;
    z-index: 10;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.landing-center.phase-exit {
    opacity: 0;
    transform: scale(0.8);
}

/* ── Hidden utility ──────────────────────────────────────────────────── */
.landing-container .hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   Phase 1 — Robot Entrance
   ═══════════════════════════════════════════════════════════════════════ */
.robot-wrapper {
    position: relative;
    display: inline-block;
    animation: robotEntrance 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes robotEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) perspective(600px) rotateY(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) perspective(600px) rotateY(0deg);
    }
}

.robot-icon {
    font-size: 8rem;
    color: var(--accent-teal, #00d4aa);
    filter: drop-shadow(0 0 30px rgba(0,212,170,0.4));
    animation: robotBob 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes robotBob {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25%      { transform: scale(1.08) rotate(4deg); }
    75%      { transform: scale(1.08) rotate(-4deg); }
}

/* Glow ring behind robot */
.robot-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,170,0.2) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

/* ── Floating orbiters ───────────────────────────────────────────────── */
.orbiter {
    position: absolute;
    font-size: 1.4rem;
    z-index: 3;
}
.orbiter-zap {
    top: -12px;
    right: -16px;
    color: #f59e0b;
    animation: floatZap 4s ease-in-out infinite;
}
.orbiter-activity {
    bottom: -12px;
    left: -16px;
    color: #22c55e;
    animation: floatActivity 3s ease-in-out 0.5s infinite;
}

@keyframes floatZap {
    0%, 100% { transform: translate(0, -10px) rotate(0deg); }
    50%      { transform: translate(5px, 10px) rotate(180deg); }
}
@keyframes floatActivity {
    0%, 100% { transform: translate(0, 10px) rotate(360deg); }
    50%      { transform: translate(-5px, -10px) rotate(180deg); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Phase 2 — Typing
   ═══════════════════════════════════════════════════════════════════════ */
.landing-typing-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeSlideUp 0.5s ease forwards;
}

@keyframes fadeSlideUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.robot-icon-sm {
    font-size: 3.5rem;
    color: var(--accent-teal, #00d4aa);
    animation: shrinkIn 0.5s ease forwards;
}

@keyframes shrinkIn {
    0%   { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

.typing-text {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary, #e0e0e0);
    min-height: 1.2em;
    letter-spacing: -0.02em;
}

/* Blinking cursor */
.cursor {
    color: var(--accent-teal, #00d4aa);
    font-weight: 400;
    margin-left: 2px;
    animation: blink 0.8s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Phase 3 — Complete (subtitle + dots)
   ═══════════════════════════════════════════════════════════════════════ */
.typing-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary, #94a3b8);
    margin-top: -0.5rem;
    animation: fadeSlideUp 0.5s ease forwards;
}

.progress-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    animation: fadeSlideUp 0.5s ease 0.3s both;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-teal, #00d4aa);
    animation: dotPulse 1.5s ease-in-out infinite;
}
.dot-0 { animation-delay: 0s; }
.dot-1 { animation-delay: 0.2s; }
.dot-2 { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 100% { transform: scale(1);   opacity: 0.4; }
    50%      { transform: scale(1.3); opacity: 1; }
}

/* ── Skip button ─────────────────────────────────────────────────────── */
.landing-skip {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 28px;
    border: 1px solid var(--border-default, #2d3548);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.25s ease;
    z-index: 20;
    backdrop-filter: blur(4px);
}
.landing-skip:hover {
    border-color: var(--accent-teal, #00d4aa);
    color: var(--accent-teal, #00d4aa);
    background: rgba(0,212,170,0.06);
    box-shadow: 0 0 20px rgba(0,212,170,0.1);
}
.landing-skip i {
    margin-left: 6px;
    font-size: 0.8rem;
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .robot-icon { font-size: 5rem; }
    .robot-icon-sm { font-size: 2.5rem; }
    .typing-text { font-size: 1.6rem; }
    .typing-subtitle { font-size: 0.95rem; }
    .landing-corner { display: none; }
    .landing-skip { bottom: 1.5rem; padding: 8px 22px; }
}
