/* =========================================
   RAPTOR DEVS - HOJA DE ESTILOS DEFINITIVA
   Malla Técnica Integral + Consola Consistente + Mobile UX
========================================= */

:root {
    --bg-main: #0a0a0a;
    --bg-secondary: #121214;
    --accent: #32CD32;
    --accent-hover: #2db52d;
    --whatsapp-green: #25D366;
    --whatsapp-hover: #20ba57;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --font-apple: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "Fira Code", "SF Mono", Consolas, monospace;
    --progress: 0%;
}

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

html { 
    scroll-behavior: smooth; 
}

/* === FONDO GLOBAL DE MALLA TÉCNICA === */
body { 
    background-color: var(--bg-main); 
    color: var(--text-primary); 
    font-family: var(--font-apple); 
    -webkit-font-smoothing: antialiased; 
    letter-spacing: -0.01em; 
    overflow-x: hidden; 

    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    background-attachment: fixed;
}

a { 
    text-decoration: none; 
    color: var(--text-primary); 
}

/* === BARRA DE PROGRESO DE LECTURA (TOP) === */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background-color: var(--accent);
    width: 0%;
    z-index: 10000;
    transition: width 0.1s ease-out;
}

/* === ACCESIBILIDAD === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.terminal-text { 
    font-family: var(--font-mono) !important; 
    color: var(--accent) !important; 
}

/* === EFECTO CONSOLA / MÁQUINA DE ESCRIBIR EN HERO === */
.headline.console-container {
    font-family: var(--font-mono);
    font-size: clamp(40px, 7vw, 75px); 
    line-height: 1.15; 
    font-weight: 700; 
    letter-spacing: -0.03em; 
    margin-bottom: 20px;
    white-space: pre-line;
}

.console-subheadline {
    font-family: var(--font-mono);
    font-size: clamp(16px, 3vw, 21px); 
    color: var(--text-secondary); 
    margin-bottom: 40px; 
    font-weight: 400; 
    max-width: 700px; 
    margin-left: auto; 
    margin-right: auto;
    white-space: pre-line;
}

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

.console-cursor {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
    animation: blink-cursor 0.8s infinite steps(1);
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* === NAVEGACIÓN (FROSTED GLASS) === */
.global-nav {
    position: fixed; 
    top: 0; 
    width: 100%; 
    height: 52px;
    background-color: rgba(10, 10, 10, 0.75); 
    backdrop-filter: saturate(180%) blur(20px); 
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; 
    justify-content: center;
}

.nav-content { 
    width: 100%; 
    max-width: 1000px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px; 
    height: 100%; 
}

.logo { display: flex; align-items: center; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 13px; color: var(--text-secondary); transition: color 0.3s ease; }
.nav-links a:hover { color: var(--text-primary); }

/* Hamburguesa Móvil */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 10001;
}

