/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --yellow-primary: #FFD700;
    --yellow-glow: rgba(255, 215, 0, 0.3);
    --dark-bg: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --dark-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --text-muted: #888888;
}

html {
    overflow-x: hidden; /* hard-stop horizontal overflow at root */
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==== HERO SECTION ==== */
.hero {
    min-height: calc(100vh - 80px); /* Subtract header height */
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    display: flex;
    align-items: flex-start; /* position content at the very top */
    position: relative;
    padding: 2rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, var(--yellow-glow) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, var(--yellow-glow) 0%, transparent 50%);
    opacity: 0.1;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
/* Override to column layout for new design */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-text {
    animation: fadeInLeft 0.8s ease-out;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-headline {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--yellow-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subheadline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* ==== ORBIT BADGE ==== */
.orbit-badge {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 215, 0, 0.5);
    background: #0e0e0e;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.15);
    opacity: 0.9;
}

.orbit-badge .badge-icon {
    font-size: 1.1rem;
}

/* Reduce gap specifically between badge and orbit */
.orbit-badge + .hero-orbit {
    margin-top: clamp(5.5rem, 8.5vw, 7.25rem);
}
 

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    background: var(--yellow-primary);
    color: var(--dark-bg);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 20px var(--yellow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--yellow-glow);
    background: #ffed4e;
}

.btn-secondary {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    background: transparent;
    color: var(--yellow-primary);
    padding: 1rem 2rem;
    border: 2px solid var(--yellow-primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--yellow-primary);
    color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--yellow-glow);
}

.play-icon {
    font-size: 0.9rem;
}

.hero-video {
    animation: fadeInRight 0.8s ease-out;
}

/* ==== 3D ORBITAL THUMBNAIL RING ==== */
.orbit-stack {
    display: flex;
    flex-direction: column;
    align-items: center; /* center badge and orbit */
    gap: 0.35rem; /* tight gap between badge and orbit */
    width: 100%;
}
.hero-orbit {
    width: min(92vw, 1000px);
    margin: 0 auto;
    margin-top: clamp(1.5rem, 3.5vw, 2rem); /* tighter gap and will be overridden by badge rule below */
    position: relative;
    height: var(--orbit-height, 340px);
    perspective: 1200px;
    perspective-origin: 50% 35%;
}

.orbit-stage {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    will-change: transform;
    transform: rotateX(var(--tilt-deg, 20deg));
}

.orbit-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 10px 35px rgba(0,0,0,0.45), 0 0 25px var(--yellow-glow);
    background: #000;
    transition: transform 300ms ease, box-shadow 300ms ease; /* keep transitions off text-affecting props */
    will-change: transform;
    backface-visibility: hidden;
}

.orbit-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.orbit-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto; /* let engine choose best */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    filter: none;
    display: block;
}

/* Prefer sharper sampling on Chromium/WebKit */
@supports (-webkit-appearance: none) {
    .orbit-thumb img {
        image-rendering: -webkit-optimize-contrast;
    }
}

.hero-orbit:hover .orbit-item,
.hero-orbit:focus-within .orbit-item {
    /* Slightly increase border emphasis when paused */
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 35px var(--yellow-glow);
}

.orbit-item.rim-strong {
    box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 45px rgba(255, 215, 0, 0.22);
    border-color: rgba(255, 215, 0, 0.6);
}

.orbit-item.rim-medium {
    box-shadow: 0 14px 38px rgba(0,0,0,0.55), 0 0 35px rgba(255, 215, 0, 0.16);
    border-color: rgba(255, 215, 0, 0.45);
}

.orbit-item.has-vignette .orbit-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.28) 100%);
    pointer-events: none;
}

/* Adaptive quality: reduce heavy effects when flagged */
.low-perf .orbit-item.rim-medium,
.low-perf .orbit-item.rim-strong {
    box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 18px rgba(255, 215, 0, 0.14);
}

.orbit-item:focus-visible {
    outline: 3px solid var(--yellow-primary);
    outline-offset: 2px;
}


/* ==== ORBIT ITEM METADATA (CARD BOTTOM) ==== */
.orbit-meta {
    background: #0e0e0e;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.08);
    height: 86px;
    overflow: hidden;
    opacity: 1; /* keep text fully opaque */
    transition: color 300ms ease;
    filter: none !important;
}

.orbit-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.6rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orbit-views {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 0.5rem;
}

/* Emphasis states */
.orbit-item.is-front .orbit-meta { opacity: 1; }

.orbit-item.is-front .orbit-title {
    font-weight: 700;
    font-size: 0.7rem;
}

.hero-orbit:hover .orbit-item .orbit-meta,
.hero-orbit:focus-within .orbit-item .orbit-meta { opacity: 1; }

.orbit-item.is-hovered .orbit-meta,
.orbit-item:focus-visible .orbit-meta { opacity: 1; }

/* Ensure text inside card remains crisp: no filters */
.orbit-title,
.orbit-views { filter: none !important; }

/* Hint browsers to use crisper text rasterization on composited layers */
.orbit-meta,
.orbit-title,
.orbit-views {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-synthesis-weight: none;
}

 

/* Safari/WebKit-specific smoothing hook */
@supports (-webkit-appearance: none) {
    .orbit-meta,
    .orbit-title,
    .orbit-views {
        font-smooth: antialiased;
    }
}

.video-placeholder {
    aspect-ratio: 16/9;
    background: var(--dark-secondary);
    border: 2px solid var(--yellow-primary);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px var(--yellow-glow);
}

.video-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 0 50px var(--yellow-glow);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--yellow-primary);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

