/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111318;
    --bg-accent: #2a2d34;
    --accent-primary: #0080ff;
    --accent-blue: #00a8ff;
    --accent-orange: #ff4500;
    --accent-cyan: #06b6d4;
    --accent-dark-blue: #003d7a;
    --accent-light-blue: #66ccff;
    --text-primary: #cdd6f4;
    --text-secondary: #89929b;
    --font-header: 'Orbitron', monospace;
    --font-body: 'Inter', sans-serif;
    --shadow-glow: 0 0 30px;
    --border-cyber: 2px solid transparent;
    /* Section vertical rhythm */
    --section-space-lg: clamp(4rem, 6vw, 6rem);
    --section-space-md: clamp(2rem, 4vw, 4rem);
    --section-space-sm: clamp(1rem, 3vw, 2rem);
    --contact-gap: clamp(2rem, 4vw, 3rem);
}

*::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, var(--accent-cyan), var(--accent-primary));
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    box-shadow: 0 0 20px var(--accent-cyan)40, 0 0 40px var(--accent-primary)20;
    transition: transform 0.08s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    transform: translate(-50%, -50%);
    left: 0; top: 0;
}

.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.6;
    transform: translate(-50%, -50%);
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image: 
        radial-gradient(circle, transparent 1px, var(--text-primary) 1px);
    background-size: 4px 4px;
    animation: noiseMove 0.2s linear infinite;
}

@keyframes noiseMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
    100% { transform: translate(-1px, -1px); }
}

/* Particle System */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
    opacity: 0;
}

.particle:nth-child(odd) {
    background: var(--accent-cyan);
    animation-duration: 20s;
}

.particle:nth-child(3n) {
    background: var(--accent-blue);
    animation-duration: 25s;
    width: 1px;
    height: 1px;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(200px) rotate(360deg);
        opacity: 0;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
}

/* Scroll down button */
.scroll-down {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.scroll-icon {
    width: 22px;
    height: 36px;
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 0 12px var(--accent-primary)40;
}

.scroll-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 4px;
    transform: translateX(-50%);
    animation: wheel 1.6s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent-cyan)60;
}

@keyframes wheel {
    0% { transform: translate(-50%, 0); opacity: 1; }
    70% { transform: translate(-50%, 12px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 0; }
}

.scroll-text {
    font-family: var(--font-header);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .scroll-down { bottom: 16px; }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-image: 
        radial-gradient(circle at 25% 25%, var(--accent-blue)20 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, var(--accent-primary)20 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, var(--accent-cyan)05 50%, transparent 51%);
    background-size: 100% 100%, 100% 100%, 20px 20px;
    animation: backgroundPulse 8s ease-in-out infinite, gridMove 20s linear infinite;
}

@keyframes backgroundPulse {
    0%, 100% { 
        opacity: 0.3;
        filter: hue-rotate(0deg);
    }
    50% { 
        opacity: 0.6;
        filter: hue-rotate(30deg);
    }
}

@keyframes gridMove {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 0 0, 0 0, 20px 20px; }
}

/* Hero Video Grid */
.hero-video-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    gap: 10px;
    padding: 10px;
    z-index: 1;
}

/* Desktop: 3x3 grid */
@media (min-width: 1025px) {
    .hero-video-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

/* Tablet: 2x2 grid with performance optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-video-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px; /* Уменьшенный gap для планшетов */
    }
    
    /* Tablet-specific video optimizations */
    .video-block {
        position: relative;
        overflow: hidden;
        border-radius: 6px; /* Slightly rounded corners for tablets */
    }
    
    .video-block video,
    .video-block canvas {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.45 !important; /* Optimized brightness for tablets */
        filter: contrast(1.05) brightness(0.9) saturate(1.1) !important; /* Balanced effects for performance */
        transition: opacity 0.3s ease;
    }
    
    /* Ensure video blocks don't overlap */
    .video-block:nth-child(1) { grid-column: 1; grid-row: 1; }
    .video-block:nth-child(2) { grid-column: 2; grid-row: 1; }
    .video-block:nth-child(3) { grid-column: 1; grid-row: 2; }
    .video-block:nth-child(4) { grid-column: 2; grid-row: 2; }
    
    /* Disable complex effects on tablets for better performance */
    .scan-lines,
    .wave-effect,
    .particles,
    .noise-overlay {
        display: none !important;
    }
    
    /* Simplify model card animations on tablets */
    .model-card:hover {
        transform: translateY(-2px) scale(1.01) !important; /* Reduced scale for performance */
        box-shadow: 
            0 12px 28px rgba(0, 128, 255, 0.15),
            0 0 20px rgba(6, 182, 212, 0.08) !important;
    }
    
    /* Reduce particle count on tablets */
    .particles .particle:nth-child(n+15) {
        display: none;
    }
    
    /* Optimize hero content for tablets */
    .hero-content {
        transform: none !important; /* Disable 3D effects */
    }
    
    /* Tablet-specific font sizes */
    .hero-title {
        font-size: clamp(2.2rem, 6vw, 4.5rem);
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
        line-height: 1.4;
    }
    
    .logo img {
        height: clamp(130px, 12vw, 150px);
    }
}

/* Small tablets (7-9 inches) - 2x1 grid */
@media (min-width: 600px) and (max-width: 767px) {
    .hero-video-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 1fr;
        gap: 6px;
    }
    
    .video-block:nth-child(1) { grid-column: 1; grid-row: 1; }
    .video-block:nth-child(2) { grid-column: 2; grid-row: 1; }
    .video-block:nth-child(3) { display: none; }
    .video-block:nth-child(4) { display: none; }
}

