/* WEB-ROBOT-001 -- portada publica con el Robot Verde (independiente del Point).
 * Escenario: el arte mide 1536x1024; todo se coloca en px del arte y el
 * escenario completo se escala con zoom: var(--k) (portada.js lo calcula).
 * ROBOT-VERDE-MOBILE-001: el mismo escenario en todas las pantallas; portada.js
 * pone data-mode en <html>: fit (escritorio, sin cambios), pan (vertical: alto
 * completo y recorrido horizontal tactil), wide (movil horizontal: ancho completo). */
:root {
  --bg: #050705;
  --ink: #eef7ea;
  --muted: #a9b9a3;
  --neon: #5dff3b;
  --screen-ink: #e8ff4a;
  --panel: #0a130a;
  --focus: #ffe14a;
  --k: 0.6;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
a { color: var(--neon); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.portada { min-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.foot { padding: 10px 16px 16px; color: var(--muted); font-size: 14px; }

/* ----------------------------------------------------------- stage */
@media all {
  .portada { justify-content: center; }
  .stage {
    position: relative;
    width: 1536px; height: 1024px;
    zoom: var(--k);
    background: url("/static/web/verde_robot_h.webp?v=1") center / 100% 100% no-repeat;
    flex: none;
  }
  .stage::after { /* dedos sobre el teléfono */
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
    background: url("/static/web/verde_hands.webp?v=1") center / 100% 100% no-repeat;
  }
  .foot { position: fixed; right: 0; bottom: 0; padding: 6px 12px; font-size: 13px; background: rgba(5, 7, 5, 0.7); }

  .ad-slot { position: absolute; pointer-events: none; }
  .ad-slot-led { left: 1196px; top: 0; width: 340px; height: 288px; }
  .ad-slot-panza { left: 410px; top: 720px; width: 460px; height: 304px; }

  .neon-ring {
    position: absolute; left: 124px; top: 16px; width: 129px; height: 129px;
    border: 6.5px solid #d9ffc9; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 5px #8dff6a, 0 0 14px var(--neon), 0 0 34px rgba(93, 255, 59, 0.65),
      inset 0 0 14px var(--neon), inset 0 0 30px rgba(93, 255, 59, 0.45);
    animation: neon 7s linear infinite;
  }

  .chest-screen {
    position: absolute; left: 571px; top: 386px; width: 287px; height: 236px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    padding: 16px; border-radius: 14px; text-decoration: none; text-align: center;
    color: var(--screen-ink);
    background: radial-gradient(ellipse at 50% 40%, #12300b 0%, #071407 70%, #040a04 100%);
    box-shadow: inset 0 0 52px rgba(93, 255, 59, 0.38), inset 0 0 0 1px rgba(232, 255, 74, 0.12);
    text-shadow: 0 0 20px rgba(232, 255, 74, 0.8);
    transition: filter 0.35s, box-shadow 0.35s;
  }
  .chest-label { font-size: 62px; font-weight: 900; line-height: 1.02; letter-spacing: 0.03em; }
  .chest-sub { font-size: 17px; font-weight: 700; color: #c9e8b8; text-shadow: none; }
  .chest-screen:focus-visible { outline: 4px solid var(--focus); outline-offset: -8px; }

  .plates { position: static; }
  .plate {
    position: absolute; left: 957px; width: 194px;
    display: flex; align-items: center; justify-content: center; padding: 6px 10px;
    border: 0; border-radius: 10px; cursor: pointer;
    font: 900 25px/1.05 system-ui, "Segoe UI", Roboto, sans-serif; letter-spacing: 0.01em; text-align: center;
    background: radial-gradient(ellipse at 50% 45%, rgba(16, 34, 16, 0.97), rgba(3, 7, 3, 0.99));
    box-shadow: inset 0 0 18px rgba(93, 255, 59, 0.18);
    transition: filter 0.35s, box-shadow 0.35s;
  }
  .plate-qr { top: 365px; height: 74px; color: var(--screen-ink); text-shadow: 0 0 14px rgba(232, 255, 74, 0.75); --glow: rgba(232, 255, 74, 0.55); }
  .plate-ready { top: 472px; height: 76px; color: #ffd23f; text-shadow: 0 0 14px rgba(255, 210, 63, 0.75); --glow: rgba(255, 210, 63, 0.55); }
  .plate-contratar { top: 586px; height: 79px; color: #c6ff5a; font-size: 22px; text-shadow: 0 0 14px rgba(198, 255, 90, 0.7); --glow: rgba(198, 255, 90, 0.55); }
  .plate-contacto { top: 701px; height: 86px; color: #7ff3ff; text-shadow: 0 0 14px rgba(127, 243, 255, 0.75); --glow: rgba(127, 243, 255, 0.55); }
  .plate[aria-current="true"] { box-shadow: inset 0 0 0 2px currentColor, inset 0 0 24px var(--glow); }
  .chest-screen { --glow: rgba(232, 255, 74, 0.5); }
  @media (hover: hover) {
    .plate:hover, .chest-screen:hover { filter: brightness(1.18); box-shadow: inset 0 0 24px var(--glow), 0 0 26px var(--glow); }
  }
  .plate:active, .chest-screen:active, .plate[data-pressed], .chest-screen[data-pressed] { filter: brightness(1.5); transition-duration: 0s; }

  /* tablet: cristal plano de frente, 362x496 en (59,252) */
  .tablet {
    position: absolute; left: 59px; top: 252px; width: 362px; height: 496px;
    padding: 6px 14px 12px 26px; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #2e5a24 transparent;
    background: linear-gradient(180deg, #0b160b, #050a05); border-radius: 6px;
    font-size: 20px; line-height: 1.3;
  }
  /* teléfono: misma proyección que el Point, 150x345 sobre el cristal dibujado */
  .phone {
    position: absolute; left: 0; top: 0; width: 150px; height: 345px; z-index: 2;
    transform-origin: 0 0;
    transform: matrix3d(0.977071,0.0792683,0,-2.0496e-06,-0.603112,0.719325,0,-0.000392246,0,0,1,0,1282,345,0,1);
    padding: 14px 22px 30px 12px; gap: 6px;
  }
}

/* ----------------------------------------------------------- movil (mismo escenario) */
html[data-mode="pan"], html[data-mode="pan"] body,
html[data-mode="wide"], html[data-mode="wide"] body { overflow-x: hidden; }
html[data-mode="pan"] .portada {
  display: block; min-height: 0; width: 100%;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
html[data-mode="pan"] .portada::-webkit-scrollbar { display: none; }
html[data-mode="wide"] .portada { justify-content: flex-start; min-height: 0; }
html[data-mode="pan"] .foot, html[data-mode="wide"] .foot { font-size: 12px; padding: 4px 10px; }

/* ----------------------------------------------------------- tablet content */
.tablet h2 { margin: 10px 0 8px; color: var(--neon); font-size: 1.45em; line-height: 1.1; text-shadow: 0 0 10px rgba(93, 255, 59, 0.45); }
.tablet h3 { margin: 12px 0 4px; font-size: 1.05em; color: #d9ffc9; }
.tablet p, .tablet ul, .tablet ol { margin: 6px 0; }
.tablet ul, .tablet ol { padding-left: 1.2em; }
.tablet .hint { color: var(--muted); }
.tablet .notice { padding: 8px 10px; border-left: 4px solid #ffd23f; background: rgba(255, 210, 63, 0.08); }
.tablet .price { font-size: 1.15em; font-weight: 800; color: var(--screen-ink); }
.tablet .price span { font-weight: 400; color: var(--muted); }
.tablet-cta { display: block; margin: 12px 0 4px; padding: 10px; border-radius: 10px; text-align: center; font-weight: 900; text-decoration: none; color: #061006; background: var(--neon); }
.tablet .steps { padding-left: 1.3em; }
.tablet .steps li { margin: 4px 0; }
.tablet .managed { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.tablet .managed p { margin: 0; }
.tablet .managed img, .tablet .managed video { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 6px; background: #000; }

.web-form { display: flex; flex-direction: column; gap: 7px; }
.web-form label { display: flex; flex-direction: column; gap: 2px; font-size: 0.88em; color: #cfe3c6; }
.web-form label.check { flex-direction: row; align-items: center; gap: 8px; }
.web-form input:not([type=checkbox]), .web-form textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #2c4a24; border-radius: 7px;
  background: #020502; color: var(--ink); font: inherit; font-size: 16px;
}
.web-form input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--neon); }
.web-form button { margin-top: 4px; min-height: 44px; border: 0; border-radius: 10px; font-weight: 900; font-size: 1em; cursor: pointer; color: #061006; background: var(--neon); }
.web-form button:disabled { opacity: 0.6; cursor: progress; }
.web-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.3em; font-weight: 700; }
.form-status[data-state="ok"] { color: var(--neon); }
.form-status[data-state="error"] { color: #ff8b7e; }

/* ----------------------------------------------------------- phone content */
.phone { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.phone-brand { color: var(--neon); font-weight: 900; font-size: 19px; text-shadow: 0 0 10px rgba(93, 255, 59, 0.55); }
.phone-title { color: #fff; font-weight: 800; font-size: 14px; }
.phone-qr { display: block; width: 104px; aspect-ratio: 1; padding: 5px; border-radius: 6px; background: #fff; }
.phone-qr svg { display: block; width: 100%; height: 100%; }
.phone-soon { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; color: var(--neon);
  background: radial-gradient(circle, rgba(93, 255, 59, 0.16), rgba(93, 255, 59, 0.02) 70%); box-shadow: 0 0 0 1px rgba(93, 255, 59, 0.35); }
.phone-pending { display: flex; flex-direction: column; color: #9fb09a; font-size: 12px; line-height: 1.25; }
.phone-pending strong { color: #fff; font-size: 16px; letter-spacing: 0.02em; }
.phone-alt { color: var(--neon); font-size: 12px; font-weight: 700; line-height: 1.2; }
.phone-link { font-weight: 800; font-size: 14px; }
@keyframes neon { 0%, 46%, 49%, 52%, 100% { opacity: 1; } 47.5%, 50.5% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .neon-ring { animation: none; }
  .plate, .chest-screen { transition: none; }
}
