/* ==========================================
   CARAVEL LANDING PAGE STYLES
   ========================================== */

/* CSS Variables */
:root {
    --caravel-bg: #050505;
    --caravel-panel: #0f1012;
    --caravel-accent: #00f0ff;
    --caravel-text: #e0e0e0;
    --caravel-muted: #6b7280;
}

/* Base Styles */
body {
    background-color: var(--caravel-bg);
    color: var(--caravel-text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Space Grotesk', sans-serif;
}

/* Cinematic Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 50;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--caravel-accent);
}

/* Cursor blinking for terminal */
.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* The Director's Viewport Scene Styles */
.viewport-scene {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure subtitle is on top */
#subtitle-layer {
    z-index: 50;
}

/* Updated Rain Animation - Drops further down */
.rain-drop {
    animation: rainFall 0.8s linear infinite;
}

@keyframes rainFall {
    0% { transform: translateY(-10px); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(450px); opacity: 0; }
}

/* Interactive node background */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.4;
}

/* Utilities for GSAP toggling */
.gsap-hidden {
    opacity: 0;
    visibility: hidden;
    display: none;
}

/* Navigation Styles */
.nav-container {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-svg-container {
    width: 2.5rem;
    height: 2.5rem;
    position: relative;
}

.logo-raven {
    width: 100%;
    height: 100%;
    fill: white;
    transition: fill 0.3s;
}

.logo-raven:hover {
    fill: var(--caravel-accent);
}

.logo-text {
    height: 1.25rem;
    width: auto;
    fill: white;
}

.login-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: white;
    width: 7rem;
    transition: border-color 0.3s;
}

.login-input:focus {
    outline: none;
    border-color: var(--caravel-accent);
}

.login-input::placeholder {
    color: #4b5563;
}

.login-button {
    background-color: white;
    color: black;
    padding: 0.375rem 1rem;
    border-radius: 0.25rem;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.login-button:hover {
    background-color: var(--caravel-accent);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 400vh;
}

.hero-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 6rem;
    padding-bottom: 2.5rem;
    overflow: hidden;
}

.hero-headline {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
    z-index: 10;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.025em;
    color: white;
    margin-bottom: 0.5rem;
}

.hero-title-accent {
    color: var(--caravel-accent);
}

.hero-subtitle {
    color: #9ca3af;
    font-size: 1.125rem;
    max-width: 42rem;
    margin: 0 auto;
}

.hero-scroll-indicator {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Terminal Styles */
.terminal-container {
    background-color: var(--caravel-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
}

.terminal-dot-red {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(239, 68, 68, 0.5);
}

.terminal-dot-yellow {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(234, 179, 8, 0.5);
}

.terminal-dot-green {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(34, 197, 94, 0.5);
}

.terminal-status {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
}

.terminal-reset-btn {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--caravel-accent);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
}

.terminal-reset-btn:hover {
    color: white;
}

.terminal-content {
    flex: 1;
    font-family: monospace;
    font-size: 0.875rem;
    overflow-y: auto;
}

.terminal-initial {
    color: #6b7280;
    opacity: 0.5;
}

.terminal-prompt {
    color: var(--caravel-accent);
}

.terminal-text {
    color: white;
}

.terminal-response {
    padding-left: 1rem;
    border-left: 2px solid rgba(0, 240, 255, 0.3);
    color: #d1d5db;
    font-size: 0.75rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.terminal-success {
    color: #4ade80;
}

.terminal-input-bar {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-plus {
    color: var(--caravel-accent);
    font-weight: bold;
}

.progress-bar-container {
    height: 0.25rem;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--caravel-accent);
    width: 0;
    transition: all 0.3s;
}

/* Viewport/Scene Styles */
.viewport-container {
    position: relative;
    height: 400px;
    background-color: black;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.viewport-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    display: flex;
    gap: 0.5rem;
}

.viewport-rec-badge {
    background-color: rgba(220, 38, 38, 0.8);
    color: white;
    font-size: 0.625rem;
    font-weight: bold;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.viewport-timecode {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 0.625rem;
    font-family: monospace;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.scene-background {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1f2937;
    transition: background-color 1s;
    overflow: hidden;
}

.scene-sun {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    width: 4rem;
    height: 4rem;
    background-color: #fef3c7;
    border-radius: 9999px;
    filter: blur(40px);
    opacity: 0.8;
}

.scene-rain-container {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.scene-city-layer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 0;
    opacity: 0;
    transform: translateY(3rem);
    gap: 0.25rem;
    padding: 0 1rem;
}

.scene-floor {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 25%;
    background-color: #1a1a1a;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10;
}

.scene-floor-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, black, transparent);
    opacity: 0.8;
}

.scene-actor {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5rem;
}

.scene-actor-head {
    width: 5rem;
    height: 6rem;
    background-color: #d1d5db;
    border-radius: 1rem;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.scene-actor-eye-left {
    position: absolute;
    top: 2rem;
    left: 1rem;
    width: 0.75rem;
    height: 0.25rem;
    background-color: #4b5563;
}

.scene-actor-eye-right {
    position: absolute;
    top: 2rem;
    right: 1rem;
    width: 0.75rem;
    height: 0.25rem;
    background-color: #4b5563;
}

.scene-actor-body {
    position: relative;
    margin-top: -0.625rem;
}

.scene-subtitle-layer {
    position: absolute;
    bottom: 5rem;
    text-align: center;
    width: 100%;
    padding: 0 1rem;
    z-index: 50;
}

.scene-subtitle {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.8);
    color: #facc15;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    border-radius: 0.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(1rem);
}

.processing-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.processing-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.processing-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid var(--caravel-accent);
    border-top-color: transparent;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-text {
    color: var(--caravel-accent);
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.raven-watermark {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    z-index: 40;
    opacity: 0;
    transition: all 0.5s;
    transform: scale(0.5);
}

.raven-watermark-svg {
    fill: var(--caravel-accent);
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.8));
    width: 100%;
    height: 100%;
}

/* Value Prop Section */
.value-prop-section {
    padding: 6rem 0;
    background-color: var(--caravel-bg);
    position: relative;
    z-index: 20;
}

.value-prop-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.value-prop-header {
    margin-bottom: 4rem;
    border-left: 1px solid var(--caravel-accent);
    padding-left: 1.5rem;
}

.value-prop-title {
    font-size: 2.25rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    margin-bottom: 1rem;
}

.value-prop-description {
    font-size: 1.25rem;
    color: #9ca3af;
    max-width: 42rem;
}

.value-prop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.value-prop-card {
    transition: all 0.3s;
}

.value-prop-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s;
}

