:root {
  --bg: #f4f8fb;
  --surface: #ffffff;
  --ink: #10283b;
  --muted: #607384;
  --skepsi: #143f60;
  --skepsi-dark: #0d2f49;
  --skepsi-light: #e7f1f7;
  --line: #d8e3eb;
  --shadow: 0 18px 55px rgba(19, 55, 82, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(100, 170, 207, 0.16), transparent 28rem),
    radial-gradient(circle at 92% 14%, rgba(20, 63, 96, 0.08), transparent 24rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  height: 86px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(20, 63, 96, 0.10);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--skepsi);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(20, 63, 96, 0.22);
}

.brand-word,
.footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--skepsi-dark);
}

.brand-word { font-size: 19px; }

.hero {
  text-align: center;
  padding: 76px 18px 62px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #53839f;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0;
  color: var(--skepsi-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 680px;
  margin: 23px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.55;
}

.catalog { padding: 0 0 70px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--skepsi-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 38px);
}

.section-heading p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.game-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 590px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 23px 64px rgba(19, 55, 82, 0.17);
  border-color: #bfd0dc;
}

.card-art {
  position: relative;
  height: 270px;
  overflow: hidden;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card-art--duel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0b1411;
}

.duel-half {
  background-size: cover;
  background-position: center 42%;
  filter: saturate(1.02) contrast(1.05);
}

.duel-half--left { background-image: url("assets/wild-lion.webp"); }
.duel-half--right { background-image: url("assets/wild-tiger.webp"); }

.card-art--duel::after {
  background:
    linear-gradient(90deg, rgba(118, 74, 15, 0.28), transparent 42%, rgba(12, 104, 113, 0.25)),
    linear-gradient(180deg, transparent 45%, rgba(7, 15, 13, 0.80) 100%);
}

.duel-vs {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 50%;
  background: rgba(7, 14, 12, 0.72);
  color: #f6cf70;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  backdrop-filter: blur(7px);
}

.card-art--quiz {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.45), transparent 12rem),
    linear-gradient(135deg, #164e71 0%, #0e304a 65%, #0a263b 100%);
}

.card-art--quiz::before {
  content: "?";
  position: absolute;
  right: 42px;
  top: 18px;
  color: rgba(255,255,255,.07);
  font-family: Georgia, serif;
  font-size: 210px;
  font-weight: 700;
  line-height: 1;
}

.quiz-stack {
  position: absolute;
  inset: 38px 44px;
  display: grid;
  place-items: center;
}

.quiz-sheet {
  position: absolute;
  width: min(78%, 320px);
  height: 174px;
  border-radius: 17px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 35px rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.6);
}

.quiz-sheet:nth-child(1) { transform: rotate(-7deg) translate(-18px, 8px); opacity: .40; }
.quiz-sheet:nth-child(2) { transform: rotate(6deg) translate(18px, 5px); opacity: .62; }
.quiz-sheet:nth-child(3) { transform: rotate(0); }

.quiz-sheet-main {
  padding: 27px 24px 22px;
}

.quiz-question {
  width: 74%;
  height: 12px;
  border-radius: 99px;
  background: #183e59;
  margin-bottom: 22px;
}

.quiz-option {
  height: 15px;
  margin-top: 11px;
  border: 1px solid #b9cbd7;
  border-radius: 7px;
  background: #edf4f8;
}

.quiz-option:nth-of-type(3) {
  border-color: #78afc9;
  background: #dceef6;
}

/* La Giostra: artwork CSS-only, coerente con la targa smaltata del gioco. */
.card-art--giostra {
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 50% -20%, rgba(255,255,255,.10), transparent 13rem),
    linear-gradient(145deg, #2f5344 0%, #223e33 58%, #182f27 100%);
}

.card-art--giostra::after {
  background: linear-gradient(180deg, transparent 52%, rgba(12, 30, 24, .28) 100%);
}

