@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --noche: #1C2B3A;
  --noche-2: #24374A;
  --piedra: #EDE7D9;
  --piedra-2: #F5F1E6;
  --oro: #B8842E;
  --oro-claro: #D9A24E;
  --cochinilla: #8B3A3A;
  --cochinilla-bg: #F5E7E4;
  --valle: #3D6B4F;
  --valle-bg: #E6EFE9;
  --texto: #22303D;
  --texto-suave: #5B6B78;
  --borde: #DCD4C0;

  --display: 'Fraunces', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

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

html, body {
  font-family: var(--sans);
  background: var(--piedra);
  color: var(--texto);
  overflow-x: hidden;
  max-width: 100%;
}

/* ---------- Header con logo animado ---------- */
.app-header {
  background: var(--noche);
  padding: 18px 24px;
}

.app-header-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-mini {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.logo-mini img,
.logo-mini video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 10px;
}

.logo-mini .star-glow {
  position: absolute; left: 22%; top: -6%; width: 60%; height: 60%;
  pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,215,130,0.95) 30%, rgba(240,174,78,0.5) 55%, rgba(240,174,78,0) 75%);
  animation: starPulse 3.2s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { opacity: 0; transform: scale(0.65); }
  50% { opacity: 1; transform: scale(1.2); }
}

.brand-lockup { display: flex; align-items: center; gap: 14px; }

.brand-text h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  color: #fff;
  line-height: 1.1;
}

.brand-text p {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--oro-claro);
  letter-spacing: 0.02em;
}

.btn-ghost {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }

/* ---------- Botones ---------- */
.btn-primary {
  background: var(--noche);
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.btn-primary:hover { background: var(--noche-2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-success {
  background: var(--valle);
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- Terraza: barra de progreso escalonada (elemento firma) ---------- */
.terraza {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 22px;
}

.terraza .bloque {
  flex: 1;
  background: var(--borde);
  border-radius: 3px 3px 0 0;
  transition: background 0.4s;
}

.terraza .bloque:nth-child(1) { height: 40%; }
.terraza .bloque:nth-child(2) { height: 60%; }
.terraza .bloque:nth-child(3) { height: 80%; }
.terraza .bloque:nth-child(4) { height: 100%; }

.terraza .bloque.activo { background: var(--oro); }

/* ---------- Tarjeta con borde inferior escalonado (elemento firma) ---------- */
.tarjeta-andenes {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 10px 10px 0 0;
  position: relative;
  padding: 22px;
  padding-bottom: 30px;
}

.tarjeta-andenes::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -10px; height: 10px;
  background: var(--noche);
  opacity: 0.14;
  clip-path: polygon(0 100%, 0 0%, 25% 0%, 25% 30%, 50% 30%, 50% 60%, 75% 60%, 75% 100%, 100% 100%, 100% 0%, 100% 0%);
}

/* ---------- Utilidades de texto ---------- */
.num-stat {
  font-family: var(--mono);
  font-weight: 600;
}

/* ---------- Responsivo (celular) ---------- */
@media (max-width: 600px) {
  .app-header { padding: 14px 16px; }

  .app-header-content {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .brand-lockup { gap: 10px; flex: 1 1 auto; min-width: 0; }

  .logo-mini { width: 42px; height: 42px; }

  .brand-text h1 { font-size: 17px; }
  .brand-text p { font-size: 10px; }

  .saludo-header {
    margin-left: 10px;
    padding-left: 10px;
    min-width: 0;
  }
  .saludo-header #bienvenida { font-size: 12px; }
  .saludo-header #especialidad { font-size: 11px; }

  .btn-ghost {
    padding: 7px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .container { padding: 0 14px; }
}
