/* =========================================================================
   Summr — sitio corporativo (summr.cc).

   Comparte identidad con la landing del producto (`landing-app/`): misma base
   oceánica casi negra y los mismos acentos luminosos. Lo propio de acá es la
   **constelación**: los productos como nodos de un árbol por el que circula
   energía. Es el gesto de la marca — sistemas conectados, no piezas sueltas.
   ========================================================================= */

:root {
  --abismo: #03141B;
  --hondo: #062430;
  --marina: #0C4459;
  --aqua: #5BE9DE;
  --cian: #22B8E0;
  --marea: #0A84E8;
  --oceano: #0E6F8A;
  --grad: linear-gradient(118deg, var(--aqua) 0%, var(--cian) 46%, var(--marea) 100%);
  --papel: #FCFAF6;
  --hueso: #F3F0E8;
  --filete: #E1DBCC;
  --tinta: #072530;
  --tinta-suave: #5C6B70;
  --tinta-tenue: #8A9296;
  --claro: #EDF8FA;
  --claro-medio: #9FC6D2;
  --claro-tenue: #628C9B;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "SF Mono", monospace;
  --r: 16px;
  --nav-h: 68px;
  --ease: cubic-bezier(.22, .68, .28, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--papel); color: var(--tinta);
  font-family: var(--sans); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.022em; margin: 0; }
h1 i, h2 i, h3 i { font-style: italic; }
p { margin: 0; }
a { color: inherit; }
.wrap { width: min(1180px, 92vw); margin-inline: auto; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--hondo); color: #fff; padding: 12px 18px; }
.skip:focus { left: 0; }

