:root {
    --bg: #030305;
    --panel: #0b0b0f;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-2: rgba(255, 255, 255, 0.06);
    --accent: #7dd3fc;
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --secondary: #06b6d4;
    --accent-color: #f59e0b;
    --dark: #0f172a;
    --light: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #000 0%, #0c0c1dff 35%, #020206 100%);
    color: #e6eef8;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.hero-card,
.feature-card,
.service-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

.vizyon-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vizyon-hero::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10%;
    width: min(1300px, 100vw);
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(79, 70, 229, 0.12) 0%, rgba(6, 182, 212, 0.06) 20%, transparent 60%);
    filter: blur(60px);
    opacity: 1;
}

.vizyon-hero::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 12%;
    width: min(820px, 90vw);
    height: 420px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(60, 52, 214, 0.18), rgba(6, 182, 212, 0.09));
    filter: blur(40px);
    mix-blend-mode: screen;
    opacity: .9;
}

.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header.main {
    position: fixed;
    left: 0;
    right: 0;
    top: 18px;
    z-index: 40;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(11, 11, 15, 0.9);
    backdrop-filter: blur(10px);
    top: 0;
    padding: 8px 28px;
}

.typing-text::after {
    content: '|';
    display: inline-block;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.nav-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.nav-pill:hover, .nav-pill:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

.floating-element {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease;
}

.floating-element:hover {
    transform: translateY(-5px);
}

.element-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.hero-card {
    max-width: 980px;
    text-align: center;
    padding: 48px 28px 64px;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: 'Space Grotesk', 'Inter', system-ui;
    font-weight: 700;
    font-size: 44px;
    line-height: 1.04;
    color: #fff;
}

.hero-sub {
    color: rgba(230, 238, 248, 0.75);
    margin-top: 12px;
    font-size: 16px;
}

.cta-primary {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.cta-primary:hover, .cta-primary:focus {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    outline: none;
}

.glass-cta {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
}

.glass-cta:hover, .glass-cta:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    outline: none;
}

.feature-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px) rotateX(3deg);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover::before {
    opacity: 1;
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.card-3d:hover {
    transform: rotateY(8deg) rotateX(4deg);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

section {
    position: relative;
    overflow: hidden;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.25s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

#three-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.click-bubble {
    position: fixed;
    border-radius: 50%;
    background-color: rgba(124, 58, 237, 0.5);
    pointer-events: none;
    animation: bubble-expand 1.5s forwards;
    z-index: 9999;
}

@keyframes bubble-expand {
    0% {
        transform: scale(0);
        opacity: 0.8;
        filter: blur(2px);
    }
    100% {
        transform: scale(2);
        opacity: 0;
        filter: blur(20px);
    }
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    background-image: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    
    header.main {
        padding: 12px 16px;
    }

    .nav-pill {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .glass,
    .glass-strong {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    body {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover, .tab-button:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

.tab-button.active {
    background-color: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: grid;
}

.hidden {
    display: none;
}

.input-full-width {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    color: #e6eef8;
    transition: all 0.3s ease;
}

.input-full-width::placeholder {
    color: rgba(230, 238, 248, 0.6);
}

.input-full-width:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.whatsapp-flutuante {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 70px;
  height: 70px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  animation: pulsar 2s infinite;
}

.whatsapp-flutuante:hover, .whatsapp-flutuante:focus {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  outline: none;
}

@keyframes pulsar {
  0% {
    transform: scale(1);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.portfolio-card {
    background-color: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4), 0 0 10px rgba(79, 70, 229, 0.5);
}

.tag-style {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); 
}

.cta-style {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
}

footer {
    position: relative;
}

#services::before,
#about::before,
#contact::before,
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/grain.png');
    background-repeat: repeat;
    background-blend-mode: overlay;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}