/* Landing CASTEDDU — https://games.nubelab.it/gta (anche la pagina «nuova password»). */
@font-face { font-family: "Anton"; src: url("font/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("font/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --notte: #0d1424;
  --notte-2: #141d33;
  --mare: #2d6d9c;
  --tramonto: #f39a3c;
  --corallo: #e8634a;
  --sabbia: #f7e6c8;
  --testo: #f4f1ea;
  --testo-2: rgba(244, 241, 234, .72);
  --testo-3: rgba(244, 241, 234, .5);
  --vetro: rgba(12, 18, 32, .78);
  --bordo: rgba(255, 255, 255, .14);
  --errore: #ff8f7a;
  --raggio: 16px;
  --ombra: 0 24px 60px -20px rgba(0, 0, 0, .65);
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--notte);
  color: var(--testo);
  font: 400 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--tramonto); }
a:hover { color: #ffb868; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 3px solid var(--tramonto); outline-offset: 3px; border-radius: 6px; }

.salta { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--tramonto); color: #1a1108; padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.salta:focus { left: 8px; }

/* ---------------------------------------------------------------- barra */
.barra {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
}
.barra-nube { display: inline-flex; align-items: center; gap: 10px; color: var(--testo); text-decoration: none; font-size: 15px; letter-spacing: .01em; }
.barra-nube img { width: 28px; height: 28px; border-radius: 7px; }
.barra-nube b { font-weight: 700; color: var(--tramonto); }
.barra-nube:hover { color: #fff; }
.barra-link { display: flex; align-items: center; gap: 6px; }
.barra-link a { color: var(--testo); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 999px; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.barra-link a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.barra-link .barra-accedi { background: rgba(12, 18, 32, .55); border: 1px solid var(--bordo); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-shadow: none; }
@media (max-width: 560px) { .barra-link a:not(.barra-accedi) { display: none; } }

/* ---------------------------------------------------------------- eroe */
.eroe { position: relative; min-height: 100svh; display: flex; overflow: hidden; isolation: isolate; }
.eroe-sfondo, .eroe-sfondo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.eroe-sfondo img { object-fit: cover; object-position: 50% 45%; z-index: -2; }
.eroe-velo {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(13, 20, 36, .78) 0%, rgba(13, 20, 36, .35) 34%, rgba(13, 20, 36, 0) 52%, rgba(13, 20, 36, 0) 60%, rgba(13, 20, 36, .45) 100%),
    linear-gradient(180deg, rgba(13, 20, 36, .55) 0%, rgba(13, 20, 36, 0) 22%, rgba(13, 20, 36, 0) 70%, var(--notte) 100%);
}
.eroe-griglia {
  width: 100%; max-width: 1360px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr) 390px;
  grid-template-areas: "testo . scheda" "dettagli . scheda"; align-content: center; column-gap: 24px;
  padding: 104px var(--gutter) 64px;
}
.eroe-testo { grid-area: testo; align-self: end; }
.eroe-dettagli { grid-area: dettagli; align-self: start; }
.scheda { grid-area: scheda; align-self: center; }
.occhiello {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(243, 154, 60, .16); border: 1px solid rgba(243, 154, 60, .45);
  color: #ffd2a3; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.logo { width: min(100%, 440px); height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.sottotitolo { margin: 18px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--testo); text-shadow: 0 2px 12px rgba(0, 0, 0, .55); max-width: 30rem; }
.pillole { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pillole li { padding: 7px 14px; border-radius: 999px; background: rgba(12, 18, 32, .6); border: 1px solid var(--bordo); font-size: 14px; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pillole li::before { content: "●"; color: var(--tramonto); margin-right: 8px; font-size: 10px; vertical-align: 2px; }
.bottone.bottone-eroe { display: none; }

/* ---------------------------------------------------------------- scheda registrazione / accesso */
.scheda {
  background: var(--vetro); border: 1px solid var(--bordo); border-radius: 20px; box-shadow: var(--ombra);
  padding: 22px; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  scroll-margin-top: 20px;
}
.schede-tab { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .06); border-radius: 12px; margin-bottom: 18px; }
.schede-tab button {
  appearance: none; border: 0; background: transparent; color: var(--testo-2); font: 600 14px/1 "Inter", sans-serif;
  padding: 11px 8px; border-radius: 9px; cursor: pointer; min-height: 40px;
}
.schede-tab button[aria-selected="true"] { background: var(--testo); color: #111827; }
.schede-tab button:not([aria-selected="true"]):hover { color: var(--testo); background: rgba(255, 255, 255, .06); }
.scheda-titolo { font-family: "Anton", "Inter", sans-serif; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; margin: 0 0 14px; line-height: 1.15; }
.campo { display: block; margin-bottom: 12px; }
.campo > span:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--testo); }
.campo em { font-style: normal; font-weight: 400; color: var(--testo-3); }
.campo input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .28); color: var(--testo); font: 400 16px/1.2 "Inter", sans-serif; outline: none;
  transition: border-color .15s, background .15s;
}
.campo input::placeholder { color: rgba(244, 241, 234, .35); }
.campo input:focus { border-color: var(--tramonto); background: rgba(0, 0, 0, .4); }
.campo input[aria-invalid="true"] { border-color: var(--errore); }
.pw { position: relative; display: block; }
.pw input { padding-right: 84px; }
.mostra {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); appearance: none; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: var(--testo-2); font: 600 12px/1 "Inter", sans-serif; padding: 9px 10px; border-radius: 8px;
}
.mostra:hover { color: var(--testo); background: rgba(255, 255, 255, .14); }
.consenso { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.45; color: var(--testo-2); margin: 4px 0 2px; cursor: pointer; }
.consenso input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tramonto); cursor: pointer; }
.errore { display: block; min-height: 0; color: var(--errore); font-size: 12.5px; margin-top: 5px; }
.errore:empty { display: none; }
.esito { margin: 10px 0 0; font-size: 14px; color: var(--errore); }
.esito:empty { display: none; }
.esito.ok { color: #9fe3b0; }
.bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 14px;
  padding: 12px 20px; border-radius: 14px; border: 2px solid #3a1c0c; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, #ffb35c 0%, var(--tramonto) 45%, var(--corallo) 100%);
  color: #23110a; font: 400 21px/1 "Anton", "Inter", sans-serif; letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 0 3px 0 #3a1c0c, 0 12px 28px -10px rgba(232, 99, 74, .8); transition: transform .12s, filter .12s;
}
.bottone:hover { filter: brightness(1.06); color: #23110a; }
.bottone:active { transform: translateY(2px); box-shadow: 0 1px 0 #3a1c0c; }
.bottone[disabled] { filter: grayscale(.4) brightness(.8); cursor: progress; }
.nota { margin: 12px 0 0; font-size: 13px; color: var(--testo-3); text-align: center; }
.link-dimenticata { display: block; margin: 14px auto 0; appearance: none; border: 0; background: none; color: var(--testo-2); font: 600 13px "Inter", sans-serif; text-decoration: underline; cursor: pointer; padding: 6px; }
.link-dimenticata:hover { color: var(--testo); }
.dimenticata { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: 13.5px; line-height: 1.5; color: var(--testo-2); }

/* ---------------------------------------------------------------- sezioni */
.contenitore { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.sezione { padding: clamp(56px, 8vw, 104px) 0; }
.sezione h2 { font-family: "Anton", "Inter", sans-serif; font-weight: 400; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; }
.sezione h2::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--tramonto), var(--corallo)); }
.sezione-intro { margin: 16px 0 0; color: var(--testo-2); font-size: 17px; max-width: 40rem; }
.sezione-intro.larga { max-width: 52rem; }

