/* IASOLUCIONA · landing de webs v2 — «el escaparate de noche»
   Azul medianoche + un solo acento oro. Newsreader (titulares) + Hanken Grotesk (texto).
   Nada retiene el scroll: la página siempre baja. Las webs de muestra van en un carrusel y se abren en grande al pinchar. */

:root {
  --navy: #0F1B2D;
  --navy-2: #14243C;
  --bezel: #0A1322;
  --text: #F2F4F8;
  --muted: #B9C2CF;
  --faint: #8794A8;
  --gold: #D9B45A;
  --gold-2: #E8C979;
  --on-gold: #0B1424;
  --line: rgba(255, 255, 255, .09);
  --r: 8px;
  --gut: clamp(20px, 4vw, 56px);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--navy); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.55;
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
html.locked, html.locked body { overflow: hidden; }

/* Lenis (scroll suave) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 60; background: var(--gold); color: var(--on-gold); padding: 10px 14px; border-radius: var(--r); }
.skip:focus { left: 16px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--on-gold);
  font-family: var(--sans); font-weight: 600; font-size: 1.06rem; line-height: 1;
  padding: 20px 30px; border: 0; border-radius: var(--r); text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--gold-2); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 24px 38px; font-size: 1.15rem; }

/* ---------- Cabecera ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gut);
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease;
}
.top.solid { background: rgba(15, 27, 45, .97); border-bottom-color: var(--line); }
.brand img { height: 26px; width: auto; filter: brightness(0) invert(1); }
.top-cta { font-weight: 500; font-size: .98rem; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }

/* ---------- Titulares de sección ---------- */
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.015em; margin: 0; text-wrap: balance; }

/* ---------- 1 · Portada ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(24px, 4vw, 64px);
  padding: 104px var(--gut) 64px;
  overflow: hidden;
}
html.js:not(.ready) .hero-copy, html.js:not(.ready) .stage { visibility: hidden; }

.h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 5.1vw, 5.3rem); line-height: 1.02; letter-spacing: -.015em;
  margin: 0; text-wrap: balance;
}
.lead { margin-top: 24px; font-size: clamp(1.08rem, 1.3vw, 1.3rem); color: var(--muted); max-width: 32ch; line-height: 1.45; }
.cta-row { margin-top: 32px; }
.fine { margin-top: 14px; font-size: .92rem; color: var(--faint); }

/* palabras partidas para la entrada animada */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.wi { display: inline-block; will-change: transform; }

.stage { position: relative; justify-self: end; width: min(100%, 980px); }
.stage-in { position: relative; }

/* El marco de navegador (portada y carrusel) */
.browser {
  display: block; border-radius: 14px; overflow: hidden; background: var(--bezel); padding: 0 8px 8px;
  box-shadow: 0 0 0 1px var(--line), 0 50px 100px -30px rgba(0, 0, 0, .75);
}
.browser-bar { position: relative; height: 38px; display: flex; align-items: center; justify-content: center; }
.url { font-size: .78rem; color: var(--faint); padding: 4px 16px; border-radius: 6px; background: rgba(255, 255, 255, .05); white-space: nowrap; }
.screen { position: relative; display: block; aspect-ratio: 16 / 10; background: #000; overflow: hidden; border-radius: 6px; }
.screen > img, .screen > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen > video { opacity: 0; transition: opacity .35s ease; }
.screen > video.ready { opacity: 1; }

.phone {
  position: relative; display: block; aspect-ratio: 390 / 844; border-radius: 30px; padding: 7px;
  background: #05080F;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .13), 0 30px 60px -20px rgba(0, 0, 0, .8);
}
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; background: #000; }
.stage .phone { position: absolute; width: clamp(140px, 14vw, 230px); left: -8%; bottom: -14%; }

/* ---------- 2 · Trabajos: carrusel horizontal ---------- */
.work { padding: clamp(96px, 11vw, 160px) 0 0; }
.work-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  max-width: 1440px; margin: 0 auto; padding-inline: var(--gut);
}
.work-hint { margin-top: 14px; color: var(--muted); }
.rail-nav { display: flex; gap: 10px; flex: none; }
.nav {
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center; transition: border-color .25s ease, opacity .25s ease;
}
.nav::before {
  content: ""; width: 10px; height: 10px;
  border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text);
}
.nav.prev::before { transform: translateX(2px) rotate(135deg); }
.nav.next::before { transform: translateX(-2px) rotate(-45deg); }
.nav:hover { border-color: var(--gold); }
.nav:disabled { opacity: .3; cursor: default; border-color: rgba(255, 255, 255, .22); }

