/* Fuori Campo — pagina: token, base, componenti condivisi e sezioni (testata, hero, nastro, prima di giocare, chiusura, footer).
   La sezione mappa (#campetti) è in map.css. */

:root {
  --layout: wide;
  --orange: #ff6938;
  --orange-hi: #ff9246;
  --orange-deep: #d9481a;
  --lime: #d8df8a;
  --ink: #0e1011;
  --paper: #f3f1e9;
  --muted: #a6ada8;
  --dim: #7f8782;
  --line: rgb(255 255 255 / .08);
  --line-2: rgb(255 255 255 / .15);
  --glass: rgb(17 19 20 / .86);
  --glass-solid: rgb(17 19 20 / .96);
  --ok: #6ad48e;
  --info: #8fc9ff;
  --warn: #ffbd59;
  --gap: 16px;
  --top: 74px;
  --panel-w: 392px;
  --sel-w: 372px;
  --r: 24px;
  --pad-x: clamp(20px, 5vw, 72px);
  --shadow: 0 30px 60px -24px rgb(0 0 0 / .7), 0 2px 8px rgb(0 0 0 / .25);
  --display: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--display); }
kbd { display: inline-block; min-width: 22px; padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 6px; font: 600 11px/1 var(--body); color: var(--muted); text-align: center; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.glass { background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.live-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgb(255 105 56 / .6); } 70%, 100% { box-shadow: 0 0 0 8px rgb(255 105 56 / 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.chip { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
button.chip:hover { background: var(--paper); color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 50px; padding: 0 18px; border-radius: 15px; font-size: 14px; font-weight: 700; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.btn-primary { justify-content: space-between; background: linear-gradient(100deg, var(--orange), var(--orange-hi)); color: var(--ink); box-shadow: 0 14px 30px -14px rgb(255 105 56 / .8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgb(255 105 56 / .9); }
.btn-ghost { border: 1px solid var(--line-2); background: rgb(255 255 255 / .04); }
.btn-ghost:hover { border-color: rgb(255 255 255 / .35); background: rgb(255 255 255 / .1); }
.marquee { display: flex; width: max-content; animation: marquee 36s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Entrata delle sezioni (classe .js aggiunta nel <head>, .in dallo script in fondo alla pagina) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Testata */
.site-header { position: absolute; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px var(--pad-x); }
.logo { display: flex; align-items: center; font-size: 21px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.logo svg { width: 34px; margin-right: 10px; fill: var(--orange); stroke: var(--ink); stroke-width: 1.6; transition: transform .7s var(--ease); }
.logo:hover svg { transform: rotate(180deg); }
.logo > span { margin-left: 3px; font-weight: 400; }
.logo sup { align-self: flex-start; margin: 2px 0 0 3px; font-size: 9px; font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / .03); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.site-nav a, .site-nav button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.site-nav a:hover, .site-nav button:hover { background: var(--paper); color: var(--ink); }
.site-nav .ico { width: 16px; height: 16px; }
.location { display: inline-flex; align-items: center; gap: 9px; color: var(--lime); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.location .live-dot { background: var(--lime); animation: none; }

/* Hero */
.hero {
  position: relative; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(28px, 4vw, 72px);
  min-height: 100vh; min-height: 100svh; padding: 112px var(--pad-x) 76px; overflow: hidden;
  background: radial-gradient(55% 60% at 16% 34%, rgb(255 105 56 / .16), transparent 70%), radial-gradient(45% 50% at 92% 96%, rgb(216 223 138 / .09), transparent 70%), var(--ink);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 70% at 28% 42%, #000, transparent); mask-image: radial-gradient(70% 70% at 28% 42%, #000, transparent);
}
.hero > * { position: relative; }
.hero h1 { margin: 0 0 28px; font-size: clamp(64px, 8.4vw, 146px); font-weight: 800; line-height: .94; letter-spacing: -.012em; text-transform: uppercase; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--orange) 30%, var(--orange-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.asterisk { display: inline-block; margin-left: .18em; color: var(--lime); font-size: .46em; vertical-align: top; animation: spin 16s linear infinite; }
.hero-intro { margin: 0 0 10px; font-size: clamp(20px, 1.7vw, 26px); font-weight: 500; line-height: 1.3; }
.hero-sub { max-width: 46ch; margin: 0 0 30px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-xl { height: 58px; padding: 0 24px; border-radius: 18px; font-size: 15px; }
.hero-actions .btn-primary { gap: 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column; gap: 6px; }
.hero-stats b { font: 800 36px/1 var(--display); }
.hero-stats span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-art { position: relative; align-self: stretch; min-height: 520px; max-height: 780px; margin: 0; overflow: hidden; border-radius: 32px; background: var(--lime); box-shadow: 0 50px 90px -40px rgb(0 0 0 / .8); }
.hero-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-ball { transform-box: fill-box; transform-origin: center; animation: dribble 1.6s ease-in-out infinite; }
.art-shadow { transform-box: fill-box; transform-origin: center; animation: dribble-shadow 1.6s ease-in-out infinite; }
@keyframes dribble { 50% { transform: translate(-5px, -7px) scale(1.09); } }
@keyframes dribble-shadow { 50% { transform: translate(9px, 11px) scale(.92); opacity: .55; } }
.art-top, .art-bottom { position: absolute; z-index: 1; left: 24px; right: 24px; display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.art-top { top: 22px; }
.art-bottom { bottom: 20px; }
.court-sticker { position: absolute; z-index: 1; left: 26px; bottom: 62px; padding: 18px 24px; border-radius: 16px; background: var(--paper); color: var(--ink); font-size: 12.5px; line-height: 1.6; text-transform: uppercase; letter-spacing: .04em; box-shadow: 6px 8px 0 rgb(14 16 17 / .18); transform: rotate(-5deg); transition: transform .45s var(--ease); }
.court-sticker strong { font-size: 14px; }
.court-sticker span { margin-left: 22px; font-size: 26px; vertical-align: middle; }
.hero-art:hover .court-sticker { transform: rotate(-2deg) scale(1.03); }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--dim); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; transform: translateX(-50%); }
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(var(--orange), transparent); transform-origin: top; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* Nastro */
.ticker { overflow: hidden; padding: 16px 0; background: var(--orange); color: var(--ink); }
.ticker .marquee { animation-duration: 30s; }
.ticker span { padding-right: 18px; font: 800 26px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.ticker i { margin: 0 18px; font-style: normal; }

/* Prima di giocare */
.before { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 96px); padding: clamp(64px, 9vw, 120px) var(--pad-x); background: var(--paper); color: var(--ink); }
.before .eyebrow { color: #63685f; }
.before h2 { margin: 0 0 22px; font-size: clamp(44px, 5.4vw, 84px); font-weight: 800; line-height: .9; text-transform: uppercase; }
.before h2 span { color: var(--orange-deep); }
.before-copy > p:last-child { max-width: 40ch; margin: 0; color: #575c54; font-size: 15px; line-height: 1.7; }
.checklist { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 20px; padding: 22px 24px; border: 1px solid #dcdacf; border-radius: 22px; background: #fbfaf5; transition: transform .3s var(--ease), box-shadow .3s; }
.checklist li:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -26px rgb(14 16 17 / .45); }
.checklist b { color: var(--orange-deep); font: 800 34px/1 var(--display); }
.checklist div { color: #575c54; font-size: 14px; line-height: 1.6; }
.checklist strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }

/* Chiusura e footer */
.closing { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(40px, 6vw, 72px) var(--pad-x); background: var(--orange); color: var(--ink); }
.closing p { margin: 0; font: 800 clamp(48px, 8vw, 128px)/.88 var(--display); text-transform: uppercase; }
.closing-link { flex: none; display: grid; place-items: center; width: clamp(64px, 8vw, 112px); aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 50%; transition: background .25s, color .25s, transform .35s var(--ease); }
.closing-link .ico { width: 40%; height: 40%; stroke-width: 1.8; }
.closing-link:hover { background: var(--ink); color: var(--orange); transform: rotate(45deg); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 40px var(--pad-x); }
.site-footer p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.site-footer > span { color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }

/* Come funziona */
dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 34px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 28px; background: #131617; color: var(--paper); box-shadow: 0 40px 100px rgb(0 0 0 / .6); }
dialog[open] { animation: dialog-in .4s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
dialog::backdrop { background: rgb(6 8 9 / .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
dialog h2 { margin: 0 0 24px; font-size: 54px; font-weight: 800; line-height: .9; text-transform: uppercase; }
dialog h2 span { color: var(--orange); }
dialog p { color: var(--muted); font-size: 14px; line-height: 1.7; }
dialog a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.dialog-close { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; transition: background .2s, color .2s; }
.dialog-close:hover { background: var(--paper); color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.steps li { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgb(255 255 255 / .04); color: var(--muted); font-size: 13px; line-height: 1.5; }
.steps b { display: block; color: var(--orange); font: 800 30px/1 var(--display); }
.steps strong { display: block; margin: 8px 0 4px; color: var(--paper); font-size: 15px; }
.help-legend p { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
.help-legend strong { color: var(--paper); }
.pin-sample { position: relative; flex: none; width: 30px; height: 30px; margin: 0 4px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2); }
.pin-sample.approx::after { content: ''; position: absolute; inset: -7px; border: 1.5px dashed var(--paper); border-radius: 50%; }
.help-note { padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px !important; }
.help-keys { margin-bottom: 0; font-size: 12.5px !important; }

/* Responsive pagina */
@media (max-width: 1100px) {
  .location { display: none; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 104px; }
  .hero-art { min-height: 440px; }
  .scroll-cue { display: none; }
  .before { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { padding: 16px 18px; }
  .logo { font-size: 18px; }
  .logo svg { width: 28px; margin-right: 8px; }
  .site-nav { padding: 4px; }
  .site-nav a, .site-nav button { height: 36px; padding: 0 12px; }
  .site-nav .nav-extra, .nav-text { display: none; }
  .hero { gap: 34px; padding: 92px 18px 44px; }
  .hero h1 { font-size: clamp(54px, 17vw, 86px); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { gap: 14px 26px; margin-top: 32px; }
  .hero-stats b { font-size: 30px; }
  .hero-art { min-height: 380px; border-radius: 26px; }
  .art-bottom { display: none; }
  .court-sticker { left: 18px; bottom: 18px; padding: 14px 18px; }
  .ticker { padding: 12px 0; }
  .ticker span { font-size: 20px; }
  .before { padding: 56px 18px; }
  .checklist li { padding: 18px; }
  .closing { padding: 32px 18px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px 18px; }
  dialog { padding: 26px 22px; }
  dialog h2 { padding-right: 40px; font-size: 42px; }
  .steps { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .help-keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
