:root {
  --accent-primary: #ff3f3f;     /* rosso Phonetastico */
  --accent-secondary: #f3be8d;   /* arancione / giallo caldo */
  --bg: #0a0a0a;                 /* sfondo scuro */
  --text-light: #ffffff;
  --text-muted: #bdbdbd;
}

/* base */
html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text-light);
  font-family: Inter, system-ui, Arial;
  overflow: hidden;
}

.gradient-title {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}

/* progress bar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 50;
}
.topbar .fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width .3s ease;
}

.scrolla {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.4);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-muted);
  z-index: 50;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* logo */
.phonetastico-logo {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.phonetastico-logo img { height: 100px; }
.phonetastico-logo h2 { margin: 0; font-size: 34px; }
.phonetastico-logo p {
  margin: 10px 0px 0px 0px;
  font-size: 14px;
  color: var(--text-muted);
}

/* scroll container */
.snap-wrap {
  height: 100vh;
  overflow: hidden; /* gestito da JS */
}
section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  box-sizing: border-box;
  flex-direction: column;
}

/* card migliorata */
.card {
  max-width: 900px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06); /* leggermente più chiara per contrasto */
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65); /* ombra più profonda e morbida */
  backdrop-filter: blur(8px); /* effetto vetro satinato */
  border: 1px solid rgba(255, 255, 255, 0.08); /* sottile bordo luminoso */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

/* effetto hover */
.card:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
}

/* titoli dentro la card */
h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(26px, 4vw, 42px);
  background: linear-gradient(90deg, #ff6b6b, #ffd56b); /* gradiente figo */
  -webkit-background-clip: text;
  color: transparent;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(20px, 3.5vw, 36px);
  background: linear-gradient(90deg, #ff7f50, #ffb347); /* piccolo gradiente */
  -webkit-background-clip: text;
  color: transparent;
}

/* paragrafi */
p.lead {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

/* steps dentro card */
.steps .step {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform 0.3s ease, background 0.3s ease;
}
.steps .step:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
}

/* quick-start */
.quick-start {
  display: flex;
  gap: 12px;
  align-items: center;
}
.quick-start input { flex: 1; }

/* steps */
.steps {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.step {
  flex: 1;
  min-width: 150px;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

/* form */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input, textarea, select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text-light);
  outline: none;
  font-size: inherit;
}
textarea {
  resize: none; /* impedisce di allargare o rimpicciolire la textarea */
  height: 250px;
  font-family: inherit;
}
button {
  padding: 12px;
  border-radius: 10px;
  border: 0;
  background: var(--accent-primary);
  color: var(--text-light);
  font-weight: 700;
  cursor: pointer;
}
button:hover {
  opacity: 0.85;
  transition: opacity .2s;
}
.form-actions { display: flex; gap: 8px; }

@media (max-width: 640px) {
  .card { padding: 1rem; }
}

input.error, textarea.error, select.error {
  border: 1px solid red;
  outline: none; /* rimuove eventuali highlight predefiniti */
}

/* steps responsive (collassabili su mobile) */
@media (max-width: 768px) {
  .steps{
    flex-direction: column;
  }
  .card{
    width: 100%;
  }
  #s-hero{
    padding: 15px;
  }
  
  #s-how{
    padding: 15px;
  }
  .card-how{
    height: fit-content;
  }
  .steps .step {
    cursor: pointer;
    margin-bottom: 8px;
    border-radius: 10px;
    transition: background 0.3s ease;
  }

  .steps .step .muted {
    max-height: 0;
    overflow: hidden;
    padding: 0 0;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    border-top: 0 solid rgba(255, 255, 255, 0.1);
  }

  .steps .step.open .muted {
    max-height: 1000px; /* abbastanza grande da contenere il testo */
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .steps .step:hover {
    background: rgba(255,255,255,0.03);
  }

  #s-form{
    padding: 15px;
  }
  .card-form{
    height: 92vh;
  }
  textarea {
  resize: none; /* impedisce di allargare o rimpicciolire la textarea */
  height: 150px;
  font-family: inherit;
  }

  #s-final{
    padding: 15px;
  }
}

*,
*:before,
*:after { box-sizing: border-box; }