/* ZION IA Agency · demo de la app de PRIMELAB
   Fuera del teléfono manda la marca ZION (lila, violeta, mango). Dentro, la paleta real de PRIMELAB,
   para que se lea como la app de un cliente. Lo memorable es la demo; lo demás se mantiene sobrio. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0;
}

:root {
  --lila: #EEEDF5;
  --lila-deep: #E2DFF0;
  --ink: #1E1B33;
  --muted: #5D5878;
  --line: #CFCAE3;
  --violet: #5B3FD9;
  --violet-ink: #F6F4FF;
  --mango: #F2A93B;
  --mango-soft: #FCEBCF;
  --mint: #2E9E7A;
  --focus: #2F6FE0;

  /* PRIMELAB, dentro del teléfono */
  --pl-paper: #E9EEEA;
  --pl-surface: #F7F9F7;
  --pl-ink: #17242C;
  --pl-muted: #56666C;
  --pl-line: #C9D3CE;
  --pl-teal: #1F5C4E;
  --pl-teal-soft: #D5E4DD;
  --pl-krill: #B3263E;
  --pl-ticket: #FFF3BF;
  --pl-ticket-edge: #E6D58A;

  --display: "Bricolage Grotesque", "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lila: #17152A;
    --lila-deep: #201D38;
    --ink: #ECEAF7;
    --muted: #A9A4C6;
    --line: #34305A;
    --violet: #9C88FF;
    --violet-ink: #17152A;
    --mango: #F5B85C;
    --mango-soft: #3A2E18;
    --mint: #5CC9A4;
    --focus: #7EA8FF;
    --pl-paper: #121A1E;
    --pl-surface: #1A2429;
    --pl-ink: #E3EAE6;
    --pl-muted: #9AABA6;
    --pl-line: #2E3C40;
    --pl-teal: #5FB39C;
    --pl-teal-soft: #1E3530;
    --pl-krill: #F07A8E;
    --pl-ticket: #3A3418;
    --pl-ticket-edge: #5C5226;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lila);
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }

/* ---------- cabecera ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 18px 20px;
}
.zion { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem/1 var(--display); }
.zion-sub { font-weight: 400; color: var(--muted); }
.zion-mark { width: 32px; height: 32px; }
.zion-mark rect { fill: var(--violet); }
.zion-mark path { stroke: var(--mango); stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.top-cta { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--mango); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 14px; font: 600 1rem/1 var(--text); text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-solid { background: var(--violet); color: var(--violet-ink); }
.btn-solid:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--lila-deep); }

/* ---------- hero ---------- */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 24px 20px 72px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start;
}
.hero-copy { padding-top: 40px; }
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.6rem);
  font-weight: 800; font-stretch: 78%; letter-spacing: -0.02em;
  max-width: 11ch;
}
.lead { font-size: 1.125rem; color: var(--muted); max-width: 46ch; margin: 24px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- escenario de la demo ---------- */
.stage {
  background: var(--lila-deep);
  border-radius: 32px; padding: 20px;
  position: relative;
  /* rejilla sutil: el «banco de pruebas» donde se monta la app */
  background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 18px 18px;
}
.scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.scene {
  font: 600 0.9rem/1 var(--text); padding: 10px 14px; min-height: 40px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--lila); color: var(--ink); cursor: pointer;
}
.scene:hover { border-color: var(--violet); }
.scene[aria-selected="true"] { background: var(--ink); color: var(--lila); border-color: var(--ink); }

.rig { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }

