/* ==========================================================
   Flujo Digital — Estilos compartidos de las demostraciones
   ========================================================== */

:root {
  /* Flujo Digital */
  --fd-bg: #0f0f0f;
  --fd-bg2: #131313;
  --fd-surface: #1a1a1a;
  --fd-surface2: #232323;
  --fd-line: #2b2b2b;
  --fd-line2: #3a3a3a;
  --fd-lime: #c6ff3d;
  --fd-lime-dim: #9fd41f;
  --fd-glow: rgba(198, 255, 61, .15);
  --fd-glow-s: rgba(198, 255, 61, .35);
  --fd-text: #f5f5f2;
  --fd-dim: #a3a3a3;
  --fd-muted: #6b6b6b;

  /* WhatsApp */
  --wa: #25d366;
  --wa-dark: #075e54;
  --wa-bg: #efe7de;

  /* Semánticos */
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --r: 14px;
  --r-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--fd-bg);
  color: var(--fd-text);
  overflow-x: hidden;
  line-height: 1.55;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--fd-lime);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}

.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  animation: fadeIn .35s var(--ease);
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ---------- Barra Flujo Digital ---------- */
.fd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--fd-line);
  background: rgba(15, 15, 15, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.fd-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  transition: opacity .16s var(--ease), transform .14s var(--ease);
}

a.fd-brand:active {
  transform: scale(.97);
}

@media (hover: hover) and (pointer: fine) {
  a.fd-brand:hover {
    opacity: .8;
  }
}

.fd-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px var(--fd-glow-s));
  animation: pulseLogo 2.8s var(--ease-io) infinite;
}

@keyframes pulseLogo {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px var(--fd-glow-s))
  }

  50% {
    transform: scale(1.07);
    filter: drop-shadow(0 0 11px var(--fd-lime))
  }
}

.fd-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .97rem;
  letter-spacing: -.01em;
}

.fd-name span {
  color: var(--fd-lime);
}

.demo-pill {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fd-lime);
  background: var(--fd-glow);
  border: 1px solid rgba(198, 255, 61, .25);
  border-radius: 999px;
  padding: .3rem .6rem;
  white-space: nowrap;
}

/* ---------- Tipografía ---------- */
.kicker {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fd-lime);
  font-weight: 700;
}

.h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 6.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.h1 em {
  color: var(--fd-lime);
  font-style: normal;
}

.h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.22;
}

.sub {
  color: var(--fd-dim);
  font-size: .9rem;
  line-height: 1.6;
}

.note {
  font-size: .74rem;
  color: var(--fd-muted);
  line-height: 1.6;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: .93rem;
  padding: 1rem 1.3rem;
  min-height: 50px;
  width: 100%;
  transition: transform .14s var(--ease), background .18s, box-shadow .2s, border-color .18s, color .18s;
}

.btn:active {
  transform: scale(.975);
}

.btn[disabled] {
  opacity: .4;
  cursor: not-allowed;
}

.btn[disabled]:active {
  transform: none;
}

.btn-lime {
  background: var(--fd-lime);
  color: #0a0a0a;
}

.btn-lime:hover:not([disabled]) {
  background: var(--fd-lime-dim);
  box-shadow: 0 10px 26px var(--fd-glow-s);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--fd-line2);
  color: var(--fd-text);
}

.btn-ghost:hover {
  border-color: var(--fd-lime);
  color: var(--fd-lime);
}

.btn-wa {
  background: var(--wa);
  color: #fff;
}

.btn-wa:hover {
  background: #1eb955;
}

.btn-sm {
  padding: .65rem 1rem;
  min-height: 42px;
  font-size: .84rem;
  width: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--fd-dim);
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: 999px;
  padding: .5rem .9rem;
  min-height: 40px;
}

.back-link:hover {
  color: var(--fd-text);
  border-color: var(--fd-line2);
}

/* ---------- Tarjetas ---------- */
.card {
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: var(--r-lg);
  padding: 1.15rem;
}

.card-lime {
  border-color: rgba(198, 255, 61, .3);
  background: linear-gradient(160deg, rgba(198, 255, 61, .06), var(--fd-surface) 55%);
}

