/* ============================================
   REMIFY LANDING PAGE
   Modern, animated, branching theme
   ============================================ */

:root {
    --bg-dark: #050508;
    --bg-card: rgba(15, 15, 20, 0.6);
    --cyan: #0ea5e9;
    --teal: #14b8a6;
    --cyan-light: #22d3ee;
    --teal-light: #5eead4;
    --text: #e2e8f0;
    --text-muted: #64748b;
    --text-dim: #475569;
    --gradient: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ============================================
   BACKGROUND CANVAS
   ============================================ */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(5, 5, 8, 0.9) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: rgba(5, 5, 8, 0.95);
    padding: 15px 40px;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 22px;
}

.logo-img {
    width: 36px;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(14, 165, 233, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 40px 80px;
    position: relative;
    z-index: 1;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 13px;
    color: var(--cyan);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-large {
    padding: 20px 40px;
    font-size: 17px;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: floatIn 1s ease 0.5s both;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.demo-window {
    width: 500px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

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

.demo-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-dots {
    display: flex;
    gap: 6px;
}

.demo-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.demo-dots span:first-child { background: #ff5f57; }
.demo-dots span:nth-child(2) { background: #ffbd2e; }
.demo-dots span:last-child { background: #28c840; }

.demo-content {
    padding: 30px;
    position: relative;
    height: 280px;
}

.demo-graph {
    width: 100%;
    height: 100%;
}

/* Animated tree lines */
.tree-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 1.5s ease forwards;
}

.line-1 { animation-delay: 0.3s; }
.line-2 { animation-delay: 0.4s; }
.line-3 { animation-delay: 0.5s; }
.line-4 { animation-delay: 0.8s; }
.line-5 { animation-delay: 0.9s; }
.line-6 { animation-delay: 1.2s; }
.line-7 { animation-delay: 1.3s; }
.line-8 { animation-delay: 1.0s; }
.line-9 { animation-delay: 1.1s; }

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

/* Animated nodes */
.tree-node {
    opacity: 0;
    animation: popIn 0.4s ease forwards;
}

.node-1 { animation-delay: 0.2s; }
.node-2 { animation-delay: 0.6s; }
.node-3 { animation-delay: 0.7s; }
.node-4 { animation-delay: 0.8s; }
.node-5 { animation-delay: 1.0s; }
.node-6 { animation-delay: 1.1s; }
.node-7 { animation-delay: 1.4s; }
.node-8 { animation-delay: 1.5s; }
.node-9 { animation-delay: 1.2s; }
.node-10 { animation-delay: 1.3s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pulse-ring {
    opacity: 0;
    animation: pulseRing 2s ease-out infinite 1s;
}

@keyframes pulseRing {
    0% {
        opacity: 0.8;
        r: 12;
    }
    100% {
        opacity: 0;
        r: 30;
    }
}

/* Demo labels */
.demo-label {
    position: absolute;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.label-1 {
    left: 20px;
    top: 50%;
    animation-delay: 0.5s;
}

.label-2 {
    left: 120px;
    top: 35%;
    animation-delay: 1s;
}

.label-3 {
    right: 60px;
    top: 25%;
    animation-delay: 1.5s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ============================================
   SECTION DIVIDER
   ============================================ */

.section-divider {
    position: relative;
    z-index: 1;
    margin-top: -60px;
}

.section-divider svg {
    display: block;
    width: 100%;
    height: 120px;
}

/* ============================================
   FEATURES SECTION - Orbital Design
   ============================================ */

.features {
    padding: 120px 40px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-label {
    display: inline-block;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 18px;
}

/* Flowing layout */
.features-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Central orbital visual */
.features-visual {
    position: relative;
    width: 450px;
    height: 450px;
    flex-shrink: 0;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(14, 165, 233, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 150px;
    height: 150px;
    animation: pulse-ring 4s ease-in-out infinite;
}

.ring-2 {
    width: 280px;
    height: 280px;
    border-style: dashed;
    animation: rotate-slow 30s linear infinite;
}

.ring-3 {
    width: 400px;
    height: 400px;
    animation: pulse-ring 4s ease-in-out infinite 1s;
}

@keyframes rotate-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse-ring {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.02); }
}

.center-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: center-pulse 3s ease-in-out infinite;
}

.center-logo {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.5));
}

@keyframes center-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Orbiting nodes */
.orbit-node {
    position: absolute;
    width: 56px;
    height: 56px;
    background: var(--bg-card);
    border: 2px solid rgba(14, 165, 233, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.orbit-node svg {
    width: 24px;
    height: 24px;
    color: var(--cyan);
    transition: all 0.3s ease;
}

.orbit-node:hover,
.orbit-node.active {
    transform: scale(1.2);
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.15);
}

.orbit-node:hover svg,
.orbit-node.active svg {
    transform: scale(1.1);
}

/* Position orbit nodes in a circle */
.node-1 { top: 5%; left: 50%; transform: translateX(-50%); }
.node-2 { top: 25%; right: 5%; }
.node-3 { bottom: 25%; right: 5%; }
.node-4 { bottom: 5%; left: 50%; transform: translateX(-50%); }
.node-5 { bottom: 25%; left: 5%; }
.node-6 { top: 25%; left: 5%; }

/* Connecting lines from center to nodes */
.orbit-node::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.3));
    transform-origin: left center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.orbit-node:hover::before,
.orbit-node.active::before {
    opacity: 1;
}

/* Features list */
.features-list {
    flex: 1;
    max-width: 500px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 0;
    opacity: 0.4;
    transform: translateX(20px);
    transition: all 0.5s ease;
    cursor: pointer;
}

.feature-item:hover,
.feature-item.active {
    opacity: 1;
    transform: translateX(0);
}

.feature-line {
    width: 3px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.feature-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--gradient);
    border-radius: 3px;
    transition: height 0.5s ease;
}

.feature-item:hover .feature-line::after,
.feature-item.active .feature-line::after {
    height: 100%;
}

.feature-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-item:not(.active):not(:hover) .feature-content h3 {
    background: none;
    -webkit-text-fill-color: var(--text);
}

.feature-content p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ============================================
   HOW IT WORKS
   ============================================ */

.how-it-works {
    padding: 100px 40px;
    position: relative;
    z-index: 1;
}

.steps {
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 20px;
}

.step:nth-child(odd) {
    flex-direction: row;
}

.step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 80px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.3;
    min-width: 120px;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 400px;
}

.step-visual {
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.step-node {
    border-radius: 50%;
    animation: nodeGlow 3s ease-in-out infinite;
}

.step-node.seed {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.5);
}

.step-node.branch-1,
.step-node.branch-2,
.step-node.branch-3 {
    width: 30px;
    height: 30px;
    background: var(--teal);
}

.step-node.branch-1 { animation-delay: 0s; }
.step-node.branch-2 { animation-delay: 0.3s; }
.step-node.branch-3 { animation-delay: 0.6s; }

.step-node.output {
    width: 60px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.5);
}

@keyframes nodeGlow {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1);
        filter: brightness(1.2);
    }
}

