/* Treinadores da Saúde — splash */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&display=swap');

body.app-splash-open {
  overflow: hidden;
}

/* Botão de tema */
.app-splash__theme-btn {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 210;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(161,18,22,0.15);
  background: rgba(255,255,255,0.9);
  color: #191c1d;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.app-splash__theme-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(161,18,22,0.12);
}

/* ─── Splash — light mode (padrão) ─── */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 1.5rem 2rem 2rem;
  margin: 0;
  font-family: 'Lexend', sans-serif;
  color: #191c1d;
  background-color: #ffffff;
  background-image: none;
}

.app-splash__main {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 2rem;
  padding-top: 8%;
}

.app-splash__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 260px;
}

/* Círculo central que envolve a logo */
.app-splash .nucleus {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 24px rgba(161,18,22,0.08), 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid rgba(161,18,22,0.10);
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-splash .nucleus-logo {
  width: 80%;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

@keyframes app-splash-orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Anel orbital */
.app-splash .orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 290px;
  height: 290px;
  border: 1px solid rgba(161,18,22,0.18);
  border-radius: 50%;
  z-index: 5;
  animation: app-splash-orbit-spin 5s linear 1;
}

.app-splash .orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #a11216;
  border-radius: 50%;
  box-shadow: 0 0 12px 3px rgba(161,18,22,0.5);
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.app-splash__status {
  width: 100%;
  margin-top: 20%;
  margin-bottom: 3rem;
  text-align: center;
}

.app-splash__percent {
  letter-spacing: 0.2em;
  opacity: 0.6;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: #a11216;
  font-weight: 400;
}

.app-splash__footer {
  padding-bottom: 3rem;
  text-align: center;
}

.app-splash__title {
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: #191c1d;
}

.app-splash__title-bold { font-weight: 700; }
.app-splash__title-light { font-weight: 300; }

.app-splash__tagline {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #8e706c;
  margin: 0 auto;
  max-width: 20rem;
}


/* ─── Modo escuro ─── */
html[data-theme="dark"] .app-splash {
  color: #e2e8f0;
  background-color: #0f172a;
  background-image: none;
}

html[data-theme="dark"] .app-splash__theme-btn {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}

html[data-theme="dark"] .app-splash .nucleus {
  background: #1e293b;
  border-color: rgba(161,18,22,0.3);
  box-shadow: 0 0 32px rgba(161,18,22,0.12);
}

html[data-theme="dark"] .app-splash .orbit-ring {
  border-color: rgba(161,18,22,0.25);
}

html[data-theme="dark"] .app-splash .orbit-dot {
  background-color: #a11216;
  box-shadow: 0 0 14px 3px rgba(161,18,22,0.6);
}

html[data-theme="dark"] .app-splash__percent {
  color: #ffafa6;
}

html[data-theme="dark"] .app-splash__title {
  color: #f1f5f9;
}

html[data-theme="dark"] .app-splash__tagline {
  color: #94a3b8;
}

/* === Logo temática: claro usa texto preto, escuro usa texto branco === */
.splash-logo-dark {
  display: none;
}
[data-theme="dark"] .splash-logo-light {
  display: none;
}
[data-theme="dark"] .splash-logo-dark {
  display: block;
}
