/* Elan, pagina della lista d'attesa. Stile ripreso dall'interfaccia: grigio chiaro,
   carte bianche arrotondate, verde scuro, blu navy, Geist. Nessuno script. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --carta: #f5f5f7;
  --bianco: #ffffff;
  --inchiostro: #16181b;
  --tenue: #66696f;
  --linea: rgba(22, 24, 27, 0.09);
  --verde: #0e3123;
  --verde-vivo: #1c6b4c;
  --navy: #27477a;
  --navy-tinta: #eaf0f8;
  --arancio: #e07b39;
  --focus: #27477a;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Geist", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--inchiostro);
  background: var(--carta);
  -webkit-font-smoothing: antialiased;
}

body:has(.finestra:target) {
  overflow: hidden;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.solo-lettori {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ------------------------------------------------------------ bottoni */

.bottone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--verde);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.bottone:hover {
  background: #14452f;
}

.bottone:active {
  transform: scale(0.99);
}

.bottone.stretto {
  width: 100%;
}

/* --------------------------------------------------------------- eroe */

.eroe {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 24px);
  min-height: calc(100svh - 24px);
  margin: 12px;
  overflow: hidden;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(110% 80% at 88% -12%, rgba(39, 71, 122, 0.6), transparent 58%),
    radial-gradient(90% 70% at -4% 112%, rgba(28, 107, 76, 0.5), transparent 60%),
    linear-gradient(165deg, #0f3426 0%, #0a2219 55%, #07170f 100%);
}

/* il foglio di calcolo, appena accennato */
.eroe::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 44px;
  -webkit-mask-image: radial-gradient(62% 52% at 50% 48%, transparent 0%, #000 100%);
  mask-image: radial-gradient(62% 52% at 50% 48%, transparent 0%, #000 100%);
}

.alone {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.alone.uno {
  left: -12vw;
  top: 28%;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(39, 71, 122, 0.55), transparent 66%);
  animation: onda 38s ease-in-out infinite alternate;
}

.alone.due {
  right: -10vw;
  bottom: -18%;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle, rgba(40, 140, 100, 0.42), transparent 66%);
  animation: onda 46s ease-in-out -14s infinite alternate-reverse;
}

@keyframes onda {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(7vw, -6vh, 0) scale(1.18);
  }
}

.testa-eroe {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
}

.marchio {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.testa-eroe .marchio {
  color: #fff;
}

.testa-eroe nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testa-eroe nav a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.testa-eroe nav a:hover {
  color: #fff;
}

.testa-eroe nav a.mini {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.centro {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 76px;
  text-align: center;
}

/* alone scuro dietro al testo, sotto le carte */
.eroe::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(46% 40% at 50% 50%, rgba(5, 20, 13, 0.72), rgba(5, 20, 13, 0));
  pointer-events: none;
}

.centro h1 {
  max-width: 9.8em;
  margin: 0;
  font-size: clamp(2.6rem, min(6.4vw, 10.8svh), 5.4rem);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.sotto {
  max-width: 30em;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  text-wrap: balance;
}

.azioni {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.cta {
  display: inline-flex;
  align-items: center;
  height: 58px;
  padding: 0 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--verde);
  font-size: 1.0625rem;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.55);
}

.cta:focus-visible {
  outline-color: #9fd8bd;
}

.gratis {
  display: inline-flex;
  align-items: center;
  height: 58px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 1.0625rem;
  font-weight: 600;
}

.micro {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* ------------------------------------------- carte che galleggiano piano */

.carte {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.c {
  position: absolute;
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  color: var(--inchiostro);
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6);
  animation: sale var(--t, 28s) ease-in-out var(--d, 0s) infinite alternate;
  will-change: transform;
}

.c.fondo {
  opacity: 0.5;
  filter: blur(2.5px);
}

@keyframes sale {
  from {
    transform: translate3d(0, 0, 0) rotate(var(--r, 0deg));
  }
  to {
    transform: translate3d(var(--dx, 6px), var(--dy, -20px), 0) rotate(calc(var(--r, 0deg) + var(--dr, 1.4deg)));
  }
}

.c small {
  display: block;
  color: var(--tenue);
  font-size: 0.6875rem;
}

/* settimana */
.c.settimana {
  left: 4%;
  top: 11%;
  width: 292px;
  --r: -3deg;
  --t: 27s;
  --dy: -16px;
}

.settimana .g {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 2px;
  text-align: center;
}

.settimana .g span {
  color: var(--tenue);
  font-size: 0.6875rem;
  font-weight: 600;
}

.settimana .g b {
  position: relative;
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: 500;
}

.settimana .g b.oggi {
  background: var(--verde);
  color: #fff;
  font-weight: 600;
}

.settimana .g b.pt::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--arancio);
  box-shadow: -6px 0 0 var(--arancio), 6px 0 0 var(--arancio);
}