/* entradas ---------------------------------------------------------------- */
.js [data-reveal], .js [data-reveal-group] > * { opacity: 0; transform: translateY(22px); }
.js [data-reveal].is-in, .js [data-reveal-group].is-in > * {
  opacity: 1; transform: none; transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.js [data-reveal-group].is-in > *:nth-child(2) { transition-delay: .08s; }
.js [data-reveal-group].is-in > *:nth-child(3) { transition-delay: .16s; }
.js [data-reveal-group].is-in > *:nth-child(4) { transition-delay: .24s; }
.js [data-reveal-group].is-in > *:nth-child(5) { transition-delay: .32s; }

/* nav --------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-stuck {
  background: rgba(4, 22, 29, .74); backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: rgba(91, 233, 222, .18);
}
.nav__in { display: flex; align-items: center; gap: 26px; height: var(--nav-h); }
.nav__brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--claro); }
.nav__brand img { width: 38px; transition: transform .4s var(--ease); }
.nav__brand:hover img { transform: translateY(-2px) rotate(-3deg); }
.nav__brand span { font-family: var(--serif); font-size: 20px; letter-spacing: .01em; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { position: relative; color: var(--claro-medio); text-decoration: none; font-size: 14.5px; padding: 6px 0; transition: color .22s var(--ease); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--grad);
  border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:hover { color: var(--claro); }
.nav__links a:hover::after { transform: scaleX(1); }

/* botones ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--grad); background-size: 180% 100%; background-position: 0 50%;
  color: #04222B; border: 0; border-radius: 12px; padding: 12px 22px;
  font: 650 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 22px -8px rgba(34, 184, 224, .7);
  transition: background-position .5s var(--ease), transform .2s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { background-position: 100% 50%; transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(34, 184, 224, .9); }
.btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }
.btn--sm { padding: 10px 17px; font-size: 14px; }
.btn--lg { padding: 16px 28px; font-size: 16.5px; border-radius: 14px; }
.btn--ghost { background: rgba(237, 248, 250, .04); color: var(--claro); box-shadow: none; border: 1px solid rgba(159, 198, 210, .3); }
.btn--ghost:hover { background: rgba(237, 248, 250, .09); border-color: var(--aqua); box-shadow: none; }

/* hero + constelación ------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; overflow: hidden; background: var(--abismo); color: var(--claro);
  padding: calc(var(--nav-h) + clamp(58px, 9vw, 110px)) 0 clamp(20px, 4vw, 40px);
  text-align: center;
}
.hero::before, .hero::after, .cierre::before {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.hero::before {
  width: 58vw; height: 38vw; top: -12vw; left: 6vw;
  background: radial-gradient(circle, rgba(34, 184, 224, .72), transparent 68%);
  animation: deriva-a 28s ease-in-out infinite alternate;
}
.hero::after {
  width: 50vw; height: 34vw; top: 4vw; right: 0;
  background: radial-gradient(circle, rgba(91, 233, 222, .48), transparent 68%);
  animation: deriva-b 34s ease-in-out infinite alternate;
}
@keyframes deriva-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vw,4vw,0) scale(1.12); } }
@keyframes deriva-b { from { transform: translate3d(0,0,0) scale(1.06); } to { transform: translate3d(-7vw,5vw,0) scale(.94); } }

.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--aqua); margin: 0 0 22px; padding: 7px 14px; border-radius: 99px;
  background: rgba(91, 233, 222, .09); border: 1px solid rgba(91, 233, 222, .26);
}
.eyebrow--dark { color: var(--oceano); background: rgba(14, 111, 138, .07); border-color: rgba(14, 111, 138, .2); }

.hero h1 { font-size: clamp(44px, 7.4vw, 86px); line-height: 1.03; margin: 0 auto 26px; max-width: 14ch; }
.hero h1 i { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { max-width: 62ch; margin: 0 auto; color: var(--claro-medio); font-size: clamp(16px, 1.7vw, 19.5px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 36px 0 0; }

.const { position: relative; margin: clamp(24px, 4vw, 46px) auto 0; width: min(1200px, 96vw); }
.const svg { width: 100%; height: auto; overflow: visible; }
/* La energía recorre el hilo: el trazo avanza en bucle. */
.const__hilos path {
  stroke-width: 2; opacity: .55;
  stroke-dasharray: 26 300; stroke-dashoffset: 326;
  animation: recorrer 6s linear infinite;
}
.const__hilos path:nth-child(2) { animation-delay: .7s; }
.const__hilos path:nth-child(3) { animation-delay: 1.4s; }
.const__hilos path:nth-child(4) { animation-delay: 2.1s; }
.const__hilos path:nth-child(5) { animation-delay: 2.8s; }
.const__hilos path:nth-child(6) { animation-delay: 3.5s; }
.const__hilos path:nth-child(7) { animation-delay: 4.2s; }
.const__hilos path:nth-child(8) { animation-delay: 4.9s; }
@keyframes recorrer { to { stroke-dashoffset: 0; } }

.const__nodos .n { fill: var(--cian); animation: latir 3.4s ease-in-out infinite; }
.const__nodos .n--raiz { fill: var(--aqua); }
.const__nodos .n:nth-child(2) { animation-delay: .4s; }
.const__nodos .n:nth-child(3) { animation-delay: .8s; }
.const__nodos .n:nth-child(4) { animation-delay: 1.2s; }
.const__nodos .n:nth-child(5) { animation-delay: 1.6s; }
.const__nodos .n:nth-child(6) { animation-delay: 2s; }
.const__nodos .n:nth-child(7) { animation-delay: 2.4s; }
@keyframes latir { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* chispas sueltas: el aire alrededor del árbol */
.chispa {
  position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; border-radius: 50%;
  background: var(--aqua); box-shadow: 0 0 12px 2px rgba(91, 233, 222, .8); opacity: 0;
  animation: chispear 7s ease-in-out infinite; animation-delay: var(--d);
}
@keyframes chispear {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  35% { opacity: 1; transform: translateY(-16px) scale(1); }
  70% { opacity: 0; transform: translateY(-34px) scale(.5); }
  100% { opacity: 0; }
}

/* tira -------------------------------------------------------------------- */
.tira { background: var(--abismo); color: var(--claro-tenue); padding: 22px 0 28px; }
.tira__in {
  display: flex; flex-wrap: wrap; gap: 12px 44px; justify-content: center;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
}

/* secciones --------------------------------------------------------------- */
.seccion { padding: clamp(72px, 9vw, 118px) 0; }
.seccion--papel { background: var(--hueso); border-block: 1px solid var(--filete); }
.seccion__head { max-width: 48ch; margin: 0 0 clamp(36px, 4vw, 56px); }
.seccion__head h2 { font-size: clamp(31px, 4.1vw, 48px); line-height: 1.1; }
.seccion__head h2 i { color: var(--oceano); }
.seccion__lead { margin-top: 15px; color: var(--tinta-suave); }

/* productos --------------------------------------------------------------- */
.prods { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; }
.prod {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--papel); border: 1px solid var(--filete); border-radius: var(--r);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.prod:hover { transform: translateY(-6px); border-color: rgba(14, 111, 138, .42); box-shadow: 0 26px 46px -30px rgba(7, 37, 48, .65); }
.prod--ancha { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .prod--ancha { flex-direction: row; align-items: stretch; }
  /* La destacada sí conserva la proporción real de la captura del editor. */
  .prod--ancha .prod__shot { width: 56%; aspect-ratio: auto; }
  .prod--ancha .prod__txt { width: 44%; display: flex; flex-direction: column; justify-content: center; }
}
/* Proporción fija en todas las miniaturas: las capturas vienen de productos
   distintos (16:9 de un juego, el recorte vertical de un login, una captura
   apaisada del editor) y sin esto la fila quedaba escalonada. */
.prod__shot { display: block; background: var(--hueso); overflow: hidden; aspect-ratio: 16 / 10; }
.prod__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s var(--ease); }
.prod:hover .prod__shot img { transform: scale(1.03); }
.prod__shot--claro { background: #EFEFEA; }
.prod__shot--ilustrada { background: linear-gradient(150deg, #06222E, #0C4459); padding: 26px 20px; }
.prod__shot--ilustrada svg { width: 100%; height: auto; }
.tv-caja { fill: none; stroke: rgba(159, 198, 210, .55); stroke-width: 2.5; }
.tv-fono { fill: none; stroke: var(--aqua); stroke-width: 2.5; }
.tv-pantalla { fill: rgba(91, 233, 222, .1); }
.tv-play { fill: none; stroke: var(--aqua); stroke-width: 2.5; stroke-linecap: round; }
.tv-onda path { fill: none; stroke: var(--cian); stroke-width: 2.5; stroke-linecap: round; opacity: .25; animation: onda 2.4s ease-in-out infinite; }
.tv-onda path:nth-child(2) { animation-delay: .3s; }
.tv-onda path:nth-child(3) { animation-delay: .6s; }
@keyframes onda { 0%, 100% { opacity: .18; } 50% { opacity: .95; } }

.prod__txt { padding: 26px 26px 30px; }
.prod__tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--tinta-tenue); margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.chip {
  font-weight: 700; letter-spacing: .1em; color: var(--oceano);
  background: rgba(14, 111, 138, .1); border: 1px solid rgba(14, 111, 138, .22);
  padding: 3px 8px; border-radius: 99px;
}
.prod h3 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 10px; }
.prod p { color: var(--tinta-suave); font-size: 15.5px; }
.enlace {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-weight: 650; font-size: 15px; color: var(--oceano); text-decoration: none;
}
.enlace svg { transition: transform .3s var(--ease); }
.prod:hover .enlace svg, .enlace:hover svg { transform: translateX(4px); }

/* criterio ---------------------------------------------------------------- */
.criterios {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px;
  background: var(--filete); border: 1px solid var(--filete); border-radius: var(--r); overflow: hidden;
}
.criterio { background: var(--papel); padding: 30px 26px 32px; transition: background .3s var(--ease); }
.criterio:hover { background: #fff; }
.criterio h3 { font-size: 20px; margin-bottom: 10px; }
.criterio h3::before { content: ""; display: block; width: 26px; height: 2.5px; background: var(--grad); margin-bottom: 15px; border-radius: 2px; transition: width .35s var(--ease); }
.criterio:hover h3::before { width: 46px; }
.criterio p { color: var(--tinta-suave); font-size: 15px; }

/* cierre ------------------------------------------------------------------ */
.cierre {
  position: relative; isolation: isolate; overflow: hidden; text-align: center; color: var(--claro);
  background: var(--abismo); padding: clamp(72px, 9vw, 120px) 0;
}
.cierre::before {
  width: 70vw; height: 40vw; bottom: -22vw; left: 15vw;
  background: radial-gradient(circle, rgba(34, 184, 224, .58), transparent 66%);
  animation: deriva-b 30s ease-in-out infinite alternate;
}
.cierre__in { position: relative; }
.cierre__logo { width: 92px; margin: 0 auto 24px; }
.cierre h2 { font-size: clamp(31px, 4.4vw, 50px); line-height: 1.08; margin-bottom: 14px; }
.cierre p { max-width: 52ch; margin: 0 auto; color: var(--claro-medio); }

/* pie --------------------------------------------------------------------- */
.pie { background: #020F14; color: var(--claro-tenue); padding: 34px 0 42px; border-top: 1px solid rgba(159, 198, 210, .1); }
.pie__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.pie__marca { font-family: var(--serif); font-size: 19px; color: var(--claro); margin: 0; }
.pie__legal { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; }
.pie__links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.pie__links a { text-decoration: none; font-size: 14px; transition: color .22s var(--ease); }
.pie__links a:hover { color: var(--aqua); }

/* responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .pie__links { margin-left: 0; }
  .hero::before, .hero::after { filter: blur(60px); }
  .const { margin-top: 30px; }
}

/* Con «reducir movimiento» se corta lo que se desplaza —aurora, chispas,
   recorrido de los hilos, hovers— y se conservan los fundidos. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before, .hero::after, .cierre::before,
  .const__hilos path, .chispa, .tv-onda path { animation: none; }
  .const__hilos path { stroke-dasharray: none; stroke-dashoffset: 0; opacity: .4; }
  .chispa { opacity: .8; }
  .js [data-reveal], .js [data-reveal-group] > * { transform: none; }
  .js [data-reveal].is-in, .js [data-reveal-group].is-in > * { transition: opacity .5s var(--ease); }
  .btn:hover, .prod:hover, .nav__brand:hover img, .prod:hover .prod__shot img { transform: none; }
}