/* Medium tablets (9-11 inches) - 2x2 grid */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-video-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
    }
}

/* Large tablets (iPad Pro) - 2x2 grid with larger gaps */
@media (min-width: 1024px) and (max-width: 1366px) {
    .hero-video-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 12px;
    }
    
    .video-block video,
    .video-block canvas {
        opacity: 0.5 !important; /* Brighter for larger screens */
    }
}

/* Video loading states */
.video-loading {
    position: relative;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    border-radius: 6px;
    overflow: hidden;
}

.video-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #333;
    border-top: 3px solid #00ff88;
    border-radius: 50%;
    animation: video-spin 1s linear infinite;
    z-index: 10;
}

.video-loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 20px);
    color: #00ff88;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
}

.video-loaded {
    animation: video-fade-in 0.5s ease-in-out;
}

@keyframes video-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes video-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Optimize video loading performance */
.video-block video {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Mobile: 2x1 grid (vertical) */
@media (max-width: 767px) {
    .hero-video-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 1fr);
    }
}

.video-block {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.video-block video,
.video-block canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35; /* increased base visibility */
    filter: contrast(1.05) brightness(0.85) saturate(1.15);
}

.video-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 48%, rgba(0, 128, 255, 0.1) 49%, rgba(0, 128, 255, 0.1) 51%, transparent 52%),
        linear-gradient(90deg, transparent 48%, rgba(0, 128, 255, 0.1) 49%, rgba(0, 128, 255, 0.1) 51%, transparent 52%);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
    animation: gridMove 20s linear infinite;
}

.video-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 128, 255, 0.05);
    pointer-events: none;
    z-index: 2;
}

/* Thin copyright footer */
.thin-footer {
    position: relative;
    z-index: 15;
    background: rgba(10, 10, 10, 0.9);
    border-top: 1px solid rgba(0, 128, 255, 0.15);
    text-align: center;
}

.thin-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--contact-gap) / 2) 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thin-footer-text {
    text-align: center;
    width: 100%;
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 0.3px;
    margin: 0 auto;
}

/* Static video blocks without movement */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.4) 0%,
        rgba(17, 19, 24, 0.2) 50%,
        rgba(0, 128, 255, 0.05) 100%
    );
    z-index: 5;
    pointer-events: none;
}

/* Fine grid overlay on top of hero and contact */
.grid-overlay-fine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 12;
    background-image:
        linear-gradient(rgba(0, 128, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 128, 255, 0.12) 1px, transparent 1px);
    background-size: 6px 6px;
    background-position: 0 0;
    animation: gridOverlayDrift 20s linear infinite;
}

@keyframes gridOverlayDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(6px, 6px); }
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 20;
    max-width: 800px;
    padding: 0 2rem;
    transform-style: preserve-3d;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    50% { transform: translateY(-10px) rotateX(1deg); }
}

.logo {
    margin-bottom: 3rem;
    animation: glowPulse 3s ease-in-out infinite;
    transform-style: preserve-3d;
}

.logo img {
    height: 160px;
    filter: drop-shadow(0 0 20px var(--accent-primary));
    transition: all 0.3s ease;
}

.logo:hover img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 40px var(--accent-primary)) drop-shadow(0 0 60px var(--accent-cyan));
}

@keyframes glowPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 20px var(--accent-primary));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 30px var(--accent-primary)) drop-shadow(0 0 40px var(--accent-primary)40);
        transform: scale(1.05);
    }
}

.hero-title {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 0.9;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    transform-style: preserve-3d;
}

.hero-title .line-1 {
    display: block;
    color: var(--text-primary);
    text-shadow: 0 0 20px var(--accent-blue)80;
    animation: titleGlow 4s ease-in-out infinite;
}

.hero-title .line-2 {
    display: block;
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-primary);
    animation: textGlitch 4s infinite, titleFloat 3s ease-in-out infinite;
    position: relative;
}

.hero-title .line-2::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    color: var(--accent-cyan);
    clip: rect(0, 900px, 0, 0);
    animation: glitchAnim 2s infinite linear alternate-reverse;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px var(--accent-blue)80; }
    50% { text-shadow: 0 0 40px var(--accent-blue), 0 0 60px var(--accent-purple)50; }
}

@keyframes titleFloat {
    0%, 100% { transform: translateZ(0); }
    50% { transform: translateZ(20px); }
}

@keyframes textGlitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px) skewX(2deg); }
    40% { transform: translateX(2px) skewX(-2deg); }
    60% { transform: translateX(-1px) skewX(1deg); }
    80% { transform: translateX(1px) skewX(-1deg); }
}

@keyframes glitchAnim {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    25% { clip: rect(12px, 9999px, 15px, 0); }
    50% { clip: rect(85px, 9999px, 90px, 0); }
    75% { clip: rect(29px, 9999px, 32px, 0); }
    100% { clip: rect(63px, 9999px, 67px, 0); }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
    animation: subtitleGlow 5s ease-in-out infinite;
}

@keyframes subtitleGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--accent-cyan)50; }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
    color: var(--bg-primary);
    text-decoration: none;
    font-family: var(--font-header);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-cyan)30, transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px) rotateX(10deg) scale(1.05);
    box-shadow: 
        0 15px 40px var(--accent-primary)40,
        0 0 60px var(--accent-cyan)30;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
}

