/* ============================================
   YZ Network Scroll-Animated Storytelling
   Base Styles and Animation Layer
   Requirements: 11.1, 11.4, 9.5, 15.1, 15.2
   ============================================ */

/* CSS Variables - Color Palette (Requirement 11.1: Consistent color palette) */
:root {
    /* Primary colors */
    --color-bg-dark: #050505;
    --color-bg-space: #0a0a1a;
    --color-bg-ground: #2a2a2a;
    
    /* Text colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.8);
    --color-text-muted: rgba(255, 255, 255, 0.6);
    
    /* Accent colors */
    --color-accent: rgba(255, 165, 0, 0.5);
    --color-accent-bright: rgba(255, 165, 0, 0.8);
    --color-success: rgba(0, 255, 100, 0.5);
    
    /* UI colors */
    --color-card-bg: rgba(255, 255, 255, 0.1);
    --color-card-border: rgba(255, 255, 255, 0.2);
    --color-building: #333;
    --color-building-light: #555;
    --color-corporate: #1a1a1a;
    
    /* Typography (Requirement 11.4: Consistent typography) */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-base: 1rem;
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.25rem;
    --font-size-small: 0.9rem;
    --line-height-base: 1.6;
    --line-height-heading: 1.3;
    
    /* Responsive scaling (Requirement 15.1, 15.2: Adapt element sizes) */
    --scale-factor: 1;
    --rocket-size: 180px;
    --astronaut-size: 60px;
    --building-scale: 1;
    --content-padding: 40px;
    --card-max-width: 450px;
    
    /* Animation timing */
    --transition-fast: 0.2s;
    --transition-medium: 0.4s;
    --transition-slow: 0.8s;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    overflow-x: hidden;
}

/* ============================================
   Animation Layer - Fixed Position (z-index: 99)
   Requirement 9.5: pointer-events pass-through
   ============================================ */

/* Fixed Brand Header with Logo */
#brand-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

/* Fixed Brand Title - Animated X → YZ → Wise → YZ.social */
#brand-title {
    font-family: var(--font-family-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 165, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0;
    pointer-events: none;
}

.brand-letter {
    display: inline-block;
}

#letter-x {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 8px;
}

#brand-arrow {
    color: var(--color-accent-bright);
    margin-right: 8px;
    font-size: 1.8rem;
}

.brand-yz {
    display: inline-flex;
    position: relative;
}

.letter-group {
    position: relative;
    display: inline-block;
}

/* Original Y and Z letters */
#letter-y, #letter-z {
    color: var(--color-accent-bright);
}

/* Split letters Wi and se - hidden by default */
#letter-wi, #letter-se {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent-bright);
    opacity: 0;
}

#brand-suffix {
    color: var(--color-text-secondary);
    font-size: 2rem;
    margin-left: 0;
    opacity: 0;
}

/* Wize state - Y transforms to W, Z moves to ize */
#brand-title.wize-state #letter-y::after {
    content: 'W';
}

#brand-title.wize-state #letter-z::after {
    content: 'ize';
}

#animation-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none; /* Requirement 9.5: Allow clicks to pass through to content */
    z-index: 10;
    overflow: hidden;
}

/* Background Container */
#background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-bg-space) 0%, #1a1a3a 50%, var(--color-bg-dark) 100%);
}

/* Stars overlay for space environment */
#space-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, white, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 370px 50px, white, transparent),
        radial-gradient(2px 2px at 450px 180px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 520px 90px, white, transparent),
        radial-gradient(2px 2px at 600px 200px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 680px 60px, white, transparent),
        radial-gradient(2px 2px at 750px 140px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 100px 200px, white, transparent),
        radial-gradient(2px 2px at 200px 300px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 350px 250px, white, transparent),
        radial-gradient(2px 2px at 500px 350px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 650px 280px, white, transparent),
        radial-gradient(2px 2px at 800px 320px, rgba(255,255,255,0.7), transparent);
    background-repeat: repeat;
    background-size: 800px 400px;
    opacity: 0.6;
}

