/* CSS Variables for easy customization */
:root {
    --primary-color: #cc0000;
    --secondary-color: #ffffff;
    --bg-color: #000000;
    --dark-gray: #1a1a1a;
    --light-gray: #333333;
    --font-primary: 'Bebas Neue', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --transition-speed: 0.3s;
}

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

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

/* Loader Styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.pcb-animation {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.pcb-svg {
    width: 100%;
    height: 100%;
}

.pcb-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawPath 2s ease-in-out infinite;
}

.photon {
    animation: travelPath 2s ease-in-out infinite;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes travelPath {
    0% {
        offset-distance: 0%;
    }
    100% {
        offset-distance: 100%;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary-color);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-2px, 0);
    }
    80% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(2px, 0);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(60% 0 20% 0);
        transform: translate(2px, -1px);
    }
    40% {
        clip-path: inset(20% 0 50% 0);
        transform: translate(-2px, 1px);
    }
    60% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(1px, 2px);
    }
    80% {
        clip-path: inset(5% 0 85% 0);
        transform: translate(-1px, -2px);
    }
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-speed);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-image {
    height: 80px;
    width: auto;
    transition: transform var(--transition-speed);
}

.logo-image:hover {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .logo-image {
        height: 90px;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: hidden;
}

.parallax-container {
    position: relative;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.stripe-pattern {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(204, 0, 0, 0.1) 10px,
        rgba(204, 0, 0, 0.1) 20px
    );
    animation: stripeMove 20s linear infinite;
}

@keyframes stripeMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(20px, 20px);
    }
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.hero-features {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.feature-tag {
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hero-product {
    position: relative;
    max-width: 500px;
    width: 100%;
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(204, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Product Callouts */


.product-callouts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.callout {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
    transform: translate(-50%, -50%);
}



.callout.right-aligned {
    flex-direction: row-reverse;
}

.callout.right-aligned .callout-text {
    margin-right: 1rem;
    margin-left: 0;
}

.callout-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.callout-text {
    background: rgba(0, 0, 0, 0.9);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    border-left: 2px solid var(--primary-color);
    margin-left: 1rem;
}

/* Callout positioning is handled via inline styles in JavaScript */


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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(204, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0);
    }
}