.cta-button .arrow {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateX(10px) rotateZ(45deg);
}

/* Enhanced Scan Lines Effect */
.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        var(--accent-primary)10 50%
    );
    background-size: 100% 4px;
    animation: scanMove 2s linear infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 10;
}

.scan-lines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 20px var(--accent-cyan);
    animation: scannerMove 3s ease-in-out infinite;
}

@keyframes scanMove {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

@keyframes scannerMove {
    0%, 100% { transform: translateY(0) scaleX(0); }
    50% { transform: translateY(50vh) scaleX(1); }
}

/* Wave Effect */
.wave-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 15;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-primary)10 1px, transparent 1px);
    background-size: 50px 50px;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    animation: waveRipple 4s ease-out infinite;
}

.wave:nth-child(2) {
    animation-delay: 1.3s;
    background: radial-gradient(circle, var(--accent-cyan)08 1px, transparent 1px);
}

.wave:nth-child(3) {
    animation-delay: 2.6s;
    background: radial-gradient(circle, var(--accent-blue)06 1px, transparent 1px);
}

@keyframes waveRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Showcase Section */
.showcase {
    padding: calc(var(--section-space-md) - 0.75rem) 0 var(--section-space-lg);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    position: relative;
    z-index: 2; /* above noise-overlay and background grid effects */
    overflow: hidden; /* prevent blueprints from overlapping next section */
}

/* Ensure content sits above decorative pseudo-elements */
.showcase > .container {
    position: relative;
    z-index: 2;
}

/* Blueprint decorative backgrounds (no extra markup, not in hero) */
.showcase::before {
    content: '';
    position: absolute;
    left: -8vw;
    bottom: -2vw;
    width: 60vw;
    max-width: 1200px;
    aspect-ratio: 1987 / 768; /* side view proportion */
    background: url('../images/blueprint/r7blueside.png') no-repeat left center / contain;
    opacity: 0.22;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
    mask-image: linear-gradient(to top, black 60%, transparent 100%);
    /* Make blueprint lines crisper */
    filter: contrast(1.35) saturate(1.1) brightness(1.15);
    will-change: transform;
    transform: translate3d(var(--bp1-x, 0), var(--bp1-y, 0), 0);
}

.showcase::after {
    content: '';
    position: absolute;
    right: -10vw;
    top: 4rem;
    width: 52vw;
    max-width: 1000px;
    aspect-ratio: 2000 / 566; /* top view proportion */
    background: url('../images/blueprint/r7bluetop.png') no-repeat right top / contain;
    opacity: 0.18;
    transform: translate3d(var(--bp2-x, 0), var(--bp2-y, 0), 0) rotate(-6deg);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 35%, black 100%);
    mask-image: linear-gradient(to left, transparent 0%, black 35%, black 100%);
    /* Make blueprint lines crisper */
    filter: contrast(1.35) saturate(1.1) brightness(1.15);
    will-change: transform;
}

@media (max-width: 1280px) {
    .showcase::before { width: 70vw; left: -15vw; opacity: 0.1; }
    .showcase::after { width: 58vw; right: -14vw; opacity: 0.06; }
}

@media (max-width: 1024px) {
    .showcase::before { width: 90vw; left: -25vw; bottom: -6vw; opacity: 0.14; }
    .showcase::after { display: none; }
}

@media (max-width: 640px) {
    .showcase::before { width: 110vw; left: -30vw; bottom: -10vw; opacity: 0.08; }
}

.section-title {
    font-family: var(--font-header);
    font-size: clamp(2rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Models Grid - Enhanced */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    perspective: 1000px;
}

/* Smooth reveal for model cards */
.models-grid.js-animate .model-card {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
}

.models-grid.js-animate .model-card.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.8s ease-out;
    transition-delay: var(--stagger, 0ms);
}

.model-card {
    background: linear-gradient(145deg, var(--bg-secondary), #0f172a);
    border: 1px solid var(--accent-primary)20;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(0, 128, 255, 0.08);
    display: flex;
    flex-direction: column;
}

/* Additional styles for white product cards */
.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.02), rgba(6, 182, 212, 0.01));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.model-card:hover::before {
    opacity: 1;
}

/* White card background layer */
.model-card-bg {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(145deg, #0b1220, #121a2b);
    border-radius: 14px;
    z-index: -1;
    transition: all 0.3s ease;
    pointer-events: none;
}

.model-card:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow:
        0 16px 36px rgba(0, 128, 255, 0.18),
        0 0 30px rgba(6, 182, 212, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.model-card:hover .model-card-bg {
    background: linear-gradient(145deg, #111b2d, #0b1220);
    box-shadow: inset 0 1px 0 rgba(0, 128, 255, 0.1);
}

.model-card:nth-child(even):hover { transform: translateY(-2px) scale(1.02); }

.model-image {
    position: relative;
    height: 360px;
    overflow: hidden;
    background: linear-gradient(135deg, #152238, #16263f); /* lighter */
    border-radius: 12px 12px 0 0;
    padding: 15px;
    box-sizing: border-box;
}

/* Enhanced white background for product images */
.model-image::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    /* Softer center glow to avoid emphasizing PNG white halos */
    background: radial-gradient(120% 120% at 50% 50%, rgba(255, 255, 255, 0.05) 0%, rgba(0, 128, 255, 0.10) 40%, rgba(6, 182, 212, 0.06) 60%, rgba(0, 0, 0, 0) 100%);
    border-radius: 8px;
    z-index: -1;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 16px rgba(0, 128, 255, 0.10);
}

.model-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.4s ease, opacity 0.3s ease;
    /* Edge halo mitigation for transparent PNGs */
    filter: contrast(1.08) saturate(1.08) drop-shadow(0 0 1px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.25));
    border-radius: 8px;
    background: transparent;
}

.model-card:hover .model-image img {
    transform: scale(1.05);
    filter: contrast(1.18) saturate(1.18) brightness(1.02) drop-shadow(0 0 1px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 8px rgba(0, 0, 0, 0.25));
    box-shadow: 0 8px 24px rgba(0, 128, 255, 0.1);
}

.model-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        var(--accent-primary)05 0%,
        transparent 30%,
        transparent 70%,
        var(--accent-cyan)05 100%
    );
    opacity: 0;
    transition: all 0.3s ease;
    mix-blend-mode: soft-light;
    pointer-events: none; /* allow clicks to pass through */
}

