/* ==========================================================================
   Taktika - Hoja de estilos compartida
   ========================================================================== */

/* Tokens de diseño */
:root {
    --navy-950: #050A1A;
    --navy-900: #0A1A3F;
    --navy-800: #102654;
    --accent: #1E9BFF;
    --accent-2: #22D3EE;
    --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    --ink: #0F172A;
    --muted: #475569;
    --line: #E2E8F0;
    --surface: #F5F7FB;
    --white: #fff;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
    --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    --header-h: 76px;
    --container: 1200px;
}

/* Reset básico */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.2;
    color: var(--ink);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section.pt-0 {
    padding-top: 0;
}

.section-alt {
    background: var(--surface);
}

/* Encabezado de sección */
.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    margin-bottom: 1rem;
}

.section-head p {
    color: var(--muted);
    font-size: 1.08rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.7rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(30, 155, 255, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(30, 155, 255, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.btn-dark {
    background: var(--navy-900);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--navy-800);
    box-shadow: var(--shadow);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   Header
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.main-header.scrolled {
    background: rgba(5, 10, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    height: 46px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav ul a {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    transition: color 0.25s ease;
}

.main-nav ul a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.25s ease;
}

.main-nav ul a:hover,
.main-nav ul a.active {
    color: var(--white);
}

.main-nav ul a:hover::after,
.main-nav ul a.active::after {
    width: 100%;
}

.nav-cta {
    padding: 0.65rem 1.3rem;
    font-size: 0.9rem;
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero (Inicio) y cabecera de página
   ========================================================================== */
.hero,
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--navy-950);
    color: var(--white);
    isolation: isolate;
}

/* Brillos difuminados */
.hero::before,
.page-hero::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(40% 50% at 15% 20%, rgba(30, 155, 255, 0.35) 0%, transparent 70%),
        radial-gradient(35% 45% at 85% 70%, rgba(34, 211, 238, 0.25) 0%, transparent 70%),
        radial-gradient(50% 60% at 50% 100%, rgba(16, 38, 84, 0.9) 0%, transparent 70%);
    z-index: -2;
    animation: glow-drift 18s ease-in-out infinite alternate;
}

/* Malla de líneas */
.hero::after,
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
    z-index: -1;
}

/* En Inicio la malla se alinea con la K (js/main.js fija --grid-x / --grid-y)
   para que los bloques parezcan celdas de la misma cuadrícula que se encienden */
.hero::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
    background-position: var(--grid-x, 0) var(--grid-y, 0);
    mask-image: radial-gradient(ellipse 75% 100% at 72% 50%, #000 30%, transparent 95%);
    -webkit-mask-image: radial-gradient(ellipse 75% 100% at 72% 50%, #000 30%, transparent 95%);
}

@keyframes glow-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(3%, -2%, 0) scale(1.08); }
}

.hero {
    --cell: 68px;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 3rem) 0 4rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 4rem;
}

.hero .eyebrow {
    color: var(--accent-2);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.4rem;
}

.hero .eyebrow::before {
    content: '';
    width: 36px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin-bottom: 2.2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* La "K" del logo emergiendo de la cuadrícula del fondo */
.hero-visual {
    display: flex;
    justify-content: center;
}

.block-grid {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(5, var(--cell));
    grid-auto-rows: var(--cell);
}

/* Halo de luz detrás de la K */
.block-grid::before {
    content: '';
    position: absolute;
    inset: -25%;
    background: radial-gradient(circle, rgba(30, 155, 255, 0.28) 0%, transparent 62%);
    z-index: -1;
}

.block-grid span {
    margin: 6px;
    border-radius: 8px;
}

.block-grid span.on {
    background: var(--gradient);
    box-shadow: 0 0 28px rgba(30, 155, 255, 0.45);
    animation:
        block-emerge 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.3s + var(--i) * 0.15s) both,
        block-pulse 4s ease-in-out calc(1.8s + var(--i) * 0.35s) infinite;
}

