/* =====================================================================
   Home — si aggiunge a style.css solo sulla home
   ===================================================================== */

/* ---------- apertura: progetti in dissolvenza e presentazione in prima persona */
/* altezza minima a tutto schermo ma libera di crescere: su schermi bassi il testo non finisce sotto l'intestazione */
.pa-hero { position: relative; min-height: max(100svh, 640px); padding-top: calc(var(--header-h) + 24px); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.pa-bgs, .pa-bg { position: absolute; inset: 0; margin: 0; }
.pa-bg { opacity: 0; animation: pa-fade 24s linear infinite; animation-delay: calc(var(--i) * 6s - .5s); }
.pa-bg img { width: 100%; height: 100%; object-fit: cover; animation: pa-zoom 24s linear infinite; animation-delay: inherit; }
@keyframes pa-fade { 0% { opacity: 0; } 4% { opacity: 1; } 25% { opacity: 1; } 29% { opacity: 0; } 100% { opacity: 0; } }
@keyframes pa-zoom { from { transform: scale(1.12); } 29% { transform: scale(1); } to { transform: scale(1); } }
.pa-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,9,.55) 0%, rgba(10,10,9,.15) 35%, rgba(10,10,9,.85) 100%); }
.pa-hero-inner { position: relative; z-index: 2; padding-bottom: clamp(48px, 10vh, 110px); text-shadow: 0 2px 24px rgba(0,0,0,.4); }
.pa-portrait { width: 92px; height: 92px; margin: 0 0 22px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(236,235,230,.4); }
.pa-portrait img { width: 100%; height: 100%; object-fit: cover; }
.pa-hello { font-size: var(--fs-lead); font-style: italic; color: #e2d6c8; margin-bottom: .4em; }
.pa-title { font-size: clamp(2.6rem, min(1rem + 6.6vw, 10.5svh), 7.6rem); font-weight: 300; line-height: .98; letter-spacing: -.035em; margin-bottom: .35em; }
.pa-title span { display: block; }
.pa-title em { font-style: italic; font-weight: 400; color: #e2d6c8; }
.pa-lead { font-size: var(--fs-lead); font-weight: 300; max-width: 44ch; color: #dcd9d2; margin-bottom: 1.8em; }

/* ---------- da stanza vuota a casa: circa 1/4 di schermo di scroll per ogni render */
.pa-frames { position: relative; height: calc(var(--n) * 28vh + 100vh); }
.pa-frames-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.pa-frames-stack, .pa-frame { position: absolute; inset: 0; margin: 0; }
.pa-frame { opacity: 0; transition: opacity .45s ease; }
.pa-frame.is-on { opacity: 1; }
.pa-frame img { width: 100%; height: 100%; object-fit: cover; }
.pa-frames-sticky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,9,.82) 0%, rgba(10,10,9,.35) 45%, rgba(10,10,9,0) 70%); pointer-events: none; }
.pa-frames-text { position: absolute; inset: auto 0 clamp(40px, 10vh, 100px); z-index: 2; }
.pa-frames-text .h2 { max-width: 12ch; margin-bottom: 1.2rem; }
.pa-caps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.pa-caps li { font-size: var(--fs-lead); font-weight: 300; color: rgba(236,235,230,.35); transition: color .5s, transform .5s var(--ease); }
.pa-caps li.is-on { color: var(--text); transform: translateX(12px); }
.pa-caps li.is-on::before { content: "— "; color: var(--accent); }
.pa-dots { display: flex; align-items: center; gap: 28px; }
.pa-dots li { position: relative; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(236,235,230,.5); transition: background .4s, border-color .4s, box-shadow .4s, transform .4s var(--ease); }
.pa-dots li + li::before { content: ""; position: absolute; right: 100%; top: 50%; width: 28px; height: 1px; background: rgba(236,235,230,.25); transition: background .4s; }
.pa-dots li.is-on { background: var(--accent); border-color: var(--accent); }
.pa-dots li.is-on::before { background: var(--accent); }
.pa-dots li.is-cur { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(181,164,147,.22), 0 0 18px rgba(181,164,147,.7); }