.mobile-menu-toggle .bar {
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* === MENÚ MÓVIL FULLSCREEN (FROSTED GLASS) === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.mobile-link {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.mobile-menu-overlay.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-link:nth-child(3) { transition-delay: 0.3s; }

.mobile-menu-footer {
    margin-top: 40px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* === BOTONES Y ENLACES === */
.btn-pill {
    background-color: var(--text-primary); 
    color: var(--bg-main);
    padding: 14px 28px; 
    border-radius: 980px; 
    font-size: 17px; 
    font-weight: 600;
    display: inline-block; 
    border: none; 
    cursor: pointer; 
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-pill:hover { 
    background-color: #ffffff; 
    transform: scale(1.03); 
}

.btn-pill-small {
    background-color: rgba(50, 205, 50, 0.1); 
    color: var(--accent); 
    border: 1px solid var(--accent);
    padding: 6px 16px; 
    border-radius: 980px; 
    font-size: 13px; 
    font-weight: 600; 
    font-family: var(--font-mono);
    transition: all 0.3s ease; 
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.1);
}

.btn-pill-small:hover { 
    background-color: var(--accent); 
    color: #000; 
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.4); 
}

.link-chevron { 
    color: var(--accent); 
    font-size: 15px; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    transition: color 0.3s ease; 
}

.link-chevron span { 
    font-size: 14px; 
    margin-left: 5px; 
    transition: transform 0.3s ease; 
}

.link-chevron:hover span { 
    transform: translateX(4px); 
}

/* === HERO SECTION === */
.hero-module { 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 0 20px; 
    position: relative;
    overflow: hidden;
    background: transparent;
}

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

/* === ZIG-ZAG LAYOUT B2B === */
.split-layout { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
}

.split-row { 
    display: flex; 
    flex-direction: row; 
    width: 100%; 
    min-height: 650px; 
}

.split-row.reverse { 
    flex-direction: row-reverse; 
}

.split-text { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 80px 40px; 
}

.text-content { 
    max-width: 550px; 
}

.split-text.dark-bg { 
    background-color: rgba(8, 10, 8, 0.85); 
    backdrop-filter: blur(4px);
}

.split-text.light-bg { 
    background-color: rgba(17, 19, 22, 0.85); 
    backdrop-filter: blur(4px);
}

.text-content h2 { 
    font-size: clamp(32px, 4vw, 42px); 
    letter-spacing: -0.02em; 
    line-height: 1.1; 
    margin-bottom: 20px; 
}

.text-content .subtitle { 
    font-size: 21px; 
    color: var(--text-secondary); 
    margin-bottom: 30px; 
}

.apple-bullets { 
    list-style: none; 
    padding: 0; 
    margin-top: 30px; 
}

.apple-bullets li { 
    margin-bottom: 25px; 
    position: relative; 
    padding-left: 25px; 
    color: var(--text-secondary); 
    font-size: 17px; 
    line-height: 1.5; 
}

.apple-bullets li::before { 
    content: "•"; 
    color: var(--accent); 
    font-size: 24px; 
    position: absolute; 
    left: 0; 
    top: -5px; 
}

.apple-bullets li strong { 
    color: var(--text-primary); 
    font-weight: 600; 
}

.split-image { 
    flex: 1; 
    position: relative; 
    overflow: hidden; 
}

.split-image img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.8s ease; 
}

.split-row:hover .split-image img { 
    transform: scale(1.03); 
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === SCROLL REVEAL (SCRUBBING) === */
.scroll-reveal-module { 
    padding: 150px 20px; 
    min-height: 80vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: rgba(5, 5, 5, 0.9); 
    backdrop-filter: blur(4px);
}

.reveal-container { 
    max-width: 900px; 
    text-align: center; 
}

#reveal-text {
    font-size: clamp(35px, 6vw, 65px); 
    line-height: 1.1; 
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #ffffff var(--progress), #222222 var(--progress));
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent;
}

/* === FORMULARIO DE CONTACTO === */
.contact-module { 
    padding: 120px 20px; 
    text-align: center; 
    background-color: transparent; 
}

.contact-content h2 { 
    font-size: 40px; 
    letter-spacing: -0.02em; 
    margin-bottom: 15px; 
}

.contact-content p { 
    color: var(--text-secondary); 
    margin-bottom: 40px; 
    font-size: 19px; 
}

.apple-form { 
    max-width: 450px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
}

.apple-form input { 
    width: 100%; 
    padding: 18px 20px; 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    background-color: #121212; 
    color: var(--text-primary); 
    font-size: 17px; 
    font-family: var(--font-apple); 
    transition: all 0.3s ease; 
}

.apple-form input:focus { 
    outline: none; 
    border-color: var(--accent); 
    background-color: #1a1a1a; 
    box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.1); 
}

.apple-form button { 
    margin-top: 10px; 
    background-color: var(--accent); 
    color: #000; 
}

.apple-form button:hover { 
    background-color: var(--accent-hover); 
    transform: none; 
}

.microcopy { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin-top: 8px; 
}

/* === FOOTER ESTRUCTURADO Y LEGAL === */
.global-footer { 
    background-color: rgba(7, 7, 8, 0.95); 
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 80px 20px 30px; 
    font-size: 13px; 
    color: var(--text-secondary); 
}

.footer-container { 
    max-width: 1100px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr; 
    gap: 40px; 
    padding-bottom: 60px; 
}

.footer-col h4 { color: var(--text-primary); font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-secondary); transition: color 0.3s ease; }
.footer-col ul li a:hover { color: var(--text-primary); }

.footer-logo { font-size: 18px; font-weight: 800; color: var(--text-primary); margin-bottom: 15px; display: inline-block; }
.brand-desc { line-height: 1.6; margin-bottom: 20px; max-width: 300px; }

.status-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background-color: rgba(50, 205, 50, 0.05); 
    border: 1px solid rgba(50, 205, 50, 0.2); 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-family: var(--font-mono); 
    color: var(--accent); 
}

.status-dot { width: 6px; height: 6px; background-color: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }
.nap-info { margin-bottom: 10px; line-height: 1.5; }
.nap-info a { color: var(--text-secondary); transition: color 0.3s ease; }
.nap-info a:hover { color: var(--accent); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 30px; }
.footer-bottom-content { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 12px; }
.tech-stack-badge span { font-family: var(--font-mono); color: var(--text-secondary); font-size: 11px; }

/* === CÁPSULA FLOTANTE DE COTIZACIÓN MÓVIL (STICKY PILL BAR) === */
.sticky-bottom-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 980px;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9997;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sticky-bottom-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.whatsapp-pill-btn {
    background-color: var(--whatsapp-green);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === RESPONSIVE & ACCESIBILIDAD === */
@media (max-width: 900px) {
    .split-row, .split-row.reverse { flex-direction: column; min-height: auto; }
    .split-text { padding: 60px 20px; }
    .split-image { min-height: 400px; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .desktop-only { display: none; }
    .mobile-menu-toggle { display: flex; }
    .sticky-bottom-bar { display: flex; }
    .footer-container { grid-template-columns: 1fr; gap: 35px; }
    .footer-bottom-content { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* === BANNER DE COOKIES (LEGAL Y PRIVACIDAD) === */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10002;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 20px;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.cookie-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-content button {
    white-space: nowrap;
}

/* Responsivo para el banner */
@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
}