/* ═══════════════════════════════════════════════════════════
   Hekli — Design System & Stylesheet
   ══════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&family=Cinzel+Decorative:wght@500;600;700;800&display=swap');

/* ─── CSS Custom Properties (Design Tokens) ────────────────── */
:root {
    /* Colors */
    --bg: #0A0F1E;
    --bg2: #0D1325;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    
    /* ═══ COLORES DEL LOGO HEKLI ═══ */
    /* Púrpura/Violeta - Color base del logo */
    --primary: #7C3AED;
    --primary-light: #9D5FFF;
    --primary-dark: #5B21B6;
    /* Cian/Turquesa - Color medio del gradiente del logo */
    --accent: #06B6D4;
    --accent-light: #22D3EE;
    /* Verde - Color final del gradiente del logo */
    --success: #10B981;
    --success-light: #34D399;
    --warning: #F59E0B;
    --error: #EF4444;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --text-subtle: #64748B;

    /* ═══ GRADIENTES ═══ */
    /* Gradiente del logo: Púrpura → Cian → Verde en diagonal 135deg */
    --grad-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 45%, var(--success) 100%);
    /* Gradiente igual para la sección hero */
    --grad-hero: linear-gradient(135deg, var(--primary) 0%, var(--accent) 45%, var(--success) 100%);
    /* Efecto de brillo radial con púrpura */
    --grad-glow: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.3) 0%, transparent 70%);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    /* Tipografía especial para el logo; si no aplica en el resto, se usa solo aquí. */
    --font-logo: 'Cinzel Decorative', var(--font-heading);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.4);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: 0.3s var(--ease);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-blur: blur(20px);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ─── Light Theme ───────────────────────────────────────────── */
[data-theme="light"] {
    --bg: #F8FAFC;
    --bg2: #F1F5F9;
    --surface: rgba(0, 0, 0, 0.04);
    --surface-hover: rgba(0, 0, 0, 0.07);
    --border: rgba(0, 0, 0, 0.1);
    --text: #0F172A;
    --text-muted: #475569;
    --text-subtle: #94A3B8;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --grad-glow: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
}

/* Fix hero text legibility in light mode */
[data-theme="light"] .hero-stat strong {
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

body.loading {
    overflow: hidden;
}

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

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

ul {
    list-style: none;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ─── Typography Scale ──────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.text-gradient {
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Layout Utilities ──────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-dark {
    background: var(--bg2);
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--space-3xl);
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-light);
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.25);
    padding: 0.35em 1em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn svg {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.55);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border-color: var(--glass-border);
    color: var(--text);
    backdrop-filter: var(--glass-blur);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ─── Loading Screen ────────────────────────────────────────── */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-logo {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: var(--space-xl);
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.97);
    }
}

/* ═══ LOGO EN PANTALLA DE CARGA ═══ */
.loader-adm {
    /* Mismo estilo que el logo del navbar para mantener consistencia visual */
    font-family: var(--font-logo);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    
    /* ▼ GRADIENTE DEL LOGO: Púrpura (#7C3AED) → Cian (#06B6D4) → Verde (#10B981) */
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* ▼ EFECTOS VISUALES */
    /* Sombra flotante con brillo púrpura */
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.25));
    /* Sombra de texto con brillo cian */
    text-shadow: 0 0 40px rgba(6, 182, 212, 0.15);
    /* Animación de brillo pulsante infinita */
    animation: logoGlow 2s ease-in-out infinite;
}

/* ═══ ANIMACIÓN DE BRILLO PULSANTE DEL LOGO ═══ */
/* Este efecto crea un glow pulsante que alterna entre dos intensidades */
@keyframes logoGlow {
    /* Estado inicial y final: brillo suave */
    0%, 100% {
        /* Púrpura suave: 20px de blur, opacidad 0.25 */
        filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.25));
        /* Cian suave en el texto: 40px de blur, opacidad 0.15 */
        text-shadow: 0 0 40px rgba(6, 182, 212, 0.15);
    }
    /* Estado medio: brillo intenso */
    50% {
        /* Púrpura intenso: 30px de blur, opacidad 0.4 */
        filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.4));
        /* Cian intenso en el texto: 60px de blur, opacidad 0.25 */
        text-shadow: 0 0 60px rgba(6, 182, 212, 0.25);
    }
}

.loader-market {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.loader-bar {
    width: 220px;
    height: 3px;
    background: var(--surface);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto var(--space-md);
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: var(--grad-primary);
    border-radius: var(--radius-full);
    animation: loadProgress 1.8s var(--ease) forwards;
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.loader-text {
    color: var(--text-subtle);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* ─── Navbar ────────────────────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition);
    /* para paginas internas no se vea el fondo de las secciones */
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] #navbar {
    background: rgba(248, 250, 252, 0.95);
}

