/* ============================================================
   pages.css — design system condiviso delle pagine "marketing"
   (Servizi, Chi sono, Contatti, Risorse, Casi Studio).
   Stesso linguaggio visivo della home: nero, blu elettrico, glass.
   Caricato da BlogLayout.astro dopo blog.css.
   ============================================================ */

:root {
  --p-blue: #0A84FF;
  --p-teal: #64D2FF;
  --p-glass: rgba(255, 255, 255, 0.04);
  --p-glass-2: rgba(255, 255, 255, 0.07);
  --p-border: rgba(255, 255, 255, 0.09);
  --p-border-2: rgba(255, 255, 255, 0.18);
  --p-txt: #ffffff;
  --p-txt-2: rgba(255, 255, 255, 0.62);
  --p-txt-3: rgba(255, 255, 255, 0.4);
  --p-max: 1060px;
  --p-r: 16px;
}

/* --- layout base --- */
.p-wrap {
  max-width: var(--p-max);
  margin: 0 auto;
  padding: 0 24px;
}
.p-section {
  padding: 72px 0;
  position: relative;
  z-index: 1;
}
.p-section + .p-section {
  border-top: 1px solid var(--p-border);
}

/* --- intestazioni --- */
.p-hero {
  padding: 128px 0 56px;
  position: relative;
  z-index: 1;
}
.p-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--p-teal);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.p-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p-teal);
  box-shadow: 0 0 12px var(--p-teal);
}
.p-h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.p-h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.p-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--p-txt-2);
  max-width: 640px;
  line-height: 1.55;
}
.p-h1 .accent,
.p-h2 .accent {
  background: linear-gradient(120deg, var(--p-blue), var(--p-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- glass card --- */
.glass {
  background: var(--p-glass);
  border: 1px solid var(--p-border);
  border-radius: var(--p-r);
  backdrop-filter: blur(8px);
}
.p-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* --- bottoni --- */
.p-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--p-border-2);
  color: var(--p-txt);
  background: var(--p-glass-2);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.p-btn:hover {
  transform: translateY(-2px);
  border-color: var(--p-border-2);
  background: rgba(255, 255, 255, 0.11);
}
.p-btn-primary {
  background: linear-gradient(120deg, var(--p-blue), #3a9bff);
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(10, 132, 255, 0.32);
}
.p-btn-primary:hover {
  background: linear-gradient(120deg, #0a84ff, #57a9ff);
}

/* ============ CASI STUDIO ============ */
.cs-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.cs-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.cs-card:hover {
  transform: translateY(-4px);
  border-color: var(--p-border-2);
}
.cs-settore {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-teal);
  margin-bottom: 14px;
}
.cs-num {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.cs-period {
  font-size: 13px;
  color: var(--p-txt-3);
  margin: 6px 0 16px;
}
.cs-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.cs-desc {
  font-size: 14px;
  color: var(--p-txt-2);
  line-height: 1.5;
  flex: 1;
}
.cs-mets {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--p-border);
}
.cs-met {
  display: flex;
  flex-direction: column;
}
.cs-met-v {
  font-weight: 700;
  font-size: 1.05rem;
}
.cs-met-v.acc {
  color: var(--p-teal);
}
.cs-met-k {
  font-size: 11px;
  color: var(--p-txt-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.cs-more {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--p-blue);
}

/* card CTA in coda alla griglia */
.cs-next {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  border-style: dashed;
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.cs-next:hover {
  transform: translateY(-4px);
  border-color: var(--p-blue);
}
.cs-next-plus {
  font-size: 2rem;
  font-weight: 300;
  color: var(--p-blue);
  line-height: 1;
}
.cs-next-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 12px 0 6px;
}
.cs-next-sub {
  font-size: 14px;
  color: var(--p-txt-2);
}

/* dettaglio caso studio */
.cs-hero-mets {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
}
.cs-hero-met .v {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
}
.cs-hero-met .v.acc {
  color: var(--p-teal);
}
.cs-hero-met .k {
  font-size: 12px;
  color: var(--p-txt-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============ SERVIZI: step ============ */
.p-steps {
  display: grid;
  gap: 18px;
}
.p-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px;
  align-items: start;
}
.p-step-n {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--p-blue);
}
.p-step h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}
.p-step p {
  color: var(--p-txt-2);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* fit / not-fit */
.p-fit-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.p-fit {
  padding: 26px;
}
.p-fit h3 {
  font-size: 1.05rem;
  margin: 0 0 16px;
}
.p-fit ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 11px;
}
.p-fit li {
  font-size: 15px;
  color: var(--p-txt-2);
  line-height: 1.45;
  padding-left: 26px;
  position: relative;
}
.p-fit.yes li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--p-teal);
  font-weight: 700;
}
.p-fit.no li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.28);
}

