/* ============================================================================
   AP Buen Hijo — hoja de estilos de la aplicación instalable.
   Reproduce la app Android ya aprobada: mismos colores, tamaños, tipografías y
   distribución. No se reutiliza styles.css para que la app quede aislada del
   sitio público y no pueda alterarlo.
   ============================================================================ */

:root {
  --rosa: #D24CAD;
  --violeta: #2E1F45;
  --dorado: #E3971C;
  --crema: #FBF8F3;
  --blanco: #FFFFFF;
  --gris: #6B5B7A;
  --borde: #EADFD2;
  --fuente: -apple-system, BlinkMacSystemFont, system-ui, 'Roboto', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

/* El atributo hidden debe ganar siempre: los botones definen display:flex y lo anulaban. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--crema);
  font-family: var(--fuente);
  -webkit-text-size-adjust: 100%;
}

/* ==================== BIENVENIDA (splash) ==================== */

.splash {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--rosa);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: pointer;
}

.splash.oculto { display: none; }

.splash-logo {
  width: 200px;
  height: 224px;
  object-fit: contain;
  display: block;
}

.splash-badge {
  margin-top: -8px;
  background: var(--blanco);
  color: var(--dorado);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
  padding: 2px 16px;
  border-radius: 10px;
}

.splash-texto {
  margin: 40px 0 0;
  color: var(--blanco);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}

/* ==================== PANTALLA PRINCIPAL ==================== */

.inicio {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--crema);
}

.inicio[hidden] { display: none; }

/* Los hijos del contenedor flex deben poder encogerse: si no, un texto largo
   empuja el ancho y provoca desborde horizontal en el teléfono. */
.inicio > * { min-width: 0; max-width: 100%; }

.inicio-logo {
  width: 132px;
  height: 146px;
  object-fit: contain;
  align-self: center;
  display: block;
}

.tarjeta {
  margin-top: 14px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 22px;
  padding: 16px 18px;
  text-align: center;
}

.tarjeta-mascota {
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.tarjeta-titulo {
  margin: 6px 0 0;
  color: var(--violeta);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.tarjeta-texto {
  margin: 2px 0 0;
  color: var(--gris);
  font-size: 15px;
  line-height: 1.35;
}

/* ==================== ACCIONES ==================== */

.acciones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.boton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--blanco);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.boton.rosa {
  background: var(--rosa);
  box-shadow: 0 4px 12px rgba(210, 76, 173, 0.18);
}

.boton.violeta {
  background: var(--violeta);
  box-shadow: 0 4px 12px rgba(46, 31, 69, 0.18);
}

.boton:hover { transform: translateY(-1px); }
.boton.rosa:hover { background: #C2429E; }
.boton.violeta:hover { background: #3A2857; }
.boton:active { transform: scale(0.98); }

.enlace {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  color: var(--rosa);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.enlace:hover { text-decoration: underline; }

/* ==================== INSTALACIÓN ==================== */

.instalacion {
  margin-top: 10px;
}

.boton.instalar {
  background: var(--rosa);
  box-shadow: 0 6px 18px rgba(210, 76, 173, 0.28);
}

.instrucciones {
  margin: 0;
  padding: 12px 14px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 14px;
  color: var(--gris);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: break-word;
}

/* ==================== PIE ==================== */

.pie {
  margin-top: auto;
  padding-top: 18px;
  color: var(--gris);
  font-size: 12px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .boton { transition: none; }
  .boton:hover, .boton:active { transform: none; }
}
