:root {
  --navy: #06246b;
  --blue: #0a4fc2;
  --blue-2: #1268e3;
  --cyan: #2cc9f6;
  --red: #e3141b;
  --red-2: #ff3b3b;
  --ink: #12203f;
  --muted: #5a6788;
  --line: #d5deee;
  --bg: #f1f5fc;
  --card: #ffffff;
  --ok: #e3141b;
  --font: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #031a4d;
  font-family: var(--font); color: var(--ink);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
input { -webkit-user-select: text; user-select: text; }
button { font-family: inherit; cursor: pointer; }

/* ------------------------------------------------------------ escenario
   Todo se diseña a 1080×1920 y se escala para llenar la pantalla. */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage {
  position: absolute; left: 0; top: 0; width: 1080px; height: 1920px;
  transform-origin: 0 0; overflow: hidden; background: var(--bg);
}

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(40px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.screen.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s ease, transform .35s ease, visibility 0s;
}
.screen.leaving-back { transform: translateX(40px); }
.screen.from-back { transform: translateX(-40px); }

/* ------------------------------------------------------------ inicio */
#s-inicio { background: #0a4fc2; }
.inicio-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.inicio-cta {
  position: absolute; left: 13.6%; top: 74.2%; width: 72.6%; height: 8.6%;
  border: 0; border-radius: 999px; background: transparent;
  animation: pulse 2.2s ease-out infinite;
}
.inicio-cta:active { background: rgba(255,255,255,.18); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.55); }
  70%  { box-shadow: 0 0 0 34px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.admin-hotspot { position: absolute; left: 0; top: 0; width: 160px; height: 160px; border: 0; background: transparent; }

/* ------------------------------------------------------------ cabecera */
.topbar {
  position: relative; flex: none; height: 190px; padding: 0 64px;
  display: flex; align-items: center; justify-content: space-between;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(44,201,246,.45) 0%, rgba(44,201,246,0) 45%),
    linear-gradient(120deg, var(--navy) 0%, var(--blue) 60%, var(--blue-2) 100%);
  color: #fff; z-index: 2;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 36px;
  background: linear-gradient(90deg, var(--cyan), rgba(44,201,246,0) 70%);
  clip-path: polygon(0 0, 100% 0, 100% 10%, 0 100%);
}
.topbar-logo { height: 58px; width: auto; }
.topbar-tag { font-size: 38px; font-weight: 800; font-style: italic; letter-spacing: -.5px; }
.topbar-tag b { font-weight: 900; }

.screen-body { position: relative; flex: 1; padding: 64px 64px 0; z-index: 1; transition: transform .3s ease; }

.steps { display: flex; gap: 14px; justify-content: center; margin-bottom: 36px; }
.steps span { width: 64px; height: 10px; border-radius: 6px; background: var(--line); }
.steps span.on { background: var(--blue); }

.title { margin: 0 0 48px; text-align: center; font-size: 60px; line-height: 1.12; font-weight: 800; letter-spacing: -1px; color: var(--navy); }
.subtitle { margin: 52px 0 36px; text-align: center; font-size: 40px; line-height: 1.2; font-weight: 700; color: var(--navy); }