#ground-background {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(to top, var(--color-bg-ground) 0%, transparent 100%);
}

/* ============================================
   Core Animated Elements
   ============================================ */

/* Rocket */
#rocket {
    position: absolute;
    bottom: 2%;
    left: 75%;
    transform: translateX(-50%) rotate(-45deg); /* Point straight up initially */
    font-size: var(--rocket-size);
    filter: drop-shadow(0 0 20px var(--color-accent));
    z-index: 10;
}

/* Astronaut */
#astronaut {
    position: absolute;
    bottom: 50vh;
    left: 50%;
    transform: translateX(-50%);
    width: var(--astronaut-size);
    height: calc(var(--astronaut-size) * 1.4);
    opacity: 0;
    z-index: 9;
}

.astronaut-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Astronaut limb animations for floating in space */
.astronaut-left-arm {
    transform-origin: 11px 55px;
    animation: floatLeftArm 3s ease-in-out infinite;
}

.astronaut-right-arm {
    transform-origin: 89px 55px;
    animation: floatRightArm 3s ease-in-out infinite;
}

.astronaut-left-leg {
    transform-origin: 37px 95px;
    animation: floatLeftLeg 4s ease-in-out infinite;
}

.astronaut-right-leg {
    transform-origin: 63px 95px;
    animation: floatRightLeg 4s ease-in-out infinite;
}

@keyframes floatLeftArm {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(25deg); }
}

@keyframes floatRightArm {
    0%, 100% { transform: rotate(15deg); }
    50% { transform: rotate(-25deg); }
}

@keyframes floatLeftLeg {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(15deg); }
}

@keyframes floatRightLeg {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(-15deg); }
}

/* Launch Pad */
#launch-pad {
    position: absolute;
    bottom: 0;
    left: 75%;
    transform: translateX(-50%);
    width: 150px;
    height: 20px;
    background: linear-gradient(to top, #444 0%, #666 100%);
    border-radius: 5px 5px 0 0;
    z-index: 5;
}

/* Landing surface visual feedback */
#launch-pad::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(100, 100, 100, 0.5) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Thrust Effect - Propulsion visual for liftoff */
#thrust-effect {
    position: fixed;
    width: 60px;
    height: 90px;
    background: radial-gradient(ellipse at top, 
        rgba(255, 200, 50, 0.9) 0%, 
        rgba(255, 100, 0, 0.7) 40%, 
        rgba(255, 50, 0, 0.4) 70%, 
        transparent 100%);
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    filter: blur(3px);
    z-index: 9;
    opacity: 0;
    animation: thrustFlicker 0.1s infinite alternate;
    pointer-events: none;
}

@keyframes thrustFlicker {
    0% {
        transform: translateX(-50%) scaleY(1) scaleX(1);
        opacity: 0.8;
    }
    100% {
        transform: translateX(-50%) scaleY(1.1) scaleX(0.9);
        opacity: 1;
    }
}

/* Thrust Particles Container */
#thrust-particles {
    position: fixed;
    width: 60px;
    height: 100px;
    pointer-events: none;
    z-index: 8;
    transform: translateX(-50%);
}

/* Break Particles Container */
#break-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

/* Tether SVG */
#tether-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    opacity: 0;
}

#tether-line {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 8 4;
    fill: none;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

/* Buildings Container */
#buildings-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    opacity: 0;
    z-index: 6;
    transform-origin: center bottom;
}

.building {
    position: absolute;
    bottom: 0;
    background: linear-gradient(to top, var(--color-building) 0%, var(--color-building-light) 100%);
    border: 1px solid #666;
}

.building-1 {
    left: 20%;
    width: 80px;
    height: 200px;
}

.building-2 {
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 280px;
}

.building-3 {
    right: 20%;
    width: 90px;
    height: 220px;
}

/* Building windows */
.building-window {
    transition: background 0.3s ease, opacity 0.3s ease;
}

#focus-window {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* Scientist Scene */
#scientist-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 7;
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
}