.model-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--accent-cyan)80, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.model-card:hover .model-overlay {
    opacity: 0.3;
}

.model-card:hover .model-overlay::before {
    width: 100px;
    height: 100px;
}

.model-info {
    padding: 2rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(145deg, #0e1525, #0b1220);
    border-radius: 0 0 14px 14px;
    margin-top: -1px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: auto;
}

.model-name {
    font-family: var(--font-header);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 800;
}

/* Product card brand indicator */
.model-card .model-brand {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-family: var(--font-header);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 128, 255, 0.3);
    transition: all 0.3s ease;
}

.model-card:hover .model-brand {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.4);
}

.model-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.model-card:hover .model-name {
    color: var(--accent-primary);
    text-shadow: 0 2px 12px rgba(0, 128, 255, 0.5);
    transform: translateX(5px);
}

.model-card:hover .model-name::after {
    width: 60px;
}

.model-specs {
    list-style: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Keep download button close to specs (no large gap) */
.model-info .control-buttons:last-of-type { margin-top: 0.75rem; }

/* Reduce bottom padding to remove excess empty space */
.model-info { padding-bottom: 1.25rem; }

/* Disabled clickable spec link */
.variant-specs .variant-link.disabled {
    cursor: default;
    color: var(--text-secondary);
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .model-image { height: 320px; }
}

@media (max-width: 768px) {
    .model-image { height: 300px; }
}

@media (max-width: 480px) {
    .model-image { height: 280px; }
}

.model-specs li {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    transform: translateX(0);
    position: relative;
    padding-left: 20px;
    font-weight: 500;
}

.model-specs li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
    transition: all 0.3s ease;
    transform: translateX(0);
}

/* Clickable variant links in specs */
.variant-specs .variant-link {
    color: var(--text-secondary);
    cursor: pointer;
}

.variant-specs .variant-link:hover {
    color: var(--accent-primary);
}

.variant-specs .variant-link.active {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 128, 255, 0.35);
}

.model-card:hover .model-specs li {
    color: #334155;
    transform: translateX(10px);
}

.model-card:hover .model-specs li::before {
    color: var(--accent-primary);
    transform: translateX(5px) scale(1.2);
    text-shadow: 0 1px 3px rgba(0, 128, 255, 0.3);
}

.model-specs li:nth-child(odd) {
    transition-delay: 0.1s;
}

.model-specs li:nth-child(even) {
    transition-delay: 0.2s;
}

/* Enhanced Contact Section */
.contact {
    padding: var(--section-space-lg) 0;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300ff7f' fill-opacity='0.05'%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(60px) translateY(60px); }
}

.contact-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Make email link white in contact description */
.contact-description a,
.contact-description a:visited {
    color: #ffffff;
}

.contact-form {
    max-width: 600px;
    margin: var(--contact-gap) auto;
    background: var(--bg-accent);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--accent-primary)30;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px var(--bg-primary)80;
    z-index: 20; /* ensure email + copy block is above grid overlays */
}

/* Contact email button */
.contact-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(0, 128, 255, 0.15), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(0, 128, 255, 0.35);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-header);
    font-weight: 800;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.contact-email-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 0%, rgba(0, 128, 255, 0.15), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

.contact-email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 128, 255, 0.2), 0 0 40px rgba(6, 182, 212, 0.2);
    border-color: var(--accent-primary);
}

.contact-email-btn:active {
    transform: translateY(0);
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.copy-email-btn {
    flex: 0 0 auto;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-primary);
    border: 1px solid var(--accent-primary)40;
    border-radius: 8px;
    font-family: var(--font-header);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-email-btn:hover {
    border-color: var(--accent-primary);
    background: linear-gradient(145deg, var(--accent-primary)10, var(--accent-cyan)05);
    transform: translateY(-1px);
}

.copy-email-btn:active {
    transform: translateY(0);
}

.copy-toast {
    margin-left: auto;
    padding: 0.4rem 0.6rem;
    font-family: var(--font-header);
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--accent-cyan);
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.25s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, var(--accent-primary)05, var(--accent-blue)05);
    border-radius: 16px;
    z-index: -1;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--accent-primary);
    font-family: var(--font-header);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group:focus-within label {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan)50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary)30;
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 
        0 0 20px var(--accent-cyan)30,
        inset 0 1px 0 var(--accent-primary)20;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    transform: translateY(-2px);
}

.submit-button {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
    color: var(--bg-primary);
    border: none;
    padding: 1.2rem 2rem;
    font-family: var(--font-header);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-cyan)50, transparent);
    transition: left 0.6s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px var(--accent-primary)40,
        0 0 60px var(--accent-cyan)30;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-dark-blue));
}

