/* ============================================================================
   RGUI Animator — Premium Dark Mode Design
   Inspired by Linear, Vercel, Raycast
   ============================================================================ */

/* CSS Variables */
:root {
    --bg-primary: #050507;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #111118;
    --bg-elevated: #16161f;
    --bg-card: rgba(17, 17, 24, 0.6);

    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --accent-pink: #ec4899;
    --accent-success: #22c55e;
    --accent-warning: #fbbf24;
    --accent-error: #ef4444;

    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-muted: #4b5563;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(99, 102, 241, 0.4);

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --max-width: 1200px;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================================================
   Background Effects
   ============================================================================ */
.gradient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    transition: transform 0.3s ease-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    top: -200px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
    top: 400px;
    right: -150px;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
    bottom: 200px;
    left: 20%;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ============================================================================
   Container
   ============================================================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

/* ============================================================================
   Navigation
   ============================================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark svg {
    width: 32px;
    height: 32px;
    display: block;
}

.logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-cta i {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.nav-cta:hover {
    background: var(--bg-card);
    border-color: var(--border-accent);
}

.nav-cta:hover i {
    transform: translateX(2px);
}

/* ============================================================================
   Hero
   ============================================================================ */
.hero {
    padding: 180px 0 120px;
    text-align: center;
    position: relative;
}

.hero-eyebrow {
    margin-bottom: 32px;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.hero-headline {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.hero-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3), 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5), 0 8px 30px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: rgba(99, 102, 241, 0.05);
}

.btn-lg {
    padding: 18px 32px;
    font-size: 1rem;
}

/* Hero Metrics */
.hero-metrics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.metric-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* ============================================================================
   Bento Grid
   ============================================================================ */
.bento-section {
    padding: 120px 0;
}

.section-intro {
    text-align: center;
    margin-bottom: 60px;
}

