/* Design System */
:root {
    /* Brand Colors */
    --color-primary: #ff8c42;
    --color-primary-dark: #ff6b35;
    --color-primary-light: #ffad42;
    
    /* Neutrals */
    --color-background: #0d0d0d;
    --color-surface: #1a1a1a;
    --color-border: #2a2a2a;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.7);
    --color-text-subtle: rgba(255, 255, 255, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ff8c42, #ff6b35);
    --gradient-surface: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    
    /* Typography */
    --font-primary: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 {
    transition-delay: 0.1s;
}

.animate-delay-2 {
    transition-delay: 0.2s;
}

.animate-delay-3 {
    transition-delay: 0.3s;
}

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

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

.bg-effect {
    position: absolute;
    inset: -20px;
    background: url('images/header/5.jpg') center center;
    background-size: cover;
    opacity: 0.15;
    filter: blur(10px) brightness(0.7);
    animation: bgMove 30s ease-in-out infinite;
}

@keyframes bgMove {
    0% {
        transform: translate(0, 0) scale(1.5) rotate(0deg);
    }
    25% {
        transform: translate(-40px, 20px) scale(1.7) rotate(1deg);
    }
    50% {
        transform: translate(20px, -30px) scale(1.6) rotate(-1deg);
    }
    75% {
        transform: translate(30px, 40px) scale(1.8) rotate(1deg);
    }
    100% {
        transform: translate(0, 0) scale(1.5) rotate(0deg);
    }
}

.hero-content {
    grid-area: title;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 1s ease-out;
}

.hero-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.hero-cta {
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: auto;
    background: transparent;
    border-radius: 16px;
    padding: 24px;
}

.effect-chain {
    display: grid;
    grid-template-areas:
        "node1 node2 . ."
        "title node5 node6 node7"
        "node3 node4 . .";
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 40px 30px;
    padding: 40px;
    position: relative;
    width: 100%;
    min-height: 60vh;
    align-items: center;
}

.connectors {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.connector-path {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-dasharray: 5,5;
    opacity: 0.8;
}

.node {
    position: relative;
    z-index: 1;
    width: 200px;
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    justify-self: center;
}

#node1 { grid-area: node1; }
#node2 { grid-area: node2; }
#node3 { grid-area: node3; }
#node4 { grid-area: node4; }
#node5 { grid-area: node5; }
#node6 { grid-area: node6; }
#node7 { grid-area: node7; }

.node-number {
    position: absolute;
    top: -20px;
    left: 0;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.node-number {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 24px;
    height: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.node-preview {
    aspect-ratio: 16/9;
    background: var(--color-background);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder backgrounds */
.node-preview[class*="placeholder-"] {
    background: linear-gradient(135deg, var(--color-surface), var(--color-border));
    position: relative;
    overflow: hidden;
}

.node-preview[class*="placeholder-"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    background: var(--color-primary);
    opacity: 0.1;
    border-radius: 50%;
}

.placeholder-1 { background: linear-gradient(135deg, #2a2a2a, #3a3a3a); }
.placeholder-2 { background: linear-gradient(135deg, #3a2a2a, #4a3a3a); }
.placeholder-3 { background: linear-gradient(135deg, #2a3a2a, #3a4a3a); }
.placeholder-4 { background: linear-gradient(135deg, #2a2a3a, #3a3a4a); }
.placeholder-5 { background: linear-gradient(135deg, #3a3a2a, #4a4a3a); }
.placeholder-6 { background: linear-gradient(135deg, #2a3a3a, #3a4a4a); }

.node-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

.connector {
    display: flex;
    align-items: center;
    padding: 0 4px;
    margin-top: 60px;
}

.connector-line {
    stroke-dasharray: 5,5;
    animation: flowLine 2s linear infinite;
}

.connector {
    width: 40px;
    height: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connector-line {
    animation: flowLine 2s linear infinite;
}

@keyframes flowLine {
    0% { stroke-dasharray: 5,5; stroke-dashoffset: 20; }
    100% { stroke-dasharray: 5,5; stroke-dashoffset: 0; }
}

@keyframes glitchSlide {
    0% { background-position: 0 0; }
    100% { background-position: 100px 0; }
}

@keyframes resultPreview {
    0% {
        background-position: 0 0;
        filter: blur(1px);
    }
    50% {
        background-position: 100px 100px;
        filter: blur(2px);
    }
    100% {
        background-position: 0 0;
        filter: blur(1px);
    }
}

/* Intro Section */
.intro {
    padding: 5rem 0;
    background: var(--color-background);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 30%, var(--color-primary) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, var(--color-primary) 0%, transparent 60%);
    opacity: 0.03;
    pointer-events: none;
}

.intro-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.intro-reverse {
    direction: rtl;
}

.intro-reverse .intro-text {
    direction: ltr;
}

.intro-text {
    position: relative;
}

.intro-heading {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    position: relative;
    letter-spacing: -0.02em;
}

.intro-heading::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
}

.intro-visual {
    position: relative;
}

.intro-screenshot-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: visible;
}

.screenshot-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(
        circle at center,
        rgba(255, 140, 66, 0.15) 0%,
        rgba(255, 140, 66, 0.05) 40%,
        transparent 70%
    );
    filter: blur(30px);
    z-index: 0;
    animation: glowPulse 4s ease-in-out infinite;
}

.screenshot-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow:
        0 20px 60px -20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 140, 66, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshot-placeholder:hover {
    transform: translateY(-8px);
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 140, 66, 0.2);
}

.screenshot-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 140, 66, 0.1) 0%,
        transparent 50%,
        rgba(255, 107, 53, 0.1) 100%
    );
    opacity: 0.5;
}

.screenshot-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--color-text-subtle);
    letter-spacing: 0.1em;
}

/* Feature Sections */
.feature {
    padding: 5rem 0;
    background: var(--color-surface);
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 3rem, 100% 100%, 0 calc(100% - 3rem));
    margin-top: -3rem;
}

.feature::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3rem;
    background: inherit;
    bottom: -1.5rem;
    transform: skewY(-2deg);
    transform-origin: 100%;
    z-index: 1;
    pointer-events: none;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, var(--color-primary-dark) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--color-primary) 0%, transparent 50%);
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.feature:nth-child(odd) {
    background: var(--color-background);
}

.feature:nth-child(odd)::before {
    background-image: 
        radial-gradient(circle at 80% 20%, var(--color-primary-light) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, var(--color-primary) 0%, transparent 50%);
    opacity: 0.03;
}

.feature-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 2rem;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.feature-text {
    max-width: 600px;
}

.feature:nth-child(odd) .feature-content {
    direction: rtl;
}

.feature:nth-child(odd) .feature-text {
    direction: ltr;
}

.feature:nth-child(odd) .carousel {
    direction: ltr;
}

.feature-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.feature-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-primary-light),
        var(--color-primary),
        var(--color-primary-dark),
        var(--color-primary),
        var(--color-primary-light)
    );
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    border-radius: 3px;
    opacity: 0.8;
}

@keyframes gradientMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.feature-description {
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.feature-visual {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--gradient-surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-visual::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: linear-gradient(
        45deg,
        var(--color-primary-light),
        var(--color-primary),
        var(--color-primary-dark)
    );
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    filter: blur(20px);
}

.feature-visual:hover {
    transform: perspective(1000px) rotateY(-2deg) translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

.feature-visual:hover::before {
    opacity: 0.15;
}

.feature:nth-child(odd) .feature-visual {
    transform: perspective(1000px) rotateY(5deg);
}

.feature:nth-child(odd) .feature-visual:hover {
    transform: perspective(1000px) rotateY(2deg) translateY(-5px);
}

.feature-visual .carousel {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-visual:hover .carousel {
    transform: scale(1.02);
}

.feature-visual::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--color-surface);
    border-radius: inherit;
    z-index: 1;
}

.feature-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0.15;
    z-index: 2;
    mix-blend-mode: overlay;
}

/* Carousel Styles */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 4;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-button.prev {
    left: 16px;
}

.carousel-button.next {
    right: 16px;
}

.carousel:hover .carousel-button {
    opacity: 1;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
    .carousel-button {
        display: none;
    }
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-text);
    opacity: 0.3;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.carousel-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    opacity: 0.5;
}

.carousel-dot.active {
    opacity: 1;
    background: var(--color-primary);
}

.carousel-dot.active::after {
    opacity: 0.2;
    transform: scale(1);
}

.feature-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    border: 1px solid var(--color-primary);
    position: relative;
    box-shadow: 0 0 10px rgba(255, 140, 66, 0.1);
    transition: all 0.3s ease;
}

.feature-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(
        45deg,
        var(--color-primary-light),
        var(--color-primary),
        var(--color-primary-dark)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.8;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

.feature-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(255, 140, 66, 0.2);
}

.feature-badge:hover::before {
    animation: glowPulse 1s ease-in-out infinite;
}

/* Interactive Elements */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 10px 20px -10px rgba(255, 140, 66, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 20px 30px -10px rgba(255, 140, 66, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

.button svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Responsive Design */
@media (max-width: 1280px) {
    .container {
        max-width: 1024px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-visual {
        width: 45%;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero-visual {
        width: 50%;
        height: 60vh;
    }

    .feature-content {
        gap: 3rem;
    }

    .feature-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .section {
        min-height: auto;
        padding: 4rem 0;
    }

    .hero {
        padding: 6rem 0;
        min-height: auto;
    }

    .intro {
        padding: 4rem 0;
        min-height: auto;
    }

    .intro-wrapper {
        gap: 3rem;
    }

    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-heading {
        font-size: 2rem;
    }

    .intro-heading::before {
        left: -1.5rem;
        width: 3px;
    }

    .intro-visual {
        order: -1;
    }

    .intro-reverse {
        direction: ltr;
    }

    .feature {
        padding: 4rem 0;
        clip-path: polygon(0 0, 100% 1.5rem, 100% 100%, 0 calc(100% - 1.5rem));
        margin-top: -1.5rem;
    }

    .feature::after {
        height: 1.5rem;
        bottom: -0.75rem;
    }

    .hero-content {
        position: relative;
        transform: none;
        left: auto;
        top: auto;
        text-align: center;
        margin: 0 auto;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-visual {
        display: none;
    }

    .feature-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr !important;
    }

    .feature-text {
        text-align: center;
        margin: 0 auto;
    }

    .feature-visual {
        order: -1;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .feature-title {
        font-size: 1.75rem;
    }

    .feature-description {
        font-size: 1rem;
    }

    .feature-badge {
        font-size: 0.75rem;
    }

    .button {
        width: 100%;
        justify-content: center;
    }
}
