/* Viajely landing: tokens de la identidad Cobalto y las piezas del producto (chat, cotización, autobús, recibo, panel). */
:root {
  --paper: #f3f5f9;
  --white: #ffffff;
  --ink: #0f1a33;
  --muted: #4f5a72;
  --navy: #0e1e4a;
  --navy-deep: #071232;
  --on-navy: #ffffff;
  --on-navy-muted: #c9d3ee;
  --cobalt: #2340a8;
  --cobalt-strong: #1c3386;
  --cobalt-soft: #e9edf8;
  --cobalt-muted: #c8d0ea;
  --cobalt-light: #7f96dc;
  /* El ocre solo vive en el anillo punteado del sello. */
  --ochre: #a87410;
  --ochre-on-navy: #d9a43a;
  --line: #dde2ec;
  --line-soft: #e9edf4;
  --success: #1c7044;
  --success-soft: #e7f3ec;
  --warning: #8a5a00;
  --warning-soft: #fbf3e2;
  --bubble-out: #e6ecfa;
  --chat-bg: #edf0f6;
  --track: #e4e8f1;

  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --font-body: "Public Sans", ui-sans-serif, system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
  --t-open: 1200ms;

  --gutter: clamp(16px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
::selection { background: var(--cobalt-muted); color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Botón único de la página: rectangular, relleno cobalto, se hunde al tocarlo. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  background: var(--cobalt); color: var(--white);
  font-weight: 650; font-size: 17px; text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.button:hover { background: var(--cobalt-strong); }
.button:active { transform: scale(0.97); }
.button.is-light { background: var(--white); color: var(--navy); }
.button.is-light:hover { background: var(--cobalt-soft); }
.button svg { transition: transform var(--t-ui) var(--ease-out); }
.button:hover svg { transform: translateX(4px); }
.text-link { font-weight: 650; text-underline-offset: 5px; text-decoration-thickness: 2px; transition: color var(--t-hover) ease; }
.text-link:hover { color: var(--cobalt); }

/* ---------- Piezas del producto (data-ui): sus propios bordes y sombras son los del sistema. ---------- */
[data-ui] { font-family: var(--font-body); color: var(--ink); font-size: 15px; line-height: 1.4; text-align: left; }

/* Chat */
.ui-chat { background: var(--chat-bg); border-radius: 18px; overflow: hidden; width: 100%; max-width: 380px; }
.ui-chat__bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--white); border-bottom: 1px solid var(--line); }
.ui-chat__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--cobalt-soft); color: var(--cobalt); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.ui-chat__who { font-weight: 700; font-size: 15px; }
.ui-chat__where { font-size: 13px; color: var(--muted); }
.ui-chat__body { padding: 14px; display: grid; gap: 8px; min-height: 220px; align-content: end; }
.ui-bubble { max-width: 84%; padding: 9px 12px 7px; border-radius: 14px; font-size: 15px; }
.ui-bubble small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); text-align: right; }
.ui-bubble.is-in { background: var(--white); border-bottom-left-radius: 4px; justify-self: start; }
.ui-bubble.is-out { background: var(--bubble-out); border-bottom-right-radius: 4px; justify-self: end; }
.ui-bubble__by { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--cobalt); margin-bottom: 2px; }
.ui-typing { justify-self: end; display: flex; gap: 4px; padding: 12px 14px; background: var(--bubble-out); border-radius: 14px; border-bottom-right-radius: 4px; }
.ui-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt-light); animation: typing 1s infinite ease-in-out; }
.ui-typing i:nth-child(2) { animation-delay: .15s; }
.ui-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Cotización (como sale en WhatsApp, guía de voz C9) */
.ui-quote { background: var(--white); border-radius: 16px; padding: 18px 20px; width: 100%; max-width: 360px; box-shadow: 0 18px 40px -22px rgba(14, 30, 74, .45); }
.ui-quote__title { font-weight: 700; font-size: 17px; }
.ui-quote__line { color: var(--muted); }
.ui-quote__total { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.ui-quote__total strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.ui-quote__deposit { margin-top: 6px; display: flex; justify-content: space-between; font-weight: 650; color: var(--cobalt); }
.ui-quote__includes { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Autobús, asiento por asiento */
.ui-bus { background: var(--white); border-radius: 22px 22px 14px 14px; padding: 16px 16px 18px; width: 100%; max-width: 300px; }
.ui-bus__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ui-bus__trip { font-weight: 700; font-size: 15px; }
.ui-bus__count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.ui-bus__count b { color: var(--ink); }
.ui-bus__front { height: 8px; border-radius: 6px; background: var(--track); margin-bottom: 12px; }
.ui-bus__seats { display: grid; grid-template-columns: 1fr 1fr 18px 1fr 1fr; gap: 6px; }
.ui-seat { aspect-ratio: 1 / 1.05; border-radius: 6px 6px 4px 4px; background: var(--track); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); transition: background-color 260ms var(--ease-out), color 260ms var(--ease-out), transform 260ms var(--ease-out); }
.ui-seat.is-sold { background: var(--cobalt); color: var(--white); }
.ui-seat.is-new { background: var(--navy); color: var(--white); transform: scale(1.12); box-shadow: 0 0 0 3px var(--cobalt-muted); }
.ui-seat.is-aisle { visibility: hidden; }
.ui-bus__legend { margin-top: 12px; display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.ui-bus__legend span { display: inline-flex; align-items: center; gap: 6px; }
.ui-bus__legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--track); }
.ui-bus__legend i.is-sold { background: var(--cobalt); }
.ui-bus__legend i.is-new { background: var(--navy); }