.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(44vw, 640px); gap: clamp(20px, 2.4vw, 32px);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gut); padding: clamp(36px, 4vw, 56px) var(--gut) 12px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; }
.card-open {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  text-align: left; cursor: zoom-in; border-radius: 14px;
}
.card-open .browser { transition: box-shadow .3s ease, transform .3s ease; }
.card-open:hover .browser { box-shadow: 0 0 0 1px rgba(217, 180, 90, .55), 0 50px 100px -30px rgba(0, 0, 0, .75); transform: translateY(-3px); }
.card .phone { display: none; }
.card figcaption { display: grid; gap: 4px; padding-top: 18px; }
.card b { font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 1.9vw, 1.9rem); line-height: 1.1; letter-spacing: -.01em; }
.card span { color: var(--muted); font-size: .96rem; }

/* ---------- Visor: la web de muestra en grande ---------- */
.visor {
  padding: 0; border: 0; background: transparent; color: var(--text);
  width: min(1400px, 94vw); height: min(920px, 90vh); max-width: none; max-height: none; margin: auto; overflow: visible;
}
.visor::backdrop { background: rgba(6, 11, 20, .86); }
.visor-frame {
  height: 100%; display: flex; flex-direction: column;
  background: var(--bezel); border-radius: 14px; padding: 0 8px 8px;
  box-shadow: 0 0 0 1px var(--line), 0 60px 120px -30px rgba(0, 0, 0, .8);
}
.visor-bar { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 8px; }
.visor-actions { display: flex; align-items: center; gap: 22px; font-size: .95rem; font-weight: 500; }
.visor-actions a { text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.visor-close {
  background: var(--gold); color: var(--on-gold); border: 0; border-radius: 6px;
  padding: 8px 16px; font-weight: 600; cursor: pointer;
}
.visor-close:hover { background: var(--gold-2); }
.visor-screen { position: relative; flex: 1; overflow: hidden; border-radius: 6px; background: #fff; }
.visor-screen iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }

/* ---------- 3 · Promesas, 4 · Planes y 6 · Dudas (titular a la izquierda, contenido a la derecha) ---------- */
.promises, .dudas, .planes {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 80px);
  max-width: 1440px; margin: 0 auto; padding: clamp(96px, 12vw, 170px) var(--gut);
}
.promises .h2, .dudas .h2, .planes-head { position: sticky; top: 112px; align-self: start; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.85rem, 3.9vw, 3.6rem); line-height: 1.08; letter-spacing: -.012em;
  padding: .4em 0; border-top: 1px solid var(--line);
}
.plist li:last-child { border-bottom: 1px solid var(--line); }
.note { margin-top: 22px; color: var(--faint); font-size: .95rem; max-width: 70ch; }

/* ---------- 4 · La escalera (planes) ---------- */
.planes { padding-top: 0; }
.planes-intro { margin-top: 18px; color: var(--muted); max-width: 28ch; font-size: clamp(1.05rem, 1.3vw, 1.2rem); }
.grupo { margin: 0 0 6px; font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--gold); }
.grupo:not(:first-child) { margin-top: 48px; }
.tarifa { border-top: 1px solid var(--line); }
.fila {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; gap: 8px 28px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.fila dt { font-family: var(--serif); font-weight: 500; font-size: clamp(1.35rem, 1.9vw, 1.75rem); line-height: 1.1; letter-spacing: -.01em; }
.fila .que { color: var(--muted); font-size: .98rem; max-width: 46ch; }
.fila .precio { font-family: var(--serif); font-size: clamp(1.25rem, 1.7vw, 1.6rem); white-space: nowrap; text-align: right; }
.planes .btn { margin-top: 40px; }

/* ---------- 5 · Reto ---------- */
.reto { background: var(--navy-2); padding: clamp(104px, 13vw, 190px) var(--gut); }
.reto-in { max-width: 1328px; margin: 0 auto; }
.reto-h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.5rem, 6.3vw, 6.4rem); line-height: 1; letter-spacing: -.02em;
  margin: 0; max-width: 13ch; text-wrap: balance;
}
.reto-p { margin: 26px 0 36px; font-size: clamp(1.1rem, 1.5vw, 1.4rem); color: var(--muted); }