/* Interior room effect */
#scientist-scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0,0,0,0.3) 0%, transparent 10%, transparent 90%, rgba(0,0,0,0.3) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/* Floor effect */
#scientist-scene::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to top, #2a2a3a 0%, transparent 100%);
    pointer-events: none;
}

#mainframe {
    position: absolute;
    bottom: 15%;
    right: 25%;
    width: 180px;
    height: 280px;
    background: linear-gradient(to bottom, #4a4a5a 0%, #3a3a4a 50%, #2a2a3a 100%);
    border: 4px solid #666;
    border-radius: 5px;
    box-shadow: 
        0 0 30px rgba(100, 150, 255, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
}

/* Mainframe glow effect */
#mainframe::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(ellipse at center, rgba(100, 150, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Teletype console - period appropriate terminal */
#teletype-console {
    position: absolute;
    bottom: 18%;
    right: 45%;
    width: 120px;
    height: 100px;
    background: linear-gradient(to bottom, #5a5a4a 0%, #4a4a3a 100%);
    border: 3px solid #666;
    border-radius: 8px 8px 0 0;
    opacity: 0;
}

#teletype-console::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 3px;
}

/* Paper feed coming out of teletype */
.console-paper {
    position: absolute;
    top: -40px;
    left: 20%;
    width: 60%;
    height: 50px;
    background: linear-gradient(to bottom, 
        #f5f5e8 0%, 
        #f5f5e8 90%,
        transparent 100%);
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.console-paper::before {
    content: '>>>>>';
    position: absolute;
    top: 10px;
    left: 5px;
    font-family: monospace;
    font-size: 8px;
    color: #333;
    animation: typeText 1s steps(5) infinite;
}

@keyframes typeText {
    0%, 100% { content: '>>>>>'; }
    20% { content: '>>>>> RUN'; }
    40% { content: '>>>>> RUN PROG'; }
    60% { content: '>>>>> RUN PROGRAM'; }
    80% { content: '>>>>> OK'; }
}

/* Keyboard area on teletype */
#teletype-console::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 35px;
    background: linear-gradient(to bottom, #3a3a3a 0%, #2a2a2a 100%);
    border: 2px solid #444;
    border-radius: 3px;
    background-image: 
        repeating-linear-gradient(90deg, 
            #444 0px, #444 8px, 
            #333 8px, #333 10px);
}

/* Operator chair */
#operator-chair {
    position: absolute;
    bottom: 10%;
    right: 38%;
    width: 60px;
    height: 40px;
    background: linear-gradient(to top, #3a2a1a 0%, #5a4a3a 100%);
    border-radius: 5px 5px 0 0;
    opacity: 0;
}

#operator-chair::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 20px;
    background: #2a2a2a;
}

#operator-chair::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 8px;
    background: #2a2a2a;
    border-radius: 3px;
}

#scientist {
    position: absolute;
    bottom: 18%;
    right: 40%;
    width: 80px;
    height: 120px;
    opacity: 0;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
}

.scientist-svg {
    width: 100%;
    height: 100%;
}

/* Scientist arm animation - typing on teletype */
.scientist-left-arm {
    transform-origin: 20px 54px;
    animation: typeArm 0.5s ease-in-out infinite;
}

.scientist-right-arm {
    transform-origin: 60px 54px;
    animation: typeArmAlt 0.5s ease-in-out infinite 0.25s;
}

@keyframes typeArm {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes typeArmAlt {
    0%, 100% { transform: rotate(5deg); }
    50% { transform: rotate(-5deg); }
}

/* Laptop User Scene */
#laptop-user-scene {
    position: absolute;
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
    opacity: 0;
    z-index: 9;
}

#desk {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 60px;
    background: linear-gradient(to bottom, #5a4a3a 0%, #4a3a2a 50%, #3a2a1a 100%);
    border-radius: 5px 5px 0 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Desk surface highlight */
#desk::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(to bottom, #6a5a4a 0%, #5a4a3a 100%);
    border-radius: 5px 5px 0 0;
}

/* Desk legs */
#desk::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 15px;
    width: 15px;
    height: 40px;
    background: #3a2a1a;
    box-shadow: 135px 0 0 #3a2a1a;
}

