/* ==========================================================================
   Pubblipro - stile della pagina Agenzia
   (si usa insieme a home.css per recensioni, clienti e frammenti condivisi)
   ========================================================================== */
.crop-i { --cm: var(--ink); }

/* ---------- Chi siamo e storia ---------- */
.story { position: relative; padding: 176px 0 120px; background: var(--paper); }
.story__inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px clamp(40px, 6vw, 112px); }
.story__text { flex: 3 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.story__text p { margin: 0; max-width: 60ch; font-size: 21px; color: var(--muted); }
.story .flow { flex: 2 1 320px; }
.vm { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 88px; }
.vm__card {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 3.4vw, 52px);
  border-radius: var(--radius);
  color: var(--paper-text);
}
.vm__card--ink { background: var(--ink); }
.vm__card--red { background: var(--red); }
.vm__card h3 { margin: 0; font-weight: 600; font-size: 34px; letter-spacing: -0.025em; }
.vm__card p { margin: 0; font-size: 20px; line-height: 1.6; }
.vm__card--ink p { color: var(--muted-on-ink); }

/* ---------- Laboratorio e imbuto ---------- */
.lab { padding: 136px 0; background: var(--ink); color: var(--paper-text); }
.lab__inner { display: flex; flex-direction: column; gap: 80px; }
.lab__intro { max-width: 900px; display: flex; flex-direction: column; gap: 20px; }
.lab__intro p { margin: 0; max-width: 56ch; font-size: 22px; color: var(--muted-on-ink); }
.lab__lead { margin: 0 0 32px; max-width: 30ch; font-weight: 600; font-size: clamp(28px, 3vw, 44px); line-height: 1.12; letter-spacing: -0.03em; }
.funnel { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.funnel__bar {
  width: var(--w);
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.funnel__bar--1 { background: var(--paper-text); color: var(--ink); }
.funnel__bar--2 { background: #D9D3C5; color: var(--ink); }
.funnel__bar--3 { background: #C2BBAA; color: var(--ink); }
.funnel__bar--4 { background: var(--red); color: var(--paper-text); }

/* ---------- Team ---------- */
.team { position: relative; padding: 176px 0 120px; background: var(--paper); }
.team__inner { display: flex; flex-direction: column; gap: 64px; }
.team__grid { display: flex; flex-wrap: wrap; gap: 40px 32px; }
.person { margin: 0; flex: 1 1 220px; max-width: 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.person__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  color: var(--muted);
  font-size: 17px;
}
.person__photo--a { background: var(--paper-2); }
.person__photo--b { background: #F3D9DA; }
.person__photo--c { background: #D5D3CC; }
.person__photo--d { background: #E8DDBE; }
.person figcaption { display: flex; flex-direction: column; gap: 2px; }
.person__name { font-weight: 500; font-size: 26px; letter-spacing: -0.015em; }
.person__role { color: var(--muted); font-size: 18px; }

/* ---------- Come lavoriamo ---------- */
.how { padding: 120px 0 136px; background: var(--paper-2); }
.how__inner { display: flex; flex-direction: column; gap: 64px; }
.how__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px clamp(32px, 5vw, 80px); }
.how__item { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 3px solid var(--ink); }
.how__item h3 { margin: 0; font-weight: 600; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.025em; line-height: 1.15; }
.how__item p { margin: 0; color: var(--muted); font-size: 19px; }

/* ---------- Per chi lavoriamo ---------- */
.audience { padding: 136px 0; background: var(--red); color: var(--paper-text); }
.audience__inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px clamp(40px, 6vw, 112px); }
.audience__head { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.audience__head p { margin: 0; max-width: 30ch; font-size: 22px; }
.audience__list { flex: 2 1 520px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.aud { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 8px 40px; padding: 32px 0; border-top: 1px solid rgba(242, 237, 227, 0.5); }
.aud:first-child { padding-top: 0; border-top: none; }
.aud__who { font-weight: 600; font-size: clamp(30px, 3.1vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }
.aud__what { min-width: 0; font-size: 20px; line-height: 1.55; }

/* ---------- Clienti ---------- */
.clients-sec { padding: 96px 0; background: var(--paper); }

/* ---------- Domande frequenti ---------- */
.faq { position: relative; padding: 176px 0 136px; background: var(--paper); }
.faq__inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px clamp(40px, 6vw, 112px); }
.faq__head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.faq__head p { margin: 0; max-width: 34ch; font-size: 21px; color: var(--muted); }
.faq__list { flex: 2 1 520px; min-width: 0; }
.qa { border-top: 2px solid var(--ink); }
.qa:last-child { border-bottom: 2px solid var(--ink); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; list-style: none; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa__q { font-weight: 500; font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em; line-height: 1.25; }
.qa__icon { position: relative; flex: none; width: 28px; height: 28px; }
.qa__icon::before, .qa__icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  margin: -1px 0 0 -10px;
  background: currentColor;
  transition: transform 220ms var(--ease);
}
.qa__icon::after { transform: rotate(90deg); }
.qa[open] .qa__icon::after { transform: rotate(0deg); }
.qa__a { margin: 0; padding: 0 56px 28px 0; max-width: 62ch; color: var(--muted); font-size: 19px; line-height: 1.65; }

@media (max-width: 820px) {
  .how__grid { grid-template-columns: minmax(0, 1fr); }
  .funnel__bar { width: 100%; }
}
@media (max-width: 640px) {
  .story { padding: 152px 0 96px; }
  .vm { margin-top: 64px; }
  .lab, .audience { padding: 96px 0; }
  .lab__inner { gap: 56px; }
  .team { padding: 152px 0 96px; }
  .how { padding: 96px 0; }
  .clients-sec { padding: 72px 0; }
  .faq { padding: 152px 0 96px; }
  .qa__a { padding-right: 0; }
  .aud { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .qa__icon::before, .qa__icon::after { transition: none; }
}

/* ==========================================================================
   Vivacità: sfondi appena percettibili, forme in movimento, hover, vetro
   ========================================================================== */
:root {
  --mark-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240' fill='none' stroke='%2314141A' stroke-width='2'%3E%3Ccircle cx='120' cy='120' r='100'/%3E%3Ccircle cx='120' cy='120' r='66'/%3E%3Ccircle cx='120' cy='120' r='32'/%3E%3Cpath d='M120 8v224M8 120h224'/%3E%3C/svg%3E");
  --mark-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240' fill='none' stroke='%23F2EDE3' stroke-width='2'%3E%3Ccircle cx='120' cy='120' r='100'/%3E%3Ccircle cx='120' cy='120' r='66'/%3E%3Ccircle cx='120' cy='120' r='32'/%3E%3Cpath d='M120 8v224M8 120h224'/%3E%3C/svg%3E");
}
/* il contenuto sta sempre sopra le forme decorative */
.story, .lab, .team, .how, .audience, .faq, .cta-band, .reviews { position: relative; overflow: hidden; }
.story > .wrap, .lab__inner, .team__inner, .how__inner, .audience__inner, .faq__inner { position: relative; z-index: 1; }

/* ---------- Chi siamo: mirino di stampa e retino appena visibili ---------- */
.story::before {
  content: '';
  position: absolute;
  right: -200px;
  top: 120px;
  width: 660px;
  height: 660px;
  background: var(--mark-ink) center / contain no-repeat;
  opacity: 0.07;
  animation: spin-slow 140s linear infinite;
  pointer-events: none;
}
.story::after {
  content: '';
  position: absolute;
  left: -60px;
  bottom: 0;
  width: 560px;
  height: 420px;
  background-image: radial-gradient(circle, rgba(20, 20, 26, 0.13) 2px, transparent 2.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 0% 100%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 0% 100%, #000, transparent 72%);
  animation: drift 70s linear infinite;
  pointer-events: none;
}
.vm__card { position: relative; overflow: hidden; }
.vm__card::after {
  content: '';
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 300px;
  height: 300px;
  background: var(--mark-paper) center / contain no-repeat;
  opacity: 0.12;
  animation: spin-slow 80s linear infinite;
  pointer-events: none;
}
.vm__card > * { position: relative; z-index: 1; }
.vm__card.rv, .person.rv, .how__item.rv, .funnel__bar.rv, .aud.rv, .review.rv {
  transition: opacity 800ms var(--ease), transform 420ms var(--ease), border-color 220ms var(--ease), background-color 260ms var(--ease);
}
.fi::before { transition: transform 260ms var(--ease); }

/* ---------- Laboratorio: bagliore rosso e retino sul nero ---------- */
.lab::before {
  content: '';
  position: absolute;
  right: -160px;
  top: -120px;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 32, 38, 0.32), transparent 68%);
  animation: float-a 20s ease-in-out infinite;
  pointer-events: none;
}
.lab::after {
  content: '';
  position: absolute;
  left: -40px;
  bottom: 0;
  width: 560px;
  height: 380px;
  background-image: radial-gradient(circle, rgba(193, 32, 38, 0.5) 2px, transparent 2.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 0% 100%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 0% 100%, #000, transparent 72%);
  animation: drift 60s linear infinite;
  pointer-events: none;
}
.funnel__bar { position: relative; overflow: hidden; }
.funnel__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 800ms var(--ease);
  pointer-events: none;
}

/* ---------- Team: cerchi sovrapposti, etichetta di vetro, segni di taglio che si aprono ---------- */
.team::before {
  content: '';
  position: absolute;
  right: -80px;
  top: 40px;
  width: 560px;
  height: 460px;
  background:
    radial-gradient(circle at 32% 38%, var(--blue) 0 92px, transparent 93px),
    radial-gradient(circle at 62% 36%, var(--red) 0 92px, transparent 93px),
    radial-gradient(circle at 47% 68%, var(--amber) 0 92px, transparent 93px);
  mix-blend-mode: multiply;
  opacity: 0.11;
  animation: float-b 18s ease-in-out infinite;
  pointer-events: none;
}
.person__photo { position: relative; overflow: hidden; }
.person__ph { position: absolute; left: 0; right: 0; top: 40%; text-align: center; }
.person__cap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(242, 237, 227, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  color: var(--ink);
  text-align: left;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .person__cap { background: rgba(242, 237, 227, 0.94); }
}
.person__name { font-weight: 500; font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; }
.person__role { color: var(--muted); font-size: 17px; }
.person .crop::before, .person .crop::after { transition: top 300ms var(--ease), left 300ms var(--ease), bottom 300ms var(--ease), right 300ms var(--ease); }

/* ---------- Come lavoriamo: mirino sullo sfondo ---------- */
.how::before {
  content: '';
  position: absolute;
  left: -220px;
  bottom: -200px;
  width: 620px;
  height: 620px;
  background: var(--mark-ink) center / contain no-repeat;
  opacity: 0.06;
  animation: spin-slow 160s linear infinite reverse;
  pointer-events: none;
}
.how__item { border-top-color: var(--ink); }

/* ---------- Per chi lavoriamo: forme in movimento e righe di vetro ---------- */
.audience::before, .audience::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.audience::before {
  right: -120px;
  top: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(240, 176, 48, 0.55), transparent 68%);
  animation: float-a 19s ease-in-out infinite;
}
.audience::after {
  left: 28%;
  bottom: -220px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(20, 20, 26, 0.5), transparent 68%);
  animation: float-b 22s ease-in-out infinite;
}
.audience__list { margin-top: -32px; }
.aud { margin: 0 -24px; padding: 32px 24px; border-radius: var(--radius); border-top: none; box-shadow: inset 0 1px 0 rgba(242, 237, 227, 0.5); }
.aud:first-child { padding-top: 32px; box-shadow: none; }
.aud + .aud { margin-top: 0; }

/* ---------- Domande frequenti: punto interrogativo a contorno ---------- */
.faq__head::after {
  content: '?' / '';
  display: block;
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(180px, 22vw, 320px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(20, 20, 26, 0.16);
  animation: float-b 13s ease-in-out infinite;
  user-select: none;
}
.qa summary { transition: padding-left 260ms var(--ease), background-color 220ms var(--ease); }
.qa[open] .qa__q { color: var(--red-dark); }
.qa[open] .qa__a { animation: rise 420ms var(--ease) both; }

/* ---------- Fascia finale: retino appena visibile ---------- */
.cta-band::before {
  content: '';
  position: absolute;
  left: -40px;
  bottom: -40px;
  width: 520px;
  height: 340px;
  background-image: radial-gradient(circle, rgba(242, 237, 227, 0.4) 2px, transparent 2.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 0% 100%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 0% 100%, #000, transparent 72%);
  animation: drift 60s linear infinite;
  pointer-events: none;
}

/* ---------- Effetti solo con il mouse ---------- */
@media (hover: hover) and (pointer: fine) {
  .vm__card:hover { transform: translateY(-8px); }
  .story .fi:hover::before { transform: scale(1.6); }
  .funnel__bar:hover { transform: translateX(12px); }
  .funnel__bar:hover::after { transform: translateX(120%); }
  .person:hover { transform: translateY(-8px); }
  .person:hover .crop::before { top: -24px; left: -24px; }
  .person:hover .crop::after { bottom: -24px; right: -24px; }
  .how__item:hover { transform: translateY(-6px); border-top-color: var(--red); }
  .aud:hover {
    transform: translateX(10px);
    background: rgba(20, 20, 26, 0.2);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(242, 237, 227, 0.4);
  }
  .qa summary:hover { padding-left: 16px; background-color: rgba(20, 20, 26, 0.045); }
}

/* ---------- Schermi piccoli ---------- */
@media (max-width: 900px) {
  .audience__list { margin-top: 0; }
  .aud:first-child { padding-top: 32px; }
  .story::before { width: 440px; height: 440px; right: -180px; }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  .story::before, .story::after, .vm__card::after, .lab::before, .lab::after, .team::before,
  .how::before, .audience::before, .audience::after, .faq__head::after, .cta-band::before { animation: none; }
  .qa[open] .qa__a { animation: none; }
  .funnel__bar::after { display: none; }
  .vm__card.rv, .person.rv, .how__item.rv, .funnel__bar.rv, .aud.rv, .review.rv, .qa summary { transition: none; }
}

@media (max-width: 640px) {
  .aud { margin: 0 -12px; padding: 28px 12px; }
  .aud:first-child { padding-top: 28px; }
  .faq__head::after { font-size: 160px; margin-top: 8px; }
  .team::before { width: 360px; height: 300px; right: -120px; }
}

/* linee tra le righe di "Per chi lavoriamo": dritte, senza angoli arrotondati */
.aud { position: relative; box-shadow: none; }
.aud::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: rgba(242, 237, 227, 0.5); transition: opacity 200ms var(--ease); }
.aud:first-child::before { display: none; }
@media (hover: hover) and (pointer: fine) {
  .aud:hover::before { opacity: 0; }
}
@media (max-width: 640px) {
  .aud::before { left: 12px; right: 12px; }
}

/* ---------- Team: foto ---------- */
.person__photo--img { background: var(--ink); }
.person__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

/* Team: il ruolo sta su una sola riga. La misura del carattere segue la larghezza della scheda (uguale per tutti), così anche i ruoli lunghi ci stanno. */
.person__role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
@supports (width: 1cqi) {
  .person__photo--img { container-type: inline-size; }
  .person__role { font-size: clamp(11px, calc((100cqi - 56px) / 16), 17px); }
}
