/* ============================
   CLIC CESTELES — MAIN STYLES
   ============================ */

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

:root {
    /* Brand Colors */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --accent: #06d6a0;
    --accent-light: #34ebc0;

    /* Surfaces */
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #25254a;
    --bg-section: #12121f;
    --bg-light: #16162b;

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0c0;
    --text-muted: #6b6b8d;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.3);

    /* Spacing */
    --section-pad: 100px 0;
    --container-width: 1100px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-med: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ---------- UTILITIES ---------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.accent {
    color: var(--accent);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--primary-light), var(--accent-light));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-med);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.6);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-icon {
    font-size: 1.3em;
}

/* ---------- HEADER / NAV ---------- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background var(--transition-med), box-shadow var(--transition-med);
}

#main-header.scrolled {
    background: rgba(15, 15, 26, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

#main-nav {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

#logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ---------- HERO ---------- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    gap: 60px;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroPulse 6s ease-in-out infinite;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 214, 160, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroPulse 8s ease-in-out infinite reverse;
}

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

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.hero-content {
    max-width: 560px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.8;
}

/* QR Visual */
.hero-qr-visual {
    z-index: 2;
}

.qr-mock {
    width: 260px;
    height: 260px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 4px;
    width: 200px;
    height: 200px;
}

.qr-cell {
    border-radius: 3px;
    transition: all 0.3s ease;
    animation: qrFadeIn 0.5s ease forwards;
    opacity: 0;
}

.qr-cell.filled {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
}

.qr-cell.empty {
    background: rgba(255, 255, 255, 0.03);
}

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

.qr-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: qrGlow 3s ease-in-out infinite;
}

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

/* ---------- SECTIONS ---------- */
.section {
    padding: var(--section-pad);
}

.section-dark {
    background: var(--bg-section);
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ---------- FEATURES GRID ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform var(--transition-med);
}

.feature-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---------- STEPS ---------- */
.steps {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent), transparent);
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    position: relative;
    z-index: 2;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- BENEFITS ---------- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.benefit {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition-med);
}

.benefit:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(124, 58, 237, 0.3);
}

.benefit-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.benefit h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.benefit p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---------- PILOT SECTION ---------- */
.section-pilot {
    background: linear-gradient(180deg, var(--bg-dark), var(--bg-section));
}

.pilot-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 36px;
    text-align: center;
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
}

.pilot-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-med);
}

.pilot-card:hover::after {
    opacity: 1;
}

.pilot-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.pilot-emoji {
    font-size: 2.5rem;
    margin-bottom: 16px;
    letter-spacing: 8px;
}

.pilot-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.pilot-desc {
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
}

/* ---------- CONTACT ---------- */
.contact-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
#main-footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
}

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

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.footer-copy p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- SCROLL ANIMATIONS ---------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    :root {
        --section-pad: 70px 0;
    }

    #hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        gap: 40px;
    }

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(16px);
        padding: 20px;
        gap: 4px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .steps::before {
        left: 18px;
    }

    .step-number {
        min-width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-actions {
        flex-direction: column;
        align-items: center;
    }
}
