/**
 * BridgeWorks — Registrazione candidati
 * Layout split: rail brand a sinistra + form compatto a destra,
 * su sfondo con immagine leggera. Pensato per stare in una schermata.
 */

body.candidate-register-page {
  min-height: 100vh;
  background: var(--bianco);
}

/* Immagine di sfondo leggera, come nell'header della home.
   Specificità alta per battere `body.home-landing:not(.candidate-area)::before { display:none }`. */
html body.home-landing.candidate-register-page::before {
  content: "";
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(248, 250, 249, 0.82) 0%, rgba(255, 255, 255, 0.74) 50%, rgba(245, 248, 246, 0.84) 100%),
    url("https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1200&h=800&fit=crop&q=80");
  background-size: cover;
  background-position: 72% center;
  background-repeat: no-repeat;
  opacity: 1;
}

body.candidate-register-page .fade-up {
  opacity: 1;
  transform: none;
}

.cr-reg-page {
  position: relative;
  z-index: 1;
  padding: calc(var(--home-nav-height) + 1.4rem) var(--home-gutter) 1.6rem;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cr-reg-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* ---- Back link ---- */
.cr-reg-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--verde-m);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.cr-reg-back:hover {
  color: var(--verde);
  gap: 0.55rem;
}

/* ---- Intestazione card ---- */
.cr-reg-cardhead {
  margin-bottom: 0.95rem;
  text-align: center;
}

.cr-reg-cardhead .section-label {
  justify-content: center;
}

.cr-reg-cardhead .section-label::after {
  display: none;
}

.cr-reg-title {
  font-family: var(--bw-font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--verde);
  margin: 0 0 0.4rem;
}

.cr-reg-lead {
  margin: 0 auto;
  max-width: 30rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--grigio);
  font-weight: 400;
}

.cr-reg-lead strong {
  color: var(--verde);
  font-weight: 600;
}

/* ---- Card form ---- */
.cr-reg-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 70px -30px rgba(42, 92, 71, 0.35);
  padding: 1.4rem 1.8rem;
  display: flex;
  flex-direction: column;
}

.cr-reg-hint {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--verde);
  background: rgba(106, 171, 138, 0.12);
  border: 1px solid rgba(106, 171, 138, 0.28);
  border-radius: var(--radius);
}

.cr-reg-alert {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}

.cr-reg-alert--error {
  background: rgba(184, 114, 98, 0.12);
  color: #7a3d32;
  border: 1px solid rgba(184, 114, 98, 0.28);
}

.cr-reg-form {
  position: relative;
}

.cr-reg-grid {
  display: grid;
  gap: 0.55rem 1rem;
}

@media (min-width: 560px) {
  .cr-reg-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cr-reg-grid .cr-field:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.cr-reg-grid--pair {
  margin-top: 0.55rem;
}

.cr-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cr-field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--grigio);
}

.cr-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.8rem;
  border-radius: 11px;
  border: 1.5px solid rgba(42, 92, 71, 0.14);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--nero);
  background: #fff;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.cr-field input::placeholder {
  color: rgba(107, 107, 96, 0.5);
}

.cr-field input:focus {
  outline: none;
  border-color: var(--verde-l);
  box-shadow: 0 0 0 3px rgba(106, 171, 138, 0.18);
}

.cr-reg-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--grigio);
  font-weight: 400;
  cursor: pointer;
}

.cr-reg-check input {
  margin-top: 0.18rem;
  flex-shrink: 0;
  accent-color: var(--verde-m);
}

.cr-reg-check a {
  color: var(--verde-m);
  font-weight: 600;
  text-decoration: none;
}

.cr-reg-check a:hover {
  text-decoration: underline;
}

.cr-reg-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cr-reg-submit {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.78rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-m) 100%);
  box-shadow: 0 14px 28px -14px rgba(42, 92, 71, 0.55);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cr-reg-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -14px rgba(42, 92, 71, 0.6);
}

.cr-reg-submit:focus-visible,
.cr-reg-back:focus-visible {
  outline: 2px solid var(--verde-l);
  outline-offset: 3px;
}

.cr-reg-foot {
  margin: 0.75rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(42, 92, 71, 0.08);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--grigio);
  line-height: 1.55;
}

.cr-reg-foot a,
.cr-reg-foot button.bw-cc-open-link {
  color: var(--verde-m);
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.cr-reg-foot a:hover,
.cr-reg-foot button.bw-cc-open-link:hover {
  color: var(--verde);
  text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .cr-reg-page {
    min-height: 0;
    align-items: flex-start;
    padding: calc(var(--home-nav-height) + 1.2rem) var(--home-inset) 2.5rem;
  }
}

@media (max-width: 559px) {
  .cr-reg-grid--pair {
    grid-template-columns: 1fr;
  }

  .cr-reg-card {
    padding: 1.5rem 1.3rem;
  }
}
