/* style-brand.css
   Base comune di Triv-AI: font, colori e comandi. La usano landing, login e
   registrazione; le pagine del gioco hanno ancora i loro fogli, con gli stessi blu.
   Poppins (SIL Open Font License 1.1) è servito da /assets/fonts, solo alfabeto latino. */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/poppins-700-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/poppins-800-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  /* Il blu da quiz televisivo del gioco (#203B8C) e l'oro della classifica */
  --bg: #0f2166;
  --bg-deep: #0a1850;
  --brand: #203b8c;
  --surface: #172d7d;
  --surface-2: #1e3a94;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.4);
  --ink: #ffffff;
  --ink-2: #d9e0ff;
  --ink-3: #b3bfef;
  --gold: #ffd166;
  --gold-strong: #ffc23d;
  --on-gold: #1c1500;
  --ok: #157a3f;
  --ko: #c8362b;
  --ko-ink: #ffb4ab;
  --tile-low: #157a3f;
  --tile-mid: #f1c40f;
  --tile-high: #c8362b;
  --focus: #ffd166;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --z-sticky: 10;
  --z-modal: 100;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p { text-wrap: pretty; }

a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-strong); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font-display);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out), border-color 160ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--on-gold); }
.btn-primary:hover { background: var(--gold-strong); color: var(--on-gold); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.btn[aria-busy="true"]::before {
  content: '';
  width: 1em; height: 1em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