/* Features Section */
.features {
    padding: 4rem 1rem;
    background: var(--dark-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

.features-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(204, 0, 0, 0.3);
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(204, 0, 0, 0.3), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* Product Showcase */
.product-showcase {
    padding: 4rem 1rem;
    position: relative;
    overflow: hidden;
}

.pcb-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.showcase-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
    grid-template-columns: 1fr;
    position: relative;
    z-index: 1;
}

.showcase-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.showcase-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.feature-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.product-viewer {
    position: relative;
    aspect-ratio: 1;
    max-width: 500px;
    margin: 0 auto;
    touch-action: pan-y;
    user-select: none;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s;
}

.product-image.active {
    opacity: 1;
}

.product-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* Color Showcase */
.color-showcase {
    padding: 100px 0;
    background: var(--dark-gray-color);
    position: relative;
}

.color-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(204, 0, 0, 0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.color-swiper {
    padding: 20px 0;
    margin: 40px 0;
    overflow: visible;
}

.swiper-slide {
    height: auto;
}

/* Ensure body doesn't have horizontal overflow from swiper */
body {
    overflow-x: hidden;
}

/* Ensure color showcase doesn't create horizontal scroll */
.color-showcase {
    overflow-x: hidden;
}

.color-slide {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(204, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.color-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(204, 0, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.color-slide:hover::before {
    left: 100%;
}

.color-slide:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(204, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.color-image {
    position: relative;
    margin-bottom: 20px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.color-slide:hover .color-image img {
    transform: scale(1.1);
}

.color-name {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.color-description {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: #999;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.color-pagination {
    position: relative;
    margin-top: 30px;
}

.color-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: transparent;
    opacity: 1;
    transition: all 0.3s ease;
    position: relative;
}

.color-pagination .swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

.color-pagination .swiper-pagination-bullet-active::before {
    opacity: 1;
}

.color-pagination .swiper-pagination-bullet:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.5);
}

/* Mobile responsive for color showcase */
@media (max-width: 768px) {
    .color-swiper {
        padding: 10px 0;
    }
    
    .color-slide {
        padding: 15px;
    }
    
    .color-image {
        height: 150px;
    }
    
    .color-name {
        font-size: 1.2rem;
    }
    
    .color-description {
        font-size: 0.8rem;
    }
    
    .color-pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
    
    .color-pagination .swiper-pagination-bullet::before {
        width: 4px;
        height: 4px;
    }
}
    margin-top: 2rem;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--secondary-color);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.nav-dot.active,
.nav-dot:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Speed Feed Section */
.speed-feed {
    padding: 4rem 1rem;
    background: var(--dark-gray);
    position: relative;
    overflow: hidden;
}

.diagonal-stripes {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 20px,
        rgba(204, 0, 0, 0.05) 20px,
        rgba(204, 0, 0, 0.05) 40px
    );
    animation: diagonalMove 30s linear infinite;
}

@keyframes diagonalMove {
    0% {
        transform: translate(-50%, -50%);
    }
    100% {
        transform: translate(0, 0);
    }
}

.speed-feed-content {
    display: grid;
    gap: 3rem;
    align-items: center;
    grid-template-columns: 1fr;
}

.speed-feed-image {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.speed-feed-image img {
    width: 100%;
    height: auto;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.pulse-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;

    animation: pulsate 3s ease-in-out infinite;
}

@keyframes pulsate {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.speed-feed-info h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-primary);
    font-size: 3rem;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* CTA Section */
.cta-section {
    padding: 4rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--bg-color) 100%);
}

.cta-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Floating Buy Now Button */
.buy-now-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-primary);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(204, 0, 0, 0.5);
    text-decoration: none;
    opacity: 1;
    visibility: visible;
    width: 35vw;
}

/* State: centered over hero */
.buy-now-btn.centered {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 80vw;
}

/* State: corner (after hero out of view) */
.buy-now-btn.corner {
    left: auto;
    right: 2rem;
    transform: translateY(0);
    width: 35vw;
}

/* Anchor element below CTA to park the button without covering content */
.buy-btn-anchor {
    height: 120px; /* reserve vertical space below CTA */
}

/* When anchored, button becomes absolute and centered below CTA */
.buy-now-btn.anchored {
    position: absolute;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: auto;
    width: 80vw;
}

.buy-now-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.7);
}

.buy-now-btn.at-bottom {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.buy-now-btn.at-bottom:hover {
    transform: translateX(-50%) scale(1.25) !important;
}

/* Removed floating animation as it conflicts with hover/positioning */

.btn-icon {
    opacity: 0;
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.buy-now-btn:hover .btn-icon {
    opacity: 1;
    transform: translateX(5px);
}

/* Responsive Design - Tablet and up */
@media (min-width: 768px) {
    .hero-content {
        margin-bottom: 4rem;
    }
    
    .showcase-grid,
    .speed-feed-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .callout[data-position="top-right"] {
        right: -20%;
    }
    
    .callout[data-position="bottom-left"] {
        left: -20%;
    }
    
    .buy-now-btn {
        bottom: 3rem;
        right: 3rem;
    }
    .buy-now-btn.anchored, .buy-now-btn.centered {
        width: 45vw!important;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .main-nav {
        padding: 1.5rem 2rem;
    }
    
    .hero {
        padding: 4rem 2rem;
    }
    
    .features,
    .product-showcase,
    .speed-feed,
    .cta-section {
        padding: 6rem 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* Testimonials */
.testimonials {
    padding: 4rem 1rem;
    background: var(--bg-color);
}

.testimonials .section-subtitle {
    text-align: center;
    opacity: 0.8;
    margin: 0 auto 2rem auto;
    max-width: 700px;
}

.video-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(204, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

/* 16:9 or 9:16 responsive iframe wrappers */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-embed.vertical {
    aspect-ratio: 9 / 16;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-card figcaption {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
