/* Base */
:root {
  --bg: #0f1115;
  --card: rgba(33, 37, 41, 0.65);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.85);
  --border: rgba(255,255,255,0.15);
  --accent: #800020;
  --shadow: rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0b0d11, #151924);
}

/* Layout */
.container {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  padding: 1rem 0;
}
.brand {
  margin: 0;
  font-weight: 650;
  letter-spacing: 0.3px;
}

.main {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 10px 30px var(--shadow);
  backdrop-filter: blur(6px);
}

.badge {
  display: inline-block;
  margin: 0 0 0.75rem 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.85rem;
}

h1 {
  margin: 0 0 0.75rem 0;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead {
  margin: 0 0 1rem 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.actions { margin: 1rem 0 0 0; }

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.9);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn:hover { background: rgba(255,255,255,0.10); }

.hint {
  margin: 1rem 0 0 0;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Footer */
.footer {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
}
.legal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.legal a {
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid rgba(128,0,32,0.9);
}
.legal a:hover { opacity: 0.9; }

/* Accessibilità: focus visibile */
a:focus-visible {
  outline: 3px solid rgba(255,255,255,0.95);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: #fff;
  color: #000;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 650;
}
.skip-link:focus { left: 0.5rem; }

/* Loader */
.status { margin: 0.75rem 0 0 0; }
.dots { display: inline-flex; gap: 6px; vertical-align: middle; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
  animation: pulse 1.2s infinite ease-in-out;
}
.dot:nth-child(2){ animation-delay: .15s; }
.dot:nth-child(3){ animation-delay: .30s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(.85); opacity: .55; }
  40% { transform: scale(1.15); opacity: 1; }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Riduci animazioni se richiesto */
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}

/* Link non blu */
a,
a:visited {
  color: #ffffff;          /* oppure var(--text) se usi variabili */
  text-decoration: none;   /* opzionale: rimuove sottolineatura */
}

/* Hover/focus: resta chiaro ma “cliccabile” */
a:hover,
a:focus-visible {
  text-decoration: underline;   /* opzionale */
  opacity: 0.95;
}