.submit-button:active {
    transform: translateY(-1px) scale(0.98);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* iOS touch interaction improvements */
.video-block {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Prevent text selection on iOS during swipes, but allow buttons */
.hero-video-grid * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Allow variant buttons to be interactive on iOS */
.variant-link, .variant-link * {
    -webkit-user-select: auto !important;
    user-select: auto !important;
    -webkit-touch-callout: default !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
}

/* iOS play button removed - videos work in autoplay mode only */

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-family: var(--font-header);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: none;
    animation: statusSlideIn 0.3s ease-out;
}

@keyframes statusSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-status.success {
    background: linear-gradient(135deg, var(--accent-primary)20, var(--accent-cyan)10);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary)20;
}

.form-status.error {
    background: linear-gradient(135deg, var(--accent-orange)20, #ff174410);
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 0 20px var(--accent-orange)20;
}

/* Footer Grid Effect */
.footer-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-primary) 25%, 
        var(--accent-cyan) 50%, 
        var(--accent-blue) 75%, 
        transparent 100%
    );
    animation: footerPulse 3s ease-in-out infinite;
}

@keyframes footerPulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Enhanced Loading States */
.loading-state {
    position: relative;
    overflow: hidden;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-cyan)30, transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Performance Optimizations */
* {
    will-change: auto;
}

.model-card,
.hero-content,
.cta-button,
.submit-button {
    will-change: transform;
}

.particle,
.cursor-trail,
.custom-cursor {
    will-change: transform, opacity;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo img {
        height: 120px;
    }

    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 12vw, 4rem);
        line-height: 1.1;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .model-card {
        max-width: 100%;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }

    /* Disable 3D effects on mobile for performance */
    .model-card:hover {
        transform: translateY(-5px) scale(1.02) !important;
    }

    .hero-content {
        transform: none !important;
    }

    /* Reduce particles on mobile */
    .particles .particle:nth-child(n+20) {
        display: none;
    }

    /* Simplify cursor on mobile */
    .custom-cursor,
    .cursor-trail {
        display: none;
    }

    body {
        cursor: auto;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 100px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 10vw, 3rem);
        letter-spacing: 1px;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
        letter-spacing: 2px;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .model-specs {
        font-size: 0.8rem;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .particles,
    .noise-overlay,
    .scan-lines {
        display: none;
    }
}

/* Force dark theme - no automatic light theme switching */
/* Removed automatic light theme detection to maintain consistent dark design */

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --accent-primary: #0080ff;
        --accent-blue: #0080ff;
        --accent-cyan: #00ffff;
    }
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    margin-bottom: 2rem;
    animation: preloaderGlow 2s ease-in-out infinite, preloaderFloat 3s ease-in-out infinite;
    transform-style: preserve-3d;
}

.preloader-logo img {
    height: 200px;
    filter: drop-shadow(0 0 30px var(--accent-primary)) 
            drop-shadow(0 0 60px var(--accent-cyan)50);
    transition: all 0.3s ease;
    animation: preloaderPulse 2s ease-in-out infinite;
}

@keyframes preloaderGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 30px var(--accent-primary)) 
                drop-shadow(0 0 60px var(--accent-cyan)50);
    }
    50% { 
        filter: drop-shadow(0 0 50px var(--accent-primary)) 
                drop-shadow(0 0 80px var(--accent-cyan)) 
                drop-shadow(0 0 100px var(--accent-blue)30);
    }
}

@keyframes preloaderFloat {
    0%, 100% { 
        transform: translateY(0) rotateY(0deg) scale(1);
    }
    25% { 
        transform: translateY(-10px) rotateY(5deg) scale(1.05);
    }
    50% { 
        transform: translateY(0) rotateY(0deg) scale(1.1);
    }
    75% { 
        transform: translateY(-5px) rotateY(-5deg) scale(1.05);
    }
}

@keyframes preloaderPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.9;
    }
}

.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-top: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-cyan);
    border-radius: 50%;
    animation: preloaderSpin 1s linear infinite;
    margin-bottom: 1rem;
    position: relative;
}

.preloader-spinner::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-blue);
    border-radius: 50%;
    animation: preloaderSpin 2s linear infinite reverse;
}

.preloader-spinner::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid transparent;
    border-top: 1px solid var(--accent-cyan);
    border-radius: 50%;
    animation: preloaderSpin 0.5s linear infinite;
}

@keyframes preloaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader-progress {
    width: 200px;
    margin: 1rem 0;
    text-align: center;
}

.preloader-progress .progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--accent-primary)30;
    margin-bottom: 0.5rem;
}

.preloader-progress .progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.preloader-progress .progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 1.5s ease-in-out infinite;
}

.preloader-progress .progress-text {
    color: var(--accent-cyan);
    font-family: var(--font-header);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: textPulse 2s ease-in-out infinite;
}

.preloader-text {
    color: var(--text-secondary);
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: preloaderTextGlow 2s ease-in-out infinite;
    margin-top: 1rem;
}

@keyframes preloaderTextGlow {
    0%, 100% { 
        opacity: 0.6;
        text-shadow: 0 0 10px var(--accent-primary)30;
    }
    50% { 
        opacity: 1;
        text-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-cyan)50;
    }
}

.preloader-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.preloader-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: preloaderParticleFloat 4s ease-in-out infinite;
}

.preloader-particle:nth-child(odd) {
    background: var(--accent-primary);
    animation-duration: 3s;
}