/* ============ CHI SONO ============ */
.p-about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}
.p-about-photo img {
  width: 100%;
  border-radius: var(--p-r);
  border: 1px solid var(--p-border);
  display: block;
}
.p-about-stats {
  display: flex;
  gap: 26px;
  margin: 24px 0 30px;
  flex-wrap: wrap;
}
.p-about-stat .v {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
}
.p-about-stat .k {
  font-size: 12px;
  color: var(--p-txt-3);
}
.p-prose p {
  color: var(--p-txt-2);
  line-height: 1.65;
  margin: 0 0 16px;
  font-size: 16px;
}
.p-prose strong {
  color: var(--p-txt);
}

/* ============ FORM (Contatti / Newsletter) ============ */
.p-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}
.p-field {
  display: grid;
  gap: 7px;
}
.p-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--p-txt-2);
}
.p-field input,
.p-field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--p-border-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--p-txt);
  font-family: inherit;
  font-size: 15px;
}
.p-field input:focus,
.p-field textarea:focus {
  outline: none;
  border-color: var(--p-blue);
  background: rgba(10, 132, 255, 0.06);
}
.p-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.p-inline-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  flex-wrap: wrap;
}
.p-inline-form input {
  flex: 1;
  min-width: 200px;
}
.p-form-note {
  font-size: 13px;
  color: var(--p-txt-3);
  margin-top: 4px;
}
.p-form-msg {
  padding: 14px 16px;
  border-radius: 11px;
  font-size: 14px;
  display: none;
}
.p-form-msg.ok {
  display: block;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.4);
  color: var(--p-teal);
}
.p-form-msg.err {
  display: block;
  background: rgba(255, 70, 70, 0.1);
  border: 1px solid rgba(255, 70, 70, 0.4);
  color: #ff9b9b;
}

/* --- responsive --- */
@media (max-width: 820px) {
  .p-about {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .p-field-row {
    grid-template-columns: 1fr;
  }
  .p-hero {
    padding: 104px 0 40px;
  }
}

/* ============================================================
   PREMIUM v2 — coerenza con la home: movimento + profondita'
   (animazioni d'ingresso applicate via JS in BlogLayout)
   ============================================================ */

/* --- reveal on scroll (progressive enhancement: se il JS non gira, tutto resta visibile) --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.reveal-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
}

/* --- glow dietro l'headline dell'hero (come i bagliori della home) --- */
.p-hero {
  position: relative;
}
.p-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -80px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.16), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.p-hero .p-wrap {
  position: relative;
  z-index: 1;
}

/* --- glass con piu' profondita' (gradiente + ombra + highlight interno) --- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 48px -30px rgba(0, 0, 0, 0.7);
}

/* --- card: linea-accento in gradiente che si accende all'hover + glow blu --- */
.cs-card,
.p-step,
.p-fit {
  position: relative;
  overflow: hidden;
}
.cs-card::before,
.p-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 210, 255, 0.65), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cs-card:hover::before,
.p-step:hover::before {
  opacity: 1;
}
.cs-card:hover,
.p-step:hover {
  border-color: var(--p-border-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 30px 60px -28px rgba(10, 132, 255, 0.38);
}
.p-step {
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.3s ease;
}
.p-step:hover {
  transform: translateY(-3px);
}

/* --- numeri dei casi studio: un filo di glow, come la home --- */
.cs-num,
.cs-hero-met .v.acc {
  text-shadow: 0 0 34px rgba(10, 132, 255, 0.28);
}