.giostra-sign {
  position: relative;
  z-index: 1;
  width: min(82%, 286px);
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 21px 28px 20px;
  border: 3px solid #231a12;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.23), rgba(255,255,255,0) 24%),
    linear-gradient(0deg, rgba(0,0,0,.10), rgba(0,0,0,0) 32%),
    #b23a2e;
  color: #efe4cc;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -3px 8px rgba(0,0,0,.18),
    0 16px 35px rgba(0,0,0,.32);
  text-align: center;
  transform: rotate(-1.2deg);
}

.giostra-sign-eyebrow {
  margin-bottom: 7px;
  font-size: 8px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .82;
}

.giostra-sign strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  line-height: .78;
  letter-spacing: -.035em;
  text-shadow: 0 2px 0 #8c2a22, 0 3px 0 rgba(0,0,0,.30);
}

.giostra-sign-tag {
  max-width: 210px;
  margin-top: 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  line-height: 1.25;
  font-style: italic;
  opacity: .94;
}

.giostra-rivet {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 48%), #b9a884;
  box-shadow: 0 1px 1px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.30);
}

.giostra-rivet--tl { top: 9px; left: 9px; }
.giostra-rivet--tr { top: 9px; right: 9px; }
.giostra-rivet--bl { bottom: 9px; left: 9px; }
.giostra-rivet--br { bottom: 9px; right: 9px; }

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 29px 30px 30px;
}

.game-kicker {
  margin: 0 0 8px;
  color: #5d8298;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.game-title {
  margin: 0;
  color: var(--skepsi-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  line-height: 1.05;
}

.game-subtitle {
  margin: 9px 0 0;
  color: #305267;
  font-size: 16px;
  font-weight: 800;
}

.game-description {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.63;
}

.game-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #d7e4eb;
  border-radius: 99px;
  background: #f6fafc;
  color: #42697e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.game-cta {
  margin-top: auto;
  padding-top: 28px;
}

.play-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 13px;
  background: var(--skepsi);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 11px 25px rgba(20, 63, 96, .18);
  transition: background 160ms ease, transform 160ms ease;
}

.play-button:hover { background: var(--skepsi-dark); }
.play-button:active { transform: translateY(1px); }

.play-button::after {
  content: "→";
  font-size: 18px;
  line-height: 1;
}

.site-footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(20, 63, 96, 0.10);
  color: var(--muted);
}

.footer-brand { font-size: 14px; }
.footer-copy { font-size: 12px; letter-spacing: .07em; }

@media (min-width: 1050px) {
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .games-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 570px; }
  .games-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-card { min-height: 560px; }
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 620px); }
  .site-header { height: 72px; }
  .brand-mark { width: 31px; height: 31px; font-size: 19px; border-radius: 9px; }
  .brand-word { font-size: 17px; }

  .hero { padding: 52px 8px 48px; }
  .eyebrow { font-size: 10px; margin-bottom: 14px; }
  .hero h1 { font-size: clamp(40px, 13.8vw, 58px); }
  .hero-copy { font-size: 17px; margin-top: 18px; }
  .desktop-break { display: none; }

  .catalog { padding-bottom: 48px; }
  .section-heading { display: block; margin-bottom: 20px; }
  .section-heading h2 { font-size: 30px; }
  .section-heading p { margin-top: 8px; font-size: 13px; }

  .games-grid { grid-template-columns: 1fr; gap: 18px; }
  .game-card { min-height: 0; border-radius: 19px; }
  .card-art { height: 218px; }
  .card-body { padding: 24px 23px 24px; }
  .game-title { font-size: 29px; }
  .game-description { margin-top: 16px; }
  .game-meta { margin-top: 18px; }
  .game-cta { padding-top: 24px; }

  .quiz-stack { inset: 28px 24px; }
  .quiz-sheet { width: min(78%, 280px); height: 150px; }
  .quiz-sheet-main { padding: 23px 20px 18px; }

  .card-art--giostra { padding: 24px; }
  .giostra-sign { width: min(84%, 270px); min-height: 150px; padding: 18px 24px 17px; }
  .giostra-sign strong { font-size: 36px; }

  .site-footer { min-height: 96px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
