/* ===== CSS Variables ===== */
:root {
    --color-bg: #0a0a0f;
    --color-bg-secondary: #111118;
    --color-surface: #16161d;
    --color-surface-elevated: #1e1e28;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);

    --color-text: #f4f4f5;
    --color-text-muted: #a1a1aa;
    --color-text-subtle: #71717a;

    --color-primary: #8b5cf6;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-secondary: #6366f1;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Background Elements ===== */
.web-background {
    position: fixed;
    top: -200px;
    right: -200px;
    width: 800px;
    height: 800px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%238b5cf6' stroke-width='0.5' opacity='0.1'%3E%3Cline x1='200' y1='200' x2='200' y2='0'/%3E%3Cline x1='200' y1='200' x2='341' y2='59'/%3E%3Cline x1='200' y1='200' x2='400' y2='200'/%3E%3Cline x1='200' y1='200' x2='341' y2='341'/%3E%3Cline x1='200' y1='200' x2='200' y2='400'/%3E%3Cline x1='200' y1='200' x2='59' y2='341'/%3E%3Cline x1='200' y1='200' x2='0' y2='200'/%3E%3Cline x1='200' y1='200' x2='59' y2='59'/%3E%3Ccircle cx='200' cy='200' r='40'/%3E%3Ccircle cx='200' cy='200' r='80'/%3E%3Ccircle cx='200' cy='200' r='120'/%3E%3Ccircle cx='200' cy='200' r='160'/%3E%3Ccircle cx='200' cy='200' r='200'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    animation: rotateWeb 120s linear infinite;
}

.web-background--secondary {
    top: auto;
    bottom: -300px;
    left: -200px;
    right: auto;
    width: 600px;
    height: 600px;
    opacity: 0.5;
    animation-direction: reverse;
    animation-duration: 150s;
}

@keyframes rotateWeb {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Particles */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
}

.navbar--scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 40px;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar__logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spider-icon {
    width: 100%;
    height: 100%;
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.navbar__title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar__link {
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    position: relative;
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.navbar__link:hover {
    color: var(--color-text);
}

.navbar__link:hover::after {
    width: 100%;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn--primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn--primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, 0.4);
}

.btn--primary:active {
    transform: translateY(0) scale(0.98);
}

.btn--large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn--nav {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn--nav:hover {
    background: var(--color-surface-elevated);
    border-color: var(--color-primary);
}

.btn__arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-glow);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-primary-light);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 60px 80px 120px;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero__content {
    flex: 1;
    max-width: 550px;
    margin-left: auto;
}

.hero__badge {
    margin-bottom: 24px;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.hero__trust {
    font-size: 0.9rem;
    color: var(--color-text-subtle);
}

.hero__visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Web Graphic */
.web-graphic {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.web-svg {
    width: 100%;
    height: 100%;
    animation: pulseWeb 4s ease-in-out infinite;
}

@keyframes pulseWeb {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.web-circle {
    animation: expandCircle 3s ease-in-out infinite;
}

.web-circle:nth-child(1) {
    animation-delay: 0s;
}

.web-circle:nth-child(2) {
    animation-delay: 0.3s;
}

.web-circle:nth-child(3) {
    animation-delay: 0.6s;
}

.web-circle:nth-child(4) {
    animation-delay: 0.9s;
}

@keyframes expandCircle {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

.web-center {
    animation: glowCenter 2s ease-in-out infinite;
}

@keyframes glowCenter {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.8));
    }
}

/* Floating Icons */
.floating-icon {
    position: absolute;
    font-size: 2rem;
    animation: floatIcon 6s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.floating-icon--1 {
    top: 10%;
    right: 15%;
    animation-delay: 0s;
}

.floating-icon--2 {
    bottom: 20%;
    right: 10%;
    animation-delay: 1.5s;
}

.floating-icon--3 {
    top: 25%;
    left: 10%;
    animation-delay: 3s;
}

.floating-icon--4 {
    bottom: 15%;
    left: 20%;
    animation-delay: 4.5s;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* ===== Features Section ===== */
.features {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 64px;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

/* Feature Cards */
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card__icon {
    font-size: 3rem;
    margin-bottom: 24px;
}

.feature-card__title {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.feature-card__text {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ===== How It Works Section ===== */
.how-it-works {
    padding: 120px 0;
    background: var(--color-bg-secondary);
    position: relative;
    z-index: 1;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.step__number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.step__content {
    flex: 1;
    padding-top: 8px;
}

.step__title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.step__text {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.cta-box {
    background: var(--gradient-glow);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 80px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%238b5cf6' stroke-width='0.5' opacity='0.1'%3E%3Cline x1='200' y1='200' x2='200' y2='0'/%3E%3Cline x1='200' y1='200' x2='400' y2='200'/%3E%3Cline x1='200' y1='200' x2='200' y2='400'/%3E%3Cline x1='200' y1='200' x2='0' y2='200'/%3E%3Ccircle cx='200' cy='200' r='60'/%3E%3Ccircle cx='200' cy='200' r='120'/%3E%3Ccircle cx='200' cy='200' r='180'/%3E%3C/g%3E%3C/svg%3E") center/cover no-repeat;
    pointer-events: none;
}

.cta-box__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 16px;
    position: relative;
}

.cta-box__text {
    color: var(--color-text-muted);
    font-size: 1.15rem;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 30px;
    position: relative;
    z-index: 1;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 32px;
}

.footer__brand .navbar__title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    display: block;
}

.footer__tagline {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.footer__links {
    display: flex;
    gap: 32px;
}

.footer__links a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--color-primary-light);
}

.footer__bottom {
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-subtle);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 24px 60px;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__cta {
        align-items: center;
    }

    .hero__visual {
        min-height: 300px;
    }

    .web-graphic {
        width: 300px;
        height: 300px;
    }

    .navbar {
        padding: 16px 24px;
    }

    .navbar__links {
        gap: 16px;
    }

    .navbar__link {
        display: none;
    }

    .step {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .cta-box {
        padding: 60px 32px;
    }

    .footer__content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .btn--large {
        padding: 16px 32px;
        font-size: 1rem;
    }

    .features__grid {
        grid-template-columns: 1fr;
    }

    .floating-icon {
        display: none;
    }
}

/* ===== 3D Feature Ring ===== */
.library-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 500px;
}

.library-showcase__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    margin: 0;
}

.ring-container {
    width: 100%;
    height: 320px;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ring {
    width: 280px;
    height: 280px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-card {
    position: absolute;
    width: 280px;
    height: 280px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backface-visibility: hidden;
    transition: all 0.5s ease;
    cursor: pointer;
}

/* Position cards in 3D space - 3 cards, 120 degrees apart */
.ring-card[data-index="0"] {
    transform: rotateY(0deg) translateZ(200px);
}

.ring-card[data-index="1"] {
    transform: rotateY(120deg) translateZ(200px);
}

.ring-card[data-index="2"] {
    transform: rotateY(240deg) translateZ(200px);
}

.ring-card--active,
.ring-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* Removed the ::before line - cards now have clean rounded corners */

.ring-card__icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.ring-card__title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.ring-card__text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Navigation Dots */
.ring-nav {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.ring-nav__dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ring-nav__dot:hover {
    border-color: var(--color-primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.ring-nav__dot--active {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: scale(1.15);
    box-shadow: var(--shadow-glow);
}

/* Hero visual adjustments for the ring */
.hero__visual {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 20px;
}

/* ===== Responsive for 3D Ring ===== */
@media (max-width: 1100px) {
    .hero {
        flex-direction: column;
        gap: 60px;
        padding-top: 140px;
    }

    .hero__content {
        text-align: center;
        max-width: 100%;
    }

    .hero__cta {
        align-items: center;
    }

    .library-showcase {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .ring-container {
        height: 280px;
        perspective: 800px;
    }

    .ring {
        width: 240px;
        height: 240px;
    }

    .ring-card {
        width: 240px;
        height: 240px;
        padding: 24px 20px;
    }

    .ring-card[data-index="0"] {
        transform: rotateY(0deg) translateZ(150px);
    }

    .ring-card[data-index="1"] {
        transform: rotateY(120deg) translateZ(150px);
    }

    .ring-card[data-index="2"] {
        transform: rotateY(240deg) translateZ(150px);
    }

    .ring-card__icon {
        font-size: 2.5rem;
    }

    .ring-card__title {
        font-size: 1.1rem;
    }

    .ring-card__text {
        font-size: 0.8rem;
    }

    .ring-nav__dot {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}