@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --void: #050810;
  --bg: #080c18;
  --bg-elevated: #0e1528;
  --bg-soft: #121a2e;
  --surface: rgba(22, 30, 50, 0.72);
  --surface-solid: #141c2f;
  --surface-soft: #0f1629;
  --text: #e8edf7;
  --text-muted: #94a3c8;
  --text-on-dark: #e5e7eb;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.35);
  --accent-glow: rgba(45, 212, 191, 0.45);
  --violet: #818cf8;
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(45, 212, 191, 0.12);
  --radius: 16px;
  --radius-lg: 22px;
  --container: 1120px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--void);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -40%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(129, 140, 248, 0.08), transparent 50%);
  line-height: 1.6;
  min-height: 100vh;
}

h1,
h2,
h3,
.logo {
  font-family: var(--font-display);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 8, 16, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 6px 0;
  max-width: 100%;
  line-height: 0;
  color: var(--text);
}

.logo-mark {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(200px, 52vw);
  object-fit: contain;
}

.logo-wordmarks {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-left: 12px;
}

.logo-wordmarks img {
  display: block;
  height: 32px;
  width: auto;
  max-height: 36px;
  max-width: min(200px, 38vw);
  object-fit: contain;
}

.logo:hover .logo-mark,
.logo:hover .logo-wordmarks img {
  opacity: 0.88;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a[aria-current="page"] {
  color: #f1f5f9;
  font-weight: 700;
}

.main-nav a[aria-current="page"]::after {
  width: 100%;
}

.main-nav a[aria-current="page"]:hover {
  color: #f8fafc;
}

.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(14, 21, 40, 0.97) 0%, rgba(5, 8, 16, 0.98) 45%, #050810 100%);
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55%;
  height: 70%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #f8fafc;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .hero-content .eyebrow {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.hero-text {
  margin: 0 0 24px;
  max-width: 700px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: var(--font-display);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 45%, #2563eb 100%);
  color: #050810;
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(45, 212, 191, 0.45);
  filter: brightness(1.06);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(148, 163, 184, 0.35);
}

.hero-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--shadow-glow);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
}

.hero-card-inner {
  padding: 28px;
}

.hero-card h2 {
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 1.65rem;
  font-family: var(--font-display);
  color: #f1f5f9;
}

.card-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.text-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: #5eead4;
}

.text-link:hover {
  color: #99f6e4;
}

.section {
  padding: 72px 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.6) 0%, rgba(8, 12, 24, 0.4) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
}

