/* =================================================================
   WOLFCODING — Landing page in stile stories
   Usato sul sito (.lp-body) e nell'editor (.editor-styles-wrapper).

   Stili selezionabili dall'editor (pannello "Stili" del blocco):
     Paragrafo  → Pillola, Pillola con punto, Testo d'apertura,
                  Testo grande, Etichetta, Testo secondario
     Titolo     → Cifra gigante, Titolo display
     Gruppo     → Blocco con separatore, Riquadro vetro
     Elenco     → Passi numerati
     Pulsante   → (pieno), Contorno, Con anello (stories)
   Colonne con classe "lp-grid" → contenuto a sinistra, form a destra.
   ================================================================= */

:root {
  --lp-bg: #05080b;
  --lp-glass: rgba(14, 20, 26, .72);
  --lp-field: rgba(255, 255, 255, .05);
  --lp-line: rgba(255, 255, 255, .12);
  --lp-text: #ffffff;
  --lp-muted: #a3adb6;
  --lp-accent: #3de0e8;
  --lp-tag: #3a8f93;
  --lp-ink: #041214;
  --lp-pad: 36px;
}

:is(.lp-body, .editor-styles-wrapper) {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--lp-bg);
  color: var(--lp-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.lp-body { scroll-behavior: smooth; }
.lp-body *, .lp-body *::before, .lp-body *::after { box-sizing: border-box; }
:where(.lp-body, .editor-styles-wrapper) :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; }
:where(.lp-body, .editor-styles-wrapper) a { color: var(--lp-accent); }
:is(.lp-body, .editor-styles-wrapper) img { max-width: 100%; height: auto; }
:is(.lp-body, .editor-styles-wrapper) .accent { color: var(--lp-accent); }

/* ---------- Sfondo (codice sfocato, scurito dove c'è il testo) ---------- */
.lp-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,8,11,.45) 0%, rgba(5,8,11,.75) 50%, rgba(5,8,11,.92) 100%),
    var(--lp-bg-image) center 30% / cover no-repeat,
    var(--lp-bg);
}
@media (min-width: 920px) {
  .lp-bg {
    background:
      linear-gradient(90deg, rgba(5,8,11,.92) 0%, rgba(5,8,11,.72) 40%, rgba(5,8,11,.25) 72%, rgba(5,8,11,.4) 100%),
      var(--lp-bg-image) right 35% / cover no-repeat,
      var(--lp-bg);
  }
}

.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 28px 20px 40px; }

/* ---------- Logo ---------- */
.lp-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--lp-text) !important; }
.lp-brand img { width: 40px; height: auto; display: block; }
.lp-wordmark { font-weight: 800; font-size: 22px; letter-spacing: .06em; }
.lp-wordmark span { color: var(--lp-accent); }

.lp-content { margin-top: 40px; }
@media (min-width: 920px) { .lp-content { margin-top: 56px; } }
.lp-content > * + * { margin-top: 48px; }

/* ---------- Colonne "lp-grid": contenuto + form ---------- */
.wp-block-columns.lp-grid { display: grid; gap: 40px; margin: 0; }
.wp-block-columns.lp-grid > .wp-block-column { margin: 0; min-width: 0; flex-basis: auto !important; }
@media (min-width: 920px) {
  .wp-block-columns.lp-grid { grid-template-columns: 1fr 460px; gap: 72px; align-items: stretch; }
  .wp-block-columns.lp-grid > .wp-block-column:first-child { display: flex; flex-direction: column; justify-content: space-between; padding: var(--lp-pad) 0; }
}

/* ---------- Colonna stretta centrata (layout "stories") ---------- */
.lp-narrow { max-width: 600px; margin-left: auto !important; margin-right: auto !important; }
.lp-narrow > * + * { margin-top: 48px; }
.lp-cta { text-align: center; }
.lp-cta > * + * { margin-top: 24px; }
.lp-features > * + * { margin-top: 18px; }
.lp-features > .is-style-lp-display { margin-top: 28px; margin-bottom: 30px; }