/* Recibo con borde dentado, sello de PAGADO */
.ui-receipt { position: relative; width: 100%; max-width: 340px; background: var(--white); padding: 22px 24px 64px; box-shadow: 0 30px 60px -24px rgba(4, 10, 30, .55);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%; }
.ui-receipt__head { display: flex; justify-content: space-between; align-items: baseline; }
.ui-receipt__title { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--navy); }
.ui-receipt__folio { font-size: 14px; color: var(--muted); }
.ui-receipt dl { display: grid; gap: 7px; margin-top: 14px; font-size: 15px; }
.ui-receipt dl div { display: flex; justify-content: space-between; gap: 12px; }
.ui-receipt dt { color: var(--muted); }
.ui-receipt dd { font-weight: 650; text-align: right; }
.ui-receipt__amount { margin: 14px 0; padding: 12px 0; border-block: 1px solid var(--line); }
.ui-receipt__amount span { font-size: 14px; color: var(--muted); }
.ui-receipt__amount strong { display: block; font-family: var(--font-display); font-size: 46px; line-height: 1; font-weight: 600; }
.ui-stamp { position: absolute; right: 18px; bottom: 14px; width: 112px; height: 112px; color: var(--cobalt); opacity: .92; transform: rotate(-14deg); }

/* Panel del dueño */
.ui-panel { background: var(--white); border-radius: 18px; padding: 20px 22px; width: 100%; max-width: 400px; }
.ui-panel__label { font-size: 14px; color: var(--muted); }
.ui-panel__big { font-family: var(--font-display); font-size: 48px; line-height: 1; font-weight: 600; margin-top: 4px; }
.ui-panel__of { font-size: 15px; color: var(--muted); margin-top: 6px; }
.ui-panel__bar { margin-top: 14px; height: 12px; border-radius: 6px; background: var(--track); overflow: hidden; }
.ui-panel__bar i { display: block; height: 100%; background: var(--cobalt); transform-origin: left; transform: scaleX(var(--paid, .737)); transition: transform 900ms var(--ease-expo); }
.ui-panel__rows { margin-top: 16px; display: grid; gap: 10px; }
.ui-panel__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.ui-chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 650; }
.ui-chip.is-ok { background: var(--success-soft); color: var(--success); }
.ui-chip.is-warn { background: var(--warning-soft); color: var(--warning); }

/* Sello de marca (símbolo provisional con la V) */
.seal-ring { fill: none; stroke: currentColor; }
.seal-dots { fill: none; stroke: var(--ochre); stroke-dasharray: 1.2 1.9; }
.on-navy .seal-dots { stroke: var(--ochre-on-navy); }

/* Entrada de cada sección: en orden de lectura, una sola vez. Sin script todo se ve. */
/* Solo se esconde lo que está abajo al cargar; lo que ya se ve nunca espera a nadie. */
[data-reveal] { transition: opacity var(--t-reveal) var(--ease-expo), transform var(--t-reveal) var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal].is-waiting { opacity: 0; transform: translateY(24px); transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  [data-reveal].is-waiting { opacity: 1; transform: none; }
}
