/* ============================================================
   SITI SARTORIALI CSS — Solferino Technology
   siti-sartoriali.html — Split-screen scrollytelling
   ============================================================ */

/* ============================================================
   PAGE HERO
   ============================================================ */
.process-hero {
  padding-top: calc(var(--nav-h) + clamp(60px, 8vw, 100px));
  padding-bottom: clamp(48px, 6vw, 80px);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  border-bottom: 1px solid var(--border);
}

.process-hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 56px);
}

@media (min-width: 901px) {
  .process-hero-inner {
    grid-template-columns: 1.2fr 1fr; /* Divide lo schermo in due colonne pulite */
    align-items: start;
  }

  .process-hero-right {
    max-width: 440px; /* Impedisce al blocco di destra di allargarsi troppo */
    justify-self: end;
  }
}

.process-hero-label { margin-bottom: 20px; }

.process-hero-headline {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  overflow: hidden;
  color: var(--text);
}

.process-hero-headline .line-wrap span {
  display: block;
  will-change: transform, opacity;
}

.process-hero-headline em {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.process-hero-right {
  display: flex;
  flex-direction: column; /* Mantiene l'immagine sopra il testo */
  gap: 24px;
  width: 100%;
}

.process-hero-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9; /* Proporzione video moderna ed elegante */
  background: #e8e6e3;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.process-hero-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 12px,
    rgba(26,26,26,0.04) 12px,
    rgba(26,26,26,0.04) 13px
  );
}

.process-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.process-hero-desc {
  color: #5a5a5a;
  max-width: 100%; /* Sfrutta tutta la larghezza del suo contenitore fisso */
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
}

/* ============================================================
   SPLIT-SCREEN SCROLLYTELLING
   ============================================================ */
.process-split-outer {
  /* JS will set height based on step count */
}

.process-split-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* LEFT PANEL — Step navigation */
.process-left {
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: var(--nav-h) var(--gutter) clamp(40px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.process-left-inner { position: relative; z-index: 1; }

.process-section-label {
  margin-bottom: 48px;
}

/* Step list */
.step-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0 18px 14px; /* left padding clears the 3px accent bar */
  border-bottom: 1px solid var(--border);
  cursor: default;
  position: relative;
}

.step-nav-item:first-child { border-top: 1px solid var(--border); }

/* Active accent line slides in from left */
.step-nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-nav-item.is-active::before { transform: scaleY(1); }

.step-nav-item.is-active .step-num { color: var(--accent); }

.step-nav-item.is-active .step-label {
  color: var(--text);
  font-weight: 700;
}

.step-num {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  width: 24px;
  transition: color 0.3s ease;
}

.step-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.88rem, 1.3vw, 1.05rem);
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.3s ease, font-weight 0.3s ease;
}

/* Large step name shown prominently */
.step-current-display {
  margin-top: clamp(32px, 4vw, 56px);
  overflow: hidden;
}

.step-current-name {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  transition: none; /* GSAP handles transitions */
}

.step-current-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #5a5a5a;
  max-width: 360px;
  margin-top: 16px;
  min-height: 80px;
}

/* Progress bar */
.step-progress-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  transition: width 0.05s linear;
}

/* RIGHT PANEL — Wireframe SVG canvas */
.process-right {
  background: #f2f1ef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 40px;
}

.wireframe-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 9 / 11;
}

/* Each wireframe step is absolutely positioned, opacity controlled by JS */
.wireframe-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96);
  transition: none; /* GSAP controls these */
  will-change: opacity, transform;
}

.wireframe-step.is-visible {
  opacity: 1;
  transform: scale(1);
}

.wireframe-svg {
  width: 100%;
  height: 100%;
}

/* SVG element styles */
.wf-line   { stroke: var(--muted); stroke-width: 1; fill: none; stroke-dasharray: 600; stroke-dashoffset: 600; }
.wf-rect   { stroke: var(--text); stroke-width: 1.5; fill: none; }
.wf-accent { stroke: var(--accent); stroke-width: 2; fill: none; }
.wf-fill   { fill: rgba(26, 26, 26, 0.06); stroke: none; }
.wf-accent-fill { fill: rgba(139, 30, 47, 0.08); stroke: none; }
.wf-text-block  { fill: rgba(26, 26, 26, 0.12); }
.wf-code   {
  font-family: 'Courier New', monospace;
  font-size: 8px;
  fill: var(--muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   STEP INFO SECTION (below scrolly) — Mobile fallback list
   ============================================================ */
.steps-list-section {
  padding: var(--section-pad) var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: none; /* shown only on mobile */
}

.steps-list-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-list-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.step-list-item:first-child { border-top: 1px solid var(--border); }

.step-list-num {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  color: rgba(26, 26, 26, 0.08);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-list-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}

.step-list-name span { color: var(--accent); }

.step-list-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #5a5a5a;
}

.step-list-icon {
  display: block;
  width: 22px;
  height: 22px;
  margin-top: 10px;
  color: var(--accent);
  opacity: 0.7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .process-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .process-split-outer { display: none; }
  .steps-list-section  { display: block; }
}