/* Pagine di iscrizione (/join, /register): stessa identity della landing */
:root {
  --primary: #190D37;
  --primary-deep: #0a0517;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, .72);
  --white-faint: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .28);
  --error: #ffb4b4;
  --serif: "freight-display-pro", "Cormorant Garamond", Georgia, serif;
  --sans: "Poppins", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--primary);
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(ellipse at 50% 120%, var(--primary-deep) 0%, rgba(10,5,23,0) 70%);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

header {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(28px, 5vh, 56px) 16px 0;
}

header img {
  height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  padding: 40px 16px 56px;
  text-align: center;
}

.eyebrow {
  font-family: var(--serif);
  font-weight: 400;
  font-variant-numeric: lining-nums;
  font-size: clamp(.85rem, 1.4vw, 1rem);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--white-soft);
}

h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  line-height: 1;
  letter-spacing: .06em;
  padding-left: .06em;
  margin: .35em 0 .3em;
}

/* WITH alcohol · with NO alcohol · with LOW alcohol */
.trio {
  margin: -.2em 0 1.4em;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--white-soft);
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.45;
  color: var(--white-soft);
}

.divider {
  width: 64px;
  height: 1px;
  background: var(--line);
  margin: 32px auto;
}

/* --- form --- */

form { text-align: left; }

.field { margin-bottom: 26px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--white-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  font: 400 1rem/1.5 var(--sans);
  color: var(--white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color .2s;
}

.field textarea { resize: vertical; min-height: 76px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--white-faint); }

.field input:focus,
.field textarea:focus { border-bottom-color: var(--white); }

.field input[readonly] { color: var(--white-soft); cursor: default; }
.field input[readonly]:focus { border-bottom-color: var(--line); }

.field .hint { margin-top: 6px; font-size: .75rem; color: var(--white-faint); }

.field.invalid input,
.field.invalid textarea { border-bottom-color: var(--error); }

.field .error,
.check .error { display: none; margin-top: 6px; font-size: .78rem; color: var(--error); }
.field.invalid .error,
.check.invalid .error { display: block; }

/* checkbox privacy */
.check { margin: 8px 0 32px; }

.check label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--white-soft);
  cursor: pointer;
}

.check input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--white-soft);
  border-radius: 3px;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.check input:checked { background: var(--white); border-color: var(--white); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.check.invalid input { border-color: var(--error); }

.check a, .note a { color: var(--white); text-underline-offset: 3px; }

/* campo trappola per i bot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block;
  width: 100%;
  padding: 17px 30px 15px;
  font: 600 .78rem/1 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--primary);
  background: var(--white);
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.btn.ghost { color: var(--white); background: transparent; border: 1px solid var(--line); }

.form-error {
  display: none;
  margin-top: 18px;
  font-size: .85rem;
  color: var(--error);
  text-align: center;
}
.form-error.show { display: block; }

.note {
  margin-top: 24px;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--white-faint);
  text-align: center;
}

/* stati della pagina (form / successo / errore link) */
[hidden] { display: none !important; }

.state p + p { margin-top: 14px; }
.state .btn { margin-top: 32px; width: auto; }

.dev-link {
  margin-top: 24px;
  padding: 12px;
  font-size: .75rem;
  word-break: break-all;
  border: 1px dashed var(--line);
  border-radius: 6px;
}
.dev-link a { color: var(--white); }

footer {
  width: 100%;
  padding: 24px 16px 32px;
  text-align: center;
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--white-soft);
}

.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.eyebrow a:hover { color: var(--white); border-color: var(--white); }

footer a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
footer a:hover { color: var(--white); border-color: var(--white); }

.fade { opacity: 0; transform: translateY(14px); animation: in 1s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .35s; }
@keyframes in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; opacity: 1; transform: none; } }
