/* EquiPro — pagina di accesso e registrazione.

   Stesso stile della pagina iniziale: a sinistra la foto con il motto, a
   destra il modulo su carta avorio. I nomi dei campi e dei bottoni restano
   quelli di auth.js; qui cambia solo l'aspetto. */

.auth-body {
  --paper:      #FBF8F2;
  --ivory:      #FFFDF9;
  --edge:       #E2D8C6;
  --ink:        #14241A;
  --muted:      #7C7062;
  --gold:       #C9A84C;
  --gold-soft:  #D9C08A;
  --leather:    #6E4B33;
  --leather-dk: #5A3C28;
  --ease:       cubic-bezier(.2, .7, .2, 1);
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: "lnum" 1;
}

.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; min-height: 100svh; }

/* ── lato con la foto ─────────────────────────────────────────────────── */

.auth-side {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 38px 48px 36px; color: var(--cream); background: var(--ink);
}
.auth-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 1.2s var(--ease);
  animation: auth-zoom 16s var(--ease) both;
}
.auth-photo.is-login { object-position: 50% 40%; }
.auth-photo.is-register { opacity: 0; object-position: 50% 55%; }
.is-register .auth-photo.is-login { opacity: 0; }
.is-register .auth-photo.is-register { opacity: 1; }
@keyframes auth-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.auth-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 36, 26, .94) 0%, rgba(20, 36, 26, .5) 48%, rgba(20, 36, 26, .62) 100%);
}
.auth-brand, .auth-quote, .auth-motto { position: relative; z-index: 1; }

.auth-brand { display: inline-flex; align-items: center; gap: 13px; align-self: flex-start; color: var(--cream); text-decoration: none; }
.auth-brand img { height: 42px; width: auto; }
.auth-brand span { font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: .03em; }

.auth-quote { max-width: 540px; animation: auth-rise 1.1s var(--ease) .15s backwards; }
.auth-eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-soft);
}
.auth-eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .6; }
.auth-quote h1 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.01em;
  font-size: clamp(44px, 4.9vw, 78px); line-height: 1.02; margin: 22px 0 18px;
}
.auth-quote h1 em { display: block; font-style: italic; color: var(--gold-soft); }
.auth-lead { max-width: 430px; font-size: 16px; font-weight: 300; line-height: 1.65; color: rgba(245, 240, 232, .85); }
.auth-motto { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: rgba(245, 240, 232, .58); }

/* ── lato del modulo ──────────────────────────────────────────────────── */

.auth-main { position: relative; display: flex; align-items: center; justify-content: center; padding: 96px 56px 64px; }
.auth-back {
  position: absolute; top: 36px; right: 48px;
  font-size: 12px; letter-spacing: .06em; color: var(--muted); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color .3s, border-color .3s;
}
.auth-back:hover { color: var(--ink); border-color: currentColor; }
.auth-box { width: 100%; max-width: 450px; animation: auth-rise .9s var(--ease) backwards; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Accedi / Registrati: due voci con la riga oro sotto quella scelta */
.auth-body .tabs {
  display: flex; gap: 34px; margin: 0 0 36px; padding: 0;
  background: none; border-radius: 0; border-bottom: 1px solid var(--edge);
}
.auth-body .tabs button {
  height: auto; padding: 0 0 14px; margin-bottom: -1px; border-radius: 0;
  font-size: 11.5px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid transparent;
  transition: color .3s, border-color .3s;
}
.auth-body .tabs button:hover { color: var(--ink); }
.auth-body .tabs button[aria-selected="true"] {
  background: none; box-shadow: none; font-weight: 400; color: var(--ink); border-bottom-color: var(--gold);
}
.auth-body .tabs button:focus-visible, .auth-body .role:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.auth-box h2 { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1.02; color: var(--ink); margin-bottom: 10px; }
.auth-box .panel-sub { font-size: 14.5px; font-weight: 300; line-height: 1.6; color: var(--muted); margin-bottom: 32px; }

/* campi */
.auth-body .field { margin-bottom: 20px; }
.auth-body .field > label:not(.consent), .auth-body .fieldset-label {
  font-size: 10.5px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 9px;
}
.auth-body .field input:not([type="checkbox"]), .auth-body .field select {
  height: 50px; padding: 0 16px; border: 1px solid var(--edge); border-radius: 3px;
  background-color: var(--ivory); font-family: var(--sans); font-size: 15px; color: var(--ink);
  transition: border-color .3s, box-shadow .3s;
}
.auth-body .field select { padding-right: 42px; }
.auth-body .field input::placeholder { color: #B3A793; font-weight: 300; }
.auth-body .field input:focus, .auth-body .field select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, .16);
}
.auth-body .field-hint { font-size: 12px; font-weight: 300; margin-top: 7px; }
.auth-body .field-error { font-size: 12.5px; margin-top: 7px; }

