/* style.css — Tarjeta digital Alejandro Nualart / SmartProcess AI
   Concepto "P3 — Tarjeta viva": la página ES el pass de Wallet, flotando.
   Mobile-first: 390px es el caso primario (llega gente escaneando el QR). */

@font-face {
  font-family: "Baloo2";
  src: url("assets/fonts/Baloo2-VF.ttf") format("truetype-variations"),
       url("assets/fonts/Baloo2-VF.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("assets/fonts/Quicksand-VF.ttf") format("truetype-variations"),
       url("assets/fonts/Quicksand-VF.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --tinta: #131209;
  --papel: #F4EEE0;
  --lima: #A8DE2E;
  --aceituna: #5C7A10;
  --papel-muted: rgba(244, 238, 224, 0.62);
  --sombra: rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--tinta);
  color: var(--papel);
  font-family: "Quicksand", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ── textura "lija": grano fino, silencioso, sin patrones geométricos ── */
body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 120px 120px;
  animation: grano-respira 46s ease-in-out infinite;
}

@keyframes grano-respira {
  0%, 100% { background-position: 0 0; }
  50% { background-position: 9px 6px; }
}

.escena {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1.25rem 2rem;
}

/* ── marquee: cinta de texto viva, arriba del hero ──
   full-bleed: se sale con márgenes negativos del padding del .escena,
   overflow:hidden aquí es lo que evita el scroll horizontal (la sonda
   de 390px mide contra ESTE contenedor, no solo contra body). */

.marquee {
  overflow: hidden;
  background: var(--lima);
  padding: 0.55rem 0;
  margin: -1.75rem -1.25rem 2.25rem;
  width: calc(100% + 2.5rem);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 16s linear infinite;
}

.marquee:hover .marquee__track,
.marquee.marquee--pausado .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  white-space: nowrap;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  color: var(--tinta);
  padding-right: 0;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── la tarjeta flotante ── */

.tarjeta-wrap {
  width: 100%;
  max-width: 360px;
  perspective: 900px;
  touch-action: pan-y;
  animation: tarjeta-cae 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tarjeta-cae {
  from { opacity: 0; transform: translateY(-56px) scale(0.82); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tarjeta {
  --rx: 0deg;
  --ry: 0deg;
  --s: 1;
  position: relative;
  border-radius: 26px;
  background: var(--papel);
  box-shadow: 0 18px 40px var(--sombra), 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
  touch-action: none;
  overflow: hidden;
}

.tarjeta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 40%);
  pointer-events: none;
}

.tarjeta__cara {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  min-height: 210px;
  padding: 1.6rem 1.5rem 1.5rem;
}

.tarjeta__logo {
  width: 62%;
  max-width: 190px;
  height: auto;
  display: block;
}

.tarjeta__chip {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 78px;
  height: 78px;
  border-radius: 18px;
}

.tarjeta__texto {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tarjeta__campo {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.tarjeta__label {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  color: var(--aceituna);
}

.tarjeta__valor {
  font-family: "Baloo2", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--tinta);
  line-height: 1.2;
}

/* ── botón de giroscopio ── */

.btn-giro {
  margin-top: 1.1rem;
  background: transparent;
  color: var(--lima);
  border: 1px solid var(--lima);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-family: "Quicksand", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-giro:active {
  transform: scale(0.94);
  background: rgba(168, 222, 46, 0.12);
}

.btn-giro[hidden] { display: none; }

/* ── acciones ── */

.acciones {
  width: 100%;
  max-width: 360px;
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@keyframes subir {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: "Baloo2", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  animation: subir 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.75s both;
}

.acciones .boton:nth-child(2) { animation-delay: 0.83s; }
.acciones .boton:nth-child(3) { animation-delay: 0.91s; }

.boton:active {
  transform: scale(0.95);
}

.boton--primario {
  background: var(--lima);
  color: var(--tinta);
}

.boton--wallet {
  background: var(--papel);
  color: var(--tinta);
}

.boton--whatsapp {
  background: transparent;
  color: var(--papel);
  border-color: rgba(244, 238, 224, 0.35);
  font-weight: 500;
}

.nota-demo {
  font-size: 0.78rem;
  color: var(--papel-muted);
  line-height: 1.4;
  margin: 0.1rem 0 0;
  text-align: center;
  animation: subir 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.98s both;
}

/* ── Los detalles: filas picables, toda la info que el pass no trae ── */

.detalles {
  width: 100%;
  max-width: 360px;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  animation: subir 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.08s both;
}

.detalles__titulo {
  font-family: "Baloo2", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--papel);
  margin: 0 0 0.5rem;
}

.detalle {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 12px;
  border-bottom: 1px solid rgba(244, 238, 224, 0.12);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.detalle--ultimo {
  border-bottom: none;
}

.detalle:hover {
  background: rgba(168, 222, 46, 0.07);
}

.detalle:active {
  background: rgba(168, 222, 46, 0.12);
  transform: scale(0.98);
}

.detalle__label {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  color: var(--lima);
}

.detalle__valor {
  font-family: "Baloo2", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--papel);
  word-break: break-word;
}

.firma {
  font-family: "Baloo2", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--lima);
  text-align: center;
  margin: 1.5rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .tarjeta,
  .boton,
  .btn-giro,
  .detalle {
    transition: none !important;
  }

  .tarjeta-wrap,
  .boton,
  .nota-demo,
  .detalles {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body::before {
    animation: none !important;
  }

  .marquee__track {
    animation: none !important;
    transform: translateX(0) !important;
  }
}