.cards-grid {
  display: grid;
  gap: 20px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.info-card:hover {
  border-color: rgba(45, 212, 191, 0.25);
  transform: translateY(-2px);
}

.info-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #f1f5f9;
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  gap: 28px;
  align-items: start;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.feature-list li + li {
  margin-top: 12px;
}

.hero-small .hero-about-list {
  margin-top: 14px;
  max-width: 640px;
}

.hero-about-cta {
  margin-top: 22px;
}

.feature-grid .eyebrow {
  color: var(--accent);
}

.feature-grid h2 {
  color: #f1f5f9;
}

.feature-grid > div > p {
  color: var(--text-muted);
}

.site-footer {
  background: linear-gradient(180deg, #04060d 0%, #020308 100%);
  color: var(--text-on-dark);
  padding-top: 52px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  min-width: 0;
  text-align: center;
  overflow-x: visible;
}

.footer-brand p {
  margin: 0;
  align-self: center;
  width: 100%;
  max-width: min(34rem, 100%);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #94a3b8;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-family: var(--font-display);
  color: #f1f5f9;
}

.site-footer .footer-brand-heading {
  line-height: 0;
  align-self: center;
  max-width: 100%;
}

.site-footer .footer-brand-heading img {
  display: block;
  height: 38px;
  width: auto;
  margin-inline: auto;
  max-width: min(340px, 100%);
  object-fit: contain;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li {
  margin-top: 8px;
}

.footer-bottom {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px 24px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 28px;
}

.site-footer .footer-copyright {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
}

.footer-legal {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-left: auto;
  flex: 0 0 auto;
}

.footer-legal a {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
}

.footer-legal a:hover {
  color: var(--accent);
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.35fr 0.85fr;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 767px) {
  .header-inner {
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-mark {
    height: 36px;
    max-width: min(180px, 70vw);
  }

  .logo-wordmarks {
    margin-left: 0;
    margin-top: 8px;
    gap: 8px 10px;
  }

  .logo-wordmarks img {
    height: 28px;
    max-height: 30px;
    max-width: min(160px, 42vw);
  }

  .main-nav {
    gap: 12px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-card-inner,
  .info-card,
  .feature-box {
    padding: 20px;
  }

  .footer-bottom {
    gap: 10px 14px;
  }

  .site-footer .footer-copyright {
    font-size: 0.82rem;
  }

  .footer-legal {
    gap: 14px;
  }

  .footer-legal a {
    font-size: 0.82rem;
  }

  .site-footer .footer-brand-heading img {
    height: 32px;
  }

  .footer-brand p {
    font-size: 0.78rem;
    line-height: 1.6;
    max-width: 100%;
    padding-inline: 4px;
  }
}

@media (min-width: 768px) {
  .footer-brand {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .footer-brand p {
    width: max-content;
    max-width: 100%;
    line-height: 1.4;
    white-space: nowrap;
  }
}

.hero-small {
  padding: 56px 0 40px;
}

.hero-small h1 {
  background: none;
  -webkit-text-fill-color: #f8fafc;
  color: #f8fafc;
}

.cards-grid-single {
  grid-template-columns: 1fr;
}

.game-card {
  max-width: 760px;
}

.text-link-dark {
  color: var(--accent);
  font-weight: 700;
}

.text-link-dark:hover {
  color: #99f6e4;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.legal-container {
  max-width: 860px;
}

.legal-content h2 {
  margin-top: 32px;
  margin-bottom: 10px;
  font-size: 1.35rem;
  color: #f1f5f9;
}

.legal-content p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.legal-content h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.18rem;
  color: #f1f5f9;
  font-family: var(--font-display);
}

.legal-content ul {
  margin: 0 0 18px;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.legal-content li + li {
  margin-top: 6px;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-note {
  margin-top: 28px;
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: rgba(45, 212, 191, 0.08);
  border-radius: 12px;
  color: #cbd5e1;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-store-row {
  margin-top: 22px;
}

.hero-media-cap {
  margin-top: 24px;
  max-width: 960px;
}

/* YouTube in pagina (iframe) — video resta sui server Google */
.embed-youtube-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.embed-youtube {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-strong);
}

.embed-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-youtube-caption {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.embed-youtube-caption a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.embed-youtube-caption a:hover {
  color: #99f6e4;
}

.media-placeholder {
  border: 1px dashed rgba(45, 212, 191, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.65) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(16px, 4vw, 28px);
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.media-placeholder--16x9 {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.media-placeholder--square {
  aspect-ratio: 1;
  max-width: 200px;
  margin-inline: auto;
}

.media-placeholder-label {
  font-weight: 700;
  font-family: var(--font-display);
  color: #e2e8f0;
  font-size: 0.95rem;
}

.media-placeholder-hint {
  font-size: 0.76rem;
  line-height: 1.45;
  max-width: 32ch;
  color: #64748b;
}

.media-strip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  mask-image: linear-gradient(90deg, transparent, black 24px, black calc(100% - 24px), transparent);
  /* Barra nativa nascosta; sotto stili “leggeri” solo in hover / mentre scrolli */
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  -ms-overflow-style: none;
}

.media-strip::-webkit-scrollbar {
  height: 0;
}

.media-strip::-webkit-scrollbar-thumb {
  background: transparent;
}

/* WebKit: barra sottile solo in hover (mouse) o mentre scrolli (classe da media-strip.js) */
.media-strip:hover::-webkit-scrollbar,
.media-strip.media-strip--show-scrollbar::-webkit-scrollbar {
  height: 5px;
}

.media-strip:hover::-webkit-scrollbar-track,
.media-strip.media-strip--show-scrollbar::-webkit-scrollbar-track {
  background: rgba(5, 8, 16, 0.75);
  border-radius: 999px;
  margin: 0 6px;
}

.media-strip:hover::-webkit-scrollbar-thumb,
.media-strip.media-strip--show-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.55), rgba(56, 189, 248, 0.45));
  border-radius: 999px;
}

@media (hover: hover) and (pointer: fine) {
  .media-strip:hover::-webkit-scrollbar-thumb:hover,
  .media-strip.media-strip--show-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.75), rgba(56, 189, 248, 0.65));
  }
}

/* Firefox: barra sottile solo hover o mentre la classe è attiva */
@media (hover: hover) and (pointer: fine) {
  .media-strip:hover {
    scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 191, 0.55) rgba(5, 8, 16, 0.75);
  }
}

.media-strip.media-strip--show-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.55) rgba(5, 8, 16, 0.75);
}

/* touch-action non è ereditato: senza questo, il tocco sulle img va in verticale (pagina) invece che nella striscia */
.media-strip .media-frame,
.media-strip .media-placeholder,
.media-strip img {
  touch-action: pan-x;
  -webkit-user-drag: none;
}

.media-strip .media-placeholder,
.media-strip .media-frame {
  flex: 0 0 min(82vw, 300px);
  scroll-snap-align: start;
}

/* Nella striscia orizzontale, width:100% sul 16:9 rompe il flex (figure troppo larghe → immagini “assenti”) */
.media-strip .media-frame.media-frame--16x9 {
  width: min(82vw, 300px);
  max-width: min(82vw, 300px);
  flex: 0 0 min(82vw, 300px);
  box-sizing: border-box;
}

/* Immagini reali (hero, cover, screenshot) al posto dei placeholder */
.media-frame {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface-soft);
}

.media-frame--16x9 {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.media-frame--16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.store-slot {
  flex: 1 1 200px;
  max-width: 280px;
  min-height: 56px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  backdrop-filter: blur(8px);
}

.hero .store-slot {
  background: rgba(5, 8, 16, 0.45);
}

.store-slot-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #f1f5f9;
}

.store-slot-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Badge store (SVG in /assets/images/badges/) — senza link finché non hai gli URL */
.store-row-badges {
  align-items: flex-end;
  gap: 16px 24px;
}

.store-badge-static {
  display: inline-block;
  line-height: 0;
  /* niente overflow/border-radius: tagliava bordi e anti-alias degli SVG */
}

.store-badge-static img {
  height: 40px;
  width: auto;
  display: block;
}

.store-badge-note {
  margin: 10px 0 0;
  max-width: 420px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.section-tight {
  padding-top: 48px;
  padding-bottom: 48px;
}

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-card-thumb {
  margin-bottom: 16px;
}

/* Pagine interne: hero compatto su sfondo scuro */
main > section.hero-small {
  background: linear-gradient(180deg, rgba(14, 21, 40, 0.95) 0%, var(--void) 100%);
}

main > section.hero-small .hero-text {
  color: var(--text-muted);
}

main > section.hero-small .eyebrow {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }

  .info-card:hover {
    transform: none;
  }
}
