:root {
  --guinda: #7a0f1e;
  --guinda-medio: #5e0b17;
  --guinda-oscuro: #3e0810;
  --guinda-profundo: #240408;
  --dorado: #d9a441;
  --dorado-claro: #f2d98a;
  --azul: #1e3a6b;
  --crema: #fbf7f0;
  --blanco: #ffffff;
  --tinta: #1f1a1c;
  --tinta-suave: #6b6166;
  --linea: #ece4d6;
  --radio: 16px;
  --sombra: 0 2px 6px rgba(31, 26, 28, 0.06), 0 8px 20px rgba(31, 26, 28, 0.06);
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--crema);
  color: var(--tinta);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

a:focus-visible {
  outline: 2px solid var(--dorado);
  outline-offset: 3px;
}

/* ---------- Barra superior ---------- */
.barra {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: var(--guinda-oscuro);
  padding-top: env(safe-area-inset-top);
  border-bottom: 2px solid var(--dorado);
}

.barra-interior {
  max-width: 680px;
  margin: 0 auto;
  padding: 11px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.barra-escudo {
  width: 34px;
  height: auto;
}

.barra-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.barra-inst {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blanco);
  letter-spacing: 0.2px;
}

.barra-sub {
  font-size: 0.65rem;
  color: var(--dorado-claro);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* ---------- Portada ---------- */
.portada {
  width: 100%;
  background: var(--guinda-oscuro);
}

.portada-imagen {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Contenido ---------- */
.contenido {
  width: 100%;
  max-width: 680px;
  padding: 26px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Bienvenida */
.bienvenida {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}

.saludo {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--guinda);
  letter-spacing: -0.3px;
}

.saludo-texto {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--tinta-suave);
}

/* Accesos rápidos: tiles tipo app */
.accesos-rapidos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.acceso {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px 12px;
  border-radius: var(--radio);
  color: var(--blanco);
  text-decoration: none;
  box-shadow: var(--sombra);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.acceso-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.acceso-nombre {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.acceso-guinda { background: linear-gradient(160deg, var(--guinda), var(--guinda-medio)); }
.acceso-dorado { background: linear-gradient(160deg, #e0ab4c, var(--dorado)); color: var(--guinda-oscuro); }
.acceso-dorado .acceso-icono { background: rgba(122, 15, 30, 0.14); }
.acceso-azul   { background: linear-gradient(160deg, #2b4f8f, var(--azul)); }
.acceso-crema  { background: var(--blanco); color: var(--guinda); border: 1px solid var(--linea); }
.acceso-crema .acceso-icono { background: rgba(122, 15, 30, 0.08); }

/* Secciones */
.seccion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-margin-top: 80px;
}

.titulo-seccion {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--tinta);
  padding-left: 4px;
}

/* Filas de acceso (lista) */
.fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  color: var(--tinta);
  text-decoration: none;
  transition: transform 0.18s ease;
}

.fila-texto {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fila-texto strong {
  font-size: 0.97rem;
  font-weight: 700;
}

.fila-texto small {
  font-size: 0.8rem;
  color: var(--tinta-suave);
}

.chevron {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--dorado);
}

/* Radio: estilo cabina de transmisión */
.radio {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 22px 20px;
  border-radius: var(--radio);
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 90% 0%, rgba(242, 217, 138, 0.18), transparent 55%),
    linear-gradient(160deg, #1b0307, var(--guinda-oscuro) 70%);
  border: 1px solid rgba(217, 164, 65, 0.35);
  color: var(--blanco);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px rgba(62, 8, 16, 0.3);
  transition: transform 0.18s ease;
}

.al-aire {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 77, 77, 0.6);
  background: rgba(255, 77, 77, 0.12);
  color: #ff8a8a;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.al-aire i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 8px #ff4d4d;
  animation: latido 1.8s ease-out infinite;
}

/* Ecualizador animado */
.ecualizador {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
  margin: 10px 0 4px;
}

.ecualizador b {
  display: block;
  width: 5px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--dorado-claro), var(--dorado));
  transform-origin: bottom;
  animation: ecualizar 1.1s ease-in-out infinite;
}

.ecualizador b:nth-child(1) { animation-delay: -0.2s; height: 40%; }
.ecualizador b:nth-child(2) { animation-delay: -0.8s; height: 80%; }
.ecualizador b:nth-child(3) { animation-delay: -0.5s; height: 55%; }
.ecualizador b:nth-child(4) { animation-delay: -0.1s; height: 100%; }
.ecualizador b:nth-child(5) { animation-delay: -0.6s; height: 65%; }
.ecualizador b:nth-child(6) { animation-delay: -0.3s; height: 85%; }
.ecualizador b:nth-child(7) { animation-delay: -0.9s; height: 45%; }

.radio-titulo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--dorado-claro);
}