/* ==== FEATURES SECTION ==== */
.features {
    padding: 6rem 0;
    background: var(--dark-secondary);
    position: relative;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--yellow-primary);
}

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

.feature-card {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.2);
    border-color: var(--yellow-primary);
}

.feature-image {
    margin-bottom: 1.5rem;
}

.thumbnail-placeholder {
    aspect-ratio: 16/9;
    background: var(--dark-bg);
    border: 2px solid var(--yellow-primary);
    border-radius: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.feature-card:hover .thumbnail-placeholder {
    opacity: 1;
    box-shadow: 0 0 20px var(--yellow-glow);
}

.feature-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--yellow-primary);
    margin-bottom: 0.75rem;
}

.feature-description {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* ==== HOW IT WORKS SECTION ==== */
.how-it-works {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.how-it-works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.process-step {
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.process-step:hover {
    border-color: var(--yellow-primary);
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.1);
}

.small-thumbnail {
    aspect-ratio: 16/9;
    background: var(--dark-secondary);
    border: 2px solid var(--yellow-primary);
    border-radius: 8px;
    opacity: 0.8;
}

.prompt-box {
    background: var(--dark-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--yellow-primary);
}

.prompt-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--yellow-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.prompt-box p {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

.result-thumbnail {
    aspect-ratio: 16/9;
    background: var(--dark-secondary);
    border: 2px solid var(--yellow-primary);
    border-radius: 8px;
    box-shadow: 0 0 20px var(--yellow-glow);
    position: relative;
}

.result-thumbnail::after {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0.8;
}

/* ==== DEMO MODAL ==== */
.demo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.demo-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.demo-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.demo-modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.demo-modal.active .demo-modal-container {
    transform: scale(1) translateY(0);
}

.demo-modal-content {
    background: var(--dark-card);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 215, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.demo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    background: linear-gradient(135deg, var(--dark-card) 0%, var(--dark-secondary) 100%);
}

.demo-modal-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--yellow-primary);
    margin: 0;
}

.demo-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.1);
}

.demo-modal-body {
    padding: 0;
    position: relative;
}

.demo-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
    max-height: calc(90vh - 120px); /* Account for header height */
}

/* Responsive video container that adapts to viewport height */
@media (max-height: 600px) {
    .demo-video-container {
        padding-bottom: 40%; /* Reduce aspect ratio on short screens */
        max-height: calc(90vh - 80px);
    }
}

@media (max-height: 500px) {
    .demo-video-container {
        padding-bottom: 30%; /* Further reduce on very short screens */
        max-height: calc(90vh - 60px);
    }
}

.demo-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-video-container iframe.loaded {
    opacity: 1;
}

/* Loading Spinner */
.demo-video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
}

.demo-video-loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top: 4px solid var(--yellow-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

/* ==== ANIMATIONS ==== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==== RESPONSIVE DESIGN ==== */

/* ==== MEDIA QUERIES ==== */
/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    .orbit-item {
        transition: none;
    }
}

/* Desktop-only text rendering hints for orbit metadata */
@media (min-width: 769px) {
    .orbit-meta,
    .orbit-title,
    .orbit-views {
        -webkit-font-smoothing: subpixel-antialiased; /* Blink/WebKit */
        -moz-osx-font-smoothing: grayscale;           /* Firefox/macOS */
        text-rendering: optimizeLegibility;
        font-optical-sizing: auto;
        font-variant-ligatures: none;
        font-kerning: none;
        color: #f5f5f5; /* slightly off-white reduces bloom on LCD */
    }

    /* Let the browser decide compositing each frame; avoid pre-raster softness */
    .hero-orbit .orbit-item {
        will-change: auto;
        transform-style: flat; /* flatten children to reduce warping */
    }

    /* Tiny shadow sometimes nudges subpixel AA on some stacks */
    .orbit-title,
    .orbit-views {
        text-shadow: 0 0 0 rgba(0,0,0,0.01);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto; /* Subtract mobile header height */
        padding: 2rem 0; /* Reduce padding on mobile */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem; /* Reduce gap on mobile */
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-text { order: 1; }
    .orbit-stack { order: 2; }
    .hero-orbit { width: min(98vw, 720px); }
    
    .hero-text {
        order: 1;
    }
    
    .hero-video {
        order: 2;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    /* Orbit badge adjustments */
    .orbit-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
        margin-top: 0.1rem;
        margin-bottom: 0rem; /* pull badge closer to orbit */
    }
    .orbit-badge + .hero-orbit {
        margin-top: 3.5rem; /* ensure a clear gap between badge and orbit on phones */
    }

    .hero {
        min-height: auto; /* Let content determine height instead of forcing full viewport */
        padding: 1.5rem 0; /* Minimal padding for very small screens */
        margin-top: 0; /* Remove any top margin */
    }
    .hero-orbit {
        height: var(--orbit-height, 340px);
        margin-top: clamp(0.5rem, 2.5vw, 0.75rem); /* reduce top space on phones */
        transform: translateX(-4vw); /* nudge orbit left on phones */
    }

    /* Slightly smaller text on phones */
    .orbit-title { font-size: 0.54rem; }
    .orbit-item.is-front .orbit-title { font-size: 0.62rem; }
    .orbit-views { font-size: 0.46rem; }
    
    .hero-headline {
        font-size: 2rem;
    }
    
    .hero-subheadline {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Modal responsive adjustments */
    .demo-modal-container {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .demo-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .demo-modal-title {
        font-size: 1.25rem;
    }
    
    .demo-modal-close {
        padding: 0.25rem;
    }
    
    .demo-video-container {
        max-height: calc(95vh - 100px); /* Adjust for smaller header on mobile */
    }
} 