/* =====================================================================
   Taurenova · stili della home
   Colori, font, header, footer e scene comuni sono in base.css.
   ===================================================================== */

/* ---------- Apertura ---------- */
.hero { padding-top: clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero__griglia { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5.2rem); letter-spacing: -0.035em; line-height: 1.02; margin-top: 1rem; }
.hero h1 mark { padding: 0 .12em; }
.hero__sotto { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--on-night-muted); max-width: 40rem; margin-top: 1.5rem; }

.ordine { margin: 0; }
.ordine__svg { width: 100%; max-width: 520px; height: auto; margin-inline: auto; }
.ordine__scudo { fill: none; stroke: var(--brand); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 0; }
.q { fill: var(--brand); }
.q--ok { fill: var(--ok); }
.q--giallo { fill: var(--highlight); }

/* Numeri in fondo all'apertura */
.numeri { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(2.5rem, 6vw, 5rem); border-top: 1.5px solid var(--night-raised); }
.numeri li { padding: 1.6rem 1.25rem 2.2rem 0; display: flex; flex-direction: column; gap: .35rem; }
.numeri li + li { padding-left: 1.25rem; border-left: 1.5px solid var(--night-raised); }
.numeri__n { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: #fff; }
.numeri__l { color: var(--on-night-muted); font-size: 1rem; }

/* ---------- 01 Framework ---------- */
.norme { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.norma {
  background: var(--sunken); border-radius: var(--r); border-top: 6px solid var(--brand-deep);
  padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .55rem;
  transition: transform .3s var(--curva), background-color .3s;
}
.norma:hover { transform: translateY(-4px); background: var(--brand-pale); }
.norma__sigla { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; color: var(--brand-deep); line-height: 1; }
.norma h3 { font-size: 1.02rem; color: var(--ink-muted); font-weight: 700; letter-spacing: 0; }
.norma__cosa { color: var(--ink); }
.norma__chi { margin-top: auto; padding-top: .7rem; border-top: 1.5px solid var(--line); font-size: .95rem; color: var(--ink-muted); }
.norma__chi span { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }

.pillole { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pillole li { background: var(--raised); border: 1.5px solid var(--line); border-radius: 999px; padding: .12rem .65rem; font-size: .86rem; font-weight: 600; }
.pillole--grandi li { font-size: 1rem; padding: .45rem 1rem; background: var(--sunken); border-color: transparent; }

/* ---------- 02 Servizi: scena a livelli ---------- */
.livelli { display: grid; gap: .75rem; }
.livello {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem;
  background: var(--raised); border-radius: var(--r); border-left: 6px solid var(--line);
  padding: 1.3rem 1.4rem;
}
.livello__num { font-family: var(--mono); font-weight: 500; font-size: 1.1rem; color: var(--brand-deep); }
.livello__nome { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.livello__cosa { color: var(--ink-muted); }
.livello .ico { width: 2.6rem; height: 2.6rem; padding: .55rem; border-radius: 999px; background: var(--brand-pale); color: var(--brand-deep); }
.livelli__base { display: flex; align-items: center; gap: .6rem; justify-content: center; padding: .9rem; border: 2px dashed var(--ink-faint); border-radius: var(--r); font-weight: 700; color: var(--ink-muted); }
.livelli__base .ico { color: var(--brand-deep); }

.passo__livello { font-family: var(--mono); font-size: .9rem; color: var(--brand-deep); margin-bottom: .2rem; }
.passo h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.passo__intro { font-size: 1.1rem; color: var(--ink) !important; margin-bottom: 1.1rem; }
.servizi { list-style: none; padding: 0; display: grid; gap: .75rem; }
.servizio { background: var(--raised); border-radius: var(--r); padding: 1rem 1.15rem; border-top: 4px solid var(--brand); }
.servizio h4 { font-size: 1.12rem; margin-bottom: .3rem; }
.servizio p { color: var(--ink-muted); font-size: 1rem; }
.etichette { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.etichette li { font-family: var(--mono); font-size: .8rem; background: var(--sunken); border-radius: var(--r); padding: .1rem .45rem; color: var(--ink); }

/* ---------- In evidenza: Secure AI Channel ---------- */
.sac { position: relative; overflow: hidden; }
.sac__griglia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.sac h2 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); margin-top: .8rem; }
.sac h2 mark { padding: 0 .1em; }
.sac .etichetta .nuovo { letter-spacing: .08em; }
.sac__punti { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.6rem; }
.sac__punti li { display: flex; align-items: center; gap: .6rem; background: var(--night-raised); border-radius: var(--r); padding: .7rem .85rem; font-weight: 700; }
.sac__punti .ico { color: var(--brand); flex: none; }
.sac__motivo { margin: 0; }
.sac__svg { width: 100%; height: auto; }
.sac__linee path { stroke: var(--on-night-muted); stroke-opacity: .55; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sac__linee path:nth-child(odd) { stroke: var(--brand); stroke-opacity: .8; }
.sac__canale { stroke: var(--brand); stroke-dasharray: 1; stroke-dashoffset: 0; }
.sac__lucchetto circle { fill: var(--highlight); }
.sac__lucchetto rect, .sac__lucchetto path { stroke: var(--ink); }

/* ---------- 03 Chi è Taurenova ---------- */
.chi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.chi__testata { margin-bottom: 0; }
.chi__firma { margin-top: 1.5rem; font-weight: 800; font-size: 1.15rem; padding-left: 1rem; border-left: 6px solid var(--highlight); }
.valori { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.valore { background: var(--sunken); border-radius: var(--r); padding: 1.3rem; }
.valore__num { display: block; font-size: 2.6rem; font-weight: 900; line-height: 1; letter-spacing: -0.04em; color: var(--brand-deep); margin-bottom: .6rem; }
.valore h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.valore p { color: var(--ink-muted); }

.titolo-blocco { font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin-bottom: 1.1rem; }
.settori { margin-top: clamp(3rem, 6vw, 5rem); }
.strumenti { margin-top: clamp(3rem, 6vw, 5rem); }
.strumenti__griglia { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.strumenti__griglia li { padding: 1rem 1rem 1rem 0; border-bottom: 1.5px solid var(--line); }
.strumenti__cat { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-deep); margin-bottom: .25rem; }

/* ---------- 04 Contatti ---------- */
.contatti { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contatti h2 { font-size: clamp(1.85rem, 3.6vw, 3rem); margin-top: .75rem; }
.recapiti { list-style: none; padding: 0; display: grid; gap: 1.1rem; margin-top: 2rem; }
.recapiti li { display: flex; gap: .9rem; align-items: flex-start; }
.recapiti .ico { width: 2.5rem; height: 2.5rem; padding: .55rem; border-radius: 999px; background: var(--brand-deep); color: #fff; }
.recapiti li > span { display: flex; flex-direction: column; }
.recapiti__l { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }

.modulo { background: var(--raised); border-radius: var(--r); border-top: 6px solid var(--brand-deep); padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: 1rem; }
.modulo__riga { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo label { font-weight: 700; font-size: .95rem; }
.campo input, .campo select, .campo textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--raised);
  border: 1.5px solid var(--ink-muted); border-radius: var(--r); padding: .7rem .8rem; min-height: 48px; width: 100%;
}
.campo textarea { resize: vertical; min-height: 8rem; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 3px solid var(--brand-deep); outline-offset: 1px; border-color: var(--brand-deep); }
.campo--spunta { flex-direction: row; align-items: flex-start; gap: .7rem; }
.campo--spunta input { width: 22px; height: 22px; min-height: 0; margin-top: .15rem; flex: none; accent-color: var(--brand-deep); }
.campo--spunta label { font-weight: 400; font-size: .95rem; color: var(--ink-muted); }
.modulo__nota { font-size: .9rem; color: var(--ink-muted); }
.modulo__invia { justify-self: start; }
.modulo__esito:empty { display: none; }
.modulo__esito { border-radius: var(--r); padding: .8rem 1rem; font-weight: 600; }
.modulo__esito.ok { background: var(--ok-soft); }
.modulo__esito.errore { background: var(--alert-soft); }
.modulo[aria-busy="true"] .modulo__invia { opacity: .7; cursor: progress; }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Animazioni della home ---------- */
@keyframes assesta {
  from { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rz, 0deg)); fill: var(--alert); opacity: .9; }
  60% { fill: var(--alert); }
  to { transform: none; opacity: 1; }
}
@keyframes svanisce-su { to { transform: translateY(-60px); opacity: .25; } }

@media (prefers-reduced-motion: no-preference) {
  /* Apertura: lo scudo si disegna e i quadrati sparsi si mettono in ordine */
  .ordine__scudo { animation: disegna 1.6s var(--curva) 1.2s both; }
  .q { transform-box: fill-box; transform-origin: center; animation: assesta 1.5s var(--curva) both; }
  .q:nth-child(8n+1) { --dx: -70px; --dy: -50px; --rz: -24deg; animation-delay: .15s; }
  .q:nth-child(8n+2) { --dx: 60px;  --dy: -80px; --rz: 18deg;  animation-delay: .3s; }
  .q:nth-child(8n+3) { --dx: -40px; --dy: 70px;  --rz: 32deg;  animation-delay: .2s; }
  .q:nth-child(8n+4) { --dx: 90px;  --dy: 30px;  --rz: -14deg; animation-delay: .4s; }
  .q:nth-child(8n+5) { --dx: -100px;--dy: 20px;  --rz: 40deg;  animation-delay: .25s; }
  .q:nth-child(8n+6) { --dx: 30px;  --dy: 90px;  --rz: -30deg; animation-delay: .35s; }
  .q:nth-child(8n+7) { --dx: 70px;  --dy: -40px; --rz: 22deg;  animation-delay: .1s; }
  .q:nth-child(8n)   { --dx: -60px; --dy: 100px; --rz: -40deg; animation-delay: .45s; }

  @supports (animation-timeline: view()) {
    /* Mentre si scorre via dall'apertura, lo scudo sale piano */
    .ordine__svg { animation: svanisce-su linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    .sac__linee path { animation: disegna linear both; animation-timeline: --sac; animation-range: entry 30% cover 42%; }
    .sac__canale { animation: disegna linear both; animation-timeline: --sac; animation-range: cover 42% cover 52%; }
    .sac { view-timeline-name: --sac; }
    .sac__lucchetto { animation: compare linear both; animation-timeline: --sac; animation-range: cover 45% cover 55%; transform-box: fill-box; transform-origin: center; }
  }
  .io .sac__linee path, .io .sac__canale { transition: stroke-dashoffset 1.4s var(--curva); }
  .io .sac:not(.visibile) .sac__linee path, .io .sac:not(.visibile) .sac__canale { stroke-dashoffset: 1; }

  .livello { transition: background-color .45s var(--curva), color .45s, border-color .45s, transform .45s var(--curva); }
}

/* Scena dei livelli: il livello del passo corrente si accende */
@media (min-width: 900px) {
  .scrolly .scena--livelli .livello { opacity: 1 !important; transform: none; }
  .scrolly .scena--livelli[data-passo="1"] .livello--1,
  .scrolly .scena--livelli[data-passo="2"] .livello--2,
  .scrolly .scena--livelli[data-passo="3"] .livello--3 {
    background: var(--brand-deep); color: #fff; border-left-color: var(--highlight); transform: translateX(12px) !important;
  }
  .scrolly .scena--livelli[data-passo="1"] .livello--1 .livello__cosa,
  .scrolly .scena--livelli[data-passo="2"] .livello--2 .livello__cosa,
  .scrolly .scena--livelli[data-passo="3"] .livello--3 .livello__cosa,
  .scrolly .scena--livelli[data-passo="1"] .livello--1 .livello__num,
  .scrolly .scena--livelli[data-passo="2"] .livello--2 .livello__num,
  .scrolly .scena--livelli[data-passo="3"] .livello--3 .livello__num { color: #fff; }
  .scrolly .scena--livelli .scena__passi { padding-block: 6vh 20vh; }
  .scrolly .scena--livelli .passo { min-height: 80vh; }
  .scrolly .scena--livelli .passo > * { max-width: none; }
  .scena--livelli { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .norme { grid-template-columns: repeat(2, 1fr); }
  .chi, .contatti { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .hero__griglia, .sac__griglia { grid-template-columns: 1fr; }
  .ordine__svg { max-width: 360px; }
  .scena--livelli .scena__palco { display: none; }
  .strumenti__griglia { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .numeri { grid-template-columns: 1fr 1fr; }
  .numeri li:nth-child(3) { padding-left: 0; border-left: 0; }
  .numeri li:nth-child(n+3) { border-top: 1.5px solid var(--night-raised); }
  .norme, .valori, .sac__punti, .modulo__riga, .strumenti__griglia { grid-template-columns: 1fr; }
  .ordine__svg { max-width: 280px; }
}