/* ---------- Animación NFC ---------- */
.nfc-anim {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}

.nfc-anim::before,
.nfc-anim::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--fd-lime);
  animation: ripple 2.4s var(--ease) infinite;
  opacity: 0;
}

.nfc-anim::after {
  animation-delay: 1.2s;
}

@keyframes ripple {
  0% {
    transform: scale(.45);
    opacity: .85
  }

  100% {
    transform: scale(1.7);
    opacity: 0
  }
}

.nfc-core {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--fd-surface);
  border: 1px solid var(--fd-line2);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 28px var(--fd-glow);
}

/* ---------- Simulador de teléfono / WhatsApp ---------- */
.phone-mock {
  background: var(--wa-bg);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--fd-line2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

.wa-top {
  background: var(--wa-dark);
  color: #fff;
  padding: .8rem 1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.wa-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c1502e;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  flex: none;
}

.wa-nm {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
}

.wa-st {
  font-size: .7rem;
  opacity: .75;
}

.wa-body {
  padding: 1rem .9rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-height: 160px;
}

.bub {
  max-width: 88%;
  padding: .6rem .75rem;
  border-radius: 12px;
  font-size: .82rem;
  line-height: 1.5;
  color: #111;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .09);
  white-space: pre-line;
}

.bub.in {
  background: #fff;
  align-self: flex-start;
  border-top-left-radius: 3px;
}

.bub.out {
  background: #d9fdd3;
  align-self: flex-end;
  border-top-right-radius: 3px;
}

.bub .t {
  display: block;
  font-size: .61rem;
  color: #667;
  text-align: right;
  margin-top: .25rem;
}

/* ---------- Beneficios ---------- */
.ben {
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: 13px;
  padding: .9rem 1rem;
  display: flex;
  gap: .8rem;
  align-items: flex-start;
}

.ben-ic {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--fd-glow);
  color: var(--fd-lime);
  display: grid;
  place-items: center;
  border: 1px solid rgba(198, 255, 61, .2);
}

.ben-t {
  font-size: .87rem;
  font-weight: 700;
  line-height: 1.3;
}

.ben-d {
  font-size: .76rem;
  color: var(--fd-dim);
  margin-top: .22rem;
  line-height: 1.5;
}

.ben-stack {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

/* ---------- Formularios ---------- */
.field {
  margin-bottom: .9rem;
}

.field label {
  display: block;
  font-size: .76rem;
  font-weight: 600;
  color: var(--fd-dim);
  margin-bottom: .4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--fd-bg2);
  border: 1px solid var(--fd-line);
  border-radius: 11px;
  padding: .8rem .9rem;
  color: var(--fd-text);
  font-size: .92rem;
  min-height: 46px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--fd-lime);
  box-shadow: 0 0 0 3px var(--fd-glow);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--fd-muted);
}

.field.err input,
.field.err select {
  border-color: var(--bad);
}

.field .msg {
  display: none;
  font-size: .73rem;
  color: var(--bad);
  margin-top: .35rem;
}

.field.err .msg {
  display: block;
}

/* ---------- Ticket / comanda ---------- */
.ticket {
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: 16px;
  overflow: hidden;
}

.tk-top {
  background: var(--fd-surface2);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border-bottom: 1px solid var(--fd-line);
}

.tk-ttl {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .93rem;
}

.tk-new {
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--fd-lime);
  color: #0a0a0a;
  padding: .25rem .55rem;
  border-radius: 999px;
}

.tk-body {
  padding: 1rem;
}

.tk-row {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  font-size: .83rem;
  padding: .4rem 0;
  border-bottom: 1px dashed var(--fd-line);
}

.tk-row:last-of-type {
  border-bottom: none;
}

.tk-row .k {
  color: var(--fd-muted);
}

.tk-row .v {
  font-weight: 600;
  text-align: right;
}

.tk-total {
  margin-top: .7rem;
  padding-top: .8rem;
  border-top: 1px solid var(--fd-line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.tk-total .l {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--fd-muted);
  font-weight: 700;
}

.tk-total .a {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fd-lime);
}

