/* ═══════════════════════════════════════════════════════════
   INSTAL-E VANGUARDIA — Core Design System (CSS)
   Architecture: Atomic Design + Asymmetric High Tension
   Identity: Red (#af1f24) | Yellow (#ffc11f)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Outfit:wght@400;500;700;800;900&display=swap');

:root {
    /* Brand Colors */
    --v-red: #af1f24;
    --v-yellow: #ffc11f;
    --v-carbon: #121212;
    --v-deep: #0a0a0a;
    --v-white: #ffffff;
    --v-gray: #1a1a1a;
    --v-text-muted: rgba(255, 255, 255, 0.6);

    /* Physics & Layout */
    --v-mass-service: 1.2;
    --v-friction: 0.8;
    --v-gap: 32px;
    --v-radius: 4px; /* Precision over softness */

    /* Typography */
    --v-font-head: 'Outfit', sans-serif;
    --v-font-body: 'Space Grotesk', sans-serif;
    --v-tracking: -0.03em;
}

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

body {
    background-color: var(--v-carbon);
    color: var(--v-white);
    font-family: var(--v-font-body);
    letter-spacing: var(--v-tracking);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── ATOMS ─── */
.v-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    font-family: var(--v-font-head);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.v-btn--primary {
    background-color: var(--v-red);
    color: var(--v-white);
}

.v-btn--secondary {
    background-color: var(--v-yellow);
    color: var(--v-carbon);
}

.v-btn--ghost {
    background: transparent;
    border: 1px solid var(--v-red);
    color: var(--v-red);
}

.v-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 193, 31, 0.1);
    color: var(--v-yellow);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-left: 2px solid var(--v-yellow);
    margin-bottom: 16px;
}

/* ─── MOLECULES ─── */
.v-header {
    margin-bottom: 60px;
}

.v-header h1 {
    font-family: var(--v-font-head);
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1; /* Slightly better spacing */
    text-transform: uppercase;
    margin-bottom: 32px;
}

.v-header-lead {
    font-size: 1.15rem;
    color: var(--v-text-muted);
    max-width: 750px; /* Prevent lines from being too long */
    line-height: 1.6;
}

.v-header span {
    color: var(--v-yellow);
}

.v-card {
    background: var(--v-gray);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    position: relative;
    will-change: transform;
}

.v-card--service {
    /* AntiGravity: Mass 1.2 applied via JS */
    border-top: 3px solid var(--v-red);
}

.v-card h3 {
    font-family: var(--v-font-head);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ─── ORGANISMS (Layout Structures) ─── */
.v-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 40px 60px;
}

.v-grid-mosaic {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: var(--v-gap);
    align-items: stretch;
}

.v-section-spacer {
    margin-top: 80px;
    margin-bottom: 80px;
}

/* IMMERSIVE COMPONENT ENGINE */
.v-header-immersive {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: -120px;
    padding: 120px 0;
    margin-bottom: 60px;
}

.v-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.v-hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.3;
    filter: grayscale(0.5) contrast(1.1);
}

.v-hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

.v-mosaic-wide { grid-column: span 12; }
.v-mosaic-hero { grid-column: span 7; }
.v-mosaic-side { grid-column: span 5; }

.v-mosaic-wide img { 
    width: 100%; 
    height: 450px; 
    object-fit: cover; 
    border-radius: var(--v-radius);
}

/* STATS MATRIX */
.v-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.v-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px 12px;
    text-align: center;
    border-bottom: 2px solid var(--v-red);
}

.v-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--v-yellow);
    line-height: 1;
    margin-bottom: 8px;
}

.v-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--v-text-muted);
    letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
    .v-container { padding: 100px 24px 40px; }
}

/* ─── GLOBAL NAVIGATION (VANGUARDIA SYSTEM) ─── */
.v-site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5000;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.v-brand img { height: 40px; }

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

.v-nav-link {
    color: var(--v-white);
    text-decoration: none;
    font-family: var(--v-font-head);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.v-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--v-red);
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

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

/* HAMBURGER & MOBILE MENU */
.v-hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 6000;
    padding: 10px;
}

.v-hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--v-white);
    transition: 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.v-nav-mobile {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--v-carbon);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 5500;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.v-nav-mobile.active {
    transform: translateY(0);
}

.v-nav-mobile .v-nav-link {
    font-size: 2rem;
}

/* Responsive Updates */
@media (max-width: 900px) {
    .v-site-header { padding: 20px; }
    .v-nav-desktop { display: none; }
    .v-hamburger { display: flex; }
}

@media (max-width: 768px) {
    .v-grid-mosaic {
        grid-template-columns: 1fr;
        grid-gap: 32px;
    }
    
    .v-container {
        padding: 100px 20px 40px;
    }

    .v-header-immersive {
        min-height: 50vh;
        margin-top: -100px;
        padding: 120px 0 60px;
    }

    .v-mosaic-wide img { height: 280px; }
    
    .v-site-header { padding: 16px 20px; }
    
    .v-btn {
        width: 100%;
        justify-content: center;
        padding: 18px;
    }

    .v-section-spacer { margin-top: 40px; margin-bottom: 40px; }

    .v-header h1 { font-size: 3rem; }
    .v-header-lead { font-size: 1rem; }
}

/* COMPONENT: TECHNICAL LISTS */
.v-include-list {
    list-style: none;
    padding: 0;
}

.v-include-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--v-text-muted);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.v-include-list li::before {
    content: "→";
    color: var(--v-red);
    font-weight: bold;
}

.v-exclude-item li::before {
    content: "×";
    color: var(--v-yellow);
}

/* COMPONENT: TIMELINE */
.v-timeline-item {
    border-left: 1px solid var(--v-red);
    padding: 32px 40px;
    position: relative;
}

.v-timeline-item::before {
    content: "";
    position: absolute;
    top: 36px; left: -5px;
    width: 9px; height: 9px;
    background: var(--v-red);
    border-radius: 50%;
}

/* COMPONENT: FORMS */
.v-form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v-form-label {
    font-family: var(--v-font-head);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--v-yellow);
    letter-spacing: 0.05em;
}

.v-form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    color: var(--v-white);
    font-family: var(--v-font-body);
    transition: border-color 0.3s;
}

.v-form-input:focus {
    outline: none;
    border-color: var(--v-red);
}

@media (max-width: 768px) {
    .v-timeline-item { padding: 24px 20px; }
}

/* COMPONENT: AUXILIARY PAGES */
.v-thanks-container {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.v-legal-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 60px;
    line-height: 1.8;
    color: var(--v-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.v-legal-content h2 {
    color: var(--v-white);
    font-family: var(--v-font-head);
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 2px solid var(--v-red);
    padding-left: 16px;
}

@media (max-width: 768px) {
    .v-legal-content { padding: 32px 20px; }
}

/* ─── KINETIC FX ─── */
.v-power-on {
    opacity: 0;
}

@keyframes flash {
    0% { filter: brightness(3); opacity: 0; }
    50% { filter: brightness(1.5); opacity: 1; }
    100% { filter: brightness(1); opacity: 1; }
}

.v-power-on.active {
    animation: flash 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Inducción Cursor */
.v-cursor {
    width: 24px;
    height: 24px;
    border: 1px solid var(--v-yellow);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.v-cursor-inner {
    width: 6px;
    height: 6px;
    background: var(--v-red);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