#laptop-user {
    position: relative;
    font-size: 100px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    z-index: 2;
}

/* Person facing us with laptop - emoji style */
#laptop-user::before {
    content: '👩‍💻';
}

/* Peaceful background gradient for laptop scene */
#laptop-user-scene::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 50%, rgba(40, 60, 100, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Corporate Container */
#corporate-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 6;
    overflow: visible;
}

/* Corporate buildings - all clustered in top-right corner */
.corporate-building {
    position: absolute;
    background: linear-gradient(to top, #1a1a2a 0%, #2a2a3a 50%, #3a3a4a 100%);
    border: 1px solid #444;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

/* Windows grid on buildings */
.corporate-building::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 4px;
    right: 4px;
    bottom: 10px;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 10px,
            rgba(255, 200, 100, 0.3) 10px,
            rgba(255, 200, 100, 0.3) 14px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 8px,
            rgba(0, 0, 0, 0.4) 8px,
            rgba(0, 0, 0, 0.4) 10px
        );
}

/* All buildings in top-right corner cluster */
.corp-building-1 {
    top: 5%;
    right: 3%;
    width: 50px;
    height: 90px;
    transform: scale(0);
}

.corp-building-2 {
    top: 8%;
    right: 12%;
    width: 45px;
    height: 75px;
    transform: scale(0);
}

.corp-building-3 {
    top: 3%;
    right: 8%;
    width: 40px;
    height: 65px;
    transform: scale(0);
}

.corp-building-4 {
    top: 12%;
    right: 5%;
    width: 35px;
    height: 55px;
    transform: scale(0);
}

/* SVG container for wire tentacles */
#tentacle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
}

/* Thin wire tentacles - network cables */
.wire-path {
    fill: none;
    stroke: #cc6666;
    stroke-width: 1;
    stroke-linecap: round;
    opacity: 0.6;
    filter: drop-shadow(0 0 2px rgba(200, 80, 80, 0.3));
}

/* Wire glow effect - subtle */
.wire-glow {
    fill: none;
    stroke: rgba(200, 100, 100, 0.1);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Legacy elements - hidden */
.corp-left, .corp-right, .corp-top-left, .corp-top-right,
.corporate-pipe, .smoke-effect {
    display: none;
}

/* Peer Network - Globe with city lights */
#peer-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 6;
}

/* Globe container - centered behind the laptop user */
#globe-container {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
}

#globe-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(0, 255, 100, 0.2));
}

#globe-outline {
    filter: drop-shadow(0 0 10px rgba(0, 255, 100, 0.3));
}

/* City nodes glow */
.city-node {
    filter: drop-shadow(0 0 6px rgba(0, 255, 100, 0.8));
}

/* Network lines */
.network-line {
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(0, 255, 100, 0.6));
}

/* Hide peer laptops - not needed */
.peer-laptop {
    display: none;
}

.connection-lines {
    display: none;
}

/* ============================================
   Content Layer - Scrollable
   ============================================ */
#content-wrapper {
    position: relative;
    z-index: 50;
}

.scene-content {
    min-height: 100vh;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 50;
}

/* Alternate text position for visual variety */
.scene-content:nth-child(even) {
    justify-content: flex-end;
}

/* Position text cards to not overlap with center animations */
.scene-content[data-scene="launch-pad"],
.scene-content[data-scene="liftoff"],
.scene-content[data-scene="floating"],
.scene-content[data-scene="eva"],
.scene-content[data-scene="landing"] {
    justify-content: flex-start;
    padding-left: 5%;
}

.scene-content[data-scene="zoom-buildings"],
.scene-content[data-scene="scientist"] {
    justify-content: flex-start;
    padding-left: 5%;
    padding-right: 55%;
}

.scene-content[data-scene="laptop-user"],
.scene-content[data-scene="corporate-pipes"],
.scene-content[data-scene="breaking-free"] {
    justify-content: flex-start;
    padding-left: 5%;
    padding-right: 55%;
}