/* ---------- Nota al dueño ---------- */
.ownernote {
  background: rgba(198, 255, 61, .07);
  border: 1px dashed rgba(198, 255, 61, .3);
  border-radius: 12px;
  padding: .75rem .9rem;
  font-size: .75rem;
  color: var(--fd-dim);
  line-height: 1.55;
  display: flex;
  gap: .55rem;
  align-items: flex-start;
}

.ownernote svg {
  flex: none;
  margin-top: .12rem;
  color: var(--fd-lime);
}

.ownernote b {
  color: var(--fd-lime);
}

/* ---------- CTA final ---------- */
.final-cta {
  background: linear-gradient(160deg, rgba(198, 255, 61, .09), var(--fd-surface) 60%);
  border: 1px solid rgba(198, 255, 61, .3);
  border-radius: 18px;
  padding: 1.5rem 1.3rem;
  text-align: center;
}

.final-cta h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.015em;
}

.final-cta p {
  font-size: .84rem;
  color: var(--fd-dim);
  margin-top: .6rem;
  line-height: 1.6;
}

.final-cta .btn {
  margin-top: 1.2rem;
}

.site-link {
  display: block;
  margin-top: .9rem;
  font-size: .78rem;
  color: var(--fd-muted);
}

.site-link b {
  color: var(--fd-lime);
}

/* ---------- Barra inferior de demo ---------- */
.demo-foot {
  border-top: 1px solid var(--fd-line);
  margin-top: 2.5rem;
  padding: 1.5rem 1.3rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
}

.demo-foot .lbl {
  font-size: .7rem;
  color: var(--fd-muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
}

.demo-foot .links {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: .8rem;
  flex-wrap: wrap;
}

.demo-foot .links a {
  font-size: .78rem;
  color: var(--fd-dim);
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: 999px;
  padding: .45rem .85rem;
  transition: border-color .16s, color .16s;
}

.demo-foot .links a:hover {
  color: var(--fd-lime);
  border-color: var(--fd-lime);
}

/* ---------- Navegador flotante ---------- */
.demo-nav {
  position: fixed;
  right: .8rem;
  bottom: calc(.9rem + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
}

.dn-panel {
  background: rgba(20, 20, 20, .97);
  border: 1px solid var(--fd-line2);
  border-radius: 14px;
  padding: .5rem;
  display: none;
  flex-direction: column;
  gap: .2rem;
  min-width: 194px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  max-height: 70vh;
  overflow-y: auto;
}

.dn-panel.show {
  display: flex;
}

.dn-h {
  font-size: .59rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--fd-muted);
  font-weight: 700;
  padding: .4rem .5rem .3rem;
}

.dn-h+.dn-h {
  border-top: 1px solid var(--fd-line);
  margin-top: .3rem;
}

.dn-b {
  background: none;
  color: var(--fd-dim);
  font-size: .8rem;
  font-weight: 600;
  text-align: left;
  padding: .55rem .6rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 38px;
  transition: background .15s, color .15s;
  width: 100%;
}

.dn-b:hover {
  background: var(--fd-surface2);
  color: var(--fd-text);
}

.dn-b.on {
  color: var(--fd-lime);
  background: var(--fd-glow);
}

.dn-n {
  font-size: .64rem;
  font-weight: 700;
  opacity: .55;
  min-width: 12px;
}

.dn-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--fd-lime);
  color: #0a0a0a;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px var(--fd-glow-s);
  transition: transform .16s var(--ease);
}

.dn-toggle:active {
  transform: scale(.93);
}

@media (min-width:520px) {
  .demo-nav {
    right: 1.4rem;
    bottom: 1.4rem;
  }
}

/* ---------- Utilidades ---------- */
.mt-1 {
  margin-top: .6rem
}

.mt-2 {
  margin-top: 1.1rem
}

.mt-3 {
  margin-top: 1.6rem
}

.mt-4 {
  margin-top: 2.2rem
}

.tc {
  text-align: center
}

.pad {
  padding: 1.8rem 1.3rem 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.row {
  display: flex;
  gap: .6rem;
}

.hide {
  display: none !important;
}
