/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
  --red:        #D01010;
  --red-dark:   #a80d0d;
  --blue-dark:  #1C3A6A;
  --blue-mid:   #2a5298;
  --blue-light: #4A9FD4;
  --gray:       #6B6B6B;
  --gray-light: #e5e7eb;
  --bg-light:   #f8f9fa;
  --bg-dark:    #111827;
  --white:      #ffffff;
  --text:       #1f2937;
  --text-muted: #6b7280;

  --font: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --transition: .25s ease;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===========================
   LAYOUT
   =========================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow { max-width: 760px; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(208,16,16,.35);
}
.btn--primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(208,16,16,.45);
  text-decoration: none;
}
.btn--full { width: 100%; }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Spinner inside button */
.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.loading .btn__text { display: none; }
.btn.loading .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 50%, var(--blue-light) 100%);
  overflow: hidden;
  padding: 2rem 1.5rem 6rem;
}

/* Subtle geometric background pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 58, 106, .15);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeUp .8s ease both;
}

.hero__logo {
  width: clamp(160px, 35vw, 280px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--white);
  padding: 1rem 1.5rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,.85);
  max-width: 520px;
  font-weight: 300;
}

.hero__wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.hero__wave svg { width: 100%; height: 80px; }

/* ===========================
   SECTIONS
   =========================== */
.section {
  padding: 5rem 0;
}
.section--light  { background: var(--bg-light); }
.section--white  { background: var(--white); }
.section--dark   { background: var(--bg-dark); color: var(--white); }

.section__label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .75rem;
}
.section--dark .section__label { color: var(--blue-light); }

.section__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}

.section__text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 2.5rem;
}
.section--dark .section__text { color: rgba(255,255,255,.7); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(208,16,16,.1);
  color: var(--red);
  border: 1px solid rgba(208,16,16,.2);
  border-radius: 50px;
  padding: .3rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.badge::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}

/* ===========================
   INFO CARDS
   =========================== */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.info-card__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.info-card strong {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .3rem;
}

.info-card p, .info-card a {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.info-card a:hover { color: var(--red); }

/* ===========================
   FORM
   =========================== */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form__group--privacy {
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.form__label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form__input:focus,
.form__textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(74,159,212,.15);
}
.form__input.error,
.form__textarea.error {
  border-color: var(--red);
}
.form__textarea { resize: vertical; min-height: 120px; }

.form__error {
  font-size: .8rem;
  color: var(--red);
  min-height: 1rem;
}

.form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.form__checkbox-label input[type="checkbox"] {
  margin-top: .15rem;
  flex-shrink: 0;
  accent-color: var(--red);
  width: 16px; height: 16px;
  cursor: pointer;
}

.form__submit { margin-top: .5rem; }

.form__status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  display: none;
}
.form__status.success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.form__status.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ===========================
   GESTORE CARD
   =========================== */
.gestore-card {
  display: flex;
  align-items: center;
  gap: 3rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 700px;
  margin: 0 auto;
  backdrop-filter: blur(8px);
}

.gestore-card__logo {
  width: clamp(140px, 25vw, 200px);
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--white);
  padding: .75rem 1rem;
}

.gestore-card__info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .2rem;
}

.gestore-card__info > p {
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  margin-bottom: 1.25rem;
}

.gestore-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .9rem;
  color: rgba(255,255,255,.8);
}
.gestore-card__list a {
  color: var(--blue-light);
  transition: color var(--transition);
}
.gestore-card__list a:hover { color: var(--white); text-decoration: none; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: #0a0f1a;
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .85rem;
}
.footer__sub { margin-top: .4rem; }
.footer a { color: var(--blue-light); }
.footer a:hover { color: var(--white); }

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Honeypot — invisibile agli utenti, visibile ai bot */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  tab-size: 0;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .form__row { grid-template-columns: 1fr; }

  .gestore-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
  .gestore-card__list { align-items: center; }

  .section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .hero { padding-bottom: 5rem; }
  .hero__logo { width: 200px; }
}
