/*
 * PartyCrime — pagina iniziale.
 * Stessi colori e font dei due giochi:
 *   impostore/client/src/index.css  ·  cena-con-delitto/frontend/app/globals.css
 */
:root {
  --ink: #121013;
  --panel: #1b181c;
  --card: #232025;
  --line: #3a343d;
  --line-strong: #7d747f; /* bordi di campi e controlli: minimo 3:1 (WCAG 1.4.11) */
  --cream: #efe9dd;
  --muted: #b3aaa2;
  --gold: #c9a227;
  --gold-light: #e7c65e;
  --blood: #a03038;
  --blood-light: #e8838a;
  --ok-light: #6cc08b;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--blood-light);
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.01em;
}

.lead {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
}

/* ───────── Pulsanti ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 24px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--gold);
  color: var(--ink);
}
.btn.primary:hover {
  background: var(--gold-light);
}
.btn.ghost {
  border-color: var(--line);
  color: var(--cream);
}
.btn.ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ───────── Header ───────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.logo svg {
  width: 30px;
  height: 30px;
}
.nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover {
  color: var(--gold-light);
}
@media (max-width: 560px) {
  .nav {
    display: none;
  }
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(40px, 10vw, 96px) 0 clamp(48px, 8vw, 80px);
}
.hero::before {
  /* "fascio di luce" sulla scena */
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(201, 162, 39, 0.2), rgba(201, 162, 39, 0.05) 60%, transparent 100%);
  pointer-events: none;
  animation: flicker 7s ease-in-out infinite;
}
.hero > * {
  position: relative;
}
.hero .actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.em {
  color: var(--blood-light);
  font-style: italic;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  45% {
    opacity: 0.82;
  }
  50% {
    opacity: 0.95;
  }
  55% {
    opacity: 0.78;
  }
}

/* ───────── Sezioni ───────── */
section {
  padding: clamp(36px, 6vw, 64px) 0;
}
.section-title {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 36px);
  color: var(--gold-light);
}
.section-sub {
  margin: 0 auto 32px;
  max-width: 520px;
  text-align: center;
  color: var(--muted);
}

/* ───────── Card dei giochi ───────── */
.games {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: linear-gradient(180deg, var(--card), var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.game:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.game.crime::after,
.game.impostor::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.9;
}
.game.crime::after {
  background: radial-gradient(420px 160px at 100% 0%, rgba(160, 48, 56, 0.2), transparent 70%);
}
.game.impostor::after {
  background: radial-gradient(420px 160px at 100% 0%, rgba(201, 162, 39, 0.16), transparent 70%);
}
.game > * {
  position: relative;
  z-index: 1;
}

.icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--ink);
}
.icon svg {
  width: 30px;
  height: 30px;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.chip.gold {
  color: var(--gold-light);
  border-color: rgba(201, 162, 39, 0.55);
}
.chip.free {
  color: var(--ok-light);
  border-color: rgba(108, 192, 139, 0.5);
}

.game h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--cream);
}
.game p {
  margin: 0;
  color: var(--muted);
}
.game ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.game li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.game li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.game .btn {
  margin-top: auto;
  align-self: flex-start;
}
.game .spacer {
  flex: 1;
}

/* ───────── Passi ───────── */
.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.step {
  text-align: center;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.step .n {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.step h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--gold-light);
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

/* ───────── Footer ───────── */
footer {
  margin-top: 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--gold-light);
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }
  .game,
  .btn {
    transition: none;
  }
}