/* ---------- Blocchi con separatore ---------- */
.is-style-lp-block + .is-style-lp-block { border-top: 1px solid var(--lp-line); padding-top: 28px; margin-top: 28px; }
@media (min-width: 920px) {
  .wp-block-column > .is-style-lp-block + .is-style-lp-block { margin-top: 0; padding-top: 32px; }
}
.is-style-lp-glass {
  background: var(--lp-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--lp-line);
  border-radius: 28px;
  padding: 28px 22px;
}
@media (min-width: 600px) { .is-style-lp-glass { padding: var(--lp-pad); } }
.is-style-lp-glass > * + * { margin-top: 14px; }

/* ---------- Pillole ---------- */
.is-style-lp-pill, .is-style-lp-pill-dot {
  display: block;
  border: 1.5px solid var(--lp-accent);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 15px;
  line-height: 1.3;
  width: fit-content;
}
.is-style-lp-pill-dot::before {
  content: ""; display: inline-block; vertical-align: middle; margin: -2px 10px 0 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lp-accent);
  animation: lp-pulse 2s infinite;
}
@keyframes lp-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lp-accent) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}
.is-style-lp-pill { border-radius: 22px; }
.is-style-lp-pill strong, .is-style-lp-pill b { color: var(--lp-accent); font-weight: 600; }
:is(.lp-content, .is-root-container) .is-style-lp-pill,
:is(.lp-content, .is-root-container) .is-style-lp-pill-dot { margin-top: 26px; }
:is(.lp-content, .is-root-container) :is(.is-style-lp-pill, .is-style-lp-pill-dot):first-child { margin-top: 0; }

/* ---------- Testi ---------- */
.is-style-lp-kicker { font-size: 19px; margin-top: 28px; }
.is-style-lp-amount {
  font-size: clamp(64px, 17vw, 112px) !important;
  line-height: .95;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.03em;
  margin-top: 6px !important;
}
.is-style-lp-subject { font-size: clamp(20px, 5vw, 28px); font-weight: 600; margin-top: 10px; }
.is-style-lp-subject em { font-style: italic; font-weight: 800; }
.is-style-lp-label, .lp-label {
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lp-muted);
}
.is-style-lp-muted { color: var(--lp-muted); }
.is-style-lp-display {
  font-size: clamp(40px, 8vw, 76px) !important;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
}
:is(.lp-content, .is-root-container) h2:not([class*="is-style"]) { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; font-weight: 700; }
:is(.lp-content, .is-root-container) h3:not([class*="is-style"]) { font-size: 22px; font-weight: 700; }
:is(.lp-content, .is-root-container) .has-text-align-center { margin-left: auto; margin-right: auto; }

/* ---------- Passi numerati (elenco numerato) ---------- */
ol.is-style-lp-steps {
  list-style: none; padding: 0; margin-top: 18px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  counter-reset: lp-step;
}
ol.is-style-lp-steps li { font-size: 14px; line-height: 1.4; color: #dfe5ea; counter-increment: lp-step; }
ol.is-style-lp-steps li::before {
  content: counter(lp-step);
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--lp-accent); color: var(--lp-accent);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  margin-bottom: 12px;
}
.is-style-lp-label + ol.is-style-lp-steps { margin-top: 18px; }

/* Mostra solo su desktop (classe aggiuntiva "lp-only-desktop") */
@media (max-width: 919px) { .lp-body .lp-only-desktop { display: none; } }