/* ---------- citazione e pilastri, centrati con icone grandi */
.pa-intro .wrap { text-align: center; }
.pa-quote { margin-inline: auto; }
.pa-pillars { grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 7vw, 96px); text-align: center; }
.pa-pillars li { border-top: 1px solid var(--line-2); padding: 36px clamp(8px, 2vw, 28px) 0; display: flex; flex-direction: column; align-items: center; }
.pa-pillars .ico { width: 76px; height: 76px; margin-bottom: 22px; }
.pa-pillars .ico svg { width: 32px; height: 32px; stroke-width: 1.2; }
.pa-pillars p { max-width: 34ch; }

/* ---------- progetti in orizzontale */
.pa-hs { position: relative; }
.pa-hs-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 4vh, 48px); }
.pa-hs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.pa-hs-head .eyebrow { margin-bottom: .8rem; }
.pa-hs-track { display: flex; gap: clamp(16px, 2vw, 32px); padding-inline: max(var(--gutter), (100vw - var(--maxw)) / 2); will-change: transform; }
.pa-card { flex: none; width: clamp(300px, 34vw, 520px); display: flex; flex-direction: column; gap: 16px; }
.pa-card-media { aspect-ratio: 4 / 5; max-height: 58svh; overflow: hidden; border-radius: var(--radius); }
.pa-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pa-card:hover img { transform: scale(1.05); }
.pa-card-body h3 { font-size: var(--fs-h3); margin: .3rem 0 .4rem; }
.pa-card-body p { color: var(--muted); font-size: var(--fs-sm); max-width: 40ch; }
.pa-card-end { justify-content: center; align-items: flex-start; padding: 40px; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: var(--fs-h2); font-weight: 300; line-height: 1.05; width: clamp(260px, 26vw, 380px); }
.pa-card-end svg { width: 48px; height: 48px; margin-top: 24px; color: var(--accent); }
@media (max-width: 759px) {
  .pa-hs-sticky { position: static; height: auto; padding-block: 72px; }
  .pa-hs-track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .pa-card { width: 80vw; scroll-snap-align: start; }
  .pa-card-media { aspect-ratio: 4 / 3; }
}

/* ---------- metodo con linea che si disegna */
.pa-method-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px clamp(40px, 8vw, 140px); align-items: start; }
.pa-method-head { position: sticky; top: calc(var(--header-h) + 32px); }
.pa-method-lead { margin-top: 1.2rem; max-width: 34ch; }
.pa-quote { font-size: clamp(1.8rem, 1rem + 2.6vw, 3.6rem); line-height: 1.2; max-width: 30ch; }
.pa-steps-wrap { position: relative; }
.pa-steps { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 56px); }
.pa-line { position: absolute; left: 23px; top: 24px; bottom: 24px; width: 1px; background: var(--line); }
.pa-line i { position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: top; }
.pa-steps li { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 24px; }
.pa-dot .ico { background: var(--bg); transition: background .5s, border-color .5s, color .5s, box-shadow .6s, transform .5s var(--ease); }
.pa-steps h3 { font-size: var(--fs-h3); margin: .4rem 0 .5rem; }
.pa-steps p { color: var(--muted); max-width: 46ch; }
.js .pa-steps li > div { opacity: .45; transition: opacity .6s ease; }
.js .pa-steps li.is-lit > div { opacity: 1; }
.pa-steps li.is-lit .pa-dot .ico { background: var(--accent); border-color: var(--accent); color: var(--ink); transform: scale(1.08); box-shadow: 0 0 0 6px rgba(181,164,147,.14), 0 0 26px rgba(181,164,147,.5); }
@media (max-width: 860px) { .pa-method-grid { grid-template-columns: 1fr; } .pa-method-head { position: static; } .pa-pillars { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .pa-bg { animation: none; } .pa-bg:first-child { opacity: 1; } .pa-bg img { animation: none; }
}