/* Text Card Styling (Requirement 11.4: Consistent typography) */
.text-card {
    max-width: var(--card-max-width);
    background: rgba(10, 10, 30, 0.85);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

/* Logo header in text card - scrolls with content */
.logo-header {
    text-align: center;
    margin-bottom: 20px;
}

.scrolling-logo {
    width: 280px;
    height: auto;
    object-fit: contain;
}

.text-card h2 {
    font-size: var(--font-size-h2);
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    line-height: var(--line-height-heading);
}

.text-card h3 {
    font-size: var(--font-size-h3);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
    line-height: var(--line-height-heading);
}

.text-card p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.text-card ul,
.text-card ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--color-text-secondary);
}

.text-card li {
    margin-bottom: 0.5rem;
}

.text-card strong {
    color: var(--color-text-primary);
}

.secondary-text {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-card-border);
}

/* Scene Images - Integrated into text cards */
.scene-image {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.scene-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 200px;
}

.scene-image.team-image img {
    max-height: 180px;
    object-position: center top;
}

/* App Showcase - Application logos with descriptions */
.app-showcase {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.app-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.app-info {
    flex: 1;
}

.app-info p {
    margin: 0;
    font-size: 0.9rem;
}

/* ============================================
   Responsive Breakpoints
   Requirements: 15.1, 15.2, 15.3
   Desktop >= 1024px, Tablet 768-1023px, Mobile < 768px
   ============================================ */

/* Desktop: >= 1024px (default styles above) */

/* Tablet: 768px - 1023px (Requirement 15.2: Scale proportionally) */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --scale-factor: 0.75;
        --rocket-size: 140px;
        --astronaut-size: 45px;
        --building-scale: 0.75;
        --content-padding: 30px;
        --card-max-width: 400px;
        --font-size-h2: 1.5rem;
        --font-size-h3: 1.15rem;
        --font-size-base: 0.95rem;
    }
    
    #brand-header {
        top: 15px;
        gap: 12px;
    }
    
    #brand-title {
        font-size: 2rem;
    }
    
    .scrolling-logo {
        width: 240px;
    }
    
    .scene-content {
        padding: 50px var(--content-padding);
    }
    
    .text-card {
        padding: 25px;
    }
    
    /* Buildings tablet */
    .building-1 { width: 60px; height: 150px; }
    .building-2 { width: 95px; height: 210px; }
    .building-3 { width: 70px; height: 165px; }
    
    .corporate-building {
        width: calc(120px * var(--building-scale));
        height: calc(300px * var(--building-scale));
    }
    
    .corp-building-1 { width: 40px; height: 75px; }
    .corp-building-2 { width: 35px; height: 60px; }
    .corp-building-3 { width: 32px; height: 52px; }
    .corp-building-4 { width: 28px; height: 45px; }
    
    .peer-laptop {
        font-size: 32px;
    }
    
    /* Globe container tablet */
    #globe-container {
        width: 340px;
        height: 340px;
        right: 12%;
    }
    
    /* Laptop user scene tablet */
    #laptop-user {
        font-size: 85px;
    }
    
    #desk {
        width: 155px;
        height: 52px;
    }
    
    /* Mainframe tablet */
    #mainframe {
        width: 155px;
        height: 240px;
    }
    
    #scientist {
        width: 70px;
        height: 105px;
    }
    
    #teletype-console {
        width: 105px;
        height: 85px;
    }
    
    /* Scene images tablet */
    .scene-image img {
        max-height: 175px;
    }
}