.section-intro h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.text-muted {
    color: var(--text-tertiary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-top: 12px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.bento-card:hover {
    border-color: var(--border-default);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bento-card-inner {
    padding: 28px;
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-large .bento-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bento-large .bento-visual {
    flex: 1;
    margin-bottom: 24px;
}

.bento-accent {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.bento-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.bento-icon i {
    width: 22px;
    height: 22px;
    color: white;
}

.bento-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Timeline Visual */
.timeline-visual {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-mock {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-track {
    position: relative;
    height: 32px;
    background: var(--bg-elevated);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.timeline-playhead {
    position: absolute;
    left: 35%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-error);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    z-index: 10;
}

.kf {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--accent-warning);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.kf-1 {
    left: 10%;
}

.kf-2 {
    left: 45%;
}

.kf-3 {
    left: 85%;
}

.kf-4 {
    left: 25%;
}

.kf-5 {
    left: 70%;
}

/* ============================================================================
   Graph Editor Showcase
   ============================================================================ */
.graph-showcase {
    padding: 140px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.graph-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.badge-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.badge i {
    width: 14px;
    height: 14px;
}

.graph-content h2 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.graph-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-bullet {
    width: 6px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

.feature-list span {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.feature-list strong {
    color: var(--text-primary);
}

/* Graph Window */
.graph-visual {
    display: flex;
    justify-content: center;
}

.graph-window {
    width: 100%;
    max-width: 480px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.window-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #fbbf24;
}

.dot.green {
    background: #22c55e;
}

.window-title {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
    letter-spacing: 0.02em;
}

.graph-canvas-container {
    padding: 24px;
    position: relative;
}

.graph-svg {
    width: 100%;
    height: 200px;
    display: block;
}

.curve-glow-path,
.curve-main-path {
    animation: draw-curve 2s ease-out forwards;
}

@keyframes draw-curve {
    from {
        stroke-dasharray: 400;
        stroke-dashoffset: 400;
    }

    to {
        stroke-dasharray: 400;
        stroke-dashoffset: 0;
    }
}

.control-handle {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.graph-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.6875rem;
    margin-top: 16px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================================================
   How Section
   ============================================================================ */
.how-section {
    padding: 120px 0;
}

.steps-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    flex: 1;
    text-align: center;
    padding: 0 24px;
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
}

.step-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--border-subtle);
    margin-top: 32px;
    flex-shrink: 0;
}

/* ============================================================================
   Docs Section
   ============================================================================ */
.docs-section {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.doc-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.doc-card-wide {
    grid-column: span 2;
}

.doc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.doc-header i {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.doc-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.code-block {
    padding: 20px 24px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: #e4e4e7;
}

.kw {
    color: #c792ea;
}

.fn {
    color: #82aaff;
}

.st {
    color: #c3e88d;
}

.cm {
    color: #5c6370;
    font-style: italic;
}

/* API Grid */
.api-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 24px;
}

.api-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.api-item code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.api-item span {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* ============================================================================
   Easing Section
   ============================================================================ */
.easing-section {
    padding: 100px 0;
}

.easing-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.easing-item {
    text-align: center;
}

.easing-preview {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}

.easing-item:hover .easing-preview {
    border-color: var(--border-default);
}

.easing-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.easing-item.featured .easing-preview {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.easing-item span {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Easing Ball */
.easing-ball {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Ball animation on hover - slides from left to right */
.easing-item:hover .easing-ball {
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
}

.easing-item:hover .linear .easing-ball {
    animation-name: slide-linear;
    animation-timing-function: linear;
}

.easing-item:hover .ease-out .easing-ball {
    animation-name: slide-linear;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.easing-item:hover .ease-in .easing-ball {
    animation-name: slide-linear;
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
}

.easing-item:hover .ease-in-out .easing-ball {
    animation-name: slide-linear;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.easing-item:hover .bounce .easing-ball {
    animation-name: slide-bounce;
}

.easing-item:hover .elastic .easing-ball {
    animation-name: slide-elastic;
}

.easing-item:hover .back .easing-ball {
    animation-name: slide-back;
}

.easing-item:hover .custom .easing-ball {
    animation-name: slide-custom;
}

@keyframes slide-linear {
    0% {
        left: 8px;
    }

    100% {
        left: calc(100% - 18px);
    }
}

@keyframes slide-bounce {
    0% {
        left: 8px;
    }

    65% {
        left: calc(100% - 18px);
    }

    75% {
        left: calc(100% - 28px);
    }

    85% {
        left: calc(100% - 18px);
    }

    92% {
        left: calc(100% - 23px);
    }

    100% {
        left: calc(100% - 18px);
    }
}

@keyframes slide-elastic {
    0% {
        left: 8px;
        transform: translateY(-50%) scaleX(1);
    }

    40% {
        left: calc(100% - 10px);
        transform: translateY(-50%) scaleX(1.3);
    }

    55% {
        left: calc(100% - 30px);
        transform: translateY(-50%) scaleX(0.9);
    }

    70% {
        left: calc(100% - 15px);
        transform: translateY(-50%) scaleX(1.1);
    }

    85% {
        left: calc(100% - 20px);
        transform: translateY(-50%) scaleX(0.95);
    }

    100% {
        left: calc(100% - 18px);
        transform: translateY(-50%) scaleX(1);
    }
}

@keyframes slide-back {
    0% {
        left: 8px;
    }

    20% {
        left: 0px;
    }

    100% {
        left: calc(100% - 18px);
    }
}

@keyframes slide-custom {
    0% {
        left: 8px;
    }

    30% {
        left: calc(50% - 5px);
    }

    50% {
        left: calc(40% - 5px);
    }

    100% {
        left: calc(100% - 18px);
    }
}

/* ============================================================================
   Presets Section
   ============================================================================ */
.presets-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.preset-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.preset-card:hover {
    border-color: var(--border-default);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.preset-demo {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
}

.demo-box {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.preset-info {
    padding: 16px;
    text-align: center;
}

.preset-info h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.preset-info span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Preset Animations on Hover */
.fade-demo .demo-box {
    opacity: 0.2;
    transition: opacity 0.4s ease-out;
}

.preset-card:hover .fade-demo .demo-box {
    opacity: 1;
}

.slide-demo .demo-box {
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0, 0, 0.2, 1);
}

.preset-card:hover .slide-demo .demo-box {
    transform: translateX(0);
    opacity: 1;
}

.pop-demo .demo-box {
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preset-card:hover .pop-demo .demo-box {
    transform: scale(1);
}

.preset-card:hover .bounce-demo .demo-box {
    animation: preset-bounce 0.6s ease;
}

.preset-card:hover .elastic-demo .demo-box {
    animation: preset-elastic 0.8s ease;
}

.preset-card:hover .shake-demo .demo-box {
    animation: preset-shake 0.5s ease;
}

.preset-card:hover .pulse-demo .demo-box {
    animation: preset-pulse 1s ease infinite;
}

.preset-card:hover .spin-demo .demo-box {
    animation: preset-spin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes preset-bounce {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }

    50% {
        transform: translateY(-10px);
        opacity: 1;
    }

    70% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes preset-elastic {
    0% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.2);
    }

    60% {
        transform: scale(0.9);
    }

    80% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes preset-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

@keyframes preset-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    }
}

@keyframes preset-spin {
    0% {
        transform: rotate(0deg) scale(0);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* ============================================================================
   CTA Section
   ============================================================================ */
.cta-section {
    padding: 100px 0;
}

.cta-card {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.05) 50%, rgba(236, 72, 153, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.cta-card h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    position: relative;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 32px;
    position: relative;
}

.cta-card .btn {
    position: relative;
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-copy {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .graph-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .feature-list {
        max-width: 400px;
        margin: 0 auto;
        text-align: left;
    }

    .easing-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 140px 0 80px;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-metrics {
        gap: 20px;
        flex-wrap: wrap;
    }

    .metric-divider {
        display: none;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-large {
        grid-column: span 1;
    }

    .steps-track {
        flex-direction: column;
        gap: 32px;
    }

    .step-connector {
        width: 2px;
        height: 32px;
        margin: 0 auto;
    }

    .docs-grid {
        grid-template-columns: 1fr;
    }

    .doc-card-wide {
        grid-column: span 1;
    }

    .api-grid {
        grid-template-columns: 1fr;
    }

    .easing-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .graph-content h2 {
        font-size: 2rem;
    }

    .cta-card {
        padding: 48px 24px;
    }

    .cta-card h2 {
        font-size: 1.75rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ============================================================================
   Pricing Section
   ============================================================================ */
.pricing-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto 60px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.price-card:hover {
    border-color: var(--border-default);
    transform: translateY(-4px);
}

.price-card-featured {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.15);
}

.price-card-featured:hover {
    border-color: rgba(99, 102, 241, 0.6);
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-header {
    text-align: center;
    margin-bottom: 20px;
}

.price-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.price-icon i {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.price-icon-pro {
    background: var(--gradient-primary);
}

.price-icon-pro i {
    color: white;
}

.price-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.price-tagline {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.price-amount {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.price-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.price-card-featured .price-value {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: 4px;
}

.price-features {
    list-style: none;
    flex: 1;
    margin-bottom: 28px;
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.price-features li i {
    width: 18px;
    height: 18px;
    color: var(--accent-success);
    flex-shrink: 0;
}

.feature-disabled {
    opacity: 0.5;
}

.feature-disabled i {
    color: var(--text-tertiary) !important;
}

.feature-highlight {
    color: var(--text-primary) !important;
}

.feature-highlight i {
    color: var(--accent-secondary) !important;
}

/* Button variants */
.btn-accent {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: white;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3), 0 4px 20px rgba(168, 85, 247, 0.3);
}

.btn-accent:hover {
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.5), 0 8px 30px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    width: 100%;
    justify-content: center;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.btn-glow {
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3), 0 4px 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5), 0 8px 40px rgba(99, 102, 241, 0.5);
    }
}

.price-card .btn {
    width: 100%;
    justify-content: center;
}

/* FAQ Section */
.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-faq h4 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.faq-item strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Discord Section
   ============================================================================ */
.discord-section {
    padding: 80px 0;
}

.discord-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.12) 0%, rgba(88, 101, 242, 0.05) 100%);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.discord-content {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.discord-logo {
    width: 64px;
    height: 64px;
    background: #5865F2;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.discord-logo svg {
    width: 36px;
    height: 28px;
    color: white;
}

.discord-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.discord-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.discord-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
}

.discord-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.discord-feature i {
    width: 16px;
    height: 16px;
    color: #5865F2;
}

.btn-discord {
    background: #5865F2;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.3), 0 4px 20px rgba(88, 101, 242, 0.3);
}

.btn-discord:hover {
    background: #4752C4;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.5), 0 8px 30px rgba(88, 101, 242, 0.4);
    transform: translateY(-2px);
}

.btn-discord svg {
    color: white;
}

@media (max-width: 768px) {
    .discord-content {
        flex-direction: column;
        text-align: center;
    }

    .discord-features {
        flex-direction: column;
        gap: 12px;
    }
}