.block-grid span.dim {
    background: rgba(30, 155, 255, 0.1);
    border: 1px solid rgba(30, 155, 255, 0.25);
    animation: block-emerge 0.7s ease-out calc(1.3s + var(--i) * 0.12s) both;
}

@keyframes block-emerge {
    0% { opacity: 0; transform: scale(0.3); }
    60% { opacity: 1; transform: scale(1.06); }
    100% { opacity: 1; transform: none; }
}

@keyframes block-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Cifras de confianza */
.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.hero-stats strong {
    display: block;
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--white);
}

.hero-stats span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Cabecera compacta de páginas internas */
.page-hero {
    padding: calc(var(--header-h) + 4.5rem) 0 4.5rem;
    text-align: center;
}

.page-hero .eyebrow {
    color: var(--accent-2);
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 3.3rem);
    margin-bottom: 1rem;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.1rem;
    max-width: 620px;
    margin: 0 auto;
}

/* ==========================================================================
   Componentes
   ========================================================================== */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(30, 155, 255, 0.4);
}

.icon-chip {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--gradient);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
    box-shadow: 0 8px 20px rgba(30, 155, 255, 0.3);
}

/* Servicios destacados (Inicio) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
}

.service-card p {
    color: var(--muted);
    font-size: 0.97rem;
    flex: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--accent);
}

.card-link i {
    transition: transform 0.25s ease;
}

.service-card:hover .card-link i {
    transform: translateX(4px);
}

.center-action {
    text-align: center;
    margin-top: 3rem;
}

/* Cómo trabajamos */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 2rem 1.6rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.step::before {
    counter-increment: step;
    content: '0' counter(step);
    display: block;
    font-family: var(--font-head);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.step h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Clientes */
.carousel {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll 35s linear infinite;
}

.carousel:hover .carousel-track {
    animation-play-state: paused;
}

.cliente-item {
    width: 220px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.cliente-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.cliente-item:hover img {
    filter: none;
    opacity: 1;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 0.75rem)); }
}

/* Banda CTA */
.cta-band {
    position: relative;
    overflow: hidden;
    background: var(--navy-900);
    color: var(--white);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    isolation: isolate;
}

.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(50% 80% at 0% 0%, rgba(30, 155, 255, 0.45) 0%, transparent 70%),
        radial-gradient(50% 80% at 100% 100%, rgba(34, 211, 238, 0.35) 0%, transparent 70%);
    z-index: -1;
}

.cta-band h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin-bottom: 1rem;
}

.cta-band p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.08rem;
    max-width: 560px;
    margin: 0 auto 2rem;
}

.cta-band .hero-actions {
    justify-content: center;
}

/* ==========================================================================
   Nosotros
   ========================================================================== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.established-year {
    position: absolute;
    right: -1.2rem;
    bottom: -1.2rem;
    background: var(--gradient);
    color: var(--white);
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius);
    font-family: var(--font-head);
    line-height: 1.2;
    box-shadow: var(--shadow-lg);
}

.established-year strong {
    display: block;
    font-size: 1.8rem;
}

.established-year span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.about-text h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    margin-bottom: 1.4rem;
}

.about-text p {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

/* Línea de tiempo */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 2.5rem 2.5rem 0;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2.5rem 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 1.6rem;
    right: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--accent);
    box-shadow: 0 0 0 5px rgba(30, 155, 255, 0.15);
}

.timeline-item:nth-child(even)::before {
    right: auto;
    left: -9px;
}

.timeline-year {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
    background: rgba(30, 155, 255, 0.1);
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.8rem;
}

.timeline-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: var(--muted);
    font-size: 0.97rem;
}

/* Estadísticas */
.stats-band {
    background: var(--navy-900);
    border-radius: 24px;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    margin-top: 4rem;
}

.stat-number {
    font-family: var(--font-head);
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
}

/* Liderazgo / CEO */
.ceo-card {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3.5rem;
    align-items: center;
    margin-bottom: 3rem;
}