.phone {
  position: relative; height: 560px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--pl-paper); color: var(--pl-ink);
  border-radius: 34px; border: 8px solid var(--ink);
  box-shadow: 0 30px 60px -30px rgba(30, 27, 51, .55);
}
.phone-bar {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px 12px;
  background: var(--pl-surface); border-bottom: 1px solid var(--pl-line); font-size: .95rem;
}
.phone-bar strong { letter-spacing: .02em; }
.phone-who { margin-left: auto; font-size: .78rem; color: var(--pl-muted); }
.pl-capsule {
  width: 12px; height: 20px; border-radius: 7px; display: inline-block;
  background: linear-gradient(var(--pl-teal) 50%, var(--pl-krill) 50%);
}
.chat { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; font-size: .9rem; line-height: 1.42; animation: pop .25s ease-out; }
.msg.me { align-self: flex-end; background: var(--pl-ink); color: var(--pl-paper); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--pl-surface); border: 1px solid var(--pl-line); border-bottom-left-radius: 5px; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg .confirm {
  display: inline-block; margin-top: 8px; padding: 7px 12px; border-radius: 10px;
  background: var(--pl-teal); color: var(--pl-surface); font-weight: 600; font-size: .85rem;
}
.msg .confirm { border: 0; font-family: inherit; cursor: pointer; min-height: 36px; }
.msg .confirm.waiting { animation: nudge 1.4s ease-in-out infinite; }
.msg .confirm.tapped { animation: tap .5s ease-out; cursor: default; opacity: .85; }
.msg .confirm:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ticket {
  align-self: stretch; background: var(--pl-ticket); border: 1px dashed var(--pl-ticket-edge);
  border-radius: 12px; padding: 10px 12px; font-size: .85rem; animation: pop .25s ease-out;
}
.ticket b { display: block; margin-bottom: 2px; }
.ticket .ok { color: var(--pl-teal); font-weight: 700; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--pl-surface); border: 1px solid var(--pl-line); border-radius: 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--pl-muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

.composer { width: calc(100% - 20px); font: inherit; text-align: left; cursor: pointer; color: inherit; }
.composer { display: flex; align-items: center; gap: 8px; margin: 8px 10px 12px; padding: 8px 8px 8px 14px; background: var(--pl-surface); border: 1px solid var(--pl-line); border-radius: 18px; min-height: 44px; }
.composer-text { flex: 1; font-size: .88rem; color: var(--pl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-text.typed { color: var(--pl-ink); }
.composer-text.hint { color: var(--pl-teal); font-weight: 600; }
.composer-send { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pl-teal); color: var(--pl-surface); font-weight: 700; }

.toast {
  position: absolute; top: 56px; left: 10px; right: 10px; z-index: 2;
  background: var(--ink); color: var(--lila); border-radius: 14px; padding: 10px 12px; font-size: .82rem;
  box-shadow: 0 12px 24px -12px rgba(0,0,0,.5); animation: drop .35s ease-out;
}
.toast b { color: var(--mango); }

/* ---------- panel «Por dentro» ---------- */
.inside { background: var(--lila); border-radius: 22px; padding: 18px; border: 1.5px solid var(--line); }
.inside-title { font-size: 1.4rem; font-weight: 700; font-stretch: 85%; margin-bottom: 14px; }
.stock { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.stock li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .9rem; }
.stock .units { font: 700 1.05rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stock .units.changed { color: var(--violet); animation: bump .6s ease-out; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--lila-deep); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--mint); border-radius: 99px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.stock .lotinfo { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); }