/* para que el header sea transparente en la pagina de inicio cuando no se ha scrolleado */
body.home-page #navbar:not(.scrolled) {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
}

#navbar.scrolled {
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.6rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] #navbar.scrolled {
    background: rgba(248, 250, 252, 0.85);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    flex-shrink: 0;
}

/* ═══ LOGO NAVBAR ═══ */
/* Tipografía del logo: Cinzel Decorative para un look premium */
.logo-adm {
    font-family: var(--font-logo);
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    
    /* ▼ GRADIENTE DEL LOGO: Púrpura (#7C3AED) → Cian (#06B6D4) → Verde (#10B981) */
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    transition: transform 0.3s ease, filter 0.3s ease, text-shadow 0.3s ease;
    display: inline-block;
    
    /* ▼ EFECTOS VISUALES DEL LOGO */
    /* Sombra de texto con brillo púrpura suave */
    text-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
    /* Sombra flotante con púrpura */
    filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.15));
}

/* ▼ EFECTO AL PASAR EL RATÓN */
.logo-adm:hover {
    /* Agrandamiento suave */
    transform: scale(1.05);
    /* Intensificación del brillo púrpura */
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.4));
}

.logo-market {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 auto;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    position: relative;
}

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

.nav-link.active {
    color: var(--text);
    background: var(--grad-primary);
    font-size: 1.05rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-sm);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* Theme toggle icons */
.icon-moon {
    display: block;
}

.icon-sun {
    display: none;
}

[data-theme="light"] .icon-moon {
    display: none;
}

[data-theme="light"] .icon-sun {
    display: block;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.hamburger:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text);
    border-radius: var(--radius-full);
    transition: all var(--transition);
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background: var(--primary-light);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background: var(--primary-light);
}

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

#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-image: url('../assets/hero.png');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 15, 30, 0.9) 0%,
            rgba(10, 15, 30, 0.7) 50%,
            rgba(10, 15, 30, 0.85) 100%);
    z-index: 1;
    transition: background var(--transition);
}

[data-theme="light"] .hero-overlay {
    background: linear-gradient(135deg,
            rgba(248, 250, 252, 0.95) 0%,
            rgba(248, 250, 252, 0.85) 50%,
            rgba(248, 250, 252, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 820px;
    padding: 0 var(--space-xl);
    padding-top: 90px;
    animation: heroFadeIn 1s var(--ease) both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.4em 1.1em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.03em;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(6, 182, 212, 0);
    }
}

.hero-headline {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--text);
}

#typewriter-text {
    min-width: 200px;
    display: inline-block;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

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

.hero-stat strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-subtle);
    font-size: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

.scroll-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-subtle);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--text-subtle);
    border-radius: var(--radius-full);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ─── Reveal animation ──────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Services ──────────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    transform-style: preserve-3d;
}

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

.service-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 60% 40%, var(--glow-color, var(--primary)) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
    --glow-color: var(--primary);
}

.service-card:hover .service-glow {
    opacity: 0.08;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    color: var(--icon-color, var(--primary-light));
    transition: all var(--transition);
}

.service-icon svg {
    width: 26px;
    height: 26px;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-3deg);
}

.service-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
    margin-bottom: var(--space-md);
}

.service-tag {
    font-size: 0.75rem;
    color: var(--text-subtle);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.25em 0.75em;
    border-radius: var(--radius-full);
}

/* ─── About Section ─────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-image-wrap {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: var(--radius-xl);
    object-fit: cover;
    aspect-ratio: 4/3;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.about-badge-float {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    background: var(--grad-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.float-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
}

.float-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.about-desc {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition);
}

.stat-item:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.08);
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ─── Portfolio ─────────────────────────────────────────────── */
.portfolio-filters {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.filter-btn.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.portfolio-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.portfolio-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.portfolio-item:hover .portfolio-img-wrap img {
    transform: scale(1.06);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(6, 182, 212, 0.85));
    display: flex;
    align-items: flex-end;
    padding: var(--space-xl);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay-content {
    color: #fff;
}

.portfolio-cat {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.25rem;
}

.portfolio-overlay-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.portfolio-overlay-content p {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: var(--space-md);
}

/* ─── Testimonials ──────────────────────────────────────────── */
.testimonials-wrapper {
    position: relative;
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    overflow: hidden;
    transition: transform 0.5s var(--ease);
}

.testimonial-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: all var(--transition);
    flex-shrink: 0;
}

.testimonial-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
}