.preloader-particle:nth-child(3n) {
    background: var(--accent-blue);
    animation-duration: 5s;
}

@keyframes preloaderParticleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        transform: translateY(-10vh) translateX(var(--drift-x, 50px)) scale(0);
        opacity: 0;
    }
}

/* Mobile preloader adjustments */
@media (max-width: 768px) {
    .preloader-logo img {
        height: 150px;
    }
    
    .preloader-spinner {
        width: 50px;
        height: 50px;
    }
    
    .preloader-text {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .preloader-logo img {
        height: 120px;
    }
    
    .preloader-spinner {
        width: 40px;
        height: 40px;
    }
    
    .preloader-text {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

/* 3D Model Section Styles */
.model-3d-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    position: relative;
    overflow: hidden;
}

.model-3d-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.8;
    font-weight: 300;
}

.model-3d-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    perspective: 1000px;
}

.model-3d-viewer {
    position: relative;
    height: 600px;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-accent));
    border: 2px solid var(--accent-primary)30;
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 80px var(--accent-primary)20,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.model-3d-viewer canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 14px;
    cursor: grab;
}

.model-3d-viewer canvas:active {
    cursor: grabbing;
}

.model-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-accent);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.model-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner-3d {
    width: 80px;
    height: 80px;
    border: 4px solid var(--accent-primary)20;
    border-top: 4px solid var(--accent-primary);
    border-right: 4px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin-bottom: 2rem;
    position: relative;
}

.loading-spinner-3d::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid var(--accent-blue)20;
    border-top: 2px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

.loading-text {
    color: var(--text-primary);
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--accent-cyan); }
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--accent-primary)30;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.model-3d-controls {
    background: linear-gradient(145deg, var(--bg-accent), var(--bg-secondary));
    border: 2px solid var(--accent-primary)30;
    border-radius: 16px;
    padding: 2rem;
    height: fit-content;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.controls-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--accent-primary)20;
}

.controls-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.controls-title {
    font-family: var(--font-header);
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

.controls-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    border-radius: 1px;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.variant-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-btn {
    background: rgba(0, 128, 255, 0.08);
    border-color: rgba(0, 128, 255, 0.25);
}

.variant-btn:hover {
    background: rgba(6, 182, 212, 0.12);
}

.variant-btn.active {
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-cyan));
    color: var(--bg-primary);
}

.variant-btn[disabled] {
    cursor: default;
    opacity: 0.9;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-primary);
    border: 1px solid var(--accent-primary)30;
    border-radius: 8px;
    font-family: var(--font-header);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-primary)20, transparent);
    transition: left 0.4s ease;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    background: linear-gradient(145deg, var(--accent-primary)10, var(--accent-cyan)05);
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 
        0 5px 15px var(--accent-primary)20,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.control-btn:active {
    transform: translateX(3px) scale(0.98);
}

.control-btn.active {
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-cyan));
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    box-shadow: 
        0 5px 20px var(--accent-primary)40,
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-icon {
    font-size: 1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.btn-text {
    flex: 1;
    text-align: left;
}

.preset-btn {
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.6rem 0.8rem;
}

.model-info-panel {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--accent-cyan)30;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.info-title {
    font-family: var(--font-header);
    font-size: 0.9rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--accent-primary)10;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-value {
    font-family: var(--font-header);
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-align: right;
}

.section-background-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 128, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 128, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: floatParticle 15s ease-in-out infinite;
}

.floating-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particles::after {
    top: 70%;
    right: 15%;
    animation-delay: 7s;
    background: var(--accent-primary);
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) translateX(-5px) scale(0.8);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) translateX(15px) scale(1.1);
        opacity: 0.9;
    }
}

/* Mobile responsiveness for 3D section */
@media (max-width: 1024px) {
    .model-3d-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .model-3d-viewer {
        height: 500px;
    }
    
    .model-3d-controls {
        order: -1;
        padding: 1.5rem;
    }
    
    .controls-group {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .model-3d-section {
        padding: 4rem 0;
    }
    
    .model-3d-viewer {
        height: 400px;
    }
    
    .model-3d-controls {
        padding: 1rem;
    }
    
    .control-buttons {
        gap: 0.6rem;
    }
    
    .control-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .spec-grid {
        gap: 0.6rem;
    }
    
    .spec-item {
        padding: 0.4rem 0;
    }
}

@media (max-width: 480px) {
    .model-3d-viewer {
        height: 350px;
    }
    
    .model-3d-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .control-btn {
        gap: 0.5rem;
        padding: 0.5rem 0.6rem;
    }
    
    .btn-icon {
        font-size: 0.9rem;
    }
    
    .btn-text {
        font-size: 0.7rem;
    }
    
    .preset-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0.6rem;
    }
}

/* Performance optimizations for 3D section */
.model-3d-viewer,
.control-btn,
.progress-bar {
    will-change: transform;
}

.loading-spinner-3d {
    will-change: transform;
}

