/* ==========================================================================
   home.css — Capa do jogo (§7.1)
   Tela inicial de jogo.html: background + nome do jogo + ações.
   ========================================================================== */

.screen--home {
  position: relative;
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  color: var(--parchment-100);
}

.screen--home.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Background ---------- */

.home__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.home__fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      1200px 620px at 50% -10%,
      rgba(246, 233, 201, 0.28),
      transparent 70%
    ),
    linear-gradient(165deg, var(--marrom-900), var(--marrom-700) 55%, #1b1005);
}

.home__media picture,
.home__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home__img {
  object-fit: cover;
  object-position: center 30%;
}

.home__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 520px at 50% 40%,
      rgba(20, 12, 4, 0.35),
      rgba(20, 12, 4, 0.72) 75%
    ),
    linear-gradient(
      180deg,
      rgba(18, 10, 4, 0.55) 0%,
      rgba(18, 10, 4, 0.35) 40%,
      rgba(18, 10, 4, 0.82) 100%
    );
}

/* ---------- Botão instalar app (PWA) ---------- */

.home__install[hidden] {
  display: none;
}

/* ---------- Conteúdo ---------- */

.home__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding-block: var(--space-8);
  animation: rise-in var(--dur-slow) var(--ease);
}

.home__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  color: var(--dourado-400, #f4ba31);
  background: rgba(244, 186, 49, 0.12);
  border: 1px solid rgba(244, 186, 49, 0.4);
  margin-bottom: var(--space-3);
}

.home__mark svg {
  width: 30px;
  height: 30px;
}

.home__eyebrow {
  color: var(--dourado-300, #f0c950);
}

.home__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--parchment-100);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  margin: 0;
}

.home__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-md);
  color: rgba(255, 248, 235, 0.88);
  margin: 0;
}

.home__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  width: min(320px, 100%);
  margin-top: var(--space-5);
}

.btn--lg {
  min-height: 56px;
  padding: 0.9rem 1.75rem;
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
}

.home__actions .btn {
  width: 100%;
}

/* ---------- Controles de áudio (§11.1, §11.2) ---------- */

.home__support-note {
  margin-top: var(--space-1);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-sm);
  color: rgba(255, 248, 235, 0.72);
}

.home__audio {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.audio-toggle {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(20, 12, 4, 0.4);
  color: var(--parchment-100);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

.audio-toggle:hover {
  background: rgba(20, 12, 4, 0.62);
}

.audio-toggle.is-off {
  opacity: 0.5;
  text-decoration: line-through;
}

.home__private {
  margin-top: var(--space-2);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home__private a {
  color: rgba(255, 248, 235, 0.65);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 248, 235, 0.4);
}

.home__private a:hover {
  color: var(--gold-300);
}

@media (min-width: 640px) {
  .home__actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: auto;
    flex-wrap: wrap;
  }

  .home__actions .btn {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen--home.is-active {
    animation: none;
  }
}