/* ROOT VARIABLES */
:root {
    --bg-dark: #0a0a0c;
    --bg-card: #151518;
    --bg-card-hover: #1e1e24;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a5;
    --accent-red: #ED1C24; /* AMD Red */
    --accent-glow: rgba(237, 28, 36, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

img {
    max-width: 100%;
    display: block;
}

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

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h3.subtitle {
    font-family: var(--font-body);
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.text-center { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }
.center { margin-left: auto; margin-right: auto; text-align: center; }

/* SPANS & HIGHLIGHTS */
h1 span, h2 span, .logo span {
    color: var(--accent-red);
    text-shadow: 0 0 15px rgba(237, 28, 36, 0.6);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    border: 1px solid var(--accent-red);
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.3);
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 15px rgba(237, 28, 36, 0.2); }
    to { box-shadow: 0 0 35px rgba(237, 28, 36, 0.5); }
}

.btn-primary:hover {
    background-color: transparent;
    box-shadow: 0 0 40px rgba(237, 28, 36, 0.6);
    animation: none;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: white;
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent-red);
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.btn-outline:hover {
    background-color: var(--accent-red);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.navbar.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn-outline) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.nav-links a:not(.btn-outline):hover {
    color: white;
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

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

.hero-bg .bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    animation: slowZoom 20s infinite alternate linear;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 12, 0.3) 0%, rgba(10, 10, 12, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
}

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

@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* SECTIONS BASE */
section:not(.hero) {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    margin-bottom: 4rem;
}

/* THE PROBLEM */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.problem-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.problem-card:hover {
    transform: translateY(-5px);
    border-color: rgba(237, 28, 36, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: var(--bg-card-hover);
}

.card-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-red);
    margin-bottom: 1.5rem;
}

.problem-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.problem-card p {
    margin-bottom: 0;
    font-size: 1rem;
}

/* THE SOLUTION */
.solution-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.solution-content .text-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.solution-content p {
    margin-left: auto;
    margin-right: auto;
}

.solution-content .feature-list {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.solution-content .feature-list li {
    flex: 1 1 200px;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.feature-list .bullet {
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-red);
}

.feature-list strong {
    display: block;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.feature-list span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* COMPARISON SLIDER */
.comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    cursor: col-resize;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-image {
    /* We use clip-path to show 50% of the image from the left without squishing it */
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    z-index: 2;
}

.after-image {
    z-index: 1;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--accent-red);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 3;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 15px rgba(237, 28, 36, 0.5);
}

.slider-button svg {
    width: 20px;
    height: 20px;
}

.label {
    position: absolute;
    bottom: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

.before-image .label { right: 1rem; }
.after-image .label { left: 1rem; }

/* PIPELINE */
.diagram-container {
    width: 100%;
    max-width: 700px;
    margin: 3rem auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 40px rgba(237, 28, 36, 0.1);
}

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

.tech-item {
    padding: 2rem;
    background: linear-gradient(180deg, var(--bg-card) 0%, transparent 100%);
    border-top: 2px solid var(--accent-red);
    border-radius: 4px;
}

.tech-step {
    color: var(--accent-red);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 1rem;
}

.tech-item h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* PERFORMANCE */
.performance {
    background: radial-gradient(circle at center, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.perf-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.small-text {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 2rem;
}

.stat-card {
    background: rgba(10, 10, 12, 0.5);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-value .unit {
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-left: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.stat-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar .fill {
    height: 100%;
    background: var(--accent-red);
}

.stat-bar .fill.min { width: 65%; }
.stat-bar .fill.max { width: 100%; }

.perf-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.perf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(237, 28, 36, 0.1);
    border: 1px solid rgba(237, 28, 36, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
}

.perf-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent-red);
}

/* GENERALIZATION */
.gen-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.gen-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

.image-label {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

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

.app-card {
    position: relative;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(237, 28, 36, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition-fast);
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: rgba(237, 28, 36, 0.3);
}

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

.app-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.app-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    position: relative;
}

/* DEMO SECTION */
.demo-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.demo-text p {
    margin-left: auto;
    margin-right: auto;
}

.demo-content .feature-list {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.demo-content .feature-list li {
    max-width: 400px;
    width: 100%;
}

.hero-buttons.center {
    justify-content: center;
}

.demo-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background: var(--bg-card);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(237, 28, 36, 0.1) 0%, transparent 100%);
    cursor: pointer;
    transition: var(--transition-fast);
}

.video-placeholder:hover {
    background: linear-gradient(135deg, rgba(237, 28, 36, 0.2) 0%, transparent 100%);
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.4);
    transition: transform var(--transition-fast);
}

.play-button svg {
    width: 24px;
    height: 24px;
    color: white;
    margin-left: 4px;
}

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

.video-placeholder span {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-primary);
}

/* CTA */
    background: linear-gradient(to top, rgba(237, 28, 36, 0.05) 0%, transparent 100%);
    padding: 10rem 0;
}

.cta h2 {
    font-size: clamp(3rem, 6vw, 5rem);
}

.footer-note {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-note strong {
    color: white;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: var(--bg-dark);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.copyright {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    margin-bottom: 0;
}



/* ANIMATIONS */
.fade-up-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .solution-content, .perf-wrapper, .gen-content {
        grid-template-columns: 1fr;
    }
    
    .tech-stack-grid {
        grid-template-columns: 1fr;
    }
    
    .visual-content {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile menu approach for now */
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    section:not(.hero) {
        padding: 5rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
