/* RockWallet (RockGroup) — /pagos/
   Sin JS: lista legible de metodos. Con JS: tarjetero animado (js/pagos.js).
   Cuando este lista la fuente propia de RockGroup, basta con cambiar --fuente y su @font-face. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fondo: #101116;
  --fondo-2: #30333a;
  --texto: #f5f5f5;
  --texto-2: #bfc3ca;
  --acento: #ffb347;
  --acento-tinta: #17120a;
  --wa: #167345;
  --fuente: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radio: 14px;
  color-scheme: dark;
  accent-color: var(--acento);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-block-size: 100svh;
  background: radial-gradient(ellipse at 50% 0, var(--fondo-2), var(--fondo) 65%) fixed var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.5;
}
h1, h2, p { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ico { inline-size: 1.15em; block-size: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.billetera {
  inline-size: min(100%, 30rem);
  margin-inline: auto;
  padding: 1rem 1.25rem 2rem;
}

/* ---------- Encabezado ---------- */
.encabezado { text-align: center; }
.barra { display: flex; align-items: center; justify-content: space-between; min-block-size: 2.75rem; }
.sonido {
  display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem;
  border: 1px solid #ffffff26; border-radius: 50%; background: #ffffff0d; color: var(--texto-2); cursor: pointer;
}
.sonido[aria-pressed="true"] { color: var(--acento); border-color: #ffb34766; }
.sonido[aria-pressed="true"] .ico-off, .sonido[aria-pressed="false"] .ico-on { display: none; }
@media (hover: hover) { .sonido:hover { color: var(--texto); } }
.volver-sitio {
  display: inline-flex; align-items: center; gap: .3rem;
  min-block-size: 2.75rem; padding-inline: .2rem .6rem;
  color: var(--texto-2); font-size: .8125rem; font-weight: 600; letter-spacing: .3em; text-decoration: none;
}
@media (hover: hover) { .volver-sitio:hover { color: var(--texto); } }
.titulo {
  margin-block-start: .25rem;
  font-size: clamp(2.4rem, 11vw, 3rem); font-style: italic; font-weight: 800; letter-spacing: -0.06em; line-height: 1;
}
.titulo span { color: var(--acento); }
.bajada { margin-block-start: .5rem; color: var(--texto-2); }

/* ---------- Lista sin JS (y fuente de datos) ---------- */
.metodos { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .9rem; }
.metodo {
  scroll-margin-block-start: 1rem;
  padding: 1.1rem 1.2rem; border-radius: var(--radio);
  background: #23262d; border: 1px solid #ffffff33;
}
.m-banco { font-size: 1.2rem; }
.m-moneda { font-size: .75rem; letter-spacing: .15em; color: #ddd; }
.m-dato { margin-block: .6rem .3rem; font-size: 1.35rem; font-weight: 800; overflow-wrap: anywhere; }
.m-dato.m-correo { font-size: clamp(1rem, 4.6vw, 1.25rem); overflow-wrap: break-word; }
.m-tipo { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: #ddd; }
.m-titular { font-weight: 600; font-size: .9rem; }
.m-extra, .m-nota { font-size: .8rem; color: #e6e6e6; }
.m-nota { margin-block-start: .4rem; }
.metodo:target { outline: 3px solid var(--acento); outline-offset: 3px; }
/* Con el tarjetero listo, la lista solo sirve como datos. */
.tarjetero-listo .metodos { display: none; }

/* ---------- Tarjetero ----------
   Secuencia (js/pagos.js):
   1. .llegando  -> el estuche entra desde abajo; la tapa brilla y "Toca para abrir" late.
   2. .abriendo  -> broche presionado, la tapa toma impulso y gira; destello dorado desde adentro.
   3. .abierto   -> las tarjetas suben una por una con rebote (.intro solo durante la secuencia).
   4. .brillo    -> un reflejo recorre las tarjetas. */
.tarjetero { margin-block-start: 1.75rem; perspective: 1100px; }
.estuche {
  position: relative;
  padding: 1rem .85rem 2.4rem;
  border-radius: 22px; border: 2px solid #777d84;
  background: linear-gradient(145deg, #555, #17191d 25%, #060709 80%, #65676c);
  box-shadow: 0 24px 45px #0009, inset 0 0 0 7px #25272b;
  transform-style: preserve-3d;
}
.llegando .estuche { animation: llegar .75s cubic-bezier(.2, .9, .25, 1.15) both; }
@keyframes llegar {
  from { opacity: 0; transform: translateY(5rem) scale(.9) rotateX(22deg); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
.abriendo .estuche { animation: sacudir .42s ease-out; }
@keyframes sacudir {
  0%, 100% { transform: none; }
  25% { transform: translateY(3px) scale(.985); }
  55% { transform: translateY(-4px) scale(1.01); }
}

/* Luz dorada que sale del estuche al abrirse */
.destello {
  position: absolute; inset: -30% -20% 20%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #ffd58acc, #ffb34755 35%, transparent 65%);
  opacity: 0;
}
.abriendo .destello { animation: destello 1.6s ease-out .18s both; }
@keyframes destello {
  0% { opacity: 0; transform: scale(.6); }
  25% { opacity: 1; transform: scale(1.1); }
  100% { opacity: .18; transform: scale(1); }
}

/* Recorta solo por abajo: las tarjetas salen "del bolsillo" y no asoman por debajo del estuche al subir;
   por arriba deja espacio para que la primera se levante al pasar el mouse. */
.ranuras { position: relative; z-index: 1; display: flex; flex-direction: column; clip-path: inset(-4rem -1rem -.3rem -1rem); }

.ranura {
  --alto: 7.5rem;
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem;
  block-size: var(--alto); inline-size: 100%;
  padding: .7rem 1rem;
  border: 1px solid #ffffff55; border-radius: 12px;
  background: var(--tono); color: #fff;
  font: inherit; font-size: .95rem; text-align: start; cursor: pointer;
  box-shadow: 0 -3px 8px #0008, inset 0 1px 0 #ffffff30;
  opacity: 0; transform: translateY(3.5rem) scale(.94);
  transition: transform .2s var(--ease-out), opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
/* Cada tarjeta asoma 2.9rem (unos 46 px): area comoda para el dedo. */
.ranura + .ranura { margin-block-start: calc(2.9rem - var(--alto)); }
.ranura-banco { display: flex; align-items: center; gap: .45rem; min-inline-size: 0; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.ranura-moneda { font-size: .75rem; font-weight: 700; letter-spacing: .08em; opacity: .9; line-height: 2.1; white-space: nowrap; }
.etiqueta {
  padding: .05rem .45rem; border-radius: 99px;
  background: var(--acento); color: var(--acento-tinta);
  font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.abierto .ranura { opacity: 1; transform: none; }
/* Solo durante la intro: suben con rebote, escalonadas (el JS quita .intro al terminar). */
.intro.abierto .ranura {
  transition: transform .62s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease-out;
  transition-delay: calc(var(--t-tarjetas, 380ms) + var(--i) * var(--paso, 70ms));
}
/* Reflejo final que cruza cada tarjeta */
.ranura::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #ffffff59 50%, transparent 65%);
  transform: translateX(-120%);
}
.brillo .ranura::after { animation: reflejo .9s ease-in-out calc(var(--i) * 60ms) both; }
@keyframes reflejo { to { transform: translateX(120%); } }

@media (hover: hover) and (pointer: fine) {
  .abierto .ranura:hover { transform: translateY(-.55rem); }
}
.abierto .ranura:focus-visible { transform: translateY(-.55rem); z-index: 2; outline-offset: 2px; }
.abierto .ranura:active { transform: translateY(-.3rem); transition-duration: .12s; }

.borde {
  position: absolute; inset: auto 0 0; z-index: 5; block-size: 2.1rem;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(#80858b, #25282d 38%, #4b5056);
  pointer-events: none;
}
.cierre { display: block; inline-size: 62px; block-size: 13px; margin: .45rem auto; border-radius: 5px; background: linear-gradient(#ddd, #777, #aaa); }

.tapa {
  position: absolute; inset: -2px; z-index: 10; overflow: hidden;
  display: grid; place-content: center; justify-items: center; gap: .5rem;
  border-radius: 22px; border: 2px solid #888;
  background:
    repeating-linear-gradient(45deg, #ffffff08 0 2px, transparent 2px 5px),
    linear-gradient(135deg, #555, #222 30%, #111 60%, #444);
  box-shadow: inset 0 0 0 6px #ffffff09, 0 12px 20px #0008;
  color: #fff; font: inherit; cursor: pointer;
  transform-origin: top center;
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s var(--ease-out);
}
.tapa:active { transform: scale(.98); }
/* Reflejo que recorre la tapa mientras espera el toque */
.tapa::after {
  content: ""; position: absolute; inset: -20% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, #ffffff30 50%, transparent 58%);
  transform: translateX(-70%);
  animation: barrido 3.2s ease-in-out 1s infinite;
}
@keyframes barrido { 0% { transform: translateX(-70%); } 45%, 100% { transform: translateX(70%); } }
.tapa strong { font-size: 3rem; font-style: italic; letter-spacing: -0.08em; color: var(--acento); text-shadow: 0 3px 4px #000, 0 0 24px #ffb34766; line-height: 1; }
.tapa small { font-size: .75rem; letter-spacing: .3em; color: #ddd; }
.tapa-toca {
  margin-block-start: 1.4rem; padding: .45rem 1rem; border-radius: 99px;
  border: 1px solid #ffb34766; background: #ffb3471a; color: #ffd9a3;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  animation: latir 1.6s ease-in-out infinite;
}
@keyframes latir {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 #ffb34755; }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px #ffb34700; }
}
.tapa-cierre {
  position: absolute; inset-block-end: .55rem; inset-inline-start: calc(50% - 31px);
  inline-size: 62px; block-size: 13px; border-radius: 5px;
  background: linear-gradient(#eee, #888, #bbb);
  box-shadow: 0 0 10px #ffb34755;
  animation: brillar-cierre 1.6s ease-in-out infinite;
}
@keyframes brillar-cierre { 50% { box-shadow: 0 0 16px #ffb347aa; } }
.abriendo .tapa-cierre { animation: presionar .2s ease-out both; }
@keyframes presionar { 50% { transform: scaleY(.6); background: #ffd58a; box-shadow: 0 0 26px #ffd58a; } }
.abriendo .tapa { animation: abrir-tapa 1s cubic-bezier(.5, 0, .2, 1) .05s both; pointer-events: none; }
.abriendo .tapa::after, .abriendo .tapa-toca { animation: none; }
@keyframes abrir-tapa {
  0% { transform: none; }
  18% { transform: rotateX(-9deg) translateY(4px); }   /* impulso */
  80% { opacity: 1; }
  100% { transform: rotateX(118deg) translateY(-1.5rem); opacity: 0; }
}
.abierto:not(.abriendo) .tapa { display: none; }

.indicacion { margin-block-start: 1rem; text-align: center; color: var(--texto-2); font-size: .9rem; }
.llegando .indicacion { animation: aparecer .6s ease-out .5s both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(.5rem); } }

/* ---------- Detalle ---------- */
.detalle { margin-block-start: 1.75rem; perspective: 1100px; }
.detalle.activo { animation: extraer .5s var(--ease-out) both; }
@keyframes extraer {
  from { opacity: 0; transform: translateY(4rem) rotateX(18deg) scale(.92); }
  to { opacity: 1; transform: none; }
}
.plastico {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-block-size: 13.5rem; padding: 1.4rem 1.4rem 1.2rem;
  border-radius: 20px; border: 1px solid #ffffff66;
  background: var(--tono, #23262d);
  box-shadow: 0 14px 30px #0008, inset 0 0 0 4px #ffffff0e;
}
.plastico::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(145deg, #ffffff26, transparent 45%, #ffffff0a 46%, transparent 80%);
}
.chip {
  position: absolute; inset-block-start: 1.4rem; inset-inline-end: 1.4rem;
  inline-size: 2.6rem; block-size: 2rem; border-radius: 6px;
  background: linear-gradient(135deg, #f3d8a0, #b8914a 55%, #e9c98a);
  box-shadow: inset 0 0 0 1px #0003;
}
.p-banco { font-size: 1.5rem; padding-inline-end: 3.4rem; line-height: 1.15; }
.p-moneda { margin-block-start: .3rem; font-size: .75rem; letter-spacing: .15em; }
.p-numero {
  margin-block: auto .9rem; padding-block-start: 1.4rem;
  font-size: clamp(1.4rem, 7vw, 2.1rem); font-weight: 800; letter-spacing: .03em;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.15;
}
.p-numero.correo { font-size: clamp(1.05rem, 4.6vw, 1.45rem); letter-spacing: 0; }
.p-titular { font-weight: 650; font-size: .9rem; }
.p-extra { margin-block-start: .2rem; font-size: .78rem; color: #eee; }
.p-extra:empty { display: none; }
.nota {
  margin-block-start: .8rem; padding: .7rem .9rem; border-radius: 10px;
  background: #ffb34714; border: 1px solid #ffb34740; color: #ffd9a3; font-size: .85rem;
}

.acciones { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-block-start: 1rem; }
.ancho { grid-column: 1 / -1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-block-size: 3rem; padding: .7rem 1rem;
  border: 0; border-radius: 12px;
  font: inherit; font-weight: 650; text-decoration: none; text-align: center; line-height: 1.2; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-principal { background: var(--acento); color: var(--acento-tinta); }
.btn-sec { background: #2d3038; color: #fff; border: 1px solid #ffffff20; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-texto { background: transparent; color: var(--texto-2); }
@media (hover: hover) and (pointer: fine) {
  .btn-principal:hover { background: #ffc06a; }
  .btn-sec:hover { background: #393d47; }
  .btn-wa:hover { background: #1a8551; }
  .btn-texto:hover { color: var(--texto); }
}

.estado { min-block-size: 1.5rem; margin-block: .9rem 0; text-align: center; font-size: .875rem; color: #ffca78; }

/* ---------- Aviso y pie ---------- */
.aviso {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-block-start: 1rem; padding: .85rem 1rem;
  border-radius: 12px; border: 1px solid #ffffff1f; background: #ffffff08;
  color: var(--texto-2); font-size: .8125rem;
}
.aviso .ico { color: var(--acento); margin-block-start: .1rem; }
.aviso a { color: var(--texto); font-weight: 600; white-space: nowrap; }
.pie { margin-block-start: 1.75rem; text-align: center; font-size: .6875rem; letter-spacing: .2em; color: #999; }

@media (max-width: 22em) {
  .billetera { padding-inline: .75rem; }
  .ranura { font-size: .85rem; padding-inline: .8rem; }
  .plastico { padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Menos movimiento no es cero: el detalle aparece con un fundido corto, sin desplazarse. */
  .detalle.activo { animation: fundido .2s ease-out both !important; }
  @keyframes fundido { from { opacity: 0; } }
}
