/* Shared static information pages: FAQ and How to play, Italian and English.
   The visual language mirrors Mini G without importing app runtime or fonts. */

:root {
  color-scheme: light dark;
  --ip-bg: #f7f3ea;
  --ip-paper: #fffdfa;
  --ip-paper-soft: #f1ecdf;
  --ip-text: #27223a;
  --ip-muted: #645d78;
  --ip-purple: #6847af;
  --ip-purple-deep: #4d3189;
  --ip-purple-soft: #eee7fa;
  --ip-gold: #efca62;
  --ip-gold-soft: #fff3cb;
  --ip-border: #ded5c5;
  --ip-shadow: 0 12px 28px rgba(52, 40, 78, 0.08), 0 2px 0 rgba(52, 40, 78, 0.08);
  --ip-shadow-hover: 0 16px 34px rgba(52, 40, 78, 0.12), 0 3px 0 rgba(52, 40, 78, 0.08);
  --ip-radius-lg: 22px;
  --ip-radius: 15px;
  --ip-max: 73rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ip-bg: #191327;
    --ip-paper: #241d35;
    --ip-paper-soft: #2e2541;
    --ip-text: #f9f5ff;
    --ip-muted: #c9bfd9;
    --ip-purple: #bea0f7;
    --ip-purple-deep: #d3b9ff;
    --ip-purple-soft: #392c56;
    --ip-gold: #f1cd69;
    --ip-gold-soft: #44351c;
    --ip-border: #4a3c5f;
    --ip-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), 0 2px 0 rgba(0, 0, 0, 0.18);
    --ip-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.32), 0 3px 0 rgba(0, 0, 0, 0.2);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }

body {
  min-width: 20rem;
  margin: 0;
  background: radial-gradient(circle at 10% -10%, var(--ip-gold-soft) 0, transparent 22rem), var(--ip-bg);
  color: var(--ip-text);
  font: 1rem/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-wrap: break-word;
}

.page { width: min(100% - 2rem, var(--ip-max)); margin: 0 auto; padding: 1.125rem 0 3.5rem; }
a { color: var(--ip-purple-deep); text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 0.14em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ip-gold); outline-offset: 3px; border-radius: 8px; }

/* Header */
.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.5rem 0 1.25rem;
  border-bottom: 1px solid var(--ip-border);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.8rem;
  color: var(--ip-text);
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.site-brand__mark {
  display: grid;
  width: 2.45rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ip-text) 45%, transparent);
  border-radius: 50%;
  background: var(--ip-gold);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ip-text) 23%, transparent);
  color: var(--ip-text);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.site-nav { min-width: 0; }
.site-nav ul, .site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav ul { justify-content: center; }
.site-nav a, .site-footer a {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--ip-text);
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-footer a:hover { background: var(--ip-purple-soft); }
.site-nav a[aria-current="page"] {
  background: var(--ip-purple);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ip-purple-deep) 45%, transparent);
  color: var(--ip-paper);
}
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--ip-border);
  border-radius: 999px;
  background: var(--ip-paper);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ip-text) 8%, transparent);
  white-space: nowrap;
}
.language-switch__option {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: var(--ip-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.language-switch__option:hover { background: var(--ip-purple-soft); color: var(--ip-purple-deep); }
.language-switch__option[aria-current="true"] { background: var(--ip-gold); color: var(--ip-text); }

/* Main */
main { padding-top: 1.55rem; }
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  border: 1px solid var(--ip-border);
  border-radius: var(--ip-radius-lg);
  background: var(--ip-paper);
  box-shadow: var(--ip-shadow);
}
.hero::before, .hero::after {
  position: absolute;
  z-index: 0;
  width: 5rem;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--ip-purple) 22%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.hero::before { right: clamp(1rem, 6vw, 5rem); bottom: -3.2rem; background: var(--ip-purple-soft); }
.hero::after { right: clamp(-2rem, 1vw, 1rem); top: 1.15rem; width: 1.35rem; background: var(--ip-gold); }
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  max-width: 16ch;
  margin: 0 0 0.75rem;
  color: var(--ip-text);
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(2rem, 5vw, 3.45rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.04;
}
.hero h1::after { display: block; width: 3.15rem; height: 0.38rem; margin-top: 0.82rem; border-radius: 999px; background: var(--ip-gold); content: ""; }
.hero p { max-width: 69ch; margin: 0; color: var(--ip-muted); font-size: clamp(1rem, 1.8vw, 1.12rem); }
h2 {
  margin: 2.45rem 0 0.9rem;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.18;
}
.section-title { margin-top: 1.7rem; }

/* Game directory and cards */
.toc { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.toc a {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  padding: 0.35rem 0.88rem;
  border: 1px solid var(--ip-border);
  border-radius: 999px;
  background: var(--ip-paper);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ip-text) 6%, transparent);
  color: var(--ip-purple-deep);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}