/* ---------- 6 · Dudas ---------- */
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font-size: clamp(1.1rem, 1.45vw, 1.32rem); font-weight: 500;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 11px; height: 11px; margin-right: 4px;
  border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold);
  transform: translateY(-3px) rotate(45deg); transition: transform .3s ease;
}
.qa[open] summary::after { transform: translateY(3px) rotate(225deg); }
.qa p { padding: 0 0 28px; color: var(--muted); max-width: 60ch; }

/* ---------- 7 · Cierre y pie ---------- */
.cierre { max-width: 1440px; margin: 0 auto; padding: clamp(110px, 14vw, 200px) var(--gut) clamp(72px, 9vw, 120px); }
.cierre-h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 5.6vw, 5.4rem); line-height: 1.02; letter-spacing: -.018em;
  margin: 0; max-width: 15ch; text-wrap: balance;
}
.cierre-p { margin: 22px 0 36px; font-size: clamp(1.1rem, 1.5vw, 1.4rem); color: var(--muted); }
.foot { max-width: 1440px; margin: 0 auto; padding: 44px var(--gut) 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: .92rem; }
.foot-row { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: start; }
.foot-row img { height: 22px; width: auto; filter: brightness(0) invert(1); opacity: .85; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
.legal { margin-top: 28px; max-width: 80ch; line-height: 1.5; }

.sticky-cta { display: none; }

/* ---------- Ordenador: las 3 webs caben a la vez en el ancho (sin flechas ni deslizar) ---------- */
@media (min-width: 960px) {
  .rail {
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible; scroll-snap-type: none;
    max-width: 1440px; margin-inline: auto; padding-bottom: 0;
  }
  .rail-nav { display: none; }
}

/* ---------- Móvil y tableta ---------- */
@media (max-width: 959px) {
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 112px; padding-bottom: 40px; gap: 44px; }
  .h1 { font-size: clamp(2.45rem, 10.6vw, 4rem); }
  .btn { width: 100%; }
  .cta-row .btn, .reto .btn, .cierre .btn, .planes .btn { height: 58px; padding-block: 0; }
  .stage { justify-self: center; width: auto; }
  .stage .browser { display: none; }
  .stage .phone { position: relative; left: auto; bottom: auto; width: min(64vw, 280px); }

  /* carrusel: móviles en vez de portátiles */
  .rail-nav { display: none; }
  .rail { grid-auto-columns: 62%; }
  .card .browser { display: none; }
  .card .phone { display: block; }
  .card-open { cursor: pointer; border-radius: 30px; }
  .card-open:hover .browser { transform: none; }

  /* visor a pantalla completa */
  .visor { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .visor-frame { border-radius: 0; padding: 0 0 env(safe-area-inset-bottom); }
  .visor-bar { padding: 0 12px; }
  .visor-screen { border-radius: 0; }
  .visor-actions { gap: 14px; font-size: .9rem; }

  .promises, .dudas, .planes { grid-template-columns: 1fr; gap: 28px; }
  .promises .h2, .dudas .h2, .planes-head { position: static; }
  .fila { grid-template-columns: 1fr auto; }
  .fila .que { grid-column: 1 / -1; grid-row: 2; }
  .foot { padding-bottom: 112px; }
  .foot-row { grid-template-columns: 1fr; gap: 18px; }

  .sticky-cta {
    display: flex; position: fixed; z-index: 45;
    left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); width: auto;
    height: 58px; padding-block: 0;
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .7);
    transform: translateY(170%); transition: transform .3s ease;
  }
  .sticky-cta.on { transform: none; }
}
@media (max-width: 420px) {
  .hide-s { display: none; }
  .visor-actions a { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta, .screen > video, .qa summary::after, .card-open .browser, .nav { transition: none; }
}
