/* Futuristic / Cyberpunk Theme */

/* ===== RESET & BASE ===== */
:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-color: #00ff88;
    --window-bg: rgba(28, 28, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

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

html {
    font-size: 16px;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Ensure consistent scaling on all viewports */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
}

@media (max-width: 1366px) {
    html {
        font-size: 14px;
    }
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.3;
    /* Subtler background */
}

/* ===== AI OS DESKTOP ===== */
.os-desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    /* Ensure it's on top of everything */
    pointer-events: none;
    /* Let clicks pass through */
    width: 100%;
}

.hero {
    position: relative;
    z-index: 2;
    margin-bottom: 60px;
    pointer-events: none;
    /* Let clicks pass through to windows if they overlap */
}

.beta-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 10, 10, 0.8);
    font-family: 'JetBrains Mono', monospace;
    /* Monospace font */
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.beta-pill .dot {
    width: 8px;
    height: 8px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.beta-pill:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 20, 0.9);
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.accent-dot {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-secondary);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    right: 0;
    padding: 24px 40px;
    z-index: 100;
    display: flex;
    gap: 32px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

/* Top Nav Link (Legacy - can be removed if unused, but keeping for safety) */
/* App Windows */
.app-window {
    position: absolute;
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(30px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

/* Pop-in Animation Class */
.app-window.pop-in {
    opacity: 0.8;
    transform: scale(1) translateY(0);
}

/* Active Window - AI Control Indicator */
.app-window.active {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.app-window.active .window-header::after {
    content: 'AI';
    position: absolute;
    top: 6px;
    right: 12px;
    background: var(--accent-color);
    color: #000;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 1000;
}

.window-header {
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
    justify-content: center;
    position: relative;
}

.window-controls {
    position: absolute;
    left: 12px;
    display: flex;
    gap: 8px;
}

.control {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.control.red {
    background: #ff5f57;
}

.control.yellow {
    background: #febc2e;
}

.control.green {
    background: #28c840;
}

.window-title {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.window-content {
    flex: 1;
    padding: 16px;
    overflow: hidden;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 13px;
    color: var(--text-primary);
}

/* Data Grid (Spreadsheet) */
.data-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 8px;
    border-radius: 6px;
    opacity: 0;
    /* Hidden initially for generation effect */
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.grid-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-row.visible {
    opacity: 1;
    transform: translateX(0);
}

.grid-row.header {
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    /* Header always visible */
    transform: none;
}

.grid-row.highlight-target {
    transition: background 0.3s ease;
}

.grid-row.highlight-target.active {
    background: rgba(41, 151, 255, 0.2);
    border: 1px solid rgba(41, 151, 255, 0.4);
}

.positive {
    color: #28c840;
}

.negative {
    color: #ff5f57;
}

/* Terminal */
.terminal-content {
    background: rgba(0, 0, 0, 0.3);
}

.code-line {
    margin-bottom: 6px;
    opacity: 0.7;
}

.keyword {
    color: #ff79c6;
}

.string {
    color: #f1fa8c;
}

.processing-line {
    color: var(--accent-color);
    margin-top: 12px;
    display: none;
    /* Hidden initially */
}

.processing-line.active {
    display: block;
}

/* Email */
.email-header {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.label {
    color: var(--text-secondary);
}

.email-body {
    margin-top: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
}

/* Calendar Styles */
.calendar-content {
    padding: 12px;
    height: calc(100% - 32px);
    /* Subtract header height */
    overflow-y: auto;
    /* Scroll only the content */
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Calendar */
.calendar-content::-webkit-scrollbar {
    width: 4px;
}

.calendar-content::-webkit-scrollbar-track {
    background: transparent;
}

.calendar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.calendar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    position: relative;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.month-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-top: 4px;
    padding: 4px;
    display: none;
    flex-direction: column;
    z-index: 20;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dropdown-menu.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.month-option {
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.month-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.month-option.selected {
    background: var(--accent-color);
    color: white;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 4px;
    color: var(--text-primary);
    position: relative;
}

.day.dimmed {
    color: rgba(255, 255, 255, 0.2);
}

.day.target-day {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.day.booked {
    background: var(--accent-color);
    color: #000;
    border: 1px solid var(--accent-color);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Prompt Bar */
.prompt-container {
    position: fixed;
    bottom: 30px;
    /* Moved to bottom */
    z-index: 100;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.prompt-bar {
    width: 600px;
    /* Reduced from 800px */
    height: 64px;
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

/* Active state - keyboard control indicator */
.prompt-bar.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.prompt-bar.day.booked {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.prompt-bar.active::before {
    content: 'AI';
    position: absolute;
    top: -16px;
    left: 20px;
    background: var(--accent-color);
    color: #000;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
}

.ai-icon {
    color: var(--accent-color);
    margin-right: 16px;
    display: flex;
    align-items: center;
}

.prompt-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.prompt-actions {
    display: flex;
    gap: 4px;
}

.kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: system-ui;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    /* Modern tight tracking */
    color: var(--text-primary);
}

.chapter-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 12px;
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    /* Smooth ease-out */
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chapter-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.05;
    margin-bottom: 24px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
    position: relative;
    background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Removed Glitch Effect */

.chapter-text {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

/* ===== SCROLL LAYOUT ===== */
.scrolly-container {
    width: 100%;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chapter {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    /* Removed border-bottom for cleaner look */
}

/* Active State for Scroll Reveal */
.chapter.active .chapter-label,
.chapter.active .chapter-title,
.chapter.active .chapter-text {
    opacity: 1;
    transform: translateY(0);
}

/* ===== VISUAL METAPHORS ===== */
.visual-metaphor {
    margin-top: 60px;
    height: 300px;
    width: 100%;
    max-width: 500px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.95);
    transition: all 1s ease 0.4s;
}

.chapter.active .visual-metaphor {
    opacity: 1;
    transform: scale(1);
}

/* 1968 Mouse Visual - Refined Wireframe */
.mouse-box {
    width: 120px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.mouse-cord {
    position: absolute;
    top: -50px;
    left: 50%;
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
}

/* Limit Visual - Glowing Cursors */
.cursor-swarm {
    position: relative;
    width: 200px;
    height: 200px;
}

.cursor {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid var(--text-primary);
    position: absolute;
    transform: rotate(-45deg);
    opacity: 0.8;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.c1 {
    top: 20%;
    left: 20%;
    animation: float 6s infinite ease-in-out;
}

.c2 {
    top: 60%;
    left: 70%;
    animation: float 7s infinite ease-in-out 1s;
}

.c3 {
    top: 40%;
    left: 50%;
    animation: float 5s infinite ease-in-out 0.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(-45deg);
    }

    50% {
        transform: translate(10px, -10px) rotate(-45deg);
    }
}

/* Future Prompt Visual - Clean Input */
.prompt-interface {
    margin-top: 60px;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
    backdrop-filter: blur(10px);
}

.chapter.active .prompt-interface {
    opacity: 1;
    transform: translateY(0);
}

.prompt-cursor {
    color: var(--accent-color);
    animation: blink 1.2s infinite;
    font-weight: 400;
}

.prompt-text {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* CTA Button - Modern Pill */
.cta-container {
    margin-top: 60px;
    opacity: 0;
    transition: opacity 1s ease 1s;
}

.chapter.active .cta-container {
    opacity: 1;
}

.primary-button {
    display: inline-block;
    padding: 16px 40px;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    background: rgba(0, 0, 0, 0.5);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-copyright {
    color: #666;
    font-size: 0.875rem;
    font-family: 'Rajdhani', sans-serif;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .chapter-title {
        font-size: 2.5rem;
    }

    .chapter {
        padding: 60px 20px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}