/* Splash en mode app instal·lada (PWA / iOS «Afegir a pantalla d'inici»). */

html.pwa-standalone-boot body {
  overflow: hidden;
}

html.pwa-splash-done body {
  overflow: auto;
}

#pwa-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #fff;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}

html.pwa-standalone-boot #pwa-splash {
  display: flex;
}

html.pwa-splash-ready #pwa-splash {
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

html.pwa-splash-done #pwa-splash {
  display: none;
}

.pwa-splash__logo {
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
}

.pwa-splash__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  gap: 2px;
}

.pwa-splash__title {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: var(--font-4xl);
  letter-spacing: 0.2px;
  line-height: 1.05;
  color: var(--ink);
}

.pwa-splash__sub {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--font-base);
  color: var(--muted);
}