/* swoosh decorativo inferior */
.swoosh {
  position: absolute; right: 0; bottom: 0; width: 100%; height: 160px; pointer-events: none; z-index: 0;
  background: linear-gradient(100deg, rgba(10,79,194,0) 30%, var(--blue) 70%, var(--cyan) 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  opacity: .9;
}

/* ------------------------------------------------------------ grilla de modelos */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; }
.modelo {
  position: relative; height: 330px; padding: 18px 14px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: var(--card); border: 3px solid transparent; border-radius: 26px;
  box-shadow: 0 6px 22px rgba(10,40,110,.10), 0 1px 0 var(--line) inset;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.modelo:active, .modelo.sel { transform: scale(.97); border-color: var(--blue-2); box-shadow: 0 10px 30px rgba(18,104,227,.25); }
.modelo-img { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; }
.img-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.modelo-img img, .modelo-img svg { max-width: 100%; max-height: 220px; object-fit: contain; }
.modelo-nombre { font-size: 30px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ink); text-align: center; line-height: 1.05; }
.silueta { width: 92%; }
.silueta .carro { fill: url(#gCarro); }
.silueta .vidrio { fill: #c9d6ea; }
.silueta .rueda { fill: #26324d; }
.silueta .aro { fill: #aab6cc; }
.silueta .sombra { fill: rgba(10,40,110,.12); }

/* ------------------------------------------------------------ formulario */
.modelo-card {
  display: flex; align-items: center; gap: 36px; padding: 26px 36px;
  background: var(--card); border-radius: 28px; box-shadow: 0 6px 22px rgba(10,40,110,.10);
}
.modelo-card-img { width: 330px; height: 190px; flex: none; display: flex; align-items: center; justify-content: center; }
.modelo-card-img img, .modelo-card-img svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.modelo-card-info { flex: 1; min-width: 0; }
.modelo-card-nombre { font-size: 48px; font-weight: 800; text-transform: uppercase; color: var(--navy); line-height: 1.05; }
.versiones { display: flex; gap: 14px; margin: 16px 0 14px; flex-wrap: wrap; }
.versiones:empty { display: none; }
.ver-chip {
  padding: 12px 26px; border-radius: 999px; font-size: 28px; font-weight: 700;
  border: 3px solid var(--line); background: #fff; color: var(--muted);
}
.versiones.bad .ver-chip { border-color: var(--red); color: var(--red); }
.ver-chip.on { border-color: var(--blue-2); background: var(--blue-2); color: #fff; }
.ver-unica { font-size: 32px; font-weight: 600; color: var(--muted); margin: 8px 0 12px; }
.link-btn { border: 0; background: none; padding: 6px 0; font-size: 28px; font-weight: 600; color: var(--blue-2); display: inline-flex; align-items: center; gap: 10px; }

.field {
  display: flex; align-items: center; gap: 22px; height: 108px; padding: 0 34px;
  background: #fff; border: 3px solid var(--line); border-radius: 22px;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 6px rgba(18,104,227,.15); }
.field.bad { border-color: var(--red); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 600 36px var(--font); color: var(--ink); }
.field input::placeholder { color: #8d99b4; font-weight: 500; }
.err { margin: 8px 8px 14px; min-height: 30px; font-size: 26px; font-weight: 600; color: var(--red); }

.check { display: flex; gap: 22px; align-items: flex-start; margin-top: 10px; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  flex: none; width: 52px; height: 52px; border-radius: 12px; border: 3px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s;
}
.check input:checked + .check-box { background: var(--red); border-color: var(--red); }
.check input:checked + .check-box::after {
  content: ""; width: 14px; height: 26px; border: solid #fff; border-width: 0 6px 6px 0; transform: translateY(-3px) rotate(45deg);
}
.check.bad .check-box { border-color: var(--red); }
.check-text { font-size: 27px; line-height: 1.4; color: var(--muted); font-weight: 500; }
.check-text a { color: var(--blue-2); font-weight: 700; }

/* ------------------------------------------------------------ botones */
.actions {
  position: relative; z-index: 3; flex: none; display: flex; gap: 28px; padding: 30px 64px 200px;
}
.btn {
  height: 124px; padding: 0 48px; border-radius: 999px; border: 0;
  font-size: 38px; font-weight: 800; letter-spacing: .3px;
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  transition: transform .1s ease, filter .1s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  flex: 1; color: #fff; text-transform: uppercase;
  background: linear-gradient(180deg, var(--red-2) 0%, var(--red) 60%, #c30d13 100%);
  box-shadow: 0 14px 30px rgba(227,20,27,.35), inset 0 2px 0 rgba(255,255,255,.35);
}
.btn-primary[disabled] { filter: grayscale(.4); opacity: .75; }
.btn-outline { min-width: 280px; background: #fff; color: var(--ink); border: 3px solid var(--line); }
.btn-ghost { background: #fff; color: var(--navy); border: 3px solid #b8c6df; padding: 0 64px; margin-top: 70px; }
.btn.loading .chev-r { display: none; }
.btn.loading::after {
  content: ""; width: 40px; height: 40px; border-radius: 50%;
  border: 6px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ confirmación */
.ok-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 220px; }
.ok-check {
  width: 230px; height: 230px; border-radius: 50%; background: var(--red);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 50px rgba(227,20,27,.35);
  animation: pop .5s cubic-bezier(.2,1.6,.4,1) both;
}
.ok-check svg { width: 140px; height: 140px; }
.ok-check path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .45s .3s ease forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ok-title { margin: 70px 0 40px; font-size: 72px; font-weight: 800; color: var(--navy); letter-spacing: -1px; }
.ok-text { margin: 0 0 36px; font-size: 40px; line-height: 1.35; color: var(--muted); font-weight: 500; }
.ok-text b { color: var(--ink); font-weight: 800; }
#ok-count { color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------ iconos (máscaras SVG) */
.ico, .chev-l, .chev-r, .ico-pen, .ico-home { display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico { width: 44px; height: 44px; color: #6c7a99; }
.chev-l, .chev-r { width: 34px; height: 34px; }
.ico-pen { width: 26px; height: 26px; }
.ico-home { width: 44px; height: 44px; }
.chev-l  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4 7 12l8 8'/%3E%3C/svg%3E"); }
.chev-r  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 4 8 8-8 8'/%3E%3C/svg%3E"); }
.ico-user  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E"); }
.ico-mail  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 6 8.5 7 8.5-7'/%3E%3C/svg%3E"); }
.ico-id    { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Ccircle cx='8.5' cy='11' r='2'/%3E%3Cpath d='M5.5 16c.5-1.6 1.6-2.3 3-2.3s2.5.7 3 2.3M14 10h4.5M14 13.5h3'/%3E%3C/svg%3E"); }
.ico-phone { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M5 3h3.5l1.8 4.6-2.4 1.6a11 11 0 0 0 6 6l1.6-2.4L20 14.6V18a2.5 2.5 0 0 1-2.6 2.5C10 20 4 14 3.5 6.6A2.5 2.5 0 0 1 5 3Z'/%3E%3C/svg%3E"); }
.ico-pen   { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19l-4 1Z'/%3E%3C/svg%3E"); }
.ico-home  { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 3.5 21 11M5.5 9v11h13V9'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------ overlays */
.overlay {
  position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(4,20,60,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.dialog {
  width: 780px; padding: 64px 60px 56px; border-radius: 40px; background: #fff; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.dialog-wide { width: 900px; text-align: left; }
.dialog h3 { margin: 0 0 28px; font-size: 52px; font-weight: 800; color: var(--navy); }
.dialog p { margin: 0 0 44px; font-size: 36px; line-height: 1.4; color: var(--muted); }
.dialog .btn { width: 100%; }
.dialog-scroll { max-height: 900px; overflow: auto; margin-bottom: 44px; font-size: 30px; line-height: 1.55; color: var(--muted); white-space: pre-line; -webkit-user-select: text; user-select: text; }

.admin-input { width: 100%; height: 100px; margin: 10px 0 30px; padding: 0 30px; border: 3px solid var(--line); border-radius: 20px; font: 600 36px var(--font); color: var(--ink); }
.admin-label { display: block; font-size: 28px; font-weight: 700; color: var(--muted); }
.admin-row { display: flex; gap: 22px; margin-top: 22px; }
.admin-row .btn { flex: 1; width: auto; min-width: 0; font-size: 27px; height: 100px; padding: 0 20px; }
.admin-info { display: grid; grid-template-columns: auto 1fr; gap: 14px 30px; margin: 0 0 36px; font-size: 30px; }
.admin-info dt { color: var(--muted); font-weight: 600; }
.admin-info dd { margin: 0; font-weight: 800; color: var(--ink); }

.toast {
  position: absolute; left: 50%; top: 250px; z-index: 60; transform: translateX(-50%);
  max-width: 900px; padding: 30px 48px; border-radius: 24px; background: var(--ink); color: #fff;
  font-size: 32px; font-weight: 600; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.toast[hidden] { display: none; }
