/* ═══════════════════════════════════════════════════════════
   Dualme Landing — Parallasse + sezione Agent
   Solo variabili e font già definiti in style.css.
   ═══════════════════════════════════════════════════════════ */

/* ── HERO: pila di foto a profondità diverse ───────────────── */
.hero-visual { position: relative; background: var(--rose); }

.depth-stack { position: absolute; inset: 0; }

.depth-layer {
  position: absolute;
  overflow: hidden;
  will-change: transform;
  border: 2px solid var(--ink);
  background: var(--bg);
}
.depth-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.depth-l1 { width: 62%; aspect-ratio: 3 / 4; left: 40%; top: 3%; }
.depth-l2 { width: 58%; aspect-ratio: 3 / 4; left: -6%; top: 12%; }
.depth-l3 { width: 58%; aspect-ratio: 3 / 4; left: 46%; top: 44%; }
.depth-l4 { width: 72%; aspect-ratio: 3 / 4; left: 12%; top: 30%; }

/* Retino: la foto più lontana diventa puntini color inchiostro sul rosa */
.depth-halftone { background: transparent; border: none; }
.depth-halftone img {
  filter: grayscale(1) contrast(1.5);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 46%);
  mask-image: radial-gradient(circle, #000 42%, transparent 46%);
  -webkit-mask-size: 6px 6px;
  mask-size: 6px 6px;
}

/* Rimando all'agent nell'hero */
.hero-agent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.2rem;
  align-self: flex-start;
}

/* ── WORKFLOW: la foto scorre dentro la sua cornice ────────── */
.how-step-media { overflow: hidden; }
.how-step-media img {
  height: 118%;
  will-change: transform;
}

/* ── USE CASES: stessa logica, la griglia resta ferma ──────── */
.uc-image img { height: 116%; }

/* ── VANTAGGI: il confronto resta fermo mentre scorre l'elenco ─ */
.benefits-visual {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  align-self: start;
}

/* ── AGENT: sezione bloccata guidata dallo scroll ──────────── */
#agent {
  position: relative;
  height: 420vh;
  background: var(--bg-dark);
  color: var(--bg);
}

.agent-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: calc(var(--nav-h) + 1.5rem) var(--pad) 2rem;
}

.agent-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.agent-copy { display: flex; flex-direction: column; min-height: 0; }

#agent .section-label { align-self: flex-start; background: var(--rose); color: var(--ink); }

#agent .section-title {
  color: var(--bg);
  font-size: clamp(2.2rem, 4.2vw, 3.75rem);
  margin-bottom: 1rem;
}
#agent .section-title em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--rose);
}

.agent-sub {
  font-size: 0.9375rem;
  color: rgba(240,237,232,0.6);
  max-width: 440px;
  margin-bottom: 1.5rem;
}

.agent-steps { min-height: 0; }

.agent-step {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(240,237,232,0.2);
  opacity: 0.38;
  transition: opacity 0.3s ease;
}
.agent-step.on { opacity: 1; }
.agent-step span { font-size: 0.75rem; color: var(--rose); padding-top: 0.15rem; }
.agent-step h3 { font-size: 1rem; letter-spacing: -0.01em; line-height: 1.2; }
.agent-step p {
  grid-column: 2;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(240,237,232,0.6);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin 0.3s ease;
}
.agent-step.on.current p { max-height: 4.5em; margin-top: 0.25rem; }

.agent-cta {
  align-self: flex-start;
  margin-top: 1.25rem;
  background: var(--rose);
  color: var(--ink);
  border-color: var(--rose);
}

/* Colonna destra: chat davanti, risultati dietro */
.agent-scene { position: relative; min-height: 0; }

.agent-chat {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--bg);
  will-change: transform;
}
.agent-chat-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--ink);
}
.agent-chat-bar i { font-style: normal; color: var(--ink-mid); }
.agent-chat-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  min-height: 19rem;
}

.msg {
  max-width: 88%;
  font-size: 0.875rem;
  line-height: 1.45;
  padding: 0.6rem 0.8rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.msg.on { opacity: 1; transform: none; }
.msg-user { align-self: flex-end; background: var(--ink); color: var(--bg); }
.msg-agent { align-self: flex-start; background: var(--rose); }
.msg-agent b { font-weight: 700; }

.agent-chat-note {
  font-size: 0.6875rem;
  color: var(--ink-mid);
  padding: 0 0.9rem 0.7rem;
}

/* Le foto generate salgono dietro la chat, ognuna alla sua velocità */
.agent-results { position: absolute; inset: 0; }
.agent-shot {
  position: absolute;
  width: 46%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 2px solid var(--bg);
  opacity: 0;
  will-change: transform, opacity;
}
.agent-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.agent-shot:nth-child(1) { left: 0; bottom: 0; }
.agent-shot:nth-child(2) { left: 27%; bottom: 8%; }
.agent-shot:nth-child(3) { left: 54%; bottom: 16%; }

/* ── FALLBACK: niente blocco né movimento ──────────────────── */
.px-off #agent { height: auto; }
.px-off .agent-stage { position: static; height: auto; overflow: visible; padding-bottom: 4rem; }
.px-off .agent-inner { height: auto; }
.px-off .agent-scene { display: flex; flex-direction: column; gap: 1rem; }
.px-off .agent-chat,
.px-off .agent-results { position: static; }
.px-off .agent-results { display: flex; gap: 0.5rem; order: 2; }
.px-off .agent-shot { position: static; width: 33%; opacity: 1; transform: none !important; }
.px-off .agent-step { opacity: 1; }
.px-off .agent-step p { max-height: none; margin-top: 0.25rem; }
.px-off .msg { opacity: 1; transform: none; }
.px-still .how-step-media img,
.px-still .uc-image img { height: 100%; }
.px-off .benefits-visual { position: static; }

@media (max-width: 900px) {
  .agent-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { min-height: 460px; }
}


/* Le sezioni entrano dai lati: niente barra di scorrimento orizzontale */
html, body { overflow-x: clip; }