/* ---------- Scadenze ---------- */
.lp-deadlines .lp-timeline {
  display: grid; grid-template-columns: max-content 1fr; align-items: center;
  gap: 12px clamp(14px, 4vw, 24px); margin-top: 16px;
}
.lp-tag {
  background: var(--lp-tag); color: var(--lp-ink);
  border-radius: 999px; padding: 9px 18px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; text-align: center;
}
.lp-date { font-size: clamp(17px, 4.6vw, 24px); font-weight: 600; white-space: nowrap; }
.lp-countdown {
  display: inline-block; margin-top: 18px;
  background: var(--lp-accent); color: var(--lp-ink);
  border-radius: 999px; padding: 8px 18px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.lp-countdown:empty { display: none; }

/* ---------- Card con icona ---------- */
.lp-feature {
  display: flex; align-items: center; gap: 22px;
  background: rgba(60, 66, 74, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 26px;
  padding: 22px 26px;
}
.lp-feature + .lp-feature { margin-top: 18px; }
.lp-feature-ico { flex: none; color: var(--lp-accent); display: grid; place-items: center; width: 48px; }
.lp-feature-body h3 { font-size: clamp(20px, 4vw, 26px); font-weight: 700; line-height: 1.2; color: #e8ecef; }
.lp-feature-body p { color: var(--lp-muted); margin-top: 4px; font-size: 15px; }

/* ---------- Pulsanti ---------- */
:is(.lp-body, .editor-styles-wrapper) .wp-block-button .wp-block-button__link,
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 17px;
  color: var(--lp-ink);
  background: var(--lp-accent);
  border: 0; border-radius: 999px;
  padding: 17px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s, filter .15s;
}
:is(.lp-body, .editor-styles-wrapper) .wp-block-button .wp-block-button__link:hover,
.lp-btn:hover { filter: brightness(1.08); color: var(--lp-ink); }
.lp-btn:active { transform: scale(.98); }
:is(.lp-body, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent; color: var(--lp-text); border: 1.5px solid var(--lp-accent);
}
:is(.lp-body, .editor-styles-wrapper) .wp-block-button.is-style-lp-ring .wp-block-button__link {
  position: relative;
  background: var(--lp-tag);
  font-size: clamp(20px, 4vw, 26px); font-weight: 800; text-transform: uppercase;
  padding: 16px 44px;
  margin: 18px 28px;
}
:is(.lp-body, .editor-styles-wrapper) .wp-block-button.is-style-lp-ring .wp-block-button__link::before {
  content: ""; position: absolute; inset: -18px -40px;
  border: 3px solid var(--lp-accent); border-radius: 999px;
  pointer-events: none;
}
@media (max-width: 600px) {
  :is(.lp-body, .editor-styles-wrapper) .wp-block-button.is-style-lp-ring .wp-block-button__link { padding: 14px 26px; margin: 14px 18px; white-space: normal; text-align: center; }
  :is(.lp-body, .editor-styles-wrapper) .wp-block-button.is-style-lp-ring .wp-block-button__link::before { inset: -12px -18px; }
}
.lp-body { overflow-x: hidden; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
:is(.lp-content, .is-root-container) .wp-block-buttons { margin-top: 28px; }

/* ---------- Riquadro form (Contact Form 7) ---------- */
.lp-card {
  background: var(--lp-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--lp-line);
  border-radius: 28px;
  padding: 28px 22px;
  scroll-margin-top: 16px;
}
@media (min-width: 600px) { .lp-card { padding: var(--lp-pad); } }
:is(.lp-body, .editor-styles-wrapper) .lp-card .lp-card-head h2 { font-size: 28px; line-height: 1.15; font-weight: 700; }
.lp-card-sub { color: var(--lp-muted); margin-top: 10px !important; font-size: 15px; }
.lp-card .wpcf7 { margin-top: 26px; }
.lp-card form { display: grid; gap: 18px; }
.lp-card .lp-notice { margin-top: 20px; padding: 14px; border: 1px dashed var(--lp-line); border-radius: 14px; color: var(--lp-muted); }

.lp-f { display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
.lp-card .req { color: var(--lp-accent); }
.lp-card .wpcf7-form-control-wrap { display: block; }
.lp-card :is(input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], input[type=date], select, textarea) {
  width: 100%;
  font: inherit; font-weight: 400; font-size: 16px;
  color: var(--lp-text);
  background: var(--lp-field);
  border: 1px solid var(--lp-line);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lp-card textarea { min-height: 110px; resize: vertical; }
.lp-card :is(input, select, textarea):focus { border-color: var(--lp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-accent) 18%, transparent); }
.lp-row2 { display: grid; gap: 18px; }
@media (min-width: 600px) { .lp-row2 { grid-template-columns: 1fr 1fr; } }

.lp-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.lp-card legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; padding: 0; }

/* Checkbox CF7 trasformate in "chip" */
.lp-chips .wpcf7-checkbox, .lp-chips .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chips .wpcf7-list-item { margin: 0; position: relative; }
.lp-chips .wpcf7-list-item input { position: absolute; opacity: 0; pointer-events: none; }
.lp-chips .wpcf7-list-item-label {
  display: inline-block;
  border: 1px solid var(--lp-line); background: var(--lp-field);
  border-radius: 999px; padding: 8px 14px;
  font-size: 14px; cursor: pointer; user-select: none;
  transition: all .15s;
}
.lp-chips .wpcf7-list-item input:checked + .wpcf7-list-item-label {
  border-color: var(--lp-accent);
  background: color-mix(in srgb, var(--lp-accent) 12%, transparent);
  color: var(--lp-accent);
}
.lp-chips .wpcf7-list-item input:focus-visible + .wpcf7-list-item-label { box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-accent) 30%, transparent); }