.testimonial-stars {
    color: var(--warning);
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.testimonial-card blockquote p {
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 46px;
    height: 46px;
    background: var(--grad-primary);
    background: linear-gradient(135deg, var(--av-color, var(--primary)), color-mix(in srgb, var(--av-color, var(--primary)) 60%, white));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.95rem;
}

.testimonial-author span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.slider-btn {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: all var(--transition);
}

.slider-btn svg {
    width: 18px;
    height: 18px;
}

.slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.slider-dots {
    display: flex;
    gap: 6px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.slider-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: var(--radius-full);
}

/* ─── Pricing ───────────────────────────────────────────────── */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.toggle-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.discount-badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--success);
    color: #fff;
    padding: 0.1em 0.5em;
    border-radius: var(--radius-full);
}

.toggle-switch {
    position: relative;
    display: block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-track {
    position: absolute;
    inset: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.slider-track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
}

input:checked+.slider-track {
    background: var(--primary);
    border-color: var(--primary);
}

input:checked+.slider-track::before {
    transform: translateX(22px);
    background: #fff;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    align-items: stretch;
}

.pricing-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.pricing-featured {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--grad-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25em 1em;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.pricing-header {
    margin-bottom: var(--space-xl);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.pricing-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: var(--space-xl);
}

.currency {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-muted);
}

.amount {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.4s var(--ease);
}

.period {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pricing-features {
    flex: 1;
    margin-bottom: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-features li::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-yes {
    color: var(--text);
}

.feature-yes::before {
    background-color: rgba(16, 185, 129, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.feature-no {
    text-decoration: line-through;
    opacity: 0.4;
}

.feature-no::before {
    background-color: rgba(239, 68, 68, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='3'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}

/* ─── Contact ───────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contact-list {
    margin-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-item strong {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-item a,
.contact-item span {
    color: var(--text);
    font-size: 0.95rem;
}

.contact-item a:hover {
    color: var(--primary-light);
}

/* Contact Form */
.contact-form-wrap {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    backdrop-filter: var(--glass-blur);
}

.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: var(--space-md);
    position: relative;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px;
    padding-right: 2.5rem;
    cursor: pointer;
    background-color: var(--surface);
    color: var(--text);
}

.form-group select option {
    background-color: var(--bg2);
    color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-subtle);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: var(--success);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.field-error {
    font-size: 0.78rem;
    color: var(--error);
    min-height: 1em;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-subtle);
    text-align: right;
}

.btn-submit .btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: block;
}

.form-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-subtle);
    margin-top: var(--space-md);
}

.form-privacy svg {
    width: 14px;
    height: 14px;
    color: var(--success);
}

.form-success {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    animation: fadeIn 0.5s var(--ease);
}

.form-success.visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--success), var(--success-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto var(--space-md);
}

.form-success h3 {
    margin-bottom: var(--space-sm);
}

.form-success p {
    color: var(--text-muted);
}

/* ─── Footer ────────────────────────────────────────────────── */
#footer {
    background: #060A17;
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl);
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: var(--space-md) 0 var(--space-lg);
    max-width: 280px;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.social-link svg {
    width: 16px;
    height: 16px;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-nav h4 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: var(--space-md);
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-nav a {
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--primary-light);
}

.footer-contact-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.footer-contact-info ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-contact-info a,
.footer-contact-info span {
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-contact-info a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

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

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    font-size: 0.82rem;
    color: var(--text-subtle);
    transition: color var(--transition);
}

.footer-legal a:hover {
    color: var(--text);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 900;
    width: 44px;
    height: 44px;
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.55);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .about-grid {
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }

    .logo-adm {
        font-size: 2.3rem;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        padding: 6rem 2rem 2rem;
        gap: var(--space-md);
        transform: translateY(-100%);
        transition: transform 0.4s var(--ease);
        z-index: 999;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.6rem 1.5rem;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-actions .btn-primary.btn-sm {
        display: none;
    }

    .nav-links {
        background: var(--bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
        padding: 7rem 2rem 2.5rem;
        gap: var(--space-sm);
    }

    .nav-links .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.85rem 1.5rem;
        font-size: 1.15rem;
        border-radius: var(--radius-lg);
        transition: all var(--transition);
    }

    .nav-links .nav-link:hover {
        background: var(--surface-hover);
    }

    .nav-links .nav-link.active {
        background: var(--grad-primary);
        color: #fff;
        font-weight: 700;
        box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
    }

    .hero-stats {
        gap: var(--space-lg);
    }

    .hero-stat-divider {
        height: 30px;
    }

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

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

    .about-badge-float {
        right: 0;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials-slider {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

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

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

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

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

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

    .contact-form-wrap {
        padding: var(--space-lg);
    }
}

/* ─── Selection & Scrollbar ─────────────────────────────────── */
::selection {
    background: rgba(124, 58, 237, 0.35);
    color: var(--text);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Smooth image load */
img {
    transition: opacity 0.3s var(--ease);
}

img[loading] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* ─── Internas (Páginas Multi-Page) ─────────────────────────── */

body:not(.home-page) main>section:first-of-type {
    padding-top: 150px;
}

.page-hero .section-title {
    margin-bottom: var(--space-sm);
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-hero .section-desc {
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Case Study Modal ──────────────────────────────────────── */

/* Body lock */
body.modal-open {
    overflow: hidden;
}

/* Wrapper */
.case-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s var(--ease);
}

.case-modal[hidden] {
    display: none;
}

.case-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop */
.case-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 18, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Panel */
.case-modal-panel {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: var(--bg2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s var(--ease-spring);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.case-modal.is-open .case-modal-panel {
    transform: translateY(0) scale(1);
}

/* Close button */
.case-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.case-modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.case-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Hero image */
.case-modal-hero {
    position: relative;
    aspect-ratio: 16/7;
    overflow: hidden;
}

.case-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 30, 0.95) 0%, rgba(10, 15, 30, 0.3) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl);
}

.case-modal-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(6, 182, 212, 0.35);
    padding: 0.25em 0.9em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-sm);
    width: fit-content;
}

.case-modal-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--space-xs);
    line-height: 1.15;
}

