/* =========================
   INDEX (Login) — FANTAPRESIDENT
   ========================= */

:root{
  --gold: #FFD700;
  --ink:  #0b0b0b;
  --maxbox: 1000px;      /* lato max del riquadro su desktop */
  --radius: 2.2cqw;
}

/* sfondo + centratura verticale/orizzontale */
body{
  min-height: 100svh;
  margin: 0;
  background: center/cover no-repeat url('/images/background.png');
  display: grid;
  place-items: center;
}

/* contenitore QUADRATO */
.index-box{
  width: min(92vmin, var(--maxbox));
  height: min(92vmin, var(--maxbox));
  border-radius: var(--radius);
  overflow: hidden;
  /* immagine interna leggermente più bassa, proporzionale */
  background: #111 url('/images/BG_HOME.png') center 27% / cover no-repeat;
  box-shadow:
    0 12px 28px rgba(0,0,0,.12) inset,
    0 10px 28px rgba(0,0,0,.10);
  display: grid;
  /* header più compatto, form che parte prima */
  grid-template-rows: 32% 68%;
  container-type: inline-size; /* abilita cqw */
}

/* header (nessun box/gradient) */
.hero{
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 4cqw 3cqw 0;
  text-align: center;
  background: none;
}
.title{
  margin: 0 0 1.4cqw;
  color: var(--gold);
  font-weight: 1000;
  letter-spacing: .08cqw;
  font-size: 10cqw;         /* solo proporzionale */
  line-height: 1.02;
  text-shadow:
    -0.24cqw -0.24cqw 0 #000, 0.24cqw -0.24cqw 0 #000,
    -0.24cqw  0.24cqw 0 #000, 0.24cqw  0.24cqw 0 #000;
}
.taglines{
  color: var(--gold);
  font-weight: 900;
  font-size: 3.84cqw;       /* +20% rispetto a ~3.2cqw */
  text-shadow: 0 .2cqw .6cqw rgba(0,0,0,.55);
  line-height: 1.2;
}

/* pannello in basso — fisso, nessuno scroll */
.panel{
  display: grid;
  grid-template-rows: auto 1fr; /* (errore + form) */
  align-content: start;
  justify-items: center;
  gap: 2cqw;
  padding: 1.6cqw 3.6cqw 2.6cqw; /* meno spazio sopra */
  background: transparent;
  overflow: hidden; /* disattiva scroll */
}

/* form */
.form{
  display:grid;
  gap: 1.6cqw;
  width: 100%;
  justify-items: center;
  /* micro-shift complessivo se serve (0 = nessuno) */
  margin-top: 0;
}

/* CAMPI: 72% del contenitore */
.field{ width: 72%; }

/* Etichette: gialle e centrate */
.field label{
  display:block;
  color: var(--gold);
  text-align: center;
  font-weight: 900;
  letter-spacing: .04cqw;
  font-size: 4.2cqw;           /* proporzionale */
  margin: 0 0 .6cqw;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}

/* Spaziature individuali (tutto proporzionale) */
.form .field:nth-of-type(1){ margin-top: 1.2cqw; } /* Email un filo più in basso */
.form .field:nth-of-type(2){ margin-top: 2.0cqw; } /* Password più distanziata */
.form .btn-login{            margin-top: 2.4cqw; } /* ENTRA più giù */
.form .forgot{               margin-top: 1.8cqw; } /* link più giù */

/* input */
.control input{
  width: 100%;
  border-radius: 1.2cqw;
  border: .25cqw solid rgba(0,0,0,.22);
  background: #fff7cc;         /* giallo molto chiaro */
  padding: 1.6cqw 1.8cqw;
  font-weight: 900;
  font-size: 4.8cqw;           /* proporzionale */
  color: #111;
  outline: none;
  transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.control input::placeholder{ color: rgba(0,0,0,.45); }
.control input:focus{
  border-color: var(--gold);
  box-shadow: 0 0 0 .6cqw rgba(255,215,0,.28);
  background: #fff3b0;
}

/* error box */
.error{
  display:none; width: 72%;
  background:#fde2e1; color:#5f0b0b;
  font-weight: 900;
  border-radius: 1cqw;
  padding: 1cqw 1.2cqw;
  text-align:center;
  font-size: 2.8cqw;           /* proporzionale */
}
.error.show{ display:block; }

/* Pulsante ENTRA: larghezza 32%, font proporzionale */
.btn-login{
  appearance: none; cursor:pointer;
  width: 32%;
  border-radius: 1.2cqw;
  padding: 1.8cqw 2cqw;
  border: .35cqw solid var(--gold);
  background: var(--ink);
  color: var(--gold);
  font-weight: 1000;
  letter-spacing: .08cqw;
  text-transform: uppercase;
  font-size: 5cqw;             /* proporzionale */
  box-shadow: 0 .7cqw 0 #000, 0 1.8cqw 3.2cqw rgba(0,0,0,.35);
  transition: transform .06s ease, box-shadow .12s ease, filter .12s ease, opacity .12s ease;
}
.btn-login:hover{ filter: brightness(1.04); }
.btn-login:active{ transform: translateY(.2cqw); box-shadow: 0 .4cqw 0 #000, 0 1.2cqw 2.4cqw rgba(0,0,0,.30); }
.btn-login[disabled]{ opacity:.7; cursor:default; }

/* "Password dimenticata?" in nero */
.forgot{ text-align:center; }
.forgot a,
.forgot a:visited{
  color:#0b0b0b;
  text-decoration:none;
  font-weight:900;
  font-size: 2.8cqw;           /* proporzionale */
  text-shadow: none;
  opacity:.95;
}
.forgot a{
  color:#0b0b0b;
  font-size: 3.2cqw;           /* + */
  font-weight: 1000;
  text-shadow: 0 0.2cqw 0.6cqw rgba(255,255,255,.75); /* bordino chiaro */
}
.forgot a:hover{ text-decoration: underline; }

/* Popup recupero password */
#recovery-popup{
  display: none; /* gestito da JS (show/hide) */
}
.btn-recovery{
  width: auto;
  padding: .6em 1.1em;
  font-size: 1rem;
  border-radius: .6em;
}

/* micro-adjust su box ultra-piccoli */
@container (max-width: 340px){
  .form{ gap: 1.2cqw; }
  .field{ width: 78%; }
  .btn-login{ width: 38%; }
}
