/* ─────────────────────────────────────────────────────────────────────────────
   home.css — Sezioni home LightAI
   Richiede: tokens.css · base.css (caricati da header.php)
───────────────────────────────────────────────────────────────────────────── */

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  padding-block: 96px 80px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 600px;
  gap: 64px;
  align-items: start;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero__label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
}

.hero__label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* h1 font-size da base.css (clamp 44px–88px) */
.hero__h1 {
  margin: 0;
  line-height: 0.98;
}

.hero__h1 span      { display: block; }
.hero__h1-soft      { color: var(--soft); }

.hero__p {
  margin: 0;
  font-size: 21px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 580px;
}

.hero__p strong {
  color: var(--ink);
  font-weight: 500;
}

.hero__actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ─── Console ────────────────────────────────────────────────────────────── */
.console {
  background: var(--dark-bg);
  color: var(--dark-text);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(15, 15, 16, 0.22);
}

.console__bar {
  height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--dark-border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dark-muted);
}

.console__bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.console__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--highlight);
  flex-shrink: 0;
}

.console__badge {
  padding: 4px 10px;
  border: 1px solid var(--dark-border-2);
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.console__logs {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
}

/* Righe log: nascoste, animate via .console--visible (aggiunto da home.js) */
.ln {
  opacity: 0;
  transform: translateY(6px);
}

.console--visible .ln {
  animation: lnIn 0.5s ease forwards;
}

.console--visible .ln:nth-child(1) { animation-delay: 0.2s; }
.console--visible .ln:nth-child(2) { animation-delay: 0.9s; }
.console--visible .ln:nth-child(3) { animation-delay: 1.6s; }
.console--visible .ln:nth-child(4) { animation-delay: 2.3s; }
.console--visible .ln:nth-child(5) { animation-delay: 3.0s; }
.console--visible .ln:nth-child(6) { animation-delay: 3.6s; }

@keyframes lnIn { to { opacity: 1; transform: none; } }

.log-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
}

.log-ts     { color: var(--dark-subtle); }
.log-yellow { color: var(--highlight); }
.log-blue   { color: var(--dark-accent); }
.log-muted  { display: block; color: var(--dark-muted); }

/* Cursore lampeggiante */
.cur {
  display: inline-block;
  width: 9px;
  height: 17px;
  background: var(--highlight);
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Card preventivo */
.console__card {
  background: var(--bg);
  color: var(--ink);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font);
  margin-top: 8px;
}

.console__card-info    { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.console__card-title   { font-size: 15px; font-weight: 600; }
.console__card-sub     { font-size: 13px; color: var(--muted); }
.console__card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.console__btn-outline {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 500 14px var(--font);
  cursor: pointer;
  transition: opacity var(--t);
  white-space: nowrap;
}

.console__btn-fill {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: 600 14px var(--font);
  cursor: pointer;
  transition: opacity var(--t);
  white-space: nowrap;
}

.console__btn-outline:hover { opacity: 0.7; }
.console__btn-fill:hover    { opacity: 0.88; }

/* ─── Ticker ─────────────────────────────────────────────────────────────── */
.ticker {
  height: 72px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--accent);
  user-select: none;
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
  padding-left: 48px;
  animation: marq 40s linear infinite;
  will-change: transform;
}

.ticker__track:hover { animation-play-state: paused; }
.ticker__star        { color: var(--highlight); }

@keyframes marq { to { transform: translateX(-50%); } }

/* ─── Servizi ────────────────────────────────────────────────────────────── */
.services {
  padding-block: 120px 96px;
}

.services__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 64px;
  margin-bottom: 64px;
}

.services__h2 {
  margin: 0;
  max-width: 720px;
}

.services__h2-soft  { display: block; color: var(--soft); }

.services__section-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
  flex-shrink: 0;
}

.services__rows { border-top: 2px solid var(--ink); }

.service-row {
  padding: 40px 0;
  display: grid;
  grid-template-columns: 80px 340px minmax(0, 1fr) 520px;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.service-row__num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.service-row__h3 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 36px);
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.1;
}

.service-row__p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: none;
}

/* ─── Metodo ─────────────────────────────────────────────────────────────── */
.metodo {
  background: var(--dark-bg);
  color: var(--dark-text);
  padding-block: 96px;
}

.metodo__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}

.metodo__h2    { margin: 0; }
.metodo__h2-hl { color: var(--highlight); }

.metodo__section-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--dark-muted);
  flex-shrink: 0;
}

.metodo__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.metodo__step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
}

.metodo__step--g1  { border-top: 3px solid var(--highlight); }
.metodo__step--g7  { border-top: 3px solid var(--dark-border-2); }
.metodo__step--g21 { border-top: 3px solid var(--dark-border-2); }
.metodo__step--g30 { border-top: 3px solid var(--dark-accent); }

.metodo__step-day { font-family: var(--mono); font-size: 14px; }

.metodo__step--g1  .metodo__step-day { color: var(--highlight); }
.metodo__step--g7  .metodo__step-day { color: var(--dark-muted); }
.metodo__step--g21 .metodo__step-day { color: var(--dark-muted); }
.metodo__step--g30 .metodo__step-day { color: var(--dark-accent); }

.metodo__step-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metodo__step-desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--dark-muted);
  max-width: none;
}

/* ─── Risultati + CTA ────────────────────────────────────────────────────── */
.risultati { padding-block: 96px; }

.numeri {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 72px;
}

.numero__val {
  display: block;
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.numero__desc {
  display: block;
  font-size: 16px;
  color: var(--muted);
  margin-top: 8px;
}

.cta-yellow {
  padding: 64px;
  border-radius: var(--r-card-lg);
  background: var(--highlight);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}

.cta-yellow__h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 820px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

/* ≤1280px: righe servizi passano a 2 colonne */
@media (max-width: 1280px) {
  .service-row {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px 24px;
  }
  .service-row__num   { grid-row: 1; grid-column: 1; align-self: center; }
  .service-row__h3    { grid-row: 1; grid-column: 2; font-size: clamp(20px, 2vw, 28px); }
  .service-row__p     { grid-row: 2; grid-column: 2; }
  .service-row__chips { grid-row: 3; grid-column: 1 / -1; margin-top: 8px; }
}

/* ≤960px: hero in colonna, metodo 2 col */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__p { max-width: 100%; }
  .console { max-width: 560px; }

  .metodo__steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }

  .cta-yellow {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding: 48px;
  }
}

/* ≤767px: mobile */
@media (max-width: 767px) {
  .hero { padding-block: 56px 48px; }
  .hero__p { font-size: 18px; }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .ticker { height: 56px; }
  .ticker__track { font-size: 16px; gap: 24px; padding-left: 24px; }

  .services { padding-block: 72px; }
  .services__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 40px;
  }
  .services__section-label { display: none; }

  .service-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 0;
  }
  .service-row__num { display: none; }
  .service-row__h3  { font-size: 22px; margin: 0; }

  .metodo { padding-block: 72px; }
  .metodo__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 40px;
  }
  .metodo__section-label { display: none; }
  .metodo__steps { grid-template-columns: 1fr; gap: 28px; }

  .risultati { padding-block: 72px; }
  .numeri {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
  }

  .cta-yellow { padding: 32px 28px; gap: 24px; }
  .cta-yellow .btn-dark-lg { width: 100%; justify-content: center; }
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ln,
  .console--visible .ln {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .cur           { animation: none !important; }
  .ticker__track { animation-duration: 0.01ms !important; }
}