/* Fallback mode for when videos fail to load */
.fallback-mode {
    /* Disable complex animations */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Simplify video blocks */
    .video-block {
        background: linear-gradient(135deg, #001a33 0%, #000511 70%) !important;
    }
    
    /* Hide complex effects */
    .scan-lines,
    .wave-effect,
    .particles,
    .noise-overlay {
        display: none !important;
    }
    
    /* Simplify model cards */
    .model-card:hover {
        transform: none !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
    }
}  

/* Enhanced mobile optimization */
@media (max-width: 768px) {
    /* Reduce video complexity on mobile */
    .hero-video-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr !important;
    }
    
    /* Disable complex effects on mobile for better performance */
    .scan-lines,
    .wave-effect,
    .particles,
    .noise-overlay {
        display: none !important;
    }
    
    /* Simplify animations on mobile */
    .model-card:hover {
        transform: none !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
    }
    
    /* Optimize video rendering on mobile */
    .video-block video,
    .video-block canvas {
        filter: none !important;
        opacity: 0.6 !important;
    }
    
    /* Remove overlay effects that can cause performance issues */
    .video-block::before,
    .video-block::after {
        display: none !important;
    }
}

/* Mobile/Touch adjustments overrides */
/* Remove tap highlight on touch devices */
a, button, .model-card, .variant-link {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* Improve touch targets for iOS */
@media (hover: none) and (pointer: coarse) {
    .variant-link {
        min-height: 40px; /* iOS recommended touch target size */
        display: flex;
        align-items: center;
        padding: 6px 4px;
        margin: 1px 0;
        cursor: pointer;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        line-height: 1.1;
    }
    
    .variant-link:active {
        background-color: rgba(0, 128, 255, 0.1);
        transform: scale(0.98);
    }
}

/* Removed pulse animation as no longer needed */

@media (max-width: 768px) {
    .hero {
        align-items: flex-start;
        padding-top: 2.5rem;
    }
    .logo {
        margin-bottom: 1.25rem;
    }
    .hero-title {
        letter-spacing: 1px;
        margin-bottom: 1rem;
        overflow-wrap: normal;
        word-break: keep-all;
        text-wrap: balance;
    }
    .hero-title .line-2 {
        word-break: keep-all;
        overflow-wrap: normal;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Reduce spacing in model variant buttons on mobile */
    .variant-specs .variant-link {
        line-height: 1.1 !important;
        margin: 0.5px 0 !important;
        padding: 4px 0 !important;
    }
}

/* Ensure consistent spacing around sections on small screens */
@media (max-width: 768px) {
    :root {
        --section-space-lg: clamp(2rem, 5vw, 3.5rem);
        --section-space-md: clamp(1rem, 3.5vw, 2rem);
        --contact-gap: clamp(1.25rem, 4vw, 2rem);
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 2rem;
    }
    .hero-title .line-2 {
        animation: none;
    }
    .hero-title .line-2::before {
        display: none;
    }
}

/* Touch devices: disable hover-brightening on model cards */
@media (hover: none) {
    .model-card:hover {
        transform: none !important;
        border-color: var(--accent-primary)20;
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(0, 128, 255, 0.08);
    }
    .model-card:hover .model-overlay {
        opacity: 0 !important;
    }
    .model-card:hover .model-image img {
        transform: none !important;
        filter: contrast(1.1) saturate(1.1);
        box-shadow: none !important;
    }
    .model-card:hover .model-name {
        color: var(--text-primary);
        transform: none !important;
        text-shadow: none !important;
    }
    .model-card:hover .model-name::after {
        width: 0 !important;
    }
    .model-card:hover .model-specs li {
        color: var(--text-secondary);
        transform: none !important;
    }
    .model-card:hover .model-specs li::before {
        transform: none !important;
        text-shadow: none !important;
    }
} 

@media (max-width: 768px) {
    /* Lighter rendering for hero videos on mobile */
    .video-block video,
    .video-block canvas {
        filter: none !important;
        opacity: 0.45; /* increased visibility for mobile */
    }
    .video-block::before,
    .video-block::after {
        display: none !important;
    }
    .scan-lines,
    .wave-effect,
    .grid-overlay-fine {
        display: none !important;
    }
}

/* Additional landscape video brightness fix */
@media (max-width: 768px) and (orientation: landscape) {
    .video-block video,
    .video-block canvas {
        opacity: 0.45 !important; /* consistent with portrait */
        filter: none !important;
    }
}

/* Portrait mode specific opacity (не применяется в landscape) */
@media (max-width: 768px) and (orientation: portrait) {
    .video-block video,
    .video-block canvas {
        opacity: 0.45 !important; /* только для portrait */
    }
}

/* iOS Safari specific adjustments for better video visibility */
@supports (-webkit-touch-callout: none) {
    /* Portrait mode */
    @media (max-width: 768px) and (orientation: portrait) {
        .video-block video,
        .video-block canvas {
            opacity: 0.55 !important; /* even brighter for iOS Safari portrait */
            filter: brightness(1.1) !important;
        }
    }
    
    /* Landscape mode - same as portrait for consistency */
    @media (max-height: 500px) and (orientation: landscape) {
        .video-block video,
        .video-block canvas {
            opacity: 0.55 !important; /* такая же яркость как в portrait */
            filter: brightness(1.1) !important; /* такой же фильтр как в portrait */
        }
    }
}

/* Mobile viewport height fix so bottom UI elements remain visible */
@supports (height: 100svh) {
    .hero { height: 100svh; }
}

/* Ensure scroll button stays above safe area/toolbars */
.scroll-down {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
}

@media (max-width: 768px) {
    .scroll-down {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    }
}

/* Proportional scaling system for different monitor sizes */

/* Small monitors (15" and similar) - minimalistic style */
@media (min-width: 769px) and (max-width: 1366px) {
    .hero {
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        max-width: 700px;
        padding: 0 1.5rem;
        transform: translateY(-20px); /* поднимаем контент выше */
    }
    
    .hero-subtitle {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
        margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
        line-height: 1.3;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-title {
        font-size: clamp(2rem, 5.5vw, 4.5rem);
        margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    }
    
    .logo {
        margin-bottom: clamp(1.2rem, 3vw, 2rem);
    }
    
    .logo img {
        height: clamp(120px, 15vw, 160px);
    }
    
    .scroll-down {
        bottom: 20px;
        z-index: 50;
    }
}

/* Medium monitors (17-21") - balanced style */
@media (min-width: 1367px) and (max-width: 1920px) {
    .hero {
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        max-width: 800px;
        padding: 0 2rem;
        transform: translateY(-10px); /* легкий подъем для баланса */
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 2.2vw, 1.2rem);
        margin-bottom: clamp(1.5rem, 3vw, 2rem);
        line-height: 1.4;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 5.5rem);
        margin-bottom: clamp(1.5rem, 3vw, 2rem);
    }
    
    .logo {
        margin-bottom: clamp(1.8rem, 4vw, 2.5rem);
    }
    
    .logo img {
        height: clamp(140px, 12vw, 180px);
    }
    
    .scroll-down {
        bottom: 24px;
        z-index: 50;
    }
}

/* Large monitors (24"+) - cyberpunk style */
@media (min-width: 1921px) {
    .hero {
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        max-width: 900px;
        padding: 0 2.5rem;
        transform: translateY(0); /* без подъема для киберпанк эффекта */
    }
    
    .hero-subtitle {
        font-size: clamp(1.1rem, 1.8vw, 1.4rem);
        margin-bottom: clamp(1.8rem, 2.5vw, 2.5rem);
        line-height: 1.5;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-title {
        font-size: clamp(3rem, 5vw, 6rem);
        margin-bottom: clamp(1.8rem, 2.5vw, 2.5rem);
    }
    
    .logo {
        margin-bottom: clamp(2.2rem, 3.5vw, 3rem);
    }
    
    .logo img {
        height: clamp(160px, 10vw, 200px);
    }
    
    .scroll-down {
        bottom: 28px;
        z-index: 50;
    }
}

/* Height-based adjustments for all screen sizes */
@media (min-width: 769px) and (max-height: 900px) {
    .hero-subtitle {
        font-size: clamp(0.8rem, 2vw, 0.95rem);
        margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
        line-height: 1.2;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 4.5vw, 4rem);
        margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    }
    
    .logo {
        margin-bottom: clamp(1.2rem, 3vw, 2rem);
    }
    
    .logo img {
        height: clamp(100px, 12vw, 140px);
    }
    
    .scroll-down {
        bottom: 16px;
    }
}

@media (min-width: 769px) and (max-height: 1080px) {
    .hero-subtitle {
        font-size: clamp(0.85rem, 2.2vw, 1rem);
        margin-bottom: clamp(1.2rem, 3vw, 2rem);
        line-height: 1.3;
    }
    
    .hero-title {
        font-size: clamp(2rem, 5vw, 4.5rem);
        margin-bottom: clamp(1.2rem, 3vw, 2rem);
    }
    
    .logo {
        margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
    }
    
    .logo img {
        height: clamp(120px, 13vw, 160px);
    }
    
    .scroll-down {
        bottom: 18px;
    }
}

/* Landscape mode fixes for mobile devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding-top: 0.5rem !important;
        height: 100vh;
        align-items: center;
        justify-content: center;
    }
    
    .logo {
        margin-bottom: 0.5rem !important;
    }
    
    .logo img {
        height: 80px !important;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
        line-height: 1.1 !important;
        margin-bottom: 0.5rem !important;
        letter-spacing: 1px !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-content {
        padding: 0 1rem !important;
        max-width: 90% !important;
    }
    
    .scroll-down {
        bottom: 12px !important;
        transform: scale(1) !important;
        left: 50% !important;
        transform: translateX(-50%) scale(1) !important;
    }
    
    .scroll-down .scroll-text {
        font-size: 0.8rem !important;
    }
    
    .scroll-down .scroll-icon {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Extra small landscape screens (very short height) */
@media screen and (max-height: 400px) and (orientation: landscape) {
    .hero {
        padding-top: 0.2rem !important;
    }
    
    .logo {
        margin-bottom: 0.3rem !important;
    }
    
    .logo img {
        height: 60px !important;
    }
    
    .hero-title {
        font-size: clamp(1.2rem, 6vw, 2rem) !important;
        margin-bottom: 0.3rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .scroll-down {
        bottom: 6px !important;
        transform: translateX(-50%) scale(0.9) !important;
        left: 50% !important;
    }
    
    .scroll-down .scroll-text {
        font-size: 0.7rem !important;
    }
}

/* Very short landscape devices (like iPhone in landscape) */
@media screen and (max-height: 400px) and (orientation: landscape) {
    .hero {
        padding-top: 0.5rem !important;
    }
    
    .logo img {
        height: 85px !important; /* еще больше для коротких экранов */
    }
    
    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.6rem) !important; /* еще больше */
        margin-bottom: 0.5rem !important;
    }
    
    .hero-subtitle {
        font-size: clamp(1.1rem, 4vw, 1.3rem) !important; /* еще больше */
        margin-bottom: 0.5rem !important;
    }
    
    .hero-content {
        gap: 0.5rem;
    }
    
    .scroll-down {
        position: fixed !important; /* fixed для точного позиционирования */
        bottom: 12px !important;
    }
}

/* Animations for JavaScript-generated elements */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}