/* Consensi */
.lp-check .wpcf7-list-item { margin: 0; display: block; }
.lp-check label { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--lp-muted); line-height: 1.45; cursor: pointer; }
.lp-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--lp-accent); }

.lp-card input[type=submit], .lp-card .wpcf7-submit { width: 100%; }
.lp-card .wpcf7-submit:disabled { opacity: .6; cursor: wait; }
.lp-card .wpcf7-spinner { display: block; margin: 4px auto 0; background-color: var(--lp-accent); }
.lp-card .wpcf7-not-valid-tip { color: #ff8a8a; font-size: 13px; margin-top: 6px; display: block; font-weight: 400; }
.lp-card .wpcf7-not-valid { border-color: #ff8a8a !important; }
.lp-card form .wpcf7-response-output { margin: 0; border-radius: 14px; padding: 10px 14px; font-size: 13px; border: 1px solid #ff8a8a; color: #ff8a8a; }
.lp-card form.init .wpcf7-response-output, .lp-card form.resetting .wpcf7-response-output, .lp-card form.submitting .wpcf7-response-output { display: none; }

/* Successo: il form lascia il posto alla conferma */
.lp-success { display: none; text-align: center; padding: 24px 0 8px; }
.lp-success-ico {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; color: var(--lp-accent);
  background: color-mix(in srgb, var(--lp-accent) 12%, transparent);
  border: 1.5px solid var(--lp-accent);
}
.lp-success h3 { font-size: 22px; }
.lp-success p { color: var(--lp-muted); margin-top: 8px !important; }
.lp-card.done .wpcf7, .lp-card.done .lp-card-head { display: none; }
.lp-card.done .lp-success { display: block; }

/* ---------- CTA fissa su mobile ---------- */
.lp-sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transition: opacity .2s, transform .2s;
}
.lp-sticky-cta.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
@media (min-width: 920px) { .lp-sticky-cta { display: none; } }

/* ---------- Footer ---------- */
.lp-footer {
  border-top: 1px solid var(--lp-line);
  margin-top: 64px; padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--lp-muted);
}
.lp-footer .lp-brand img { width: 26px; }
.lp-footer .lp-wordmark { font-size: 15px; }
.lp-legal { display: grid; gap: 2px; }
.lp-legal a { color: inherit; text-decoration: none; }
.lp-legal a:hover { color: var(--lp-accent); }
@media (min-width: 920px) { .lp-legal { text-align: right; } }
@media (max-width: 919px) { .lp-body { padding-bottom: 76px; } }

/* Cookie banner coi colori della landing */
.lp-body .cookie-banner { background: rgba(14, 20, 26, .96); font-family: inherit; }
.lp-body .cookie-actions .accept { color: var(--lp-ink); }
