/* Root Variables & Colors */
:root {
    /* Backgrounds */
    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    /* Primary Accent: #1ABC9C */
    --primary-50: #e8f8f5;
    --primary-100: #d1f2eb;
    --primary-200: #a3e4d7;
    --primary-300: #76d7c4;
    --primary-400: #48c9b0;
    --primary-500: #1abc9c;
    --primary-600: #17a589;
    --primary-700: #148f77;
    --primary-800: #117864;
    --primary-900: #0e6251;

    /* RGB representation for rgba layers */
    --primary-rgb: 26, 188, 156;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #E4E4E7;
    --text-tertiary: #A1A1AA;
    --text-quaternary: #71717A;

    /* Secondary Accents */
    --success: #22C55E;
    --info: #3B82F6;
    --warning: #F59E0B;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
}

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

/* Typography Hierarchy */
h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 76px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title-alt {
    font-size: 40px !important;
}

@media (max-width: 768px) {
    .section-title-alt {
        font-size: 28px !important;
    }
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--primary-500);
}

.text-center {
    text-align: center;
}

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.wrapper {
    padding: 80px 0;
}

/* Buttons */
button,
.btn-primary,
.btn-outline {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg,
            var(--primary-600) 0%,
            var(--primary-500) 30%,
            var(--primary-400) 60%,
            var(--primary-500) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    color: #ffffff;
    border: none;
    box-shadow:
        0 0 0 1px rgba(var(--primary-rgb), 0.5),
        0 4px 24px rgba(var(--primary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
    box-shadow:
        0 0 0 2px rgba(var(--primary-rgb), 0.8),
        0 8px 40px rgba(var(--primary-rgb), 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--primary-500);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-4px) scale(1.04);
}

.mt-4 {
    margin-top: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

.download-button {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.download-button:hover {
    transform: scale(1.15) translateY(-8px);
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

.download-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 45%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.1) 55%,
            transparent 100%);
    transition: all 0.6s ease;
    transform: rotate(45deg);
    pointer-events: none;
}

.download-button:hover::after {
    left: 100%;
}

/* Glow Effects */
.glow-primary {
    filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.6)) drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.4)) drop-shadow(0 0 60px rgba(var(--primary-rgb), 0.3));
}

.glow-text {
    text-shadow:
        0 0 10px rgba(var(--primary-rgb), 0.8),
        0 0 20px rgba(var(--primary-rgb), 0.4);
}

/* Glassmorphism Card */
.glass-card {
    background: linear-gradient(135deg,
            rgba(var(--primary-rgb), 0.08) 0%,
            rgba(var(--primary-rgb), 0.04) 50%,
            rgba(var(--primary-rgb), 0.08) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(var(--primary-rgb), 0.8);
    box-shadow:
        0 0 30px rgba(var(--primary-rgb), 0.3),
        0 0 60px rgba(var(--primary-rgb), 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-10px) scale(1.02);
    background: linear-gradient(135deg,
            rgba(var(--primary-rgb), 0.2) 0%,
            rgba(var(--primary-rgb), 0.1) 50%,
            rgba(var(--primary-rgb), 0.2) 100%);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 16px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

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

.nav-actions {
    display: flex;
    gap: 16px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1000;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Toggle Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(24px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.active {
    right: 0;
}

.mobile-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 24px; /* Adjusted size for Inter font */
    color: var(--text-primary);
    text-transform: none; /* Changed from uppercase to mixed case */
    letter-spacing: normal;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.mobile-nav-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-link:hover, 
.mobile-nav-link:active {
    color: var(--primary-500) !important;
    text-shadow: 0 0 10px var(--primary-500), 
                 0 0 20px var(--primary-500), 
                 0 0 40px rgba(var(--primary-rgb), 0.8);
    transform: scale(1.1);
}

.mobile-nav-link:active {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* Staggered animation for mobile links */
.mobile-nav-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav-overlay.active .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.top-label {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-400);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 24px 0 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

/* Particles & Sphere */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-500);
    opacity: 0;
    animation: float-particle 20s infinite ease-in-out;
}

.sphere {
    width: 450px;
    height: 450px;
    position: relative;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
    margin: 0 auto;
}

.sphere-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.15), transparent 70%);
    border-radius: 50%;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    box-shadow:
        0 0 60px rgba(var(--primary-rgb), 0.2),
        inset 0 0 60px rgba(var(--primary-rgb), 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: screen;
}

/* Social Proof (Metrics) */
.social-proof {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-tertiary);
    margin-bottom: 32px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.metric-number {
    font-size: 40px;
    color: var(--primary-500);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

/* Services Array (Flip Cards) */
.services-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 160px;
    margin-top: 60px;
}

.service-card-flip {
    width: 380px;
    max-width: 100%;
    perspective: 1000px;
    aspect-ratio: 1 / 1;
    height: auto;
    cursor: pointer;
    transition: all 0.4s ease;
}

.service-card-flip:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 16px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 24px;
}