.frecuencia {
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
}

.radio-escucha {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blanco);
}

.radio:hover .radio-escucha { color: var(--dorado-claro); }

/* Redes */
.redes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.red {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 8px 16px;
  border-radius: var(--radio);
  color: var(--blanco);
  text-decoration: none;
  box-shadow: var(--sombra);
  transition: transform 0.18s ease;
}

.red-fb { background: #1d4a9a; }
.red-ig { background: linear-gradient(135deg, #b8214f, #7a1e5e); }
.red-tt { background: #111116; }

.red-nombre {
  font-size: 0.9rem;
  font-weight: 700;
}

.red small {
  font-size: 0.66rem;
  opacity: 0.85;
  word-break: break-all;
  text-align: center;
}

/* Interacción */
.acceso:hover,
.fila:hover,
.radio:hover,
.red:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(31, 26, 28, 0.12);
}

.fila:hover .chevron { transform: translateX(3px); }

.acceso:active,
.fila:active,
.radio:active,
.red:active {
  transform: scale(0.98);
}

/* ---------- Pie ---------- */
.pie {
  margin-top: 10px;
  width: 100%;
  padding: 36px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  background: linear-gradient(180deg, var(--guinda-oscuro), var(--guinda-profundo));
  color: var(--dorado-claro);
  border-top: 3px solid var(--dorado);
}

.pie-filete {
  display: block;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dorado), transparent);
}

.pie-inst {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: var(--blanco);
}

.pie-texto {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--dorado-claro);
  opacity: 0.85;
}

.pie-lema {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--blanco);
  opacity: 0.8;
  margin-top: 4px;
}

/* ---------- Barra inferior tipo app ---------- */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--linea);
  box-shadow: 0 -4px 16px rgba(31, 26, 28, 0.08);
}

.tab {
  flex: 1;
  max-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 12px;
  color: var(--guinda);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.tab span {
  font-size: 1.25rem;
  line-height: 1.2;
}

.tab:hover { background: rgba(122, 15, 30, 0.07); }

/* ---------- Enfoque con zoom al llegar desde la barra inferior ---------- */
.seccion:target {
  animation: enfoque-zoom 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.seccion:target .titulo-seccion {
  color: var(--dorado);
}

@keyframes enfoque-zoom {
  0%   { transform: scale(0.94); opacity: 0.4; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---------- Botón flotante compartir ---------- */
.btn-compartir {
  position: fixed;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid rgba(217, 164, 65, 0.6);
  border-radius: 999px;
  background: var(--guinda);
  color: var(--blanco);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 20px rgba(62, 8, 16, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.btn-compartir:hover { background: var(--guinda-medio); transform: translateY(-2px); }
.btn-compartir:active { transform: scale(0.97); }
.btn-compartir svg { color: var(--dorado-claro); }

@media (min-width: 720px) {
  .btn-compartir { bottom: 24px; right: 24px; }
}

/* ---------- Animaciones ---------- */
@keyframes ecualizar {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

@keyframes latido {
  0%   { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 77, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Pantallas grandes ---------- */
@media (min-width: 720px) {
  .contenido { padding: 32px 24px 16px; }
  .accesos-rapidos { gap: 14px; }
  .saludo { font-size: 1.9rem; }
  .tabs { display: none; }
  body { padding-bottom: 0; }
}
