/* Gafete · OCB (adapted from Moxen "Gafete")
   A conference badge hanging from an ultraviolet lanyard: drag it, let it swing, click to flip.
   Everything is scoped under .mx-gafete. Colors map to the site tokens with fallbacks. */
.mx-gafete {
  --gf-acento: var(--violet, #6B4BFF);
  --gf-acento-osc: #4A2FD8;
  --gf-cta: var(--plasma, #FF5B2E);
  --gf-tinta: var(--bone, #F2EFE8);
  --gf-suave: rgba(242, 239, 232, .62);
  --gf-fondo: var(--ink, #0A0A12);
  --gf-cara: var(--ink-2, #14141F);
  --gf-filo: rgba(242, 239, 232, .13);
  --gf-linea: var(--line, #262636);
  --gf-curva: cubic-bezier(.22, 1, .36, 1);
  --gf-titulo: "Unbounded", system-ui, sans-serif;
  --gf-texto: "Manrope", system-ui, sans-serif;
  --gf-mono: "JetBrains Mono", ui-monospace, monospace;
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 460px;
  height: clamp(560px, 76svh, 700px);
  overflow: hidden;
  contain: layout paint;
  isolation: isolate;
  color: var(--gf-tinta);
  font-family: var(--gf-texto);
  -webkit-font-smoothing: antialiased;
}
.mx-gafete *, .mx-gafete *::before, .mx-gafete *::after { box-sizing: border-box; }
.mx-gafete svg { display: block; }

/* the strap is drawn on this canvas; it fades in from the top edge */
.mx-gafete .gf-cinta {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 72px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 72px);
}

/* ── the badge: follows the rope; the inner .gf-giro does the 3D flip ── */
.mx-gafete .gf-gafete {
  position: absolute; left: 0; top: 0; width: 340px; height: 500px;
  transform-origin: 0 0; will-change: transform; cursor: grab; touch-action: none;
  perspective: 1500px; -webkit-user-select: none; user-select: none;
  --giro: 0; --sx: 50;
}
.mx-gafete .gf-gafete.is-agarrado { cursor: grabbing; }
.mx-gafete.is-quieto .gf-gafete { cursor: default; }
.mx-gafete .gf-giro { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s var(--gf-curva); }
.mx-gafete .gf-gafete.is-vuelta .gf-giro { transform: rotateY(180deg); }

.mx-gafete .gf-cara {
  position: absolute; inset: 0; padding: 50px 26px 22px; overflow: hidden; border-radius: 30px;
  display: flex; flex-direction: column;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  color: var(--gf-tinta);
  /* dark glass on ink-2 */
  background:
    radial-gradient(120% 70% at 85% 0%, rgba(107, 75, 255, .22), transparent 60%),
    linear-gradient(160deg, #22223200 0%, rgba(255, 255, 255, .035) 40%, transparent 60%),
    linear-gradient(165deg, #1E1E2D 0%, var(--gf-cara) 46%, #0D0D16 100%);
  box-shadow:
    inset 0 0 0 1px var(--gf-filo),
    inset 0 1.5px 0 rgba(255, 255, 255, .18),
    inset 0 -30px 50px -30px rgba(0, 0, 0, .6),
    0 44px 70px -22px rgba(0, 0, 0, .8),
    0 10px 24px -10px rgba(0, 0, 0, .55),
    0 0 80px -30px rgba(107, 75, 255, .45);
}
.mx-gafete .gf-dorso { transform: rotateY(180deg); }
.mx-gafete .gf-ranura {
  position: absolute; left: 50%; top: 16px; width: 76px; height: 17px; margin-left: -38px; border-radius: 9px;
  background: var(--gf-fondo); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .75), 0 1px 0 rgba(255, 255, 255, .1);
}
.mx-gafete .gf-clip {
  position: absolute; left: 50%; top: -30px; width: 58px; height: 68px; margin-left: -29px; pointer-events: none; z-index: 5;
  border-radius: 12px 12px 18px 18px;
  background: linear-gradient(100deg, #cfd0d8, #fff 28%, #a0a2ad 55%, #e6e8ee 80%, #868893);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 8px 14px -6px rgba(0, 0, 0, .7);
  clip-path: polygon(14% 0, 86% 0, 100% 26%, 92% 100%, 8% 100%, 0 26%);
}
.mx-gafete .gf-clip::after {
  content: ""; position: absolute; left: 20%; right: 20%; top: 18%; height: 22%; border-radius: 6px;
  background: rgba(0, 0, 0, .55); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}

/* front: header */
.mx-gafete .gf-cab {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 500 12px var(--gf-mono); letter-spacing: .04em; color: var(--gf-suave);
}
.mx-gafete .gf-marca { display: flex; align-items: center; gap: 10px; min-width: 0; font: 700 13.5px var(--gf-texto); letter-spacing: -.005em; color: var(--gf-tinta); white-space: nowrap; }
.mx-gafete .gf-logo { width: 46px; height: 25px; flex: none; }
.mx-gafete .gf-n { flex: none; }

/* front: the logo slot (the page's 3D logo sits here) */
.mx-gafete .gf-slot { position: relative; flex: 1 1 auto; min-height: 150px; margin: 14px -4px 0; border-radius: 20px; }
.mx-gafete .gf-arcos { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; color: rgba(242, 239, 232, .14); }
.mx-gafete .gf-arcos .gf-arco-c { color: rgba(107, 75, 255, .5); }

/* front: role + chips */
.mx-gafete .gf-persona { flex: none; margin-top: 12px; }
.mx-gafete .gf-rol { margin: 0; font: 700 25px/1.08 var(--gf-titulo); letter-spacing: -.02em; color: var(--gf-tinta); overflow-wrap: anywhere; }
.mx-gafete .gf-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.mx-gafete .gf-chips li { padding: 5px 12px; border-radius: 99px; font: 500 12.5px var(--gf-texto); color: var(--gf-suave); box-shadow: inset 0 0 0 1px var(--gf-filo); }
.mx-gafete .gf-chips li:first-child { font-weight: 700; color: var(--gf-fondo); background: var(--gf-cta); box-shadow: none; }

/* footer: barcode + flip button */
.mx-gafete .gf-pie { flex: none; margin-top: 16px; display: flex; align-items: flex-end; gap: 14px; }
.mx-gafete .gf-codigo { flex: 1 1 auto; min-width: 0; }
.mx-gafete .gf-barras { width: 100%; height: 28px; fill: rgba(242, 239, 232, .82); }
.mx-gafete .gf-url { display: block; margin-top: 6px; font: 500 11.5px var(--gf-mono); letter-spacing: .12em; color: var(--gf-suave); }
.mx-gafete .gf-flip {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; margin: 0;
  border: 1px solid var(--gf-filo); border-radius: 50%; background: rgba(255, 255, 255, .04); color: var(--gf-tinta);
  cursor: pointer; transition: background .25s, border-color .25s, transform .25s var(--gf-curva);
}
.mx-gafete .gf-flip svg { width: 20px; height: 20px; }
.mx-gafete .gf-flip:hover { background: var(--gf-acento); border-color: var(--gf-acento); transform: rotate(-20deg); }
.mx-gafete .gf-flip:focus-visible,
.mx-gafete .gf-cta:focus-visible,
.mx-gafete .gf-mail:focus-visible { outline: 2px solid var(--gf-acento); outline-offset: 3px; }

/* the hologram: an iridescent foil and a light stripe moving with the tilt (no lime/yellow) */
.mx-gafete .gf-holo { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden; }
.mx-gafete .gf-holo::before {
  content: ""; position: absolute; inset: -20%; opacity: .12; mix-blend-mode: screen; filter: saturate(.85) blur(3px);
  background: conic-gradient(from calc(var(--giro) * 1deg) at 50% 40%, #FF4FA3, #FF5B2E, #3FE0FF, #6B4BFF, #FF4FA3);
  -webkit-mask-image: linear-gradient(115deg, transparent 24%, #000 44%, #000 56%, transparent 76%);
  mask-image: linear-gradient(115deg, transparent 24%, #000 44%, #000 56%, transparent 76%);
}
.mx-gafete .gf-holo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(112deg, transparent calc(var(--sx) * 1% - 16%), rgba(255, 255, 255, .16) calc(var(--sx) * 1%), transparent calc(var(--sx) * 1% + 16%));
}

/* back */
.mx-gafete .gf-et { margin: 0; font: 500 12px var(--gf-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gf-suave); }
.mx-gafete .gf-et b { color: var(--gf-acento); font-weight: 500; }
.mx-gafete .gf-btitulo { margin: 22px 0 0; font: 700 34px/1.04 var(--gf-titulo); letter-spacing: -.03em; color: var(--gf-tinta); overflow-wrap: anywhere; }
.mx-gafete .gf-btexto { margin: 16px 0 0; font: 400 15.5px/1.5 var(--gf-texto); color: var(--gf-suave); }
.mx-gafete .gf-acciones { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.mx-gafete .gf-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  font: 700 15px var(--gf-texto); color: var(--gf-fondo); background: var(--gf-cta); text-decoration: none;
  box-shadow: 0 14px 30px -12px rgba(255, 91, 46, .75); transition: transform .25s var(--gf-curva), box-shadow .25s;
}
.mx-gafete .gf-cta svg { width: 18px; height: 18px; transition: transform .25s var(--gf-curva); }
.mx-gafete .gf-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(255, 91, 46, .9); }
.mx-gafete .gf-cta:hover svg { transform: translateX(3px); }
.mx-gafete .gf-mail { display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px var(--gf-mono); color: var(--gf-tinta); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.mx-gafete .gf-mail svg { width: 17px; height: 17px; color: var(--gf-acento); }
.mx-gafete .gf-mail:hover { color: #cfc5ff; border-bottom-color: currentColor; }
.mx-gafete .gf-dorso .gf-pie { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gf-filo); }

/* the hidden face is inert: no pointer, no focus */
.mx-gafete [inert] { pointer-events: none; }

@media (max-width: 640px) {
  .mx-gafete { height: 600px; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-gafete .gf-giro { transition: none; }
  .mx-gafete .gf-flip, .mx-gafete .gf-cta, .mx-gafete .gf-cta svg { transition: none; }
  .mx-gafete .gf-flip:hover { transform: none; }
}