/* Hover effect on desktop */
@media (hover: hover) {
    .service-card-flip:hover .service-card-inner {
        transform: rotateY(180deg);
    }
}

/* Trigger for mobile via JS */
.service-card-flip.flipped .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.service-card-front {
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-flip:hover .service-image {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
}

.service-title-front {
    font-size: 20px;
    margin: 0;
}

.service-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
}

.service-features {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.feature-tag {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary-300);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Badge PRO */
.badge-pro {
    background: linear-gradient(45deg, var(--warning), #ff6b6b);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 8px;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.badge-pro.large {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    margin-bottom: 16px;
    margin-left: 0;
}

/* Pricing Section */
.pricing-section {
    position: relative;
}

.pricing-card {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.1), transparent 50%);
    z-index: -1;
}

.price-display {
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
}

.price-display .currency {
    font-size: 24px;
    color: var(--text-tertiary);
    vertical-align: top;
}

.price-display .amount {
    font-size: 64px;
    font-weight: 800;
    color: #fff;
}

.price-display .period {
    font-size: 18px;
    color: var(--text-tertiary);
}

.sub-text {
    font-size: 14px;
    color: var(--text-quaternary);
}

/* Final CTA */
.final-cta {
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
}

/* Footer */
.footer {
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    background: var(--bg-secondary);
    padding-bottom: 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-links h4 {
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    font-size: 14px;
    color: var(--text-quaternary);
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(2deg);
    }

    50% {
        transform: translateY(-10px) rotate(-2deg);
    }

    75% {
        transform: translateY(-30px) rotate(1deg);
    }
}

@keyframes float-particle {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }

    25% {
        transform: translate(100px, -100px);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50px, -200px);
        opacity: 0.6;
    }

    75% {
        transform: translate(-100px, -100px);
        opacity: 0.8;
    }
}

@keyframes gradient-shift {

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

    50% {
        background-position: 100% 50%;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-element {
    opacity: 0;
    will-change: transform, opacity;
}

.animate-in {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

/* Responsive */
@media (max-width: 1024px) {
    h1 {
        font-size: 56px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .hero-text-area {
        display: contents;
    }

    .hero-title {
        order: 1;
        margin-bottom: 10px !important;
    }

    .hero-visual-area {
        order: 2; /* Move sphere after title */
        margin-bottom: 20px !important;
    }

    .hero-cta {
        order: 3; /* Buttons last */
        justify-content: center;
    }

    .sphere {
        width: 280px;
        height: 280px;
        margin-bottom: 20px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .logo img {
        height: 30px !important; /* Reduced from 40px */
    }

    /* Target the secondary logo in the centered section */
    section img[src="images/teamateur 2.png"] {
        height: 60px !important; /* Reduced from 80px */
    }

    h1 {
        font-size: 40px;
    }

    .btn-primary,
    .btn-outline {
        padding: 12px 20px !important;
        font-size: 13px !important;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-cta a {
        width: 100%;
        text-align: center;
    }

    h2 {
        font-size: 32px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .services .container {
        padding: 0 24px !important; /* Restoring standard padding */
    }

    .services-grid {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 30px !important;
        padding: 0;
        width: 100% !important;
        margin: 0 !important;
    }

    .service-card-flip {
        width: 100% !important;
        max-width: 320px !important; /* Slightly reduced and capped */
        margin: 0 auto 20px !important;
        height: auto;
        aspect-ratio: 1 / 1;
        transform: none !important; /* Removed scaling */
    }

    .service-card-front,
    .service-card-back {
        border-radius: 16px !important;
        width: 100% !important;
        margin: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
    }

    .particle:nth-child(n+20) {
        display: none;
    }

    .app-download-section h3 {
        font-size: 36px !important;
        margin-bottom: 20px !important;
    }

    .app-download-section .container > div {
        gap: 20px !important;
        justify-content: center !important;
    }

    .download-button img {
        height: 45px !important; /* Reduced from 80px */
    }

    .app-download-section {
        padding: 40px 0 !important;
    }

    /* Centering buttons on Propietario page */
    .hero-propietario-content,
    .reality-section .container > div,
    .solution-section .container > div,
    .invite-section .container > div,
    .cta-final .container {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .reality-section p, 
    .solution-section p, 
    .invite-section p {
        text-align: center !important;
        justify-content: center !important;
    }

    /* Ser Pro Hero Reordering and Centering */
    .hero-pro-grid {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        gap: 30px !important;
    }

    .hero-pro-text {
        display: contents !important; /* Breaks the grouping to allow individual ordering */
    }

    .hero-pro-title {
        order: 1 !important;
        text-align: center !important;
        margin-bottom: 0 !important;
    }

    .hero-pro-image-box {
        order: 2 !important;
        width: 100% !important;
        max-width: 400px !important;
    }

    .hero-pro-button {
        order: 3 !important;
        width: auto !important;
        min-width: 200px !important;
    }
}

.mobile-only {
    display: none;
}