.ceo-photo {
    position: relative;
}

.ceo-photo::before {
    content: '';
    position: absolute;
    inset: 1.2rem -1.2rem -1.2rem 1.2rem;
    border-radius: 20px;
    background: var(--gradient);
    opacity: 0.9;
    z-index: 0;
}

.ceo-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.ceo-info h3 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin-bottom: 0.3rem;
}

.ceo-role {
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 1.6rem;
}

.ceo-quote {
    position: relative;
    font-family: var(--font-head);
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--ink);
    padding-left: 1.4rem;
    border-left: 3px solid var(--accent);
    margin-bottom: 1.6rem;
}

.ceo-bio {
    color: var(--muted);
    margin-bottom: 1.8rem;
}

.ceo-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ceo-details h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    margin-bottom: 1.4rem;
}

.ceo-details h4 i {
    color: var(--accent);
}

.career-list {
    list-style: none;
    position: relative;
    padding-left: 1.6rem;
}

.career-list::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--line);
}

.career-list li {
    position: relative;
    padding-bottom: 1.3rem;
}

.career-list li::before {
    content: '';
    position: absolute;
    left: -1.6rem;
    top: 0.45rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient);
}

.career-list .career-year {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
}

.career-list strong {
    display: block;
    font-family: var(--font-head);
}

.career-list span {
    color: var(--muted);
    font-size: 0.93rem;
}

.achievements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.achievement {
    padding: 1.3rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
}

.achievement i {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.achievement strong {
    display: block;
    font-family: var(--font-head);
    font-size: 1.6rem;
    line-height: 1.2;
}

.achievement span {
    color: var(--muted);
    font-size: 0.88rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(30, 155, 255, 0.08);
    border: 1px solid rgba(30, 155, 255, 0.25);
    color: var(--navy-800);
    font-size: 0.88rem;
    font-weight: 500;
}

.chip i {
    color: var(--accent);
}

/* Pilares */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pillar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
}

.pillar-card p {
    color: var(--muted);
}

.closing-note {
    margin-top: 3rem;
    padding: 2rem 2.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.closing-note strong {
    color: var(--ink);
}

/* ==========================================================================
   Servicios
   ========================================================================== */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
    padding: 3.5rem 0;
}

.service-row + .service-row {
    border-top: 1px solid var(--line);
}

.service-row:nth-child(even) .service-image {
    order: 2;
}

.service-image {
    position: relative;
}

.service-image img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.service-info h2 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin-bottom: 1.2rem;
}

.service-info p {
    color: var(--muted);
    margin-bottom: 1.8rem;
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr;
    gap: 2rem;
    align-items: stretch;
}

.contact-form-card,
.contact-info-card {
    display: flex;
    flex-direction: column;
}

.contact-form {
    flex: 1;
}

/* En escritorio el mensaje crece para igualar la altura de la tarjeta de información */
@media (min-width: 861px) {
    .contact-form {
        grid-template-rows: auto auto 1fr auto;
    }

    .form-field.full {
        display: flex;
        flex-direction: column;
    }

    .form-field.full textarea {
        flex: 1;
    }
}

.contact-form-card h2,
.contact-info-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.6rem;
}

.contact-form-card:hover,
.contact-info-card:hover {
    transform: none;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 0.45rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 155, 255, 0.15);
}

.form-field textarea {
    resize: vertical;
    min-height: 140px;
}

/* Campo trampa anti-spam: invisible para personas */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-field input.invalid,
.form-field textarea.invalid {
    border-color: #E5484D;
    background: #FFF7F7;
    box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.12);
}

/* Botón + aviso en la misma fila: el aviso ocupa un espacio fijo y no cambia el tamaño de la tarjeta */
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-actions .btn {
    flex-shrink: 0;
}

