:root {
  --fondo: #F7F5FB; --fondo-2: #EFEBF7; --tinta: #14131A; --suave: #5A5867;
  --linea: #E3DEEE; --acc: #7850ff;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--fondo);
  background-image: linear-gradient(rgba(20,19,26,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(20,19,26,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--tinta); font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.wrap {
  max-width: 480px; margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}

/* Identidad */
.id { display: grid; grid-template-columns: auto 1fr; align-items: stretch; gap: 16px; margin-bottom: 8px; }
.id > div { display: flex; flex-direction: column; justify-content: center; }
.face {
  position: relative; align-self: stretch; aspect-ratio: 1 / 1; min-width: 72px; max-width: 92px;
  border: 1px solid var(--linea); border-radius: 8px; overflow: hidden; background: var(--fondo-2);
}
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.name { margin: 0 0 6px; font: 800 clamp(1.25rem, 6.6vw, 1.75rem)/1 var(--display); letter-spacing: -0.03em; white-space: nowrap; }
.line { margin: 0; color: var(--suave); font-size: .9375rem; line-height: 1.4; text-wrap: pretty; }

/* Redes: iconos pequeños, el que llega ya viene de una red */
.social { display: flex; gap: 8px; margin-bottom: 8px; }
.social a {
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--linea); border-radius: 8px; background: #fff; color: var(--tinta);
  transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.social svg { width: 20px; height: 20px; }

/* Botón principal */
.cta {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 14px 18px;
  background: var(--acc); color: #fff; border-radius: 10px;
  transition: transform .2s var(--ease), filter .2s var(--ease);
}
.cta .wa { width: 26px; height: 26px; flex: 0 0 auto; }
.cta-t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cta-t b { font: 700 1.125rem/1.2 var(--display); letter-spacing: -0.01em; }
.cta-t small { font-size: .8125rem; opacity: .85; }

/* Tarjetas */
.card {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 14px 18px;
  background: #fff; border: 1px solid var(--linea); border-radius: 10px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.card-t { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-t b { font: 700 1.0625rem/1.25 var(--display); letter-spacing: -0.01em; }
.card-t small { font-size: .8125rem; color: var(--suave); line-height: 1.35; }
.ico {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 8px; background: var(--fondo-2); color: var(--acc);
}
.ico svg { width: 22px; height: 22px; }
.card--guia { padding: 12px 18px 12px 12px; }
.card--guia img {
  width: 72px; height: 90px; object-fit: cover; flex: 0 0 auto;
  border-radius: 6px; border: 1px solid var(--linea);
}
.tag {
  align-self: flex-start; font: 500 .6875rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--acc); background: var(--fondo-2); padding: 4px 6px; border-radius: 4px; margin-bottom: 2px;
}
.arr { font-size: 1.125rem; color: var(--suave); flex: 0 0 auto; transition: transform .2s var(--ease); }
.cta .arr { color: #fff; }

/* Toque: se hunde un poco */
.cta:active, .card:active, .social a:active { transform: scale(.98); }
@media (hover: hover) {
  .card:hover { border-color: var(--acc); }
  .card:hover .arr, .cta:hover .arr { transform: translateX(3px); }
  .cta:hover { filter: brightness(1.06); }
  .social a:hover { border-color: var(--acc); color: var(--acc); }
}
a:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* Pie */
.foot { margin-top: 20px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.foot p { margin: 0; font: 500 .75rem var(--mono); color: var(--suave); }
.foot a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--linea); }

/* Entrada escalonada, una sola vez */
@media (prefers-reduced-motion: no-preference) {
  .wrap > * { animation: sube .5s var(--ease) both; }
  .wrap > *:nth-child(2) { animation-delay: .05s; }
  .wrap > *:nth-child(3) { animation-delay: .1s; }
  .wrap > *:nth-child(4) { animation-delay: .15s; }
  .wrap > *:nth-child(5) { animation-delay: .2s; }
  .wrap > *:nth-child(6) { animation-delay: .25s; }
}
@keyframes sube { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Aviso de cookies (mismo que la web) */
.cookies {
  position: fixed; left: 50%; bottom: 16px; z-index: 50;
  width: min(560px, calc(100% - 24px));
  transform: translate(-50%, 16px); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
  display: flex; align-items: center; gap: 16px;
  padding: 12px 12px 12px 16px;
  background: #fff; border: 1px solid var(--linea); border-radius: 6px;
  font: 400 .8125rem/1.45 var(--sans); color: var(--tinta);
}
.cookies.dentro { transform: translate(-50%, 0); opacity: 1; }
.cookies.fuera { transform: translate(-50%, 16px); opacity: 0; }
.cookies p { margin: 0; flex: 1; }
.cookies a { color: var(--suave); text-decoration: underline; text-underline-offset: 2px; }
.cookies-b { display: flex; gap: 8px; flex: 0 0 auto; }
.cookies button {
  font: 600 .8125rem/1 var(--sans); cursor: pointer; min-height: 40px; padding: 0 16px;
  border-radius: 4px; border: 1px solid var(--linea); background: transparent; color: var(--tinta);
}
.cookies button.si { background: var(--tinta); border-color: var(--tinta); color: #fff; }
@media (max-width: 560px) {
  .cookies { flex-direction: column; align-items: stretch; gap: 12px; bottom: 12px; }
  .cookies-b button { flex: 1; }
}

/* Aviso de cookies compacto: una sola línea también en móvil */
.cookies { width: auto; max-width: calc(100% - 24px); gap: 12px; padding: 8px 8px 8px 14px; border-radius: 999px; white-space: nowrap; }
.cookies p { display: flex; align-items: center; gap: 6px; }
.cookies .ck-ico { font-size: 1.125rem; line-height: 1; }
.cookies button { min-height: 36px; padding: 0 14px; border-radius: 999px; }
@media (max-width: 560px) {
  .cookies { flex-direction: row; align-items: center; gap: 8px; bottom: 12px; font-size: .8125rem; }
  .cookies-b button { flex: 0 0 auto; }
}
