/* Scroll Showcase Container */
.scroll-showcase {
    height: 480svh; /* Rigid scroll container */
    position: relative;
    background: transparent;
}
/* Native Sticky restored, tracking stable mobile viewports */
.showcase-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(168,85,247,0.12) 0%, var(--bg-primary) 70%);
}

.showcase-composition {
    width: 1000px;
    height: 900px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -500px;
    margin-top: -450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Descriptive Text */
.showcase-text {
    text-align: center;
    transition: transform 0.6s ease, opacity 0.5s ease;
    z-index: 20;
}
.showcase-text h2 {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.showcase-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Virtual Keyboard Element */
.virtual-keyboard {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 16px;
    z-index: 10;
    transition: opacity 0.5s ease, transform 0.6s ease;
}
.v-key {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 24px 32px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.1);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.v-key.key-space { width: 300px; }
.v-key.pressed {
    transform: translateY(4px) scale(0.96);
    box-shadow: 0 2px 10px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    background: #1a1a1a;
    border-color: rgba(168,85,247,0.5);
    color: rgba(168,85,247,1);
}

/* Container for the morphing app */
.mock-container {
    perspective: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 15;
}

/* The Morphing App Base */
.mock-app {
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 40px 100px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
    overflow: hidden;
    position: relative;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
                border-radius 0.7s ease, 
                opacity 0.6s ease,
                box-shadow 0.7s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    
    transform: translateY(calc( (var(--scroll-p, 0) - 0.5) * -80px ));
}

/* State 0: Hidden before keyboard press */
.mock-app.state-0 {
    opacity: 0;
    width: 680px;
    height: 72px;
    border-radius: 36px;
    transform: scale(0.95) translateY(20px);
}
/* State 1: Collapsed Pill (Option + Space) */
.mock-app.state-1 {
    opacity: 1;
    width: 680px;
    height: 72px;
    border-radius: 36px;
    transform: scale(1) translateY(0);
}
/* State 2: Expanded Widget (Reasoning + Text) */
.mock-app.state-2 {
    opacity: 1;
    width: 680px;
    height: 390px;
    border-radius: 20px;
}
/* State 3: Full App (Idle State) */
.mock-app.state-3, .mock-app.state-4 {
    opacity: 1;
    width: 900px;
    height: 720px;
    border-radius: 12px;
    flex-direction: row;
    box-shadow: 0 60px 140px rgba(168,85,247,0.15), 0 20px 40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* --- State 2 Widget Content --- */
.widget-content {
    display: none;
    flex: 1;
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.widget-user-response {
    background: #0A84FF;
    padding: 10px 16px;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    font-size: 0.95rem;
    color: #fff;
    align-self: flex-end;
    box-shadow: 0 4px 15px rgba(10,132,255,0.25);
    margin-bottom: 4px;
}
.mock-app.state-2 .widget-content {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.6s ease forwards 0.3s;
}
.widget-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
}
.widget-action {
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.widget-header-btns {
    display: flex;
    gap: 12px;
}
.w-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.reasoning-box {
    background: rgba(168,85,247,0.05);
    border: 1px solid rgba(168,85,247,0.15);
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-purple-light);
    font-size: 0.9rem;
    font-weight: 500;
}
.widget-text {
    font-size: 1.1rem;
    color: #fff;
    margin-top: 4px;
}
.widget-footer {
    display: flex;
    gap: 12px;
    margin-top: auto;
}
.widget-play-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* SVG Utilities */
.svg-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.svg-icon.fill {
    fill: currentColor;
    stroke: none;
}
.svg-icon.sm { width: 16px; height: 16px; }

/* --- Full App Components --- */
.mock-sidebar {
    width: 260px;
    background: rgba(15, 15, 20, 0.7);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.mock-app.state-3 .mock-sidebar, .mock-app.state-4 .mock-sidebar {
    opacity: 1;
}
.mock-app:not(.state-3):not(.state-4) .mock-sidebar {
    width: 0;
    border-right: none;
}

.mock-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.mock-header {
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    opacity: 0;
    transition: opacity 0.5s ease;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mock-header-actions {
    position: absolute;
    right: 16px;
    display: flex;
    gap: 12px;
}
.mock-app.state-3 .mock-header, .mock-app.state-4 .mock-header {
    opacity: 1;
}
.mock-app:not(.state-3):not(.state-4) .mock-header {
    display: none;
}

/* Chat Scroll Area */
.mock-chat-scroll {
    flex: 1;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.mock-app.state-3 .mock-chat-scroll,
.mock-app.state-4 .mock-chat-scroll {
    opacity: 1;
}
.mock-app:not(.state-3):not(.state-4) .mock-chat-scroll {
    display: none;
}

/* Hide chat messages in State 3 while keeping greeting visible */
.mock-app.state-3 .chat-msg {
    opacity: 0 !important;
    pointer-events: none;
    transform: translateY(40px) !important;
    transition: all 0.4s ease;
}
.mock-app.state-4 .chat-msg {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input Bar (Shared) */
.mock-input-bar {
    height: 72px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.5s ease;
}
.mock-app.state-3 .mock-input-bar, .mock-app.state-4 .mock-input-bar {
    margin: 16px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.4);
    height: 64px;
}

/* Input Bar Elements */
.bar-left, .bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bar-left { padding-left: 8px; }
.bar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.bar-btn:hover { background: rgba(255,255,255,0.1); }
.bar-btn.pressed { background: #007AFF; color: #fff; }
.bar-btn.pressed .svg-icon { stroke: #fff; fill: #fff; }
.bar-btn.send { background: rgba(255,255,255,0.2); color: #fff; }
.bar-btn.blue { color: #3b82f6; }

.bar-center {
    flex: 1;
    padding: 0 16px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}
.bar-placeholder { color: var(--text-muted); }
.bar-text { color: #fff; font-weight: 500; }
.cursor {
    color: #3b82f6;
    animation: blink 1s step-end infinite;
    font-weight: 300;
    margin-left: 2px;
}

/* Sidebar structure */
.sidebar-header { padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.fs-dots { display: flex; gap: 8px; }
.sidebar-actions { display: flex; gap: 12px; }
.sidebar-actions .action-icon { color: var(--text-secondary); }

.fs-search { margin: 0 16px 16px; padding: 6px 12px; background: rgba(255,255,255,0.06); border-radius: 8px; font-size: 0.85rem; color: #888; border: 1px solid rgba(255,255,255,0.05); }
.fs-item { padding: 12px 16px; font-size: 0.85rem; color: #a0a0b0; cursor: pointer; }
.fs-item.active { background: #0A84FF; color: #fff; border-radius: 8px; margin: 0 8px; padding: 12px 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.fs-time { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.7); margin-top: 4px; }
.fs-bottom { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }

/* App Chat content */
.chat-greeting {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 20px 0 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.greeting-icon {
    width: 64px !important;
    height: 64px !important;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(168,85,247,0.3);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* State 3 overrides */
.mock-app.state-3 .chat-greeting {
    transform: translateY(14vh) scale(1.1);
    margin-bottom: 0px;
}
.mock-app.state-3 .chat-greeting .greeting-icon {
    width: 180px !important;
    height: 180px !important;
    border-radius: 40px;
    filter: drop-shadow(0 0 60px rgba(192, 132, 252, 0.4));
    box-shadow: none;
}
.mock-app.state-3 .chat-greeting span {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* State 4 base (for text) */
.mock-app.state-4 .chat-greeting span {
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.chat-msg { max-width: 85%; line-height: 1.5; font-size: 0.95rem; }
.user-msg { align-self: flex-end; background: #007AFF; padding: 12px 16px; border-radius: 18px; border-bottom-right-radius: 4px; color: #fff; box-shadow: 0 4px 15px rgba(0,122,255,0.25); }
.bot-msg { align-self: flex-start; color: var(--text-primary); width: 100%; }

.bot-anim-step {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease-out;
}
.bot-anim-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.thinking-block { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 12px 16px; border-radius: 8px; font-size: 0.85rem; color: var(--accent-purple-light); margin-bottom: 2px; display: flex; align-items: center; gap: 8px;}
.thinking-block.blue { color: #3b82f6; }
.thinking-block .mock-check, .reasoning-box .mock-check { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; background: #10b981; display: none; align-items: center; justify-content: center; }
.thinking-block.done .mock-check, .reasoning-box.done .mock-check { display: flex !important; }

.mock-spinner {
    margin-left: auto;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: mockSpin 1s linear infinite;
    display: none;
}
.thinking-block.blue .mock-spinner { border-top-color: #3b82f6; }
@keyframes mockSpin { to { transform: rotate(360deg); } }
.thinking-block.loading .mock-spinner, .reasoning-box.loading .mock-spinner { display: block; }
.thinking-block.loading .mock-check, .reasoning-box.loading .mock-check { display: none !important; }

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #000;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(255,255,255,0.15);
    transition: all 0.2s ease;
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(255,255,255,0.3);
    background: #f8f8f8;
}

/* Animated Waitlist Pill */
.waitlist-wrapper {
    position: relative;
    display: inline-flex;
    border-radius: 99px;
    padding: 1.5px;
    overflow: hidden;
    margin-top: 16px;
    background: rgba(255,255,255,0.08);
}

.waitlist-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: conic-gradient(from 0deg, transparent 0%, transparent 75%, rgba(168, 85, 247, 0.8) 85%, #fff 95%, transparent 100%);
    z-index: 0;
    transform: translate(-50%, -50%);
    animation: rotateShine 4s linear infinite;
    filter: blur(10px);
}

@keyframes rotateShine {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.waitlist-pill {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    background: #020202; /* Pure pitch black to blend in perfectly */
    border-radius: 99px;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: background 0.2s ease;
}

.waitlist-pill:hover {
    background: #0a0a0a;
}

.waitlist-text-main { color: #fff; }
.waitlist-divider { color: rgba(255,255,255,0.15); margin: 0 12px; }
.waitlist-text-action { color: rgba(255,255,255,0.5); transition: color 0.2s ease; }
.waitlist-pill:hover .waitlist-text-action { color: #fff; }

.mock-table { width: 100%; border-collapse: collapse; margin-top: 16px; margin-bottom: 16px; font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; overflow: hidden; background: transparent; }
.mock-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); color: #ccc;}
.mock-table tr:first-child td { font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mock-table tr:last-child td { border-bottom: none; }

.click-cursor {
    position: absolute;
    top: 50%;
    right: 50px;
    width: 24px;
    height: 24px;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
}
.mock-app.state-2 .click-cursor.visible {
    opacity: 1;
    transform: translate(-10px, -200px); /* simulate moving to the expand button */
}

@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