/* il tuo giorno */
.c.giorno {
  right: 4%;
  top: 9%;
  width: 312px;
  background: var(--navy-tinta);
  --r: 2deg;
  --t: 32s;
  --d: -9s;
  --dy: -14px;
}

.giorno .testa {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
}

.ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
}

.ic svg {
  width: 14px;
  height: 14px;
}

.giorno p {
  margin: 0;
}

/* import dell'Excel */
.c.excel {
  left: 5%;
  bottom: 9%;
  width: 290px;
  --r: 2deg;
  --t: 35s;
  --d: -14s;
  --dy: -18px;
}

.excel .file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.excel .file b {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
}

.excel .ic {
  background: var(--navy-tinta);
}

.excel .cifre {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.excel .cifre b {
  display: block;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* comando a parole */
.c.agente {
  right: 4%;
  bottom: 8%;
  width: 304px;
  --r: -2deg;
  --t: 30s;
  --d: -5s;
  --dy: -16px;
}

.agente .parlato {
  margin: 0 0 10px auto;
  width: max-content;
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 16px 16px 4px 16px;
  background: var(--verde);
  color: #fff;
}

.agente .anteprima {
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--carta);
}

.agente .anteprima b {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.agente .esito {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.agente .esito i {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--linea);
  background: #fff;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
}

.agente .esito i.si {
  border-color: var(--verde);
  background: var(--verde);
  color: #fff;
}

/* righe del programma, sullo sfondo */
.c.righe {
  left: -3%;
  top: 46%;
  width: 236px;
  --r: -3deg;
  --t: 41s;
  --d: -20s;
  --dy: -12px;
}

.righe div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 7px 0;
  font-weight: 500;
}

.righe div + div {
  border-top: 0.5px solid var(--linea);
}

.righe i {
  color: var(--tenue);
  font-style: normal;
}

/* seduta completata, sullo sfondo */
.c.seduta {
  right: -2%;
  top: 47%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 12px;
  border-radius: 999px;
  --r: 3deg;
  --t: 37s;
  --d: -8s;
  --dy: -14px;
}

.seduta .ic {
  background: var(--verde-vivo);
}

/* ----------------------------------------------------------- domande */

.domande {
  max-width: 1040px;
  margin: 0 auto;
  padding: 88px 20px 40px;
}

.domande .quadro {
  display: grid;
  gap: 32px;
}

.domande h2 {
  margin: 0;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.domande h3 {
  margin: 28px 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.domande h3:first-child {
  margin-top: 0;
}

.lista {
  overflow: hidden;
  border-radius: 20px;
  background: var(--bianco);
}

.lista details + details {
  border-top: 0.5px solid var(--linea);
}

.lista summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.lista summary::-webkit-details-marker {
  display: none;
}

.lista summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.5px solid #9a9da3;
  border-bottom: 1.5px solid #9a9da3;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.lista details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.lista summary:hover {
  background: #fafafb;
}

.lista details p {
  margin: -4px 0 0;
  padding: 0 18px 18px;
  max-width: 62ch;
  color: var(--tenue);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .domande .quadro {
    grid-template-columns: 1fr 1.7fr;
    gap: 56px;
  }
  .domande .titolo {
    position: sticky;
    top: 32px;
    align-self: start;
  }
}

.chiusura {
  max-width: 1040px;
  margin: 24px auto 0;
  padding: 0 20px;
}

.chiusura .scatola {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 36px;
  border-radius: 28px;
  background: linear-gradient(165deg, #0f3426, #07170f);
  color: #fff;
}

.chiusura p {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------- finestre che si aprono */

.finestra {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 16px;
  overflow: auto;
  background: rgba(6, 20, 14, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.finestra:target {
  display: flex;
  animation: velo 0.25s ease;
}

.sfondo-chiudi {
  position: fixed;
  inset: 0;
}

.scheda {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 32px 28px 28px;
  border-radius: 28px;
  background: var(--bianco);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.65);
  animation: sale-su 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scheda.larga {
  max-width: 580px;
}

@keyframes velo {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sale-su {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chiudi {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--carta);
  color: var(--tenue);
}

.chiudi:hover {
  background: #ececef;
}

.chiudi svg {
  width: 14px;
  height: 14px;
}

.scheda h2 {
  margin: 0 40px 6px 0;
  font-size: 1.625rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.scheda .intro {
  margin: 0 0 20px;
  color: var(--tenue);
  font-size: 0.9375rem;
}

.requisiti {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.requisiti li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--carta);
  font-weight: 500;
}

.requisiti .ic {
  margin-top: 1px;
  background: var(--verde-vivo);
}

.nota {
  margin: 0 0 22px;
  color: var(--tenue);
  font-size: 0.9375rem;
}

.piccolo {
  color: var(--tenue);
  font-size: 0.8125rem;
}

.scheda .piccolo {
  margin: 14px 0 0;
  text-align: center;
}

/* modulo */

.coppia {
  display: grid;
  gap: 12px;
}

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

.campo {
  margin-bottom: 12px;
}

.campo label {
  display: block;
  margin-bottom: 6px;
  color: var(--tenue);
  font-size: 0.8125rem;
  font-weight: 600;
}

.campo input,
.campo select {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--carta);
  color: var(--inchiostro);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.campo select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2366696f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.campo input:focus,
.campo select:focus {
  outline: none;
  border-color: var(--navy);
  background-color: #fff;
}

.campo input:user-invalid,
.campo select:user-invalid {
  border-color: #c0392b;
}

.nomine {
  margin: 2px 0 14px;
}

.nomine summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.nomine summary::-webkit-details-marker {
  display: none;
}

.nomine summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy-tinta);
  font-size: 1rem;
  line-height: 1;
}

.nomine[open] summary::before {
  content: "\2212";
}

.nomine .aiuto {
  margin: 8px 0 10px;
  color: var(--tenue);
  font-size: 0.8125rem;
}

.consenso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 18px;
  font-size: 0.875rem;
}

.consenso input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--verde);
}

/* ------------------------------------------------------ pagine di servizio */

.pagina {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.pagina.testata {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 20px;
}

.pagina.testata a {
  color: var(--tenue);
  font-size: 0.875rem;
  text-decoration: none;
}

.pagina.testata a.marchio {
  color: var(--inchiostro);
  font-size: 1.25rem;
}

main.pagina.servizio {
  margin-bottom: 24px;
  padding: 36px 32px 40px;
  border-radius: 28px;
  background: var(--bianco);
}

.servizio h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.servizio p {
  margin: 0 0 14px;
}

.servizio a {
  color: var(--navy);
}

.servizio .bottone {
  color: #fff;
}

.avviso-errore {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fbeceb;
  color: #8a2a20;
  font-weight: 500;
}

.testo-lungo h2 {
  margin: 28px 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.testo-lungo ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.testo-lungo li {
  margin-bottom: 8px;
}

.da-completare {
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff2a8;
  color: #4a3b00;
}

.piede {
  padding: 24px 0 44px;
  color: var(--tenue);
  font-size: 0.875rem;
}

.piede .pagina {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.piede a {
  color: var(--tenue);
}

.piede.largo .pagina {
  max-width: 1040px;
}

/* ------------------------------------------------------------- schermi piccoli */

@media (max-width: 1080px) {
  .c.righe,
  .c.seduta {
    display: none;
  }
  .c.settimana {
    left: 3%;
    top: 12%;
    width: 256px;
  }
  .c.giorno {
    right: 3%;
    width: 268px;
  }
  .c.excel {
    left: 3%;
    width: 252px;
  }
  .c.agente {
    right: 3%;
    width: 266px;
  }
}

@media (max-width: 820px) {
  .c.giorno,
  .c.agente {
    display: none;
  }
  .c.settimana {
    left: 50%;
    top: 84px;
    width: 250px;
    margin-left: -125px;
    opacity: 0.9;
  }
  .c.excel {
    left: 50%;
    bottom: 22px;
    width: 250px;
    margin-left: -125px;
    padding: 11px 14px;
  }
  .excel .file {
    margin-bottom: 8px;
  }
  .centro {
    padding: 150px 20px 190px;
  }
}

@media (max-width: 560px) {
  .eroe {
    margin: 8px;
    border-radius: 26px;
    min-height: calc(100svh - 16px);
  }
  .testa-eroe {
    padding: 18px 18px;
  }
  .testa-eroe nav a:not(.mini) {
    display: none;
  }
  .azioni {
    gap: 8px;
  }
  .cta,
  .gratis {
    height: 54px;
  }
  .cta {
    padding: 0 24px;
  }
  .scheda {
    padding: 28px 20px 22px;
    border-radius: 24px;
  }
  main.pagina.servizio {
    padding: 28px 20px 32px;
  }
  .chiusura .scatola {
    padding: 26px 22px;
  }
  .domande {
    padding-top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