/* Mobile: < 768px (Requirement 15.2, 15.3: Scale and reflow for readability) */
@media (max-width: 767px) {
    :root {
        --scale-factor: 0.5;
        --rocket-size: 100px;
        --astronaut-size: 30px;
        --building-scale: 0.5;
        --content-padding: 16px;
        --card-max-width: 100%;
        --font-size-h2: 1.2rem;
        --font-size-h3: 1.05rem;
        --font-size-base: 0.875rem;
        --font-size-small: 0.8rem;
        --line-height-base: 1.5;
    }
    
    /* Prevent horizontal overflow (Requirement 15.3) */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    #brand-header {
        top: 10px;
        gap: 10px;
    }
    
    #brand-title {
        font-size: 1.4rem;
    }
    
    #brand-arrow {
        font-size: 1.1rem;
        margin-right: 4px;
    }
    
    #brand-suffix {
        font-size: 1.2rem;
    }
    
    #letter-x {
        margin-right: 4px;
    }
    
    /* Animation layer mobile adjustments */
    #animation-layer {
        max-width: 100vw;
        overflow: hidden;
    }
    
    /* Rocket scaled for mobile */
    #rocket {
        font-size: var(--rocket-size);
    }
    
    /* Astronaut scaled for mobile */
    #astronaut {
        width: var(--astronaut-size);
        height: calc(var(--astronaut-size) * 1.4);
    }
    
    /* Scene content mobile adjustments (Requirement 15.3: Reflow for readability) */
    .scene-content {
        padding: 50px var(--content-padding);
        padding-top: 65px; /* Make room for brand title */
        justify-content: center !important; /* Center content on mobile */
        min-height: 100vh;
        align-items: flex-start;
        padding-bottom: 30px;
    }
    
    /* Override specific scene positioning for mobile */
    .scene-content[data-scene="launch-pad"],
    .scene-content[data-scene="liftoff"],
    .scene-content[data-scene="floating"],
    .scene-content[data-scene="eva"],
    .scene-content[data-scene="landing"],
    .scene-content[data-scene="zoom-buildings"],
    .scene-content[data-scene="scientist"],
    .scene-content[data-scene="laptop-user"],
    .scene-content[data-scene="corporate-pipes"],
    .scene-content[data-scene="breaking-free"] {
        justify-content: center !important;
        padding-left: var(--content-padding);
        padding-right: var(--content-padding);
    }
    
    /* Logo header responsive */
    .logo-header {
        margin-bottom: 15px;
    }
    
    .scrolling-logo {
        width: 200px;
    }
    
    /* Text card mobile typography (Requirement 15.3: Readable without horizontal scrolling) */
    .text-card {
        padding: 16px;
        max-width: calc(100vw - 32px);
        margin: 0 auto;
        border-radius: 10px;
    }
    
    .text-card h2 {
        font-size: var(--font-size-h2);
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .text-card h3 {
        font-size: var(--font-size-h3);
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .text-card p {
        font-size: var(--font-size-base);
        margin-bottom: 0.6rem;
        line-height: var(--line-height-base);
    }
    
    .text-card ul,
    .text-card ol {
        margin: 0.75rem 0;
        padding-left: 1.25rem;
        font-size: var(--font-size-base);
    }
    
    .text-card li {
        margin-bottom: 0.4rem;
        line-height: var(--line-height-base);
    }
    
    .secondary-text {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    /* Launch pad scaled for mobile */
    #launch-pad {
        width: 80px;
        height: 15px;
    }
    
    /* Buildings scaled for mobile */
    .building-1 { width: 40px; height: 100px; }
    .building-2 { width: 65px; height: 150px; }
    .building-3 { width: 50px; height: 120px; }
    
    /* Corporate buildings mobile */
    .corporate-building {
        width: calc(100px * var(--building-scale));
        height: calc(250px * var(--building-scale));
    }
    
    .corp-building-1 { width: 35px; height: 65px; }
    .corp-building-2 { width: 30px; height: 55px; }
    .corp-building-3 { width: 28px; height: 48px; }
    .corp-building-4 { width: 25px; height: 40px; }
    
    .corporate-pipe {
        height: 15px;
    }
    
    .peer-laptop {
        font-size: 24px;
    }
    
    /* Globe container mobile */
    #globe-container {
        width: 280px;
        height: 280px;
        right: 5%;
    }
    
    /* Laptop user scene mobile */
    #laptop-user-scene {
        right: 10%;
    }
    
    #laptop-user {
        font-size: 70px;
    }
    
    #desk {
        width: 130px;
        height: 45px;
    }
    
    /* Mainframe and scientist mobile */
    #mainframe {
        width: 130px;
        height: 200px;
        right: 15%;
    }
    
    #scientist {
        width: 60px;
        height: 90px;
        right: 30%;
    }
    
    #teletype-console {
        width: 90px;
        height: 75px;
        right: 35%;
    }
    
    /* Scene images responsive */
    .scene-image img {
        max-height: 130px;
    }
    
    .scene-image.team-image img {
        max-height: 120px;
    }
    
    /* App showcase responsive */
    .app-showcase {
        gap: 0.75rem;
    }
    
    .app-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.6rem;
    }
    
    .app-logo {
        width: 45px;
        height: 45px;
    }
    
    .app-info p {
        font-size: var(--font-size-small);
    }
    
    /* Ensure no horizontal overflow (Requirement 15.3) */
    #animation-layer,
    #content-wrapper {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Thrust effect mobile */
    #thrust-effect {
        width: 40px;
        height: 60px;
    }
    
    /* Tether mobile */
    #tether-line {
        stroke-width: 1.5;
    }
}

