:root {
  --bg: #0b0f17;
  --surface: #131a26;
  --surface-2: #1a2333;
  --line: rgba(255, 255, 255, .08);
  --text: #eef2f8;
  --muted: #94a0b4;
  --accent: #1f91cc;
  --accent-2: #4fc3f7;
  --accent-soft: rgba(31, 145, 204, .16);
  --radius: 18px;
  --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

body {
  font-family: var(--bs-body-font-family);
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background:
    radial-gradient(600px 300px at 50% -60px, rgba(31, 145, 204, .25), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

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

.card-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Botón flotante compartir ---------- */
.fab-share {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: max(14px, calc(50% - 240px + 14px));
  z-index: 1030;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(19, 26, 38, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .15s ease, background .2s ease;
}
.fab-share:hover { background: var(--accent); }
.fab-share:active { transform: scale(.92); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding-top: 70px;
}
.hero-cover {
  position: absolute;
  inset: 0 -16px auto;
  height: 150px;
  background:
    linear-gradient(180deg, transparent 40%, var(--bg)),
    linear-gradient(135deg, #0e3a57 0%, #1f91cc 55%, #4fc3f7 100%);
  border-radius: 0 0 32px 32px;
  opacity: .9;
  z-index: -1;
}
.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000 10%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 85%);
}

.avatar-ring {
  width: 148px;
  height: 148px;
  margin: 0 auto;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent-2), var(--accent), #0e3a57, var(--accent-2));
  box-shadow: 0 14px 40px rgba(31, 145, 204, .35);
}
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 50%;
  border: 4px solid var(--bg);
  display: block;
}

.name {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 18px 0 2px;
  letter-spacing: -.01em;
}
.role {
  color: var(--muted);
  font-size: .95rem;
  margin: 0;
}
.brands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 0;
  max-width: 100%;
}
.brand-logo {
  /* el PNG trae mucho margen transparente: recortamos al contenido */
  flex: 0 0 auto;
  width: 124px;
  height: 52px;
  object-fit: cover;
  object-position: 50% 48%;
  margin: 0 -10px; /* compensa el margen lateral transparente */
  display: block;
}

/* ---------- Acciones rápidas ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 8px;
}
.qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .15s ease, border-color .2s ease;
}
.qa:active { transform: scale(.95); }
.qa:hover { border-color: var(--accent); color: var(--text); }
.qa-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.qa-icon.qa-wa { background: linear-gradient(135deg, #128c7e, #25d366); }
.qa-label { font-size: .78rem; font-weight: 500; color: var(--muted); }

/* ---------- Bloques ---------- */
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
}
.block-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent-2);
  font-weight: 600;
  margin: 0 0 12px;
}

/* Lista de contacto */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li + li { border-top: 1px solid var(--line); }
.info-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.info-icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 1.05rem;
}
.info-icon.info-ig {
  color: #fff;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.info-text {
  flex: 1;
  min-width: 0;
  font-size: .92rem;
  overflow-wrap: anywhere;
}
.info-text small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
}
.info-go { color: var(--muted); font-size: .85rem; }

/* Servicios */
.services { display: grid; gap: 10px; }
.service {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: border-color .2s ease, transform .15s ease;
}
.service:hover { border-color: var(--accent); color: var(--text); }
.service:active { transform: scale(.98); }
.service-icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.service-body { flex: 1; min-width: 0; }
.service-body strong { display: block; font-size: .98rem; font-weight: 600; }
.service-body span { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.service-go { color: var(--accent-2); }

/* QR */
.qr-box {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.qr, .qr img, .qr canvas { width: 190px; height: 190px; display: block; }
.qr-url { color: var(--muted); font-size: .85rem; margin: 12px 0 14px; }

/* Botones */
.btn-accent {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1a7fb4;
  --bs-btn-hover-border-color: #1a7fb4;
  --bs-btn-active-bg: #166d9b;
  --bs-btn-active-border-color: #166d9b;
  --bs-btn-active-color: #fff;
  font-weight: 600;
  border-radius: 14px;
}
.btn-ghost {
  --bs-btn-color: var(--text);
  --bs-btn-bg: var(--surface-2);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-bg: var(--accent);
  --bs-btn-active-color: #fff;
  font-size: .88rem;
  font-weight: 500;
  border-radius: 12px;
}

/* Instalar */
.install-icon { border-radius: 12px; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  padding: 22px 0 8px;
}

/* ---------- Barra inferior ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(11, 15, 23, .92) 35%);
}
.bottom-bar .btn {
  max-width: 448px;
  margin: 0 auto;
  display: block;
  padding: 14px;
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(31, 145, 204, .35);
}

/* ---------- Hoja compartir ---------- */
.share-sheet.offcanvas-bottom {
  height: auto;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border-top: 1px solid var(--line) !important;
  border-radius: 24px 24px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .2);
  margin: 10px auto 0;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
  margin-bottom: 18px;
}
.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--muted);
  cursor: pointer;
}
.share-item span {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  background: var(--c);
  border: 1px solid var(--line);
  transition: transform .15s ease;
}
.share-item:active span { transform: scale(.9); }
.copy-row { display: flex; gap: 8px; }
.copy-row .form-control {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
  border-radius: 12px;
  font-size: .88rem;
}

/* Toast */
#toast {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line) !important;
  border-radius: 14px;
  width: auto;
}

/* Animación de entrada */
@media (prefers-reduced-motion: no-preference) {
  .hero, .quick-actions, .block { animation: rise .5s ease both; }
  .quick-actions { animation-delay: .05s; }
  .block:nth-of-type(1) { animation-delay: .1s; }
  .block:nth-of-type(2) { animation-delay: .15s; }
  .block:nth-of-type(3) { animation-delay: .2s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}