.toc a:hover { border-color: var(--ip-purple); background: var(--ip-purple-soft); transform: translateY(-1px); }
.game {
  position: relative;
  margin: 1rem 0;
  padding: clamp(1.1rem, 3vw, 1.55rem);
  overflow: hidden;
  border: 1px solid var(--ip-border);
  border-radius: var(--ip-radius);
  background: var(--ip-paper);
  box-shadow: var(--ip-shadow);
}
.game::before { position: absolute; top: 0; bottom: 0; left: 0; width: 0.38rem; background: var(--ip-purple); content: ""; }
.game:nth-of-type(3n)::before { background: var(--ip-gold); }
.game:nth-of-type(3n + 1)::before { background: #78aebd; }
.game h2 { margin: 0 0 0.38rem; font-size: clamp(1.3rem, 2.6vw, 1.65rem); }
.lead { max-width: 68ch; margin: 0 0 1rem; color: var(--ip-muted); font-size: 1.04rem; font-weight: 650; }
.facts { margin: 0; }
.fact { padding: 0.78rem 0; border-top: 1px solid var(--ip-border); }
.fact:first-child { border-top-color: color-mix(in srgb, var(--ip-border) 75%, transparent); }
.fact dt { margin: 0 0 0.17rem; color: var(--ip-purple-deep); font-size: 0.77rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.fact dd { max-width: 78ch; margin: 0; }
@media (min-width: 44rem) {
  .fact { display: grid; grid-template-columns: 10.75rem minmax(0, 1fr); gap: 0 1.25rem; }
  .fact dt { padding-top: 0.24rem; }
}

/* FAQ */
.faq-group { margin: 0 0 2.2rem; }
.faq-group .section-title { padding-bottom: 0.55rem; border-bottom: 1px solid var(--ip-border); }
.faq-item { margin: 0.7rem 0; border: 1px solid var(--ip-border); border-radius: var(--ip-radius); background: var(--ip-paper); box-shadow: 0 2px 0 color-mix(in srgb, var(--ip-text) 5%, transparent); }
.faq-item[open] { border-color: color-mix(in srgb, var(--ip-purple) 55%, var(--ip-border)); box-shadow: var(--ip-shadow); }
.faq-item summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 3.6rem; padding: 0.72rem 1rem 0.72rem 1.15rem; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.03rem; font-weight: 750; line-height: 1.38; }
.faq-item summary::after { display: grid; width: 1.9rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--ip-purple-soft); color: var(--ip-purple-deep); content: "+"; font-size: 1.35rem; font-weight: 500; line-height: 1; }
.faq-item[open] summary::after { background: var(--ip-gold); color: var(--ip-text); content: "−"; }
.faq-answer { padding: 0 1.15rem 1.08rem; }
.faq-answer p { max-width: 76ch; margin: 0; color: var(--ip-muted); }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-top: 3rem; padding: 1.5rem 0 0; border-top: 1px solid var(--ip-border); }
.site-footer__intro p { margin: 0.2rem 0 0; color: var(--ip-muted); font-size: 0.9rem; }
.site-footer__brand { color: var(--ip-text); font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-size: 1.2rem; font-weight: 850; text-decoration: none; }
.site-footer ul { justify-content: flex-end; }
.site-footer a { color: var(--ip-muted); font-size: 0.88rem; }

@media (max-width: 58rem) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; order: 3; }
  .site-nav ul { justify-content: flex-start; }
}
@media (max-width: 38rem) {
  body { background: var(--ip-bg); }
  .page { width: min(100% - 1.2rem, var(--ip-max)); padding-top: 0.6rem; }
  .site-header { gap: 0.65rem; padding-bottom: 1rem; }
  .site-brand { font-size: 1.2rem; }
  .site-brand__mark { width: 2.2rem; }
  .site-nav ul { gap: 0.18rem; }
  .site-nav a { min-height: 2.2rem; padding-inline: 0.58rem; font-size: 0.86rem; }
  .hero { margin-bottom: 1.45rem; padding: 1.45rem 1.2rem; border-radius: 18px; }
  .hero::before { display: none; }
  .game { padding: 1rem 1rem 0.9rem 1.15rem; }
  .fact { padding-block: 0.68rem; }
  .site-footer { align-items: start; margin-top: 2.2rem; padding-top: 1.15rem; }
  .site-footer ul { justify-content: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  .toc a, .faq-item { transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
  .game { transition: box-shadow 160ms ease, transform 160ms ease; }
  .game:hover { box-shadow: var(--ip-shadow-hover); transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Update-ErNa-088: pagine di contenuto (giochi, guide, novità, Chi siamo, Contatti) */
.breadcrumb { margin: 0 0 1rem; font-size: 0.9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; margin: 0; padding: 0; list-style: none; color: var(--ip-muted); }
.breadcrumb li + li::before { margin-right: 0.5rem; color: var(--ip-border); content: "›"; }
.breadcrumb a { color: var(--ip-muted); }
.article-section { max-width: 78ch; margin: 0 0 1.6rem; }
.article-section h2 { margin-top: 1.9rem; }
.article-section p { margin: 0 0 0.9rem; }
.steps, .tips { margin: 0 0 1rem; padding-left: 1.35rem; }
.steps li, .tips li { margin: 0.45rem 0; padding-left: 0.2rem; }
.facts--summary { max-width: 78ch; margin: 0 0 1.4rem; padding: 0.2rem 1.15rem; border: 1px solid var(--ip-border); border-radius: var(--ip-radius); background: var(--ip-paper); }
.related__list { margin: 0 0 1rem; padding-left: 1.2rem; }
.related__list li { margin: 0.4rem 0; }
.guide-cards { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 44rem) { .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-card { padding: 1.1rem 1.25rem; border: 1px solid var(--ip-border); border-radius: var(--ip-radius); background: var(--ip-paper); box-shadow: var(--ip-shadow); }
.guide-card h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.guide-card p { margin: 0 0 0.6rem; color: var(--ip-muted); }
.news-list { max-width: 78ch; }
.news-item { margin: 0 0 1rem; padding: 1rem 1.2rem; border: 1px solid var(--ip-border); border-radius: var(--ip-radius); background: var(--ip-paper); }
.news-item h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.news-item p { margin: 0 0 0.5rem; }
.news-item__date { color: var(--ip-muted); font-size: 0.88rem; }
.game-more { margin: 0.9rem 0 0; font-weight: 700; }