.form-message {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    line-height: 1.4;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.form-message.show {
    visibility: visible;
    opacity: 1;
    transform: none;
}

.form-message.success {
    background: #E7F8EF;
    color: #146C43;
    border: 1px solid #B7E4C7;
}

.form-message.error {
    background: #FDECEC;
    color: #A61B1B;
    border: 1px solid #F5C2C2;
}

.contact-info-card {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: var(--white);
}

.contact-info-card h2 {
    color: var(--white);
}

.contact-list {
    list-style: none;
    display: grid;
    gap: 1.4rem;
    margin-bottom: 2rem;
}

.contact-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-list .icon-chip {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    border-radius: 12px;
    margin: 0;
    flex-shrink: 0;
    color: var(--white);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-list a.icon-chip:hover {
    color: var(--white);
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(30, 155, 255, 0.5);
}

.contact-list strong {
    display: block;
    font-family: var(--font-head);
    margin-bottom: 0.15rem;
}

.contact-list span,
.contact-list a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}

.contact-list a:hover {
    color: var(--accent-2);
}

.contact-info-card .btn {
    width: 100%;
    margin-top: auto;
    background: #25D366;
    color: var(--white);
}

.map-container {
    margin-top: 2rem;
    height: 360px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background: var(--navy-950);
    color: rgba(255, 255, 255, 0.65);
    padding: 4.5rem 0 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.footer-brand .logo {
    height: 54px;
    margin-bottom: 1.2rem;
}

.footer-brand p {
    max-width: 280px;
}

.main-footer h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.main-footer ul {
    list-style: none;
    display: grid;
    gap: 0.65rem;
}

.main-footer ul a:hover {
    color: var(--accent-2);
}

.main-footer ul i {
    width: 1.2rem;
    color: var(--accent);
    margin-right: 0.4rem;
}

.social-links {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    transition: background 0.25s ease;
}

.social-links a:hover {
    background: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 999;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
}

/* Aparición suave al hacer scroll (la activa js/main.js) */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1024px) {
    .hero {
        --cell: 58px;
    }

    .services-grid,
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ceo-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    :root {
        --header-h: 68px;
    }

    .section {
        padding: 4.5rem 0;
    }

    .menu-toggle {
        display: flex;
    }

    .main-header {
        background: rgba(5, 10, 26, 0.92);
    }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem;
        background: var(--navy-950);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.35);
        transform: translateY(-120%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s ease;
    }

    .main-nav.open {
        transform: none;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.4rem;
    }

    .main-nav ul a {
        display: block;
        padding: 0.7rem 0;
        font-size: 1.05rem;
    }

    .main-nav ul a::after {
        display: none;
    }

    .main-nav ul a.active {
        color: var(--accent-2);
    }

    .hero {
        min-height: auto;
    }

    .hero-inner,
    .about-intro,
    .ceo-card,
    .service-row,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        gap: 3rem;
    }

    .hero-visual {
        display: none;
    }

    .about-intro,
    .service-row {
        gap: 2.5rem;
    }

    .service-row:nth-child(even) .service-image {
        order: 0;
    }

    .about-image img,
    .service-image img {
        height: 280px;
    }

    .established-year {
        right: 1rem;
        bottom: -1.2rem;
    }

    .ceo-card {
        gap: 3rem;
    }

    .ceo-photo {
        max-width: 360px;
        margin-right: 1.2rem;
    }

    /* Línea de tiempo en una sola columna */
    .timeline::before {
        left: 9px;
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 2rem 2.6rem;
    }

    .timeline-item::before,
    .timeline-item:nth-child(even)::before {
        left: 0;
        right: auto;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }

    .services-grid,
    .pillars-grid,
    .steps,
    .footer-grid,
    .achievements,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .hero .eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .hero-stats {
        gap: 1.5rem;
        justify-content: space-between;
    }

    .hero-stats strong {
        font-size: 1.5rem;
    }

    .hero-stats span {
        font-size: 0.78rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .stats-band {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-band {
        padding: 3rem 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .cliente-item {
        width: 170px;
        height: 90px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-message {
        text-align: center;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }
}

/* Respeta la preferencia de "reducir movimiento" */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .carousel {
        overflow-x: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
