/* =========================================================
   SESAB — Rediseño corporativo (v2)
   Archivo nuevo: no reemplaza style.css ni wspstyle.css
   Forma firma: el círculo azul de la señal de "uso obligatorio".
   PALETA institucional (tomada de style.css): editar solo aquí.
   ========================================================= */
:root {
  --primary: #428bca;      /* azul institucional */
  --primary-600: #2f78b8;  /* azul para botones con texto blanco (contraste AA) */
  --primary-700: #1c5c93;  /* azul profundo */
  --sky: #9eccf4;          /* azul claro */
  --slate: #5c768d;        /* gris azulado */
  --navy: #0d1e2d;         /* overlay del hero */
  --navy-2: #1f3548;       /* azul marino */
  --ink: #343a40;          /* títulos */
  --text: #444;            /* texto base original */
  --line: #d9e8f4;
  --soft: #f5f9fc;         /* section-bg original */
  --tint: #e7f1fb;         /* azul claro suave (derivado de --sky) */

  --font-display: "Raleway", "Segoe UI", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22,.8,.2,1);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.7; color: var(--text); background: #fff; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-variant-numeric: lining-nums; text-wrap: balance; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--navy-2); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; color: #fff; }

/* Círculo con icono: la forma firma */
.icon, .count-icon, .f-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.icon { width: 52px; height: 52px; background: #fff; color: var(--primary-700); border: 1px solid var(--line); transition: background .3s, color .3s, border-color .3s; }
.icon .ic { width: 24px; height: 24px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 30px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .98rem; letter-spacing: .01em; border: 1.5px solid transparent; background-repeat: no-repeat; background-position: left center; background-size: 0% 100%; transition: background-size .5s var(--ease), color .35s, border-color .35s, transform .35s var(--ease), box-shadow .35s; }
.btn:hover { background-size: 100% 100%; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #fff; background-color: var(--primary-600); background-image: linear-gradient(var(--navy-2), var(--navy-2)); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 30px rgba(28,92,147,.35); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); background-image: linear-gradient(#fff, #fff); }
.btn-ghost:hover { color: var(--navy-2); border-color: #fff; }
.btn-lg { min-height: 56px; padding-inline: 40px; }
#hero .btn-primary { background-image: linear-gradient(#fff, #fff); }
#hero .btn-primary:hover { color: var(--navy-2); box-shadow: 0 14px 34px rgba(0,0,0,.3); }

/* ---------- Top bar ---------- */
#topbar { display: none; background: var(--navy); color: rgba(255,255,255,.82); font-size: .84rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.contact-info { display: flex; gap: 26px; }
.contact-info a, #topbar .social-links a { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.contact-info a:hover, #topbar .social-links a:hover { color: var(--sky); }
#topbar .social-links { display: flex; gap: 16px; }
#topbar .ic { width: 1.05em; height: 1.05em; }
@media (min-width: 992px) { #topbar { display: block; } }

/* ---------- Header ---------- */
#header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: box-shadow .35s, border-color .35s; }
#header.is-scrolled { box-shadow: 0 10px 30px rgba(13,30,45,.08); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.logo img { height: 48px; width: auto; object-fit: contain; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy-2); transition: background .25s, border-color .25s; }
.nav-toggle:hover { background: var(--soft); border-color: var(--sky); }
.nav-toggle .ic { width: 24px; height: 24px; }

.nav-menu { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(13,30,45,.12); padding: 8px 20px 24px; max-height: 0; overflow: hidden; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .3s var(--ease), max-height .35s, visibility .35s; }
.nav-menu.is-open { max-height: 80vh; visibility: visible; opacity: 1; transform: none; }
.nav-menu a { display: block; padding: 15px 4px; font-family: var(--font-display); font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.nav-menu li:last-child a { border: 0; margin-top: 14px; }
.nav-menu a.active { color: var(--primary-700); }
.nav-cta { text-align: center; background: var(--navy-2); color: #fff !important; border-radius: 999px; }

@media (min-width: 992px) {
  .nav-toggle { display: none; }
  .nav-menu { position: static; max-height: none; overflow: visible; visibility: visible; opacity: 1; transform: none; padding: 0; border: 0; box-shadow: none; background: none; }
  .nav-menu ul { display: flex; align-items: center; gap: 2px; }
  .nav-menu a { position: relative; padding: 10px 16px; border: 0; border-radius: 999px; font-size: .92rem; transition: background .25s, color .25s; }
  .nav-menu li:last-child a { margin: 0 0 0 12px; padding: 11px 24px; }
  .nav-menu li:not(:last-child) a:hover { background: var(--soft); color: var(--primary-700); }
  .nav-menu li:not(:last-child) a::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--primary); transform: scale(0); transition: transform .35s var(--ease); }
  .nav-menu li:not(:last-child) a.active::after { transform: scale(1); }
  .nav-cta:hover { background: var(--primary-700); }
}

/* ---------- Hero ---------- */
#hero { position: relative; display: flex; flex-direction: column; min-height: clamp(620px, 90svh, 860px); background: var(--navy); color: #fff; overflow: hidden; }
.hero-bgs, .hero-bg { position: absolute; inset: 0; }
.hero-bg { background-size: cover; background-position: center; opacity: 0; transition: opacity 1.3s ease; }
.hero-bg.is-active { opacity: 1; }
#hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(105deg, rgba(13,30,45,.95) 0%, rgba(13,30,45,.86) 50%, rgba(31,53,72,.7) 100%); }
.hero-grid { position: relative; z-index: 2; flex: 1; display: grid; align-items: center; gap: 48px; padding-block: 64px 130px; }
.hero-copy { display: grid; max-width: 640px; }
.slide { grid-area: 1 / 1; align-self: center; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide h1, .slide h2 { font-size: clamp(2.5rem, 5.8vw, 4.6rem); font-weight: 700; line-height: 1.03; letter-spacing: -.035em; }
.slide p { margin-top: 24px; max-width: 34em; font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.7; color: rgba(255,255,255,.84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.slide.is-active > * { animation: rise .9s var(--ease) both; }
.slide.is-active > :nth-child(2) { animation-delay: .1s; }
.slide.is-active > :nth-child(3) { animation-delay: .2s; }

/* Disco con foto: la forma firma */
.hero-art { display: none; position: relative; justify-self: end; width: min(40vw, 500px); aspect-ratio: 1; }
.art-disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--navy-2); box-shadow: 0 50px 90px rgba(0,0,0,.4); }
.disc-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.1); transition: opacity 1.1s ease, transform 1.8s var(--ease); }
.disc-img.is-active { opacity: 1; transform: none; }
.art-ring { position: absolute; inset: -26px; border-radius: 50%; border: 1px solid rgba(158,204,244,.3); }
.art-ring::before { 
    content: ""; 
    position: absolute; 
    inset: -1px; 
    border-radius: 50%; 
    /* 4 líneas azules idénticas con huecos exactos para los 4 iconos */
    background: repeating-conic-gradient(from -15deg, var(--primary) 0deg 30deg, transparent 30deg 90deg); 
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); 
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); 
    
    /* EL TRUCO: Convertimos los 120 grados del JS en 90 grados exactos */
    transform: rotate(calc(var(--rot, 0deg) * 0.75)); 
    transition: transform 1.5s var(--ease); 
}
.art-badge { position: absolute; width: 60px; height: 60px; border-radius: 50%; background: #fff; color: var(--primary-700); display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 34px rgba(0,0,0,.28); animation: pop .9s var(--ease) both; }
.art-badge .ic { width: 26px; height: 26px; }
.art-badge.b1 { top: 9%; left: 9%; animation-delay: .5s; }
.art-badge.b2 { top: 9%; right: 9%; animation-delay: .65s; }
.art-badge.b3 { bottom: 9%; left: 9%; animation-delay: .8s; }
.art-badge.b4 { bottom: 9%; right: 9%; animation-delay: .95s; }

@media (min-width: 992px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero-art { display: block; } }

.hero-controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 30px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-progress { display: flex; flex: 1; gap: 12px; max-width: 340px; }
.bar { position: relative; flex: 1; height: 28px; padding: 0; border: 0; background: none; }
.bar::before, .bar .fill { content: ""; position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; }
.bar::before { right: 0; background: rgba(255,255,255,.26); transition: background .25s; }
.bar:hover::before { background: rgba(255,255,255,.45); }
.bar .fill { width: 0; background: #fff; }
.bar[aria-selected="true"] .fill { animation: barfill 7s linear forwards; }
#hero.is-paused .bar .fill { animation-play-state: paused; }
.hero-arrows { display: flex; gap: 10px; }
.hero-arrow { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); transition: background .3s, color .3s, transform .35s var(--ease); }
.hero-arrow:hover { background: #fff; color: var(--navy-2); transform: scale(1.06); }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes barfill { from { width: 0; } to { width: 100%; } }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(80px, 11vw, 140px); }
.section-title { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-title h2, .contact-side h2 { display: flex; align-items: center; gap: 16px; font-size: clamp(2.1rem, 4.8vw, 3.5rem); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; color: var(--navy-2); }
.section-title h2::before, .contact-side h2::before { content: ""; flex: none; width: .3em; height: .3em; border-radius: 50%; background: var(--primary); }
.section-title p { margin-top: 18px; max-width: 54ch; font-size: 1.08rem; color: var(--slate); }
.section-title p.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text); }

/* Revelados al hacer scroll (sobrios) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-group > * { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal-group > :nth-child(2) { transition-delay: .12s; }
.js .reveal-group > :nth-child(3) { transition-delay: .24s; }
.js .reveal-group > :nth-child(4) { transition-delay: .36s; }
.js .reveal-group.is-visible > * { opacity: 1; transform: none; }

/* Corrección de la intención inicial para .wipe */
.js .wipe { 
  -webkit-clip-path: inset(0 100% 0 0 round 24px);
  clip-path: inset(0 100% 0 0 round 24px); 
  transition: clip-path 1.3s var(--ease), -webkit-clip-path 1.3s var(--ease); 
}
.js .wipe.is-visible { 
  -webkit-clip-path: inset(0 0 0 0 round 24px);
  clip-path: inset(0 0 0 0 round 24px); 
}
/* Anulamos el salto/opacidad si se combina con .reveal para que solo haga el barrido */
.js .wipe.reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Animaciones de Flotación para About ---------- */
@keyframes floatImage {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes floatRing {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(15px) scale(1.04); }
}

/* ---------- Quienes somos ---------- */
.about-grid { display: grid; gap: 56px; align-items: center; }
.about-media { position: relative; padding-bottom: 20px; }
.about-frame { position: relative; z-index: 1; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 60px rgba(28,92,147,.18); animation: floatImage 7s ease-in-out infinite; }
.about-frame img { width: 100%; transition: transform 1.2s var(--ease); }
.about-media:hover .about-frame img { transform: scale(1.03); }
.about-dot { position: absolute; z-index: 0; right: -18px; bottom: -6px; width: 120px; aspect-ratio: 1; border-radius: 50%; border: 16px solid var(--primary); animation: floatRing 8s ease-in-out infinite; }
.about-content .section-title { margin-bottom: 36px; }

.mv-panel { display: grid; border: 1px solid var(--line); border-radius: 20px; background: var(--soft); overflow: hidden; }
.mv-item { padding: 28px; transition: background .35s; }
.mv-item + .mv-item { border-top: 1px solid var(--line); }
.mv-item:hover { background: #fff; }
.mv-item:hover .icon { background: var(--primary-700); color: #fff; border-color: var(--primary-700); }
.mv-item h3 { margin: 18px 0 8px; font-size: 1.1rem; font-weight: 700; color: var(--navy-2); }
.mv-item p { font-size: .98rem; color: var(--text); }
@media (min-width: 640px) { .mv-panel { grid-template-columns: 1fr 1fr; } .mv-item + .mv-item { border-top: 0; border-left: 1px solid var(--line); } }
@media (min-width: 992px) { .about-grid { grid-template-columns: .95fr 1fr; gap: 88px; } .about-dot { right: -44px; bottom: -22px; width: 170px; border-width: 22px; } }

/* ---------- Contadores ---------- */
/* ---------- Contadores ---------- */
.counts { padding-block: clamp(56px, 8vw, 88px); background: var(--soft); }
.counts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px; perspective: 1000px; }

.count-box { 
    padding: 24px; 
    border-radius: 16px;
    background: transparent;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
    will-change: transform;
}

/* Efecto Hover: Eleva el contador, le pone fondo blanco y sombra suave */
.count-box:hover {
    transform: translateY(-8px) scale(1.02);
    background: #fff;
    box-shadow: 0 20px 40px rgba(28, 92, 147, 0.08);
}

.count-icon { 
    width: 46px; height: 46px; 
    margin-bottom: 18px; 
    background: #fff; 
    color: var(--primary-700); 
    border: 1px solid var(--line); 
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.count-icon .ic { width: 22px; height: 22px; }

/* El icono también reacciona al pasar el mouse por el contenedor */
.count-box:hover .count-icon {
    transform: scale(1.1);
    background: var(--primary-700);
    color: #fff;
    border-color: var(--primary-700);
}

.count-box .num { 
    display: block; 
    font-family: var(--font-display); 
    font-weight: 700; 
    font-size: clamp(2.8rem, 6.5vw, 4.5rem); 
    line-height: 1; 
    letter-spacing: -.035em; 
    color: var(--primary-700); 
    font-variant-numeric: lining-nums tabular-nums; 
}
.count-box p { margin-top: 10px; color: var(--slate); font-size: .98rem; font-weight: 600; }

@media (min-width: 992px) { 
    .counts-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } 
    .count-box { padding: 32px 24px; text-align: center; } 
    /* Quitamos el borde izquierdo para que la tarjeta completa destaque al hacer hover */
    .count-box + .count-box { border-left: none; } 
    
    /* Agregamos una línea divisoria sutil entre elementos, que desaparece al hacer hover */
    .count-box:not(:hover) {
        position: relative;
    }
    .count-box:not(:first-child):not(:hover)::before {
        content: "";
        position: absolute;
        left: -8px;
        top: 20%;
        bottom: 20%;
        width: 1px;
        background: var(--line);
    }
}
/* ---------- Servicios ---------- */
/* ---------- Servicios ---------- */
.services { background: #fff; }
/* Se añadió reveal-group al contenedor para animar la entrada de las tarjetas */
.services-grid { display: grid; gap: 24px; align-items: start; }
.service { 
    border-radius: 28px; 
    padding: clamp(28px, 4vw, 52px); 
    /* Transiciones suaves para el hover general de la tarjeta */
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    will-change: transform;
}

/* Efecto hover general para las tarjetas: se elevan y ganan sombra */
.service:hover {
    transform: translateY(-8px);
}
.service-main:hover {
    box-shadow: 0 20px 40px rgba(13, 30, 45, 0.25);
}
.service-side:hover {
    box-shadow: 0 20px 40px rgba(66, 139, 202, 0.15);
}

.service-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.service-head h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 700; line-height: 1.2; }
/* Animación para el icono del encabezado */
.service .icon {
    transition: transform 0.4s var(--ease), background-color 0.3s ease, color 0.3s ease;
}
.service:hover .icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-list li { position: relative; padding: 15px 0 15px 26px; line-height: 1.55; transition: transform .35s var(--ease); }
.service-list li::before { content: ""; position: absolute; left: 0; top: 24px; width: 8px; height: 8px; border-radius: 50%; transition: transform .35s var(--ease); }
.service-list li:hover { transform: translateX(6px); }
.service-list li:hover::before { transform: scale(1.5); }

.service-main { background: var(--navy-2); color: #fff; }
.service-main .icon { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: var(--sky); }
.service-main:hover .icon { background: var(--sky); color: var(--navy-2); border-color: transparent; }
.service-main .service-list li { color: rgba(255,255,255,.92); border-top: 1px solid rgba(255,255,255,.14); break-inside: avoid; }
.service-main .service-list li::before { background: var(--sky); }

.service-side { background: var(--tint); background: color-mix(in srgb, var(--sky) 26%, #fff); color: var(--navy-2); }
.service-side .icon { background: #fff; border-color: transparent; }
.service-side:hover .icon { background: var(--primary-700); color: #fff; }
.service-side .service-list li { border-top: 1px solid rgba(31,53,72,.14); }
.service-side .service-list li::before { background: var(--primary-700); }

@media (min-width: 640px) { .service-main .service-list { columns: 2; column-gap: 48px; } }
@media (min-width: 992px) { .services-grid { grid-template-columns: 1.55fr 1fr; gap: 28px; } }
/* ---------- Portafolio ---------- */
.portfolio { background: var(--soft); }
.portfolio .section-title { margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filters button { min-height: 46px; padding: 8px 22px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; transition: background .3s, color .3s, border-color .3s, transform .35s var(--ease); }
.filters button:hover { border-color: var(--primary); color: var(--primary-700); transform: translateY(-2px); }
.filters button.is-active { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }

.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 16px; grid-auto-flow: dense; }
.p-item[hidden] { display: none; }
.p-item.is-in { animation: popIn .6s var(--ease) both; }
.p-link { position: relative; display: block; height: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; background: var(--tint); }
.p-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.p-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; color: #fff; background: linear-gradient(to top, rgba(13,30,45,.88) 0%, rgba(13,30,45,.2) 55%, transparent 100%); opacity: 0; transition: opacity .4s; }
.p-text { display: flex; flex-direction: column; transform: translateY(12px); transition: transform .5s var(--ease); }
.p-text strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.p-text small { font-size: .85rem; color: rgba(255,255,255,.8); }
.is-feature .p-text strong { font-size: 1.4rem; }
.p-zoom { position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--primary-700); display: flex; align-items: center; justify-content: center; transform: scale(.5); transition: transform .5s var(--ease); }
.p-link:hover img, .p-link:focus-visible img { transform: scale(1.06); }
.p-link:hover .p-overlay, .p-link:focus-visible .p-overlay { opacity: 1; }
.p-link:hover .p-text, .p-link:focus-visible .p-text { transform: none; }
.p-link:hover .p-zoom, .p-link:focus-visible .p-zoom { transform: scale(1); }
@media (hover: none) { .p-overlay { opacity: 1; background: linear-gradient(to top, rgba(13,30,45,.78) 0%, transparent 45%); } .p-text { transform: none; } .p-zoom { display: none; } }
@media (min-width: 560px) { .portfolio-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 250px; gap: 20px; }
  .p-link { aspect-ratio: auto; }
  .p-item.is-feature { grid-column: span 2; grid-row: span 2; }
}
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(6,14,22,.94); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox figure { max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; transform: scale(.96); transition: transform .4s var(--ease); }
.lightbox.is-open figure { transform: none; }
.lightbox img { max-height: calc(100svh - 150px); width: auto; max-width: 100%; border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.5); object-fit: contain; }
.lightbox figcaption { color: #fff; text-align: center; }
.lightbox figcaption strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.lightbox figcaption span { color: rgba(255,255,255,.7); font-size: .9rem; }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .25s, color .25s; }
.lb-btn:hover { background: #fff; color: var(--navy-2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
body.no-scroll { overflow: hidden; }

/* ---------- Clientes ---------- */
/* ---------- Clientes ---------- */
.clients { background: #fff; }
.clients-wall { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1px; 
    background: var(--line); 
    border: 1px solid var(--line); 
    border-radius: 24px; 
    overflow: hidden; 
}

.client { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    padding: 32px 18px 28px; 
    background: #fff; 
    /* Transición suave para el salto de la tarjeta completa */
    transition: background .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease), border-radius .4s; 
    position: relative;
    z-index: 1;
}

/* Efecto hover sobre la celda del cliente */
.client:hover { 
    background: #fff; 
    transform: scale(1.05); /* Hace que la tarjeta resalte hacia el frente */
    box-shadow: 0 15px 35px rgba(13, 30, 45, 0.12); /* Sombra elegante */
    z-index: 2; /* Se sobrepone a los bordes de la cuadrícula */
    border-radius: 16px; /* Redondea un poco los bordes al saltar */
}

.client-logo { 
    width: 100%; 
    height: 100px; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.client-logo img { 
    max-width: 100%; 
    max-height: 100%; 
    width: auto; 
    height: auto; 
    object-fit: contain; 
    filter: grayscale(1); 
    opacity: .5; /* Más transparente en estado normal */
    /* Transición enfocada en el zoom y el color de la imagen */
    transition: filter .5s, opacity .5s, transform .5s var(--ease); 
}

/* ZOOM pronunciado y color original al hacer hover en el logo */
.client:hover .client-logo img { 
    filter: grayscale(0); /* Recupera los colores */
    opacity: 1; 
    transform: scale(1.2); /* Zoom notorio al logo */
}

.client h3 { 
    font-size: .98rem; 
    font-weight: 700; 
    line-height: 1.3; 
    color: var(--navy-2); 
    transition: color .3s; 
}
.client:hover h3 { 
    color: var(--primary); /* El título se pinta del azul principal */
}

.client p { margin-top: 6px; font-size: .86rem; line-height: 1.5; color: var(--slate); }

@media (min-width: 992px) { 
    .clients-wall { grid-template-columns: repeat(5, 1fr); } 
}

/* Extensión de .reveal-group para soportar los 10 clientes en cascada */
.js .reveal-group > :nth-child(5) { transition-delay: .48s; }
.js .reveal-group > :nth-child(6) { transition-delay: .60s; }
.js .reveal-group > :nth-child(7) { transition-delay: .72s; }
.js .reveal-group > :nth-child(8) { transition-delay: .84s; }
.js .reveal-group > :nth-child(9) { transition-delay: .96s; }
.js .reveal-group > :nth-child(10) { transition-delay: 1.08s; }

/* ---------- Contacto ---------- */
.contact { background: var(--soft); }

.contact-panel { 
    display: grid; 
    border-radius: 32px; 
    overflow: hidden; 
    background: #fff; 
    box-shadow: 0 34px 80px rgba(13,30,45,.14); 
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

/* Efecto hover sobre el panel completo */
.contact-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 45px 90px rgba(13,30,45,.2); 
}

.contact-side { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 64px); background: var(--navy-2); color: #fff; }
.contact-side::after { content: ""; position: absolute; right: -150px; bottom: -150px; width: 360px; aspect-ratio: 1; border-radius: 50%; border: 44px solid rgba(66,139,202,.2); pointer-events: none; transition: transform 0.8s ease; }
.contact-panel:hover .contact-side::after { transform: scale(1.1); }

.contact-side h2 { color: #fff; margin-bottom: 40px; transition: color 0.3s; }
.contact-side h2::before { background: var(--sky); transition: transform 0.3s; }
.contact-side:hover h2::before { transform: scale(1.3); }

.contact-points { position: relative; z-index: 1; display: grid; gap: 28px; }
.contact-points li { display: flex; align-items: center; gap: 18px; transition: transform 0.3s var(--ease); }

/* Efecto hover sobre cada punto de contacto (Dirección, Email, Teléfono) */
.contact-points li:hover { transform: translateX(8px); }

.contact-side .icon { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: var(--sky); transition: transform 0.3s, background 0.3s, border-color 0.3s, color 0.3s; }

/* El icono salta y gira ligeramente */
.contact-points li:hover .icon { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.1) rotate(5deg); }

.contact-points h3 { font-family: var(--font-body); font-size: .86rem; font-weight: 600; color: var(--sky); transition: color 0.3s; }
.contact-points li:hover h3 { color: #fff; }
.contact-points p, .contact-points a { color: #fff; font-size: 1.08rem; line-height: 1.45; overflow-wrap: anywhere; transition: color 0.3s; }
.contact-points a:hover { color: var(--sky); }

.contact-form { padding: clamp(28px, 5vw, 64px); align-self: center; }
.form-row { display: grid; gap: 0 32px; }
.form-group { margin-bottom: 14px; position: relative; }
.form-control { width: 100%; padding: 16px 2px; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; transition: border-color .3s, background-color 0.3s, padding-left 0.3s; }
.form-control::placeholder { color: #667b8c; transition: opacity 0.3s; }

/* Efectos al pasar el mouse por encima y al enfocar los inputs del formulario */
.form-control:hover { border-bottom-color: var(--sky); background-color: rgba(158, 204, 244, 0.05); padding-left: 8px; }
.form-control:focus { outline: 0; border-bottom-color: var(--primary-700); box-shadow: 0 1.5px 0 var(--primary-700); background-color: transparent; padding-left: 8px; }
.form-control:focus::placeholder { opacity: 0.5; }
.form-control.is-invalid { border-bottom-color: #c0392b; }

textarea.form-control { resize: vertical; min-height: 130px; }
.validate { margin-top: 6px; font-size: .85rem; color: #b03020; }
.form-status > div { padding: 12px 16px; border-radius: 12px; margin: 8px 0 16px; font-weight: 600; }
.form-status [hidden] { display: none; }
.loading { background: var(--soft); color: var(--slate); }
.error-message { background: #fdecea; color: #a02818; }
.sent-message { background: var(--tint); color: var(--primary-700); }
.form-submit { margin-top: 16px; }
.form-submit .btn[disabled] { opacity: .6; pointer-events: none; }

@media (min-width: 768px) { .form-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .contact-panel { grid-template-columns: 5fr 7fr; } }
/* ---------- Footer ---------- */
#footer { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 100%); color: rgba(255,255,255,.78); font-size: .95rem; }
#footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--primary-700), var(--primary), var(--sky)); }
#footer::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(66,139,202,.28), transparent 68%); pointer-events: none; }
.footer-main { position: relative; z-index: 1; display: grid; gap: 40px; padding-block: 64px 48px; }
.footer-info .footer-logo { display: inline-block; margin-bottom: 20px; padding: 8px 14px; border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.footer-info .footer-logo img { height: 44px; width: auto; }
#footer h3 { color: #fff; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }
#footer h4 { position: relative; margin-bottom: 22px; padding-bottom: 14px; color: #fff; font-size: 1.05rem; font-weight: 700; }
#footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--primary); }
.footer-list { display: grid; gap: 16px; }
.footer-list li { display: flex; align-items: flex-start; gap: 14px; line-height: 1.5; }
.f-icon { width: 42px; height: 42px; background: rgba(255,255,255,.08); color: var(--sky); transition: background .3s, color .3s; }
.f-icon .ic { width: 20px; height: 20px; }
.footer-list li:hover .f-icon { background: var(--primary); color: #fff; }
.footer-list strong { display: block; color: rgba(255,255,255,.65); font-size: .85rem; font-weight: 600; }
.footer-list .v { color: #fff; }
#footer a { color: #fff; }
#footer a:hover { color: var(--sky); }
.footer-social .social-links { display: grid; gap: 12px; }
.footer-social .social-links a { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-weight: 600; transition: background .3s, border-color .3s, transform .35s var(--ease); }
.footer-social .social-links a .ic { width: 22px; height: 22px; color: var(--sky); transition: color .3s; }
.footer-social .social-links a:hover { background: var(--primary-600); border-color: var(--primary); color: #fff; transform: translateX(6px); }
.footer-social .social-links a:hover .ic { color: #fff; }
.footer-bottom { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: 22px; font-size: .85rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.footer-nav a { color: rgba(255,255,255,.72); }
.footer-copy { color: rgba(255,255,255,.6); }
@media (min-width: 768px) { .footer-main { grid-template-columns: 1.3fr 1fr; gap: 48px 56px; } }
@media (min-width: 992px) { .footer-main { grid-template-columns: 1.4fr 1.1fr 1fr; padding-block: 80px 60px; } .footer-bottom-inner { flex-direction: row; justify-content: space-between; } }

/* ---------- Flotantes ---------- */
.float { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(37,211,102,.45); transition: transform .35s var(--ease); }
.float:hover { color: #fff; transform: scale(1.08); }
.float .ic { width: 30px; height: 30px; }
.back-to-top { position: fixed; right: 23px; bottom: 90px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--navy-2); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(13,30,45,.2); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .35s var(--ease), visibility .3s, background .25s, color .25s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--navy-2); color: #fff; }
.back-to-top .ic { width: 20px; height: 20px; }
.progress-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 2.5; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--primary); stroke-linecap: round; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal, .js .reveal-group > * { opacity: 1; transform: none; }
  .js .wipe { clip-path: none; }
  .bar[aria-selected="true"] .fill { width: 100%; }
}