/* password con "Mostra" */
.pwd { position: relative; }
.auth-body .field .pwd input { padding-right: 96px; }
.pwd-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: color .3s, background .3s;
}
.pwd-toggle:hover { color: var(--ink); background: rgba(20, 36, 26, .05); }

/* chi sei: tre biglietti da scegliere */
.auth-body .roles { gap: 10px; }
.auth-body .role {
  position: relative; display: block; min-height: 0; padding: 16px 30px 15px 16px;
  background: var(--ivory); border: 1px solid var(--edge); border-radius: 3px; text-align: left;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.auth-body .role:hover { border-color: #CDBFA6; transform: translateY(-1px); }
.auth-body .role::after {
  content: ""; position: absolute; top: 14px; right: 12px;
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid #CDBFA6;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.auth-body .role[aria-pressed="true"] { background: #FFFDF6; border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.auth-body .role[aria-pressed="true"]::after { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 3px #FFFDF6; }
.auth-body .role-text { display: block; }
.auth-body .role b { display: block; font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.1; color: var(--ink); }
.auth-body .role-text > span { display: block; margin-top: 6px; font-size: 12px; font-weight: 300; line-height: 1.4; color: var(--muted); }

/* consenso */
.auth-body .field > label.consent { gap: 12px; font-size: 13px; font-weight: 300; line-height: 1.55; }
.auth-body .consent a { color: var(--leather); text-decoration: underline; text-underline-offset: 2px; }
.auth-body .consent input[type="checkbox"] { accent-color: var(--leather); margin-top: 2px; }

/* bottone e riga sotto */
.auth-body .btn-primary {
  height: 52px; margin-top: 10px; border-radius: 999px;
  background: var(--leather); color: var(--cream);
  font-size: 13px; font-weight: 500; letter-spacing: .06em;
  transition: background .3s, opacity .3s;
}
.auth-body .btn-primary:hover:not(:disabled) { background: var(--leather-dk); }
.auth-body .btn-primary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.auth-body .switch-line { margin-top: 24px; font-size: 13.5px; font-weight: 300; color: var(--muted); }
.auth-body .switch-line button {
  color: var(--ink); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--gold); padding-bottom: 1px; margin-left: 4px;
}

/* avvisi */
.auth-body .alert { border-radius: 3px; font-size: 13.5px; margin-bottom: 20px; }
.auth-body .invite-card {
  margin-bottom: 30px; padding: 16px 18px; border-radius: 3px;
  background: var(--ivory); border: 1px solid var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold);
}
.auth-body .invite-card .eyebrow { color: var(--leather); letter-spacing: .2em; }
.auth-body .invite-text { font-size: 14px; font-weight: 300; line-height: 1.6; }
.auth-body .invite-text b { font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .auth-photo, .auth-quote, .auth-box { animation: none; }
}

/* ── tablet e telefono: la foto diventa una fascia in alto ────────────── */

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { position: relative; height: auto; min-height: 250px; padding: 22px 20px 26px; gap: 34px; }
  .auth-brand img { height: 30px; }
  .auth-brand span { font-size: 22px; }
  .auth-quote h1 { font-size: 40px; margin: 14px 0 0; }
  .auth-lead, .auth-motto { display: none; }
  .auth-main { flex-direction: column; align-items: stretch; padding: 22px 20px 52px; }
  .auth-back { position: static; align-self: flex-end; margin-bottom: 26px; }
  .auth-box { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .auth-box h2 { font-size: 38px; }
  .auth-body .roles { grid-template-columns: minmax(0, 1fr); }
  .auth-body .role { padding: 14px 40px 14px 16px; }
  .auth-body .role::after { top: 50%; margin-top: -7px; }
  .auth-body .role-text { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
  .auth-body .role b { font-size: 20px; }
  .auth-body .role-text > span { margin-top: 0; }
}

/* ── ritocchi ─────────────────────────────────────────────────────────── */

/* Accedi e Registrati partono dallo stesso punto: cambiando scheda la pagina non salta */
.auth-main { align-items: flex-start; padding-top: clamp(96px, 15vh, 150px); }
.auth-box { max-width: 470px; }

/* tre biglietti larghi uguali: il pallino sta sopra al nome, non accanto */
.auth-body .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.auth-body .role { padding: 14px 14px 13px; }
.auth-body .role::after { top: 12px; right: 12px; width: 12px; height: 12px; }
.auth-body .role b { font-size: 19px; margin-top: 18px; }
@media (max-width: 900px) {
  .auth-main { padding-top: 22px; }
}
@media (max-width: 560px) {
  .auth-body .roles { grid-template-columns: minmax(0, 1fr); }
  .auth-body .role { padding: 14px 40px 14px 16px; }
  .auth-body .role b { margin-top: 0; }
}
/* il contenuto dei biglietti parte dall'alto, anche se le descrizioni vanno a capo */
.auth-body .role { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