.video { margin-top: 32px; border-radius: var(--raggio); overflow: hidden; background: #000; box-shadow: var(--ombra); border: 1px solid var(--bordo); }
.video video { width: 100%; height: auto; }
.video-verticale { display: none; max-width: 420px; margin-left: auto; margin-right: auto; }

.sezione-gioco { background: linear-gradient(180deg, var(--notte) 0%, var(--notte-2) 100%); }
.foto { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.foto li { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--raggio); overflow: hidden; }
.foto img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #1b2540; }
.foto h3 { font-family: "Anton", "Inter", sans-serif; font-weight: 400; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; margin: 16px 18px 0; }
.foto p { margin: 6px 18px 18px; color: var(--testo-2); font-size: 15px; }

.sezione-finale { text-align: center; background: radial-gradient(120% 90% at 50% 100%, rgba(243, 154, 60, .28) 0%, rgba(232, 99, 74, .1) 40%, rgba(13, 20, 36, 0) 70%), var(--notte-2); }
.sezione-finale h2::after { margin-left: auto; margin-right: auto; }
.sezione-finale .sezione-intro { margin-left: auto; margin-right: auto; }
.sezione-finale .bottone { width: auto; min-width: 280px; margin-top: 28px; }

.piede { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); background: #0a0f1c; color: var(--testo-3); font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.piede p { margin: 0 0 8px; }
.piede a { color: var(--testo-2); }
.piede a:hover { color: var(--testo); }
.crediti { font-size: 12px; line-height: 1.6; }

/* ---------------------------------------------------------------- contatti (in fondo alla landing e /gta/contatti) */
.sezione-contatti { background: linear-gradient(180deg, var(--notte-2) 0%, var(--notte) 100%); border-top: 1px solid rgba(255, 255, 255, .06); }
.contatti-griglia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 28px 56px; align-items: start; }
.contatti-testo { padding-top: 4px; }
.contatti-alt { margin: 16px 0 0; color: var(--testo-2); font-size: 15px; line-height: 1.55; max-width: 34rem; }
.contatti-alt strong { color: var(--testo); }
.contatti-griglia .scheda.scheda-contatti { grid-area: auto; align-self: start; width: 100%; max-width: none; margin: 0; }
.campo textarea {
  display: block; width: 100%; min-height: 150px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .28); color: var(--testo); font: 400 16px/1.45 "Inter", sans-serif; outline: none; resize: vertical;
  transition: border-color .15s, background .15s;
}
.campo textarea::placeholder { color: rgba(244, 241, 234, .35); }
.campo textarea:focus { border-color: var(--tramonto); background: rgba(0, 0, 0, .4); }
.campo textarea[aria-invalid="true"] { border-color: var(--errore); }
.campo .conta { font-variant-numeric: tabular-nums; }
.campo .conta.quasi { color: var(--tramonto); }
/* campo trappola: fuori dallo schermo, mai raggiungibile col tasto Tab né letto dai lettori di schermo (aria-hidden) */
.trappola { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.nota-contatto { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--testo-2); }
.modulo-contatto .bottone { margin-top: 12px; }
.contatto-ok { text-align: center; padding: 18px 6px 6px; outline: none; }
.contatto-ok .scheda-titolo { font-size: 28px; margin: 0 0 10px; }
.contatto-ok p { color: var(--testo); font-size: 17px; margin: 0; }
.contatto-ok .spunta-ok { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 6px; border-radius: 50%; background: #2f8f5b; color: #fff; font: 700 20px/1 "Inter", sans-serif; vertical-align: 4px; }
.centro .scheda.scheda-larga { width: min(100%, 560px); }
.scheda-larga > .scheda-titolo { text-align: center; font-size: 30px; }
.scheda-larga > .contatti-alt { margin: 0 0 18px; font-size: 14.5px; }

/* ---------------------------------------------------------------- pagina semplice (nuova password) */
.pagina-semplice { min-height: 100svh; background: radial-gradient(100% 70% at 50% 0%, rgba(243, 154, 60, .25), rgba(13, 20, 36, 0) 60%), var(--notte); }
.centro { min-height: 100svh; display: grid; place-items: center; padding: 96px 16px 40px; }
.centro .scheda { width: min(100%, 420px); }
.logo-piccolo { width: 220px; height: auto; margin: 0 auto 18px; }

/* ---------------------------------------------------------------- schermi medi e telefono */
@media (max-width: 1100px) {
  /* in alto la copertina intera con il protagonista libero: sopra solo occhiello e logo, in fondo il pulsante */
  .eroe { min-height: auto; display: block; }
  .eroe-sfondo { position: absolute; inset: 0 0 auto 0; height: 100svh; }
  .eroe-sfondo img { height: 100svh; object-position: 50% 50%; }
  .eroe-velo {
    height: 100svh;
    background: linear-gradient(180deg, rgba(13, 20, 36, .7) 0%, rgba(13, 20, 36, .15) 30%, rgba(13, 20, 36, 0) 45%, rgba(13, 20, 36, 0) 72%, rgba(13, 20, 36, .55) 90%, var(--notte) 100%);
  }
  .eroe-griglia { grid-template-columns: 1fr; grid-template-areas: "testo" "dettagli" "scheda"; padding-top: 84px; row-gap: 0; }
  .eroe-testo { min-height: calc(100svh - 84px - 28px); display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; }
  .eroe-testo h1 { order: 1; }
  .eroe-testo .occhiello { order: 2; margin: auto 0 12px; }   /* in basso con il pulsante: la Sella resta libera */
  .bottone.bottone-eroe { order: 3; display: inline-flex; width: auto; margin-top: 0; padding: 12px 28px; }
  .eroe-dettagli { padding: 28px 0 8px; }
  .scheda { width: 100%; max-width: 520px; margin: 22px auto 0; justify-self: center; }
  .foto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contatti-griglia { grid-template-columns: 1fr; }
  .contatti-griglia .scheda.scheda-contatti { max-width: 620px; margin: 0; justify-self: stretch; }
}
@media (max-width: 760px) {
  .video-orizzontale { display: none; }
  .video-verticale { display: block; }
  .foto { grid-template-columns: 1fr; gap: 16px; }
  .logo { width: min(78%, 300px); }
  .scheda { padding: 18px; border-radius: 18px; }
  .sottotitolo { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bottone { transition: none; }
}