.log { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); min-height: 120px; }
.log li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 10px 0; font-size: .88rem; border-bottom: 1px solid var(--line); animation: pop .25s ease-out; }
.log li::before { content: ""; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--violet); }
.log li.tg::before { background: var(--mango); }
.log li.ok::before { background: var(--mint); }
.log li.empty { color: var(--muted); grid-template-columns: 1fr; }
.log li.empty::before { display: none; }
.replay { margin-top: 14px; font: 600 .9rem/1 var(--text); background: none; border: 0; color: var(--violet); cursor: pointer; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.stage-note { margin: 14px 4px 0; font-size: .8rem; color: var(--muted); }

@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes tap { 0% { transform: scale(1); } 40% { transform: scale(.92); box-shadow: 0 0 0 6px var(--pl-teal-soft); } 100% { transform: scale(1); } }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 var(--pl-teal-soft); } 50% { box-shadow: 0 0 0 7px var(--pl-teal-soft); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- lo que hace ---------- */
.does, .how, .contact { max-width: 1200px; margin: 0 auto; padding: 72px 20px; }
.does h2, .how h2, .contact h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 750; font-stretch: 80%; letter-spacing: -0.015em; max-width: 18ch; }
.does-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: 36px 0 0; }
.does-list > div { padding: 22px 0; border-top: 2px solid var(--ink); }
.does-list dt { font: 700 1.2rem/1.2 var(--display); margin-bottom: 8px; }
.does-list dd { margin: 0; color: var(--muted); max-width: 40ch; }

/* ---------- cómo trabajamos ---------- */
.how { background: var(--ink); color: var(--lila); max-width: none; border-radius: 40px 40px 0 0; }
.how > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.how h2 { max-width: 1160px; }
.how-steps { list-style: none; counter-reset: s; padding: 0; margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.how-steps li { counter-increment: s; }
.how-steps li::before {
  content: counter(s); display: block; font: 800 4.5rem/1 var(--display); font-stretch: 75%;
  color: var(--mango); margin-bottom: 14px;
}
.how-steps h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.how-steps p { margin: 0; opacity: .78; }

/* ---------- contacto ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px;
  background: var(--violet); color: var(--violet-ink); max-width: none;
}
.contact > * { max-width: 620px; }
.contact-copy { justify-self: end; }
.contact-copy p { font-size: 1.1rem; opacity: .9; max-width: 42ch; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form .opt { font-weight: 400; opacity: .75; }
.form input, .form textarea {
  font: 400 1rem/1.4 var(--text); padding: 12px 14px; min-height: 48px; border-radius: 12px;
  border: 2px solid transparent; background: #F6F4FF; color: #1E1B33; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--mango); }
.form .check { grid-template-columns: 22px 1fr; align-items: start; font-weight: 400; }
.form .check input { min-height: 0; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--mango); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-send { background: var(--mango); color: #1E1B33; justify-self: start; min-width: 200px; }
.form-send[disabled] { opacity: .6; cursor: wait; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--mango-soft); color: #3B2A05; font-weight: 600; }
.form-done { background: #F6F4FF; color: #1E1B33; border-radius: 20px; padding: 28px; align-self: start; }
.form-done h3 { font-size: 1.8rem; margin-bottom: 8px; }
.form-done p { margin: 0; }
@media (prefers-color-scheme: dark) {
  .contact { color: #17152A; }
  .form-send { color: #17152A; }
}

.foot { background: var(--violet); color: var(--violet-ink); padding: 24px 20px 40px; text-align: center; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .foot { color: #17152A; } }

/* ---------- pantallas medianas y móviles ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-copy { padding-top: 12px; }
  .hero h1 { max-width: 14ch; }
  .does-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-copy { justify-self: start; }
}
@media (max-width: 640px) {
  .top { padding: 14px 16px; }
  .top-cta { font-size: .9rem; }
  .zion-sub { display: none; }
  .hero { padding: 8px 16px 48px; }
  .stage { padding: 14px; border-radius: 24px; margin: 0 -4px; }
  .scenes { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px 4px; scrollbar-width: none; }
  .scenes::-webkit-scrollbar { display: none; }
  .scene { flex: 0 0 auto; }
  .rig { grid-template-columns: minmax(0, 1fr); }
  .phone { height: 470px; }
  .hero h1 { max-width: none; font-size: clamp(2.3rem, 10vw, 2.9rem); }
  .does, .how, .contact { padding: 56px 16px; }
  .does-list, .how-steps, .form-row { grid-template-columns: minmax(0, 1fr); }
  .how { border-radius: 28px 28px 0 0; }
  .form-send { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