.step-connector {
    max-width: 100px;
    margin: -20px auto;
    opacity: 0.5;
}

.connector-path {
    stroke-dasharray: 5, 5;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -100; }
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    padding: 120px 40px;
    position: relative;
    z-index: 1;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(14, 165, 233, 0.15);
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(20, 184, 166, 0.1);
    top: 50%;
    right: 20%;
    transform: translate(50%, -50%);
    animation: glowPulse 4s ease-in-out infinite 1s;
}

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

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    color: var(--text-muted);
    font-size: 20px;
    margin-bottom: 40px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 18px;
}

.footer-brand .logo-img {
    width: 28px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 13px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

/* AOS-like scroll animations */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

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

@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 60px;
    }
    
    .demo-window {
        width: 100%;
        max-width: 450px;
    }
    
    .step {
        flex-direction: column !important;
        text-align: center;
        gap: 30px;
    }
    
    .step-content p {
        max-width: 100%;
    }
    
    /* Features responsive */
    .features-flow {
        flex-direction: column;
        gap: 60px;
    }
    
    .features-visual {
        width: 320px;
        height: 320px;
    }
    
    .ring-1 { width: 100px; height: 100px; }
    .ring-2 { width: 200px; height: 200px; }
    .ring-3 { width: 300px; height: 300px; }
    
    .orbit-node {
        width: 44px;
        height: 44px;
    }
    
    .orbit-node svg {
        width: 20px;
        height: 20px;
    }
    
    .features-list {
        max-width: 100%;
    }
    
    .feature-item {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 16px 24px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 120px 24px 60px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .features, .how-it-works, .cta-section {
        padding: 60px 24px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

