/* Ten Moons — landing. Sotto, fissa, una partita vera tra bot sul tavolo 3D del gioco;
   sopra: titolo e storia, la cronaca (fonda, arma, conquista), come installarla sul telefono, domande, invito finale. */
:root {
  color-scheme: dark;
  --sea: #0a1c36;
  --deep: #071428;
  --panel: rgba(10, 24, 50, 0.82);
  --line: rgba(160, 200, 255, 0.18);
  --ink: #eef4ff; --muted: #b4c6e2; --dim: #8ea6c9;
  --go: #45d987; --go-ink: #052414;
  --gold: #ffd36b;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --wide: 1120px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--deep); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
p { margin: 0; }

/* il tavolo: il renderer 3D aggiunge da sé un canvas fisso (#board3d) prima di #live */
.stage { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, #3aa0f0, #145fb8); }
#live { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#board3d, #live { opacity: 0; transition: opacity 1.2s ease; }
.on #board3d, .on #live { opacity: 1; }
/* velo scuro dove c'è testo */
body::before { content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 16, 36, 0.94) 0%, rgba(6, 16, 36, 0.62) 40%, rgba(6, 16, 36, 0) 62%),
              linear-gradient(180deg, rgba(6, 16, 36, 0.55), rgba(6, 16, 36, 0) 96px); }

.hero, main, footer { position: relative; z-index: 2; }
.top { z-index: 3; }