/* Very small screens (< 320px) */
@media (max-width: 320px) {
    :root {
        --scale-factor: 0.35;
        --rocket-size: 70px;
        --astronaut-size: 22px;
        --font-size-h2: 1rem;
        --font-size-h3: 0.95rem;
        --font-size-base: 0.8rem;
        --font-size-small: 0.75rem;
        --content-padding: 12px;
    }
    
    #brand-title {
        font-size: 1.1rem;
        top: 8px;
    }
    
    .text-card {
        padding: 12px;
    }
    
    .text-card h2 {
        font-size: 1rem;
    }
    
    .peer-laptop {
        font-size: 20px;
    }
    
    #globe-container {
        width: 200px;
        height: 200px;
    }
    
    #laptop-user {
        font-size: 50px;
    }
    
    #desk {
        width: 100px;
        height: 35px;
    }
    
    .scene-image img {
        max-height: 100px;
    }
    
    .app-logo {
        width: 35px;
        height: 35px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .scene-content {
        min-height: 150vh; /* More scroll space in landscape */
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    .text-card {
        max-width: 55%;
    }
    
    #brand-header {
        top: 5px;
        gap: 8px;
    }
    
    #brand-title {
        font-size: 1.2rem;
    }
    
    .scrolling-logo {
        width: 180px;
    }
    
    /* Adjust animation elements for landscape */
    #rocket {
        font-size: 80px;
    }
    
    #globe-container {
        width: 220px;
        height: 220px;
    }
    
    #laptop-user {
        font-size: 60px;
    }
}

/* Touch scrolling optimization for mobile (Requirement 15.6) */
@media (max-width: 767px) {
    #content-wrapper {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Improve touch targets */
    .signup-form button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .more-info-link {
        padding: 10px;
        display: inline-block;
    }
}

/* ============================================
   Footer Styles
   ============================================ */
.site-footer {
    position: relative;
    z-index: 50;
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 10, 30, 0.95) 20%, rgba(5, 5, 20, 1) 100%);
    padding: 60px 40px 30px;
    margin-top: -50px;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-cta {
    margin-bottom: 30px;
}

.footer-cta h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.footer-cta p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.signup-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.signup-form input[type="email"] {
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    min-width: 250px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.signup-form input[type="email"]::placeholder {
    color: var(--color-text-muted);
}

.signup-form input[type="email"]:focus {
    border-color: var(--color-accent-bright);
    background: rgba(255, 255, 255, 0.15);
}

.signup-form button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background: var(--color-accent-bright);
    color: #000;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.signup-form button:hover {
    background: #ffb833;
    transform: translateY(-1px);
}

.signup-form button:active {
    transform: translateY(0);
}

.footer-links {
    margin-bottom: 25px;
}

.more-info-link {
    color: var(--color-accent-bright);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.more-info-link:hover {
    color: #ffb833;
    text-decoration: underline;
}

.footer-copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Footer responsive */
@media (max-width: 767px) {
    .site-footer {
        padding: 40px 20px 20px;
    }
    
    .signup-form input[type="email"] {
        min-width: 100%;
    }
    
    .signup-form button {
        width: 100%;
    }
}