.case-modal-result {
    font-size: 1rem;
    color: var(--accent-light);
    font-weight: 500;
}

/* Body */
.case-modal-body {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Metrics grid */
.case-modal-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

@media (max-width: 560px) {
    .case-modal-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

.case-metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: border-color var(--transition), background var(--transition);
}

.case-metric-card:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.08);
}

.case-metric-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.case-metric-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Sections */
.case-modal-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.case-modal-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.case-modal-section-icon {
    font-size: 1.1rem;
}

.case-modal-summary {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Tags */
.case-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.case-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-light);
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    padding: 0.35em 0.9em;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.case-tag:hover {
    background: rgba(124, 58, 237, 0.22);
    border-color: var(--primary);
}

/* CTA row */
.case-modal-cta {
    display: flex;
    justify-content: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

/* Light theme adjustments */
[data-theme="light"] .case-modal-hero-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
}

[data-theme="light"] .case-modal-panel {
    background: var(--bg2);
}

/* Responsive */
@media (max-width: 480px) {
    .case-modal {
        padding: var(--space-sm);
        align-items: flex-end;
    }

    .case-modal-panel {
        max-height: 95vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

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

/* ═══════════════════════════════════════════════════════════════
   PÁGINA DE SERVICIOS — Secciones ampliadas
   ═══════════════════════════════════════════════════════════════ */

/* ─── Hero ──────────────────────────────────────────────────── */
.svc-hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    text-align: center;
}

.svc-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.22) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.svc-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237C3AED' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.svc-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.svc-hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.svc-hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.7;
}

.svc-hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--space-sm);
}

/* ─── Stats bar ──────────────────────────────────────────────── */
.svc-stats {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(124, 58, 237, 0.04);
}

.svc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    text-align: center;
}

.svc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.svc-stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 900;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.svc-stat-suffix {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 900;
    background: var(--grad-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 2px;
}

.svc-stat p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ─── Service card features list ────────────────────────────── */
.svc-features {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.svc-features li {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.svc-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--icon-color, var(--primary));
    flex-shrink: 0;
}

/* ─── Proceso ────────────────────────────────────────────────── */
.svc-process {
    background: var(--bg2);
}

.svc-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: var(--space-3xl);
}

.svc-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    padding: 0 var(--space-lg);
}

.svc-step-num {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.svc-step-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.svc-step-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 200px;
    margin: 0 auto;
}

.svc-step-connector {
    flex-shrink: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin-top: 31px;
    opacity: 0.4;
}

/* ─── CTA final ──────────────────────────────────────────────── */
.svc-cta {
    padding-bottom: var(--space-3xl);
}

.svc-cta-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.svc-cta-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.svc-cta-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 900;
    margin: var(--space-sm) 0 var(--space-md);
    line-height: 1.15;
}

.svc-cta-card>p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

.svc-cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Responsive nuevas secciones ───────────────────────────── */
@media (max-width: 1024px) {
    .svc-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-xl);
    }

    .svc-step-connector {
        display: none;
    }

    .svc-step {
        flex: 0 0 calc(50% - var(--space-xl));
        padding: 0;
    }
}

@media (max-width: 768px) {
    .svc-hero {
        padding: 130px 0 70px;
    }

    .svc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .svc-step {
        flex: 0 0 100%;
    }

    .svc-cta-card {
        padding: var(--space-2xl) var(--space-lg);
    }
}

@media (max-width: 480px) {
    .svc-hero-title {
        font-size: 2rem;
    }

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

    .svc-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

/* stat number + suffix inline */
.svc-stat-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}