.top { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gr) 0 var(--gl); max-width: var(--wide); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 18px var(--display); text-decoration: none; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.top-r { display: flex; align-items: center; gap: 8px; }
.lang-sel { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 30px 0 14px; border-radius: 999px; font: 600 14px var(--body); color: var(--ink); cursor: pointer;
  background: rgba(10, 24, 50, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b4c6e2' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center / 10px 6px;
  border: 1.5px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lang-sel option { color: #111; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 24px; border-radius: 999px; font: 700 16.5px var(--body); text-decoration: none; white-space: nowrap;
  background: rgba(10, 24, 50, 0.55); border: 1.5px solid var(--line); color: var(--ink); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.08s ease, background 0.15s ease; }
.btn:hover { background: rgba(10, 24, 50, 0.75); }
.btn:active { transform: translateY(2px); }
.btn.go { background: var(--go); color: var(--go-ink); border-color: transparent; box-shadow: 0 4px 0 #1f8f55; }
.btn.go:hover { background: #5be398; }
.btn.go:active { box-shadow: 0 1px 0 #1f8f55; }
.btn.small { height: 40px; padding: 0 18px; font-size: 15px; background: var(--go); color: var(--go-ink); border-color: transparent; }
.btn.big { height: 60px; padding: 0 40px; font-size: 19px; }

/* --- prima schermata --- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; max-width: var(--wide); margin: 0 auto;
  padding: 0 var(--gr) calc(18px + env(safe-area-inset-bottom, 0px)) var(--gl); }
.copy { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero .title { font-size: clamp(52px, 17vw, 96px); line-height: 0.9; letter-spacing: -0.045em; text-shadow: 0 2px 28px rgba(4, 12, 30, 0.55); }
.beta { align-self: flex-start; margin-top: 4px; padding: 5px 11px 4px; border-radius: 999px; font: 800 12.5px var(--body); letter-spacing: 0.12em; text-transform: uppercase;
  color: #2a1a00; background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.22), 0 4px 14px rgba(0, 0, 0, 0.3); transform: rotate(-4deg); }
.claim { font: 800 clamp(24px, 7vw, 34px)/1.08 var(--display); letter-spacing: -0.025em; color: var(--gold); text-wrap: balance; text-shadow: 0 2px 18px rgba(4, 12, 30, 0.5); }
.lede { color: var(--muted); font-size: 16.5px; max-width: 40ch; }
.cta { display: flex; gap: 10px; margin-top: 4px; }
.cta .btn { flex: 1 1 0; min-width: 0; padding: 0 16px; }
.cta .btn.go { flex-grow: 1.4; }
.free { font: 600 13px var(--body); color: var(--dim); }
.more { align-self: center; margin-top: 18px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.more::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px) rotate(45deg); } }

/* --- sezioni: pannelli opachi sopra la partita che continua a girare --- */
main { max-width: var(--wide); margin: 0 auto; padding: 8px var(--gr) 0 var(--gl); display: grid; gap: 14px; }
.band { padding: 26px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); min-width: 0; }
.band h2 { font-size: clamp(26px, 7vw, 40px); line-height: 1.05; max-width: 22ch; }
.eyebrow { font: 700 12.5px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.band h3 { font-size: 19px; letter-spacing: -0.015em; }
.band p { color: var(--muted); }

.road { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.road li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.road h3 { margin-bottom: 4px; }
.road-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(69, 217, 135, 0.13); }
.road-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--go); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.road li:nth-child(3) .road-ico { background: rgba(255, 211, 107, 0.14); }
.road li:nth-child(3) .road-ico svg { stroke: var(--gold); }

.inst-lede { margin-top: 10px; max-width: 46ch; }
.inst-now { margin-top: 16px; }
.inst-done { margin-top: 12px; color: var(--go) !important; font-weight: 600; }
.tabs { display: flex; gap: 8px; margin: 18px calc(-1 * 20px) 0; padding: 2px 20px 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; scroll-snap-align: start; height: 38px; padding: 0 14px; border-radius: 999px; font: 600 14px var(--body); color: var(--muted); cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--sea); border-color: transparent; }
.steps { list-style: none; counter-reset: s; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.steps[hidden] { display: none; }
.steps li { counter-increment: s; position: relative; padding: 13px 14px 13px 52px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); line-height: 1.45; }
.steps li::before { content: counter(s); position: absolute; left: 13px; top: 11px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--display); background: var(--gold); color: #2a1a00; }
.steps b { color: var(--ink); font-weight: 700; }

.faq h2 { margin-bottom: 12px; }
.faq details { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 32px 16px 0; position: relative; font: 700 17px var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 600 24px var(--body); color: var(--dim); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; max-width: 62ch; }

.last { text-align: center; display: grid; justify-items: center; gap: 20px; padding: 40px 20px; background: linear-gradient(180deg, rgba(31, 120, 209, 0.5), rgba(10, 24, 50, 0.85)); }
.last h2 { max-width: none; }

footer { max-width: var(--wide); margin: 0 auto; padding: 32px var(--gr) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gl); text-align: center; font: 600 14px var(--body); color: var(--muted); }
footer .brand-n { font: 800 14px var(--display); }

@media (min-width: 700px) {
  .road { grid-template-columns: repeat(3, 1fr); }
  .road li { grid-template-columns: 1fr; padding: 22px; }
  .band { padding: 40px 36px; }
  .tabs { margin: 22px 0 0; padding: 2px 0 4px; flex-wrap: wrap; overflow: visible; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cta .btn, .cta .btn.go { flex: 0 0 auto; padding: 0 28px; }
}
@media (min-width: 900px) {
  /* il tavolo a destra, il testo a sinistra */
  body::before { background: linear-gradient(90deg, rgba(6, 16, 36, 0.78) 0%, rgba(6, 16, 36, 0.5) 32%, rgba(6, 16, 36, 0) 56%); }
  .hero { justify-content: center; padding-bottom: 40px; }
  .copy { max-width: 560px; gap: 16px; }
  .title-row { flex-wrap: nowrap; }
  .hero .title { font-size: clamp(80px, 7.6vw, 108px); }
  .claim { font-size: 38px; }
  .lede { font-size: 18.5px; }
  .more { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0; }
  main { gap: 22px; }
}
@media (max-width: 380px) {
  .lang-sel { padding: 0 26px 0 10px; }
  .top .brand-n { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #board3d, #live, .btn { transition: none; }
  .more::after { animation: none; }
}
