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

:root {
    --bg-white: #ffffff;
    --bg-gray: #f5f5f7; /* Gris */
    --bg-black: #000000;
    --text-dark: #1d1d1f; /* Negro ejecutivo */
    --text-gray: #86868b;
    --accent-blue: #0071e3; /* Azul Pro */
    --ia-indigo: #5856d6; /* El violeta/índigo más pro */
    --agenda-blue: #0071e3;
}

/* --- TOQUES DE ÉLITE --- */
::selection { background: var(--accent-blue); color: white; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-white); }
::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #86868b; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    overflow-x: hidden;
    width: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
}

/* TEXTURA DE GRANO (Capas de lujo) */
body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999; opacity: 0.04;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    filter: contrast(150%) brightness(100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* --- HEADER & NAV --- */
header {
    position: fixed; top: 0; width: 100%; height: 52px;
    background: rgba(255, 255, 255, 0.8); backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05); transition: all 0.3s ease;
}
.header-container { width: 100%; max-width: 1400px; display: flex; justify-content: space-between; align-items: center; padding: 0 40px; }
.logo { font-weight: 800; font-size: 1.1rem; letter-spacing: -1px; text-decoration: none; color: #000; flex-shrink: 0; }
nav.desktop-nav { display: flex; gap: 30px; align-items: center; }
nav.desktop-nav a { text-decoration: none; color: var(--text-dark); font-size: 0.75rem; font-weight: 500; opacity: 0.7; transition: 0.2s; text-transform: uppercase; letter-spacing: 0.5px; }
nav.desktop-nav a:hover { opacity: 1; color: var(--accent-blue); }

.lang-dropdown { position: relative; display: flex; align-items: center; height: 52px; }
.lang-trigger { background: none; border: none; font-size: 0.7rem; font-weight: 800; color: #000; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px; }
.lang-menu { position: absolute; top: 100%; right: 0; background: white; min-width: 120px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); display: none; list-style: none; padding: 8px; }
.lang-dropdown:hover .lang-menu { display: block; }
.lang-menu li a { color: #000; text-decoration: none; font-size: 0.75rem; padding: 8px 12px; display: block; border-radius: 8px; font-weight: 600; }

.btn-anexa { background: var(--text-dark); color: #fff; padding: 8px 18px; border-radius: 980px; text-decoration: none; font-weight: 600; font-size: 0.75rem; transition: 0.3s; }
.btn-anexa:hover { background: var(--accent-blue); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #000; padding: 5px; }

/* --- SECCIONES --- */
section { width: 100%; padding: 140px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.section-headline { font-size: 3.5rem; font-weight: 800; letter-spacing: -2.5px; line-height: 1.1; color: #000; }
.section-subhead { font-size: 1.5rem; color: var(--text-dark); font-weight: 400; max-width: 750px; margin-top: 15px; margin-bottom: 60px; }

/* --- HERO --- */
.module-hero {
    height: 100vh; justify-content: flex-end; padding-bottom: 15vh;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 10%), url('/static/img/portada.jpeg');
    background-size: cover; background-position: center;
}
.module-hero h1 { font-size: 4rem; font-weight: 900; letter-spacing: -3px; line-height: 1; color: #000; max-width: 900px; }
.module-hero p { font-size: 1.4rem; font-weight: 500; color: #000; max-width: 700px; margin-top: 20px; }

/* --- BENTO SERVICIOS: DIAMOND SLIM 3D --- */
#servicios { padding-bottom: 150px; }
.services-bento { display: grid; grid-template-columns: repeat(8, 1fr); gap: 20px; max-width: 1350px; width: 100%; margin-top: 60px; perspective: 1500px; }
.bento-card { position: relative; width: 100%; height: 240px; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transform-style: preserve-3d; cursor: pointer; border-radius: 32px; }
.span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
.bento-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; }
.bento-card:hover .bento-card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 32px; padding: 35px 40px; display: flex; flex-direction: column; justify-content: flex-start; text-align: left; overflow: hidden; }
.card-back { transform: rotateY(180deg); }
.card-front::after, .card-back::after { content: ""; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(to right, transparent, rgba(255,255,255,0.25), transparent); transform: skewX(-25deg); transition: 0.8s ease-in-out; }
.bento-card:hover .card-front::after, .bento-card:hover .card-back::after { left: 150%; }
.card-light .card-front, .card-light .card-back { background: var(--bg-gray); color: #000; }
.card-dark .card-front, .card-dark .card-back { background: #1d1d1f; color: #fff; }
.card-accent .card-front, .card-accent .card-back { background: var(--accent-blue); color: #fff; }
.card-violet .card-front, .card-violet .card-back { background: var(--ia-indigo); color: #fff; } /* IA Refinada */
.bento-card h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.8px; line-height: 1.2; }
.bento-card p { font-size: 0.9rem; line-height: 1.4; opacity: 0.7; }
.card-back h4 { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; opacity: 0.5; }
.card-back p.benefit { font-size: 0.95rem; line-height: 1.4; font-weight: 500; margin-bottom: 15px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: 0.6rem; font-weight: 700; background: rgba(0,0,0,0.05); padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.card-dark .tag, .card-accent .tag, .card-violet .tag { background: rgba(255,255,255,0.15); color: #fff; }

/* --- STATS CUT --- */
.stats-cut { padding: 100px 20px; background: var(--bg-gray); border: none; }
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 1200px; margin: 0 auto; }
.impact-item h3 { font-size: 4.5rem; font-weight: 900; letter-spacing: -4px; color: #000; margin-bottom: 5px; }
.impact-item p { font-size: 0.8rem; font-weight: 800; color: var(--text-gray); text-transform: uppercase; letter-spacing: 2px; }

/* --- TECH BLACK BUCLE --- */
.tech-cut-black { background: var(--bg-black); color: white; padding: 100px 20px; border: none; }
.tech-cut-black .section-headline { color: #fff; margin-bottom: 80px; }
.marquee-container { width: 100%; overflow: hidden; padding: 20px 0; mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); }
.marquee-content { display: flex; gap: 100px; width: max-content; animation: marquee 35s linear infinite; }
.marquee-content i { font-size: 3.5rem; color: #444; transition: 0.4s; }
.marquee-content i:hover { color: #fff; transform: scale(1.2); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- EL MÉTODO --- */
#metodo { padding-bottom: 60px; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; max-width: 1200px; width: 100%; margin-top: 30px; }
.process-step { text-align: left; }
.process-step h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: 20px; color: #000; letter-spacing: -0.5px; }
.process-step p { font-size: 0.95rem; line-height: 1.6; color: var(--text-gray); }
.line-draw { width: 100%; height: 1px; background: #e5e5e5; margin-bottom: 30px; position: relative; overflow: hidden; }
.line-draw::after { content: ""; position: absolute; left: -100%; width: 100%; height: 100%; background: var(--accent-blue); transition: 1s ease; }
.process-step:hover .line-draw::after { left: 0; }

/* --- EQUIPO --- */
#nosotros { padding-top: 60px; padding-bottom: 80px; }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 1200px; width: 100%; margin-top: 20px; }
.member-card { background: var(--bg-gray); padding: 70px 60px; border-radius: 45px; text-align: left; transition: 0.5s; }
.member-card:hover { background: #fff; box-shadow: 0 40px 100px rgba(0,0,0,0.05); }
.member-card img { width: 120px; height: 120px; border-radius: 28px; object-fit: cover; margin-bottom: 30px; border: 4px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.member-card h4 { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 5px; }
.member-card .role { color: var(--accent-blue); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 20px; display: block; }
.member-card .bio { color: var(--text-gray); font-size: 1.1rem; line-height: 1.7; margin-bottom: 30px; }
.linkedin-btn { text-decoration: none; color: #000; font-weight: 800; border-bottom: 2px solid #ddd; padding-bottom: 4px; font-size: 0.9rem; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.linkedin-btn:hover { color: var(--accent-blue); border-color: var(--accent-blue); }

/* --- AGENDA360 --- */
.agenda-cinematic { width: 100%; display: flex; justify-content: center; margin-top: 30px; }
.blend-image-white { width: 70%; height: auto; mask-image: radial-gradient(circle, black 80%, transparent 95%); -webkit-mask-image: radial-gradient(circle, black 80%, transparent 95%); }

/* --- CONTACTO --- */
#contacto { padding-top: 60px; }
.contact-form { max-width: 850px; width: 100%; text-align: left; margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-input { background: var(--bg-gray); border: none; padding: 25px; border-radius: 20px; font-family: inherit; font-size: 1.1rem; width: 100%; outline: none; transition: 0.3s; }
.form-input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(0,102,204,0.1); }
textarea { resize: none; grid-column: span 2; height: 180px; }
.btn-wrapper { grid-column: span 2; display: flex; justify-content: center; margin-top: 40px; width: 100%; }
.btn-submit { background: #000; color: #fff; border: none; padding: 22px 60px; border-radius: 980px; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: 0.3s; }
.btn-submit:hover { background: var(--accent-blue); transform: scale(1.05); }

/* --- FOOTER --- */
footer { background: var(--bg-gray); padding: 50px 0 20px; color: var(--text-gray); font-size: 0.85rem; text-align: left; border: none; }
.footer-container { max-width: 1300px; margin: 0 auto; padding: 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 80px; padding-bottom: 0px; }
.footer-col h4 { color: #000; margin-bottom: 25px; font-weight: 800; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1.5px; }
.footer-col a { color: var(--text-gray); text-decoration: none; display: block; margin-bottom: 12px; font-weight: 500; transition: 0.2s; }
.footer-bottom { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #b1b1b7; letter-spacing: 1px; border-top: 1px solid #e5e5e5; padding-top: 20px; }

/* --- MENÚ MÓVIL OVERLAY --- */
.mobile-nav-overlay { position: fixed; top: 0; right: -100%; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 2000; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 80px 40px; }
.mobile-nav-overlay.active { right: 0; }
.mobile-nav-overlay nav { display: flex; flex-direction: column; gap: 15px; text-align: left; width: 100%; }
.mobile-nav-overlay nav a { font-size: 1.8rem; font-weight: 700; text-decoration: none; color: #1d1d1f; letter-spacing: -0.5px; }
.close-menu { position: absolute; top: 20px; right: 25px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #86868b; }
.mobile-lang-selector { margin-top: 40px; display: flex; gap: 15px; font-weight: 700; font-size: 1rem; color: #86868b; }
.mobile-lang-selector a.active { color: var(--accent-blue); }

/* --- RESPONSIVE LOGIC --- */
@media (max-width: 1100px) {
    .services-bento { grid-template-columns: 1fr; }
    .span-4, .span-3, .span-2 { grid-column: span 1 !important; }
    .header-container { padding: 0 20px; }
    nav.desktop-nav { display: none !important; }
    .btn-anexa.desktop-only { display: none !important; }
    .mobile-menu-btn { display: block !important; }
}

@media (max-width: 768px) {
    .section-headline { font-size: 2.5rem; }
    .section-subhead, .sub-headline, .module-hero p { font-size: 1.1rem; }
    .module-hero h1 { font-size: 3rem; }
    .module-hero { padding-bottom: 10vh; }
    .form-grid { grid-template-columns: 1fr; gap: 15px; }
    .form-input, textarea, .btn-wrapper { grid-column: span 1 !important; }
    .services-bento, .team-grid, .footer-grid { grid-template-columns: 1fr; }
    .span-4, .span-3, .span-2, .btn-wrapper { grid-column: span 1 !important; }
    .blend-image-white { width: 95%; }
    .stats-cut { padding: 60px 20px; }
    .impact-grid { grid-template-columns: 1fr; row-gap: 50px; max-width: 300px; margin: 0 auto; }
    .impact-item h3 { font-size: 3.8rem; }
    .process-grid { grid-template-columns: 1fr; gap: 40px; }
}

.reveal { opacity: 0; transform: translateY(50px); transition: 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ICONO TOQUE MOBILE PREMIUM */
.mobile-tap-hint { display: none; }
@media (max-width: 768px) {
    .mobile-tap-hint { display: flex; position: absolute; bottom: 20px; right: 20px; width: 40px; height: 40px; align-items: center; justify-content: center; z-index: 10; pointer-events: none; }
    .mobile-tap-hint i { font-size: 1.2rem; color: inherit; opacity: 0.6; animation: hand-tap 2s infinite ease-in-out; position: relative; z-index: 2; }
    .tap-impact { position: absolute; width: 6px; height: 6px; background: currentColor; border-radius: 40%; opacity: 0; z-index: 1; animation: impact-ripple 2s infinite ease-out; }
}
@keyframes hand-tap { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(0.85) translateY(2px); } }
@keyframes impact-ripple { 0% { transform: scale(1); opacity: 0; } 45% { opacity: 0; } 50% { opacity: 0.4; transform: scale(1); } 100% { transform: scale(4); opacity: 0; } }

/* OPTIMIZACIÓN SCROLL PRO (LENIS) */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }