/* Minimal, silent, high-contrast Void theme */
:root{
  --bg: #0a0a0a;
  --fg: #e7e7e7;
  --muted: #9a9a9a;
  --accent: #bdbdbd;
  /* Central fade duration used by CSS and JS */
  --fade-ms: 2000ms;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  letter-spacing: 0.01em;
}

.main {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* Subtle vignette breathing */
.main::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(0,0,0,0.07) 90%);
  animation: vignette-breathe 90s ease-in-out infinite alternate;
}

@keyframes vignette-breathe {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}

.center {
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
}

#void-fragment {
  max-width: 60ch;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.35;
  opacity: 0;
  transition: opacity var(--fade-ms) ease, filter var(--fade-ms) ease;
  min-height: 3rem;
}

.fade-in { opacity: 1; filter: none; }
.fade-out { opacity: 0; filter: blur(1px); }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #1e1e1e;
  padding: 0.6rem 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls {
  display: inline-flex;
  gap: 0.5rem;
}

button.min {
  background: transparent;
  color: var(--accent);
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

button.min:hover { border-color: #505050; }

button.min:focus-visible {
  outline: 2px solid #6e6e6e;
  outline-offset: 2px;
}

#next-btn[data-final="true"]::after {
  content: " (complete)";
  color: var(--muted);
}


.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  #void-fragment { transition: none; }
  .fade-in, .fade-out { opacity: 1; filter: none; }
  .main::before { animation: none; }
}

/* Allow disabling the vignette via class toggle */
.bg-off .main::before { display: none; }
