/* Portafolio de Santiago · estilo Makers Nest (Operador-Glass, tema claro) */
:root {
  --bg: #EAF2F8; --ink: #1D3557; --ink2: #3A5272; --acc: #2C6CB0; --accHover: #245A93;
  --sur: rgba(255,255,255,.78); --rim: rgba(255,255,255,.95);
  --on: rgba(44,108,176,.11); --ghost: rgba(29,53,87,.07); --sep: rgba(29,53,87,.1);
  --gsh: 0 10px 30px rgba(29,53,87,.13); --heroSh: 0 18px 44px rgba(29,53,87,.12);
  --msgBot: rgba(200,162,122,.25);
  --out: cubic-bezier(.23,1,.32,1);
  --r: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { font-family: Outfit, Inter, sans-serif; font-weight: 600; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; border-radius: 8px; }

.fondo { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.glow { position: absolute; border-radius: 50%; filter: blur(100px); }
.g1 { width: 620px; height: 620px; left: -160px; top: -220px; background: #6EA8DA; opacity: .55; animation: d1 24s ease-in-out infinite alternate; }
.g2 { width: 640px; height: 640px; right: -200px; bottom: -260px; background: #C8A27A; opacity: .45; animation: d2 28s ease-in-out infinite alternate; }
.g3 { width: 420px; height: 420px; left: 40%; top: 30%; background: #B9D3EC; opacity: .6; animation: d1 32s ease-in-out infinite alternate-reverse; }
@keyframes d1 { to { translate: 140px 90px; scale: 1.15; } }
@keyframes d2 { to { translate: -160px -70px; scale: 1.1; } }

.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 20px 32px 0; }
.sur { background: var(--sur); border: 1px solid var(--rim); border-radius: var(--r); }
.glass, .glass-sur {
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.42));
  -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--rim); box-shadow: var(--gsh);
}
.eyebrow { font-size: 13px; font-weight: 600; color: var(--acc); }

/* Navegación */
.nav { position: sticky; top: 16px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 22px; border-radius: 999px; }
.marca { font-family: Outfit, sans-serif; font-weight: 600; font-size: 18px; text-decoration: none; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; }
.nav-links > a { text-decoration: none; color: var(--ink2); padding: 10px 14px; border-radius: 999px; transition: background-color .2s, color .2s; }
.nav-links > a:hover { background: var(--on); color: var(--ink); }
.lang { display: flex; padding: 3px; margin-left: 6px; border-radius: 999px; background: var(--ghost); }
.lang button { border: 0; background: none; padding: 7px 12px; min-height: 36px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink2); transition: background-color .2s var(--out); }
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(29,53,87,.12); }

/* Portada */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 88px 0 56px; }
.hero-text { flex: 999 1 520px; min-width: 0; }
.chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--on); font-size: 13px; font-weight: 600; }
h1 { font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.03em; margin-top: 20px; text-wrap: balance; }
.lead { margin-top: 24px; max-width: 540px; color: var(--ink2); font-size: 19px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--rim); background: var(--sur);
  transition: transform .16s var(--out), background-color .2s;
}
.btn:active { transform: scale(.97); }
.btn.primario { background: var(--acc); color: #fff; border-color: var(--acc); }
.btn.primario:hover { background: var(--accHover); }
.btn.primario:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sutil { min-height: 40px; padding: 0 16px; font-size: 14px; background: transparent; border-color: var(--sep); }
.foto { flex: 1 1 300px; max-width: 360px; margin: 0; padding: 10px; border-radius: 28px; background: rgba(255,255,255,.62); border: 1px solid var(--rim); box-shadow: var(--heroSh); }
.foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; height: auto; }
.foto figcaption { display: flex; justify-content: space-between; padding: 12px 8px 4px; font-size: 13px; color: var(--ink2); }
.entra { animation: entra .7s var(--out) both; animation-delay: var(--d, 0s); }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }

/* Cifras */
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cifra { padding: 24px; }
.cifra strong { display: block; font-family: Outfit, sans-serif; font-weight: 600; font-size: 44px; line-height: 1; }
.cifra strong.acc { color: var(--acc); }
.cifra span { display: block; margin-top: 8px; font-size: 14px; color: var(--ink2); }