.value-prop-card:hover .value-prop-icon {
    background-color: rgba(0, 240, 255, 0.1);
}

.value-prop-icon-svg {
    color: white;
    transition: color 0.3s;
}

.value-prop-card:hover .value-prop-icon-svg {
    color: var(--caravel-accent);
}

.value-prop-card-title {
    font-size: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.value-prop-card-text {
    color: #9ca3af;
    line-height: 1.75;
}

/* Technical Section */
.technical-section {
    padding: 6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #0a0a0a;
}

.technical-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

.technical-graphic {
    position: relative;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    background-color: var(--caravel-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.technical-graphic-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: radial-gradient(circle at 50% 50%, #2a2a2a 1px, transparent 1px);
    background-size: 20px 20px;
}

.technical-flow-container {
    position: relative;
    z-index: 10;
}

.technical-flow-item {
    background-color: #1a1a1a;
    padding: 1rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.technical-flow-item-border-blue {
    border-left: 2px solid #3b82f6;
}

.technical-flow-item-border-purple {
    border-left: 2px solid #a855f7;
}

.technical-flow-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.technical-flow-icon-blue {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.technical-flow-icon-purple {
    background-color: rgba(168, 85, 245, 0.2);
    color: #c084fc;
}

.technical-flow-icon-green {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.technical-flow-title {
    color: #d1d5db;
    font-weight: 500;
    font-size: 0.875rem;
}

.technical-flow-subtitle {
    color: #4b5563;
    font-size: 0.75rem;
}

.technical-flow-connector {
    display: flex;
    justify-content: center;
    height: 2rem;
}

.technical-flow-line {
    width: 0.125rem;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.5), rgba(168, 85, 245, 0.5));
}

.technical-flow-line-purple-green {
    background: linear-gradient(to bottom, rgba(168, 85, 245, 0.5), rgba(34, 197, 94, 0.5));
}

.technical-content-title {
    font-size: 1.875rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.technical-content-title-muted {
    color: #6b7280;
}

.technical-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.technical-step {
    display: flex;
    gap: 1rem;
}

.technical-step-number {
    margin-top: 0.25rem;
    color: var(--caravel-accent);
    font-family: monospace;
}

.technical-step-title {
    font-weight: bold;
    color: white;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.technical-step-text {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.75;
}

/* Footer */
.footer {
    background-color: black;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 5rem;
    padding-bottom: 2.5rem;
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-top {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 2rem;
    margin-bottom: 1rem;
    fill: white;
}

.footer-description {
    color: #6b7280;
    max-width: 28rem;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-email {
    font-size: 1.25rem;
    font-weight: bold;
    transition: color 0.3s;
    color: white;
    text-decoration: none;
}

.footer-email:hover {
    color: var(--caravel-accent);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #4b5563;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copyright {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    transition: color 0.3s;
    color: #4b5563;
    text-decoration: none;
}

.footer-link:hover {
    color: white;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .logo-text {
        display: block;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .value-prop-title {
        font-size: 3rem;
    }

    .value-prop-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .technical-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .technical-content-title {
        font-size: 2.25rem;
    }

    .footer-top {
        flex-direction: row;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: row;
    }

    .footer-copyright {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .logo-text {
        display: none;
    }

    /* NEW: Mobile hero section modifications */

    /* Reduce hero section height - no scroll animation needed */
    .hero-section {
        height: auto !important;
        min-height: auto !important;
    }

    /* Remove sticky positioning */
    .hero-sticky-container {
        position: static !important;
        height: auto !important;
        padding: 6rem 0 2rem 0; /* Top padding for nav, reduced bottom */
    }

    /* Keep headline visible, adjust sizing */
    .hero-headline {
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 2.5rem; /* Smaller on mobile */
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1rem; /* Slightly smaller */
    }

    /* Hide scroll indicator on mobile */
    .hero-scroll-indicator {
        display: none !important;
    }

    /* Hide the entire interface container (terminal + viewport) */
    .hero-animation-container {
        display: none !important;
    }

    /* Ensure background canvas doesn't cause issues */
    #canvas-bg {
        opacity: 0.2; /* Reduce opacity on mobile */
    }
}