/* Casos */
.caso { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 112px 0 56px; }
.caso-text { flex: 1 1 380px; min-width: 0; }
h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin: 10px 0 16px; text-wrap: balance; }
.caso-text p, .bloque-head p, .nest-info p { color: var(--ink2); }
.pills { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 8px 14px; border-radius: 999px; background: #fff; font-size: 14px; }
.marco { flex: 1 1 420px; max-width: 540px; margin: 0; padding: 10px; border-radius: 28px; background: rgba(255,255,255,.62); border: 1px solid var(--rim); box-shadow: var(--heroSh); }
.marco img { width: 100%; height: auto; border-radius: 20px; }
.marco figcaption { padding: 10px 8px 2px; font-size: 13px; color: var(--ink2); }

.bloque { padding: 56px 0; }
.bloque-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.bloque-head h2 { max-width: 620px; margin-bottom: 0; }
.bloque-head p { max-width: 360px; font-size: 15px; }
.reels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.reel { position: relative; margin: 0; }
.reel video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 22px; border: 6px solid #fff; box-shadow: var(--gsh); background: #fff; }
.reel figcaption { margin-top: 10px; font-size: 14px; font-weight: 500; text-align: center; }
.sonido { position: absolute; inset: 0 0 34px 0; border: 0; background: transparent; border-radius: 22px; }
.sonido::after {
  content: ""; position: absolute; right: 14px; bottom: 14px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(29,53,87,.72) no-repeat center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='m23 9-6 6M17 9l6 6'/%3E%3C/svg%3E");
}
.sonido[aria-pressed="true"]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E"); background-color: var(--acc); }

/* Demo de Nest */
.nest { border-radius: 28px; padding: 28px; display: flex; flex-wrap: wrap; gap: 32px; }
.nest-info { flex: 1 1 280px; min-width: 0; }
.nest-info h2 { margin-bottom: 12px; }
.stack { margin-top: 14px; font-size: 13px; }
.pasos { list-style: none; counter-reset: p; padding: 0; margin: 24px 0 18px; display: grid; gap: 6px; }
.pasos li { counter-increment: p; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; font-size: 14px; color: var(--ink2); transition: background-color .25s var(--out), color .25s; }
.pasos li::before { content: counter(p); flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ghost); font-size: 12px; font-weight: 600; }
.pasos li.activo { background: #fff; color: var(--ink); font-weight: 600; }
.pasos li.activo::before { background: var(--acc); color: #fff; }
.pasos li.hecho::before { content: "✓"; background: #4CB582; color: #fff; }

.app { flex: 2 1 600px; min-width: 0; position: relative; }
.app-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ghost); }
.tabs button { border: 0; background: none; min-height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink2); transition: background-color .2s var(--out); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(29,53,87,.12); }
.muestra { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--msgBot); }
.vista { margin-top: 16px; }
.tablero { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.col { background: rgba(255,255,255,.6); border-radius: 18px; padding: 10px; min-height: 260px; }
.col h3 { font: 600 13px Inter, sans-serif; letter-spacing: 0; display: flex; justify-content: space-between; margin: 2px 4px 10px; }
.col h3 em { font-style: normal; color: var(--ink2); }
.tarjeta { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; line-height: 1.4; box-shadow: 0 1px 3px rgba(29,53,87,.08); }
.tarjeta .tag { display: inline-block; margin-top: 8px; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: var(--ghost); }
.tarjeta .tag.bubo { background: var(--msgBot); }
.tarjeta.foco { box-shadow: 0 0 0 2px var(--acc); transition: transform .16s var(--out); }
.tarjeta.foco:hover { transform: translateY(-2px); }
.tarjeta.foco.pulsa { animation: pulsa 1.8s ease-in-out infinite; }
@keyframes pulsa { 50% { box-shadow: 0 0 0 6px rgba(44,108,176,.25); } }
.tarjeta.llega { animation: llega .5s var(--out); }
@keyframes llega { from { opacity: 0; transform: translateY(-10px) scale(.97); } }

.panel { position: absolute; inset: 54px 0 0 0; background: #F7FAFC; border-radius: 20px; box-shadow: var(--heroSh); display: flex; flex-direction: column; overflow: hidden; animation: panel .32s var(--out); }
@keyframes panel { from { opacity: 0; transform: translateY(12px); } }
.panel[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 10px; }
.panel-head h3 { font-size: 22px; margin-top: 2px; }
.cerrar { border: 0; background: var(--ghost); width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1; }
.panel-cuerpo { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; padding: 0 20px; overflow: auto; }
.guion { display: grid; gap: 10px; align-content: start; }
.guion label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink2); }
.guion output { display: block; background: #fff; border: 1px solid var(--sep); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 400; color: var(--ink); min-height: 44px; }
#hookElegido.vacio { color: var(--ink2); border-style: dashed; }
#hookElegido.lleno { border-color: var(--acc); animation: llega .4s var(--out); }
.bubo { background: var(--msgBot); border-radius: 16px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.bubo-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 600 13px Outfit, sans-serif; }
.hook { text-align: left; border: 1px solid transparent; background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.4; transition: border-color .2s, transform .16s var(--out); }
.hook:hover { border-color: var(--acc); }
.hook:active { transform: scale(.98); }
.hook[aria-pressed="true"] { border-color: var(--acc); box-shadow: 0 0 0 2px rgba(44,108,176,.2); }
.nota { font-size: 12px; color: var(--ink2); }
.panel-pie { padding: 14px 20px 18px; display: flex; justify-content: flex-end; }

.plan-grid, .metricas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini { padding: 16px; display: grid; gap: 4px; }
.mini b { font-family: Outfit, sans-serif; font-weight: 600; font-size: 17px; }
.mini span { font-size: 14px; color: var(--ink2); }
.barras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; height: 190px; margin-top: 16px; padding: 16px; background: rgba(255,255,255,.6); border-radius: 18px; }
.barras div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.barras span { width: 100%; height: var(--h); border-radius: 10px 10px 4px 4px; background: #B9D3EC; transform-origin: bottom; animation: crece .7s var(--out) both; }
.barras span.acc { background: var(--acc); }
.barras small { font-size: 12px; color: var(--ink2); }
@keyframes crece { from { transform: scaleY(0); } }

/* Cómo trabajo y contacto */
.como { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 56px 0; }
.paso { padding: 28px; }
.paso b { color: var(--acc); }
.paso h3 { font-size: 26px; margin: 6px 0 8px; }
.paso p { color: var(--ink2); font-size: 15px; }
.contacto { margin: 24px 0 20px; border-radius: 28px; background: var(--ink); color: #fff; padding: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.contacto h2 { font-size: clamp(40px, 5vw, 56px); margin: 0; }
.contacto .ctas { margin: 0; }
.btn.blanco { background: #fff; color: var(--ink); border-color: #fff; }
.btn.borde { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.pie { text-align: center; font-size: 13px; color: var(--ink2); padding: 8px 0 32px; }

/* Celular: todo en columna, sin salirse */
@media (max-width: 900px) {
  .reels { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .reel { scroll-snap-align: start; }
  .panel-cuerpo { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wrap { padding: 12px 16px 0; }
  .nav { position: static; border-radius: 24px; padding: 12px 14px; }
  .nav-links > a { display: none; }
  .hero { padding: 48px 0 40px; gap: 32px; }
  .foto { max-width: none; }
  .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cifra { padding: 18px; }
  .cifra strong { font-size: 34px; }
  .caso { padding-top: 72px; gap: 28px; }
  .reels { grid-auto-columns: 62%; }
  .nest { padding: 18px; }
  .tablero { grid-template-columns: repeat(5, 72%); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .panel { position: fixed; inset: auto 0 0 0; max-height: 88vh; border-radius: 24px 24px 0 0; z-index: 20; }
  .plan-grid, .metricas, .como { grid-template-columns: 1fr; }
  .contacto { padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
