/* ==========================================================================
   IMPACTA HUB V4 - WORK JOURNEY & SCROLLYTELLING ENGINE
   Apple-grade Pinned Scroll, Luminous Rail Arrow, Color Contrasts & Demo Lab
   Strict Brand DNA: #080808 (Deep Black), #ff5b16 (Impacta Orange)
   ========================================================================== */

body.page-dark {
  background: #080808;
  color: #f5f5f7;
}

/* ─── 1. GATEWAY DI SCELTA INIZIALE (#inizio-lavori) ─── */
.work-door {
  padding: clamp(140px, 18vh, 180px) 0 clamp(60px, 8vh, 80px);
  min-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.door-header {
  max-width: 980px;
}

.door-title {
  font-size: clamp(44px, 6.2vw, 84px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #ffffff;
}

.door-title span {
  color: #8e8d94;
  font-weight: 600;
}

.door-lead {
  max-width: 640px;
  color: #b3b1ba;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.65;
  margin: 28px 0 48px;
}

.door-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 980px;
  gap: 32px;
  margin-bottom: 48px;
}

.door-action-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px 36px 32px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
}

.door-action-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 91, 22, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 91, 22, 0.1);
}

.door-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff5b16;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.door-card-heading {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.door-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #a4a2ab;
  margin-bottom: 24px;
}

.door-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #f5f5f7;
}

.door-action-row b {
  color: #ff5b16;
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.door-action-card:hover .door-action-row b {
  transform: translate(3px, 3px);
}

.door-scroll {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #8c8994;
  transition: color 0.25s ease;
  width: fit-content;
}

.door-scroll:hover {
  color: #ffffff;
}

.mouse-scroll-indicator {
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mouse-scroll-indicator i {
  width: 3px;
  height: 6px;
  background: #ff5b16;
  border-radius: 3px;
  animation: mouseWheel 1.8s infinite ease-in-out;
}

@keyframes mouseWheel {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ─── 2. INTRO CON SCROLL-LINKED PATH ANIMATION (FRECCIA A 90°) ─── */
.work-welcome {
  padding: clamp(100px, 14vh, 160px) 0 clamp(80px, 10vh, 120px);
  background: #080808;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.welcome-container {
  max-width: 1040px;
}

.arrow-story-header {
  position: relative;
  min-height: 280px;
  margin-bottom: 40px;
}

.arrow-phrase-top {
  text-align: left;
}

.arrow-phrase-top span {
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: inline-block;
}

.arrow-svg-wrap {
  width: 100%;
  height: 180px;
  position: relative;
  margin: -10px 0;
  pointer-events: none;
}

.luminous-arrow-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.arrow-path-bg {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.arrow-path-fg {
  stroke: var(--orange, #ff5b16);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  will-change: stroke-dashoffset;
  transition: stroke-dashoffset 0.1s linear;
}

.arrow-phrase-bottom {
  text-align: right;
  padding-right: clamp(10px, 3vw, 30px);
}

.arrow-phrase-bottom span {
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: inline-block;
  transition: color 0.3s ease;
}

.arrow-phrase-bottom.is-lit span {
  color: var(--orange, #ff5b16);
}

.welcome-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a7782;
  font-weight: 600;
  margin: 30px auto;
}

.cue-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5b16;
  box-shadow: 0 0 8px #ff5b16;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.welcome-manifesto-reveal {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-manifesto-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.manifesto-lead {
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 500;
  line-height: 1.45;
  color: #f0edf5;
  margin-bottom: 16px;
}

.manifesto-sub {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: #a29fab;
  margin-bottom: 36px;
}

.welcome-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(255, 91, 22, 0.1);
  border: 1px solid rgba(255, 91, 22, 0.35);
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-enter-btn:hover {
  background: #ff5b16;
  color: #080808;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 91, 22, 0.35);
}

/* ─── 3. CASO 1: DAVIDE DEL POPOLO (PINNED SCROLL SCRUBBED) ─── */
.featured-case {
  background: #080808;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pinned-story {
  padding-top: 60px;
}

.pinned-stage {
  position: relative;
}

.case-client-tag {
  color: #ff5b16;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.featured-heading h2 {
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  max-width: 900px;
}

.featured-heading h2 span {
  color: #8c8994;
}

/* Mockup Devices Scene */
.device-scene {
  position: relative;
  width: 88%;
  max-width: 880px;
  margin: 50px auto 60px;
  padding-right: 50px;
  padding-bottom: 30px;
  transform-origin: top right;
  will-change: transform, opacity;
  transition: transform 0.1s linear, opacity 0.1s linear;
}

.desktop-device {
  background: #18181b;
  padding: 8px 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.device-toolbar {
  height: 24px;
  display: flex;
  gap: 6px;
  align-items: center;
  padding-inline: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 6px;
}

.device-toolbar i {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}

.device-toolbar i:first-child { background: #ff5f56; }
.device-toolbar i:nth-child(2) { background: #ffbd2e; }
.device-toolbar i:nth-child(3) { background: #27c93f; }

.device-toolbar span {
  margin-left: auto;
  font-size: 9px;
  font-family: monospace;
  color: #888690;
  letter-spacing: 0.02em;
}

.desktop-device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.phone-device {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24%;
  padding: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: #111113;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 9px;
  left: 35%;
  width: 30%;
  height: 8px;
  background: #000000;
  border-radius: 12px;
  z-index: 2;
}

.phone-device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.device-scene figcaption {
  position: absolute;
  bottom: -28px;
  left: 0;
  font-size: 11px;
  color: #7b7884;
}

/* Narrative Split Panes */
.pinned-narrative {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 30px 0 60px;
}

.problem-pane, .solution-pane {
  padding: 32px;
  border-radius: 18px;
  backdrop-filter: blur(10px);
  will-change: transform, opacity;
}

.problem-pane {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.solution-pane {
  background: rgba(255, 91, 22, 0.03);
  border: 1px solid rgba(255, 91, 22, 0.28);
  box-shadow: 0 10px 30px rgba(255, 91, 22, 0.06);
}

.pane-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #71717a;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pane-badge-solution {
  color: #ff5b16;
}

.pinned-narrative h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #ffffff;
}

.solution-pane h3 {
  color: #ffffff;
}

.pinned-narrative p {
  font-size: 15px;
  line-height: 1.75;
  color: #a7a4b0;
}

/* Progress bar inside scene */
.scene-progress {
  display: none;
}

/* Desktop Pinned Enhancement */
@media(min-width: 1050px) and (min-height: 750px) and (prefers-reduced-motion: no-preference) {
  .pinned-story.is-enhanced {
    height: 320svh;
    padding: 0;
  }
  .is-enhanced .pinned-stage {
    height: calc(100svh - 80px);
    position: sticky;
    top: 80px;
    padding-top: 30px;
    overflow: hidden;
  }
  .is-enhanced .featured-heading {
    position: relative;
    z-index: 2;
    max-width: 65%;
  }
  .is-enhanced .featured-heading h2 {
    font-size: clamp(32px, 3.4vw, 46px);
  }
  .is-enhanced .device-scene {
    width: 58%;
    max-width: 680px;
    position: absolute;
    top: 140px;
    left: calc(20% + var(--scene-compact, 0) * 44%);
    margin: 0;
    transform: translateY(calc(var(--scene-compact, 0) * -85px)) scale(calc(1 - var(--scene-compact, 0) * 0.48));
    transform-origin: top right;
    opacity: calc(1 - var(--scene-compact, 0) * 0.25);
    pointer-events: none;
  }
  .is-enhanced .device-scene figcaption {
    opacity: calc(1 - var(--scene-compact, 0));
  }
  .is-enhanced .pinned-narrative {
    position: absolute;
    top: 250px;
    left: 0;
    right: 0;
    padding: 0;
    gap: 40px;
    max-width: 100%;
  }
  .is-enhanced .problem-pane {
    opacity: var(--problem-show, 0);
    transform: translateY(calc((1 - var(--problem-show, 0)) * 50px));
  }
  .is-enhanced .solution-pane {
    opacity: var(--solution-show, 0);
    transform: translateY(calc((1 - var(--solution-show, 0)) * 65px));
  }
  .is-enhanced .scene-progress {
    display: flex;
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    gap: 15px;
    align-items: center;
    color: #837e8c;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
  }
  .scene-progress i {
    height: 1px;
    flex: 1;
    background: rgba(255, 91, 22, 0.25);
  }
  .scene-progress span.active {
    color: #ff5b16;
  }
}

/* Outcome Metrics */
.project-outcome {
  padding: 80px 0 70px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.outcome-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff5b16;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.project-outcome h3 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.project-outcome p {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
  color: #b5b2bd;
  max-width: 820px;
  margin-bottom: 40px;
}

.outcome-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.outcome-metric-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
}

.om-val {
  display: block;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: #ff5b16;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.om-lbl {
  display: block;
  font-size: 13px;
  color: #9c99a6;
  line-height: 1.4;
}

/* Client Voice Quote (Reveals as user pulls up) */
.client-voice {
  padding: 80px 0 120px;
  max-width: 980px;
  opacity: 0.95;
  transition: opacity 0.5s ease;
}

.voice-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff5b16;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.client-voice h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.davide-quote-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #ff5b16;
  border-radius: 0 20px 20px 0;
  padding: clamp(28px, 4vw, 44px);
  margin: 0 0 32px;
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 54px;
  line-height: 1;
  color: #ff5b16;
  opacity: 0.6;
  display: block;
  margin-bottom: -15px;
}

.davide-quote-card p {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.6;
  letter-spacing: -0.015em;
  color: #f2edf7;
  font-style: italic;
}

.client-signature {
  margin-bottom: 48px;
}

.sig-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.sig-role {
  font-size: 13px;
  color: #928f9c;
  margin-top: 4px;
}

.next-case-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.next-case-link b {
  color: #ff5b16;
  font-size: 16px;
  transition: transform 0.25s ease;
}

.next-case-link:hover {
  background: rgba(255, 91, 22, 0.15);
  border-color: #ff5b16;
  transform: translateY(-2px);
}

.next-case-link:hover b {
  transform: translateY(3px);
}

/* ─── 4. CASO 2: RAFFAELLA SETOLA (DARK LUXURY #080808) ─── */
.editorial-case {
  background: #080808 !important;
  color: #f5f5f7 !important;
  padding: clamp(90px, 12vh, 140px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.4s ease;
}

.editorial-case .project-heading p {
  color: #ff5b16;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.editorial-case .project-heading h2 {
  color: #ffffff;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 900px;
}

.editorial-case .case-journey {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  margin-top: 50px;
  align-items: start;
}

.editorial-case .project-sticky {
  position: sticky;
  top: 120px;
}

.editorial-case .project-frame {
  aspect-ratio: 1.35;
  background: #111114;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.editorial-case .project-art.proskin {
  padding: 40px;
  background: #151518;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.editorial-case .project-art span:first-child {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff9a5c;
}

.editorial-case .project-art strong {
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.editorial-case .project-art strong i {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: #ff5b16;
}

.editorial-case .project-art span:last-child {
  font-size: 13px;
  color: #a1a1aa;
  line-height: 1.4;
}

.editorial-case figcaption {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: #a1a1aa;
  font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.editorial-case .chapter-label {
  color: #ff5b16;
  font-weight: 700;
}

.editorial-case .chapter-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
}

.editorial-case .chapter-track i {
  display: block;
  height: 100%;
  width: calc(var(--case-progress, 0) * 100%);
  background: #ff5b16;
  border-radius: 999px;
  transition: width 0.1s linear;
}

.editorial-case .visual-caption {
  font-size: 12px;
  color: #71717a;
  margin-top: 10px;
}

.editorial-case .narrative-step {
  padding: clamp(36px, 6vh, 60px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editorial-case .narrative-step:last-child {
  border-bottom: 0;
}

.editorial-case .narrative-step h3 {
  font-size: clamp(22px, 2.5vw, 30px);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 14px;
}

.editorial-case .narrative-step p {
  font-size: 16px;
  line-height: 1.8;
  color: #a1a1aa;
}

.editorial-case .narrative-step blockquote {
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.6;
  font-style: italic;
  color: #ffffff;
  border-left: 3px solid #ff5b16;
  padding-left: 24px;
  margin: 16px 0 20px;
}

.editorial-case .narrative-step cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
  color: #ff5b16;
}

/* ─── 5. CASO 3: MATTEO TIBERI (DEEP CELESTIAL MIDNIGHT BLUE #06080e) ─── */
.cosmic-case {
  background: #06080e !important;
  color: #e2e8f0 !important;
  padding: clamp(90px, 12vh, 140px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.cosmic-case .project-heading p {
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cosmic-case .project-heading h2 {
  color: #ffffff;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 900px;
}

.cosmic-case .case-journey {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  margin-top: 50px;
  align-items: start;
}

.cosmic-case .project-sticky {
  position: sticky;
  top: 120px;
}

.cosmic-case .project-frame {
  aspect-ratio: 1.35;
  background: #0c1220;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cosmic-case .project-art.kronoh {
  padding: 40px;
  background: #0a0e17;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.cosmic-case .project-art span:first-child {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
}

.cosmic-case .project-art strong {
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.cosmic-case .project-art strong i {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: #ff5b16;
}

.cosmic-case .project-art span:last-child {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

.cosmic-case figcaption {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(12, 18, 32, 0.85);
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.cosmic-case .chapter-label {
  color: #60a5fa;
  font-weight: 700;
}

.cosmic-case .chapter-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
}

.cosmic-case .chapter-track i {
  display: block;
  height: 100%;
  width: calc(var(--case-progress, 0) * 100%);
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
  border-radius: 999px;
  transition: width 0.1s linear;
}

.cosmic-case .visual-caption {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
}

.cosmic-case .narrative-step {
  padding: clamp(36px, 6vh, 60px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cosmic-case .narrative-step:last-child {
  border-bottom: 0;
}

.cosmic-case .narrative-step h3 {
  font-size: clamp(22px, 2.5vw, 30px);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 14px;
}

.cosmic-case .narrative-step p {
  font-size: 16px;
  line-height: 1.8;
  color: #cbd5e1;
}

.cosmic-case .narrative-step blockquote {
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.6;
  font-style: italic;
  color: #f1f5f9;
  border-left: 3px solid #60a5fa;
  padding-left: 24px;
  margin: 16px 0 20px;
}

.cosmic-case .narrative-step cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
  color: #60a5fa;
}

/* ─── 6. SEZIONE "E ANCORA MOLTO DI PIÙ" & FILTRO COMPLETO ─── */
.portfolio-expanded-section {
  padding: clamp(100px, 14vh, 150px) 0 80px;
  background: #080808;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-expanded-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.portfolio-expanded-header h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 14px;
}

.portfolio-expanded-header p {
  font-size: clamp(16px, 1.8vw, 19px);
  color: #9f9da8;
  line-height: 1.6;
}

/* Category Filter Bar */
.work-filter-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.work-filters button {
  background: transparent;
  border: 0;
  color: #9c99a6;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.work-filters button:hover {
  color: #ffffff;
}

.work-filters button[aria-pressed="true"] {
  background: #ff5b16;
  color: #080808;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 91, 22, 0.3);
}

.filter-status {
  text-align: center;
  font-size: 13px;
  color: #7b7884;
  margin-bottom: 40px;
}

/* Grid of Full Portfolio */
.portfolio-grid-expanded {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

.portfolio-card-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-card-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 91, 22, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 91, 22, 0.1);
}

.p-card-media {
  aspect-ratio: 1.6;
  background: #141416;
  position: relative;
  overflow: hidden;
}

.p-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card-item:hover .p-card-media img {
  transform: scale(1.04);
}

.p-card-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.p-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff5b16;
  margin-bottom: 8px;
}

.p-card-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 10px;
}

.p-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #9b98a4;
  margin-bottom: 18px;
}

.p-card-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.p-card-link b {
  color: #ff5b16;
  transition: transform 0.25s ease;
}

.portfolio-card-item:hover .p-card-link b {
  transform: translate(3px, -3px);
}

/* ─── 7. DEMO LAB INTERATTIVO (#laboratorio) ─── */
.demo-lab {
  padding: 100px 0 120px;
  background: #080808;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.demo-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.demo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 91, 22, 0.35);
}

.demo-cover {
  padding: 32px 28px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #141416;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-cover span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ff5b16;
}

.demo-cover strong {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.demo-copy {
  padding: 24px;
}

.demo-copy span {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #7b7884;
  margin-bottom: 8px;
}

.demo-copy h3 {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.demo-copy p {
  font-size: 13px;
  line-height: 1.6;
  color: #9e9ba8;
  margin-bottom: 18px;
}

.demo-copy button {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.demo-copy button span {
  color: #ff5b16;
  margin: 0;
  font-size: 15px;
}

/* Demo Modal Dialog */
.demo-dialog {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: #111113;
  color: #f5f5f7;
  max-width: 820px;
  width: calc(100% - 40px);
  padding: 0;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

.demo-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.demo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #ff5b16;
  font-weight: 600;
}

.demo-close {
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.demo-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.demo-content {
  padding: 36px 32px;
}

.demo-preview-hero h2 {
  font-size: 30px;
  margin: 12px 0;
}

.demo-preview-hero p {
  color: #a4a2ab;
  font-size: 15px;
  margin-bottom: 24px;
}

.demo-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.demo-columns > div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  min-height: 140px;
}

.demo-columns h3 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.demo-deal {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.demo-deal:hover {
  background: rgba(255, 91, 22, 0.15);
  border-color: #ff5b16;
}

.demo-deal span {
  display: block;
  font-size: 11px;
  color: #ff5b16;
  margin-top: 4px;
  font-weight: 500;
}

.demo-status {
  font-size: 13px;
  color: #22c55e;
  margin-top: 14px;
  font-weight: 500;
}

/* ─── 8. WORK CLOSE (CTA FINALE) ─── */
.work-close {
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.work-close h2 {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 32px;
}

/* ─── RESPONSIVE RULES ─── */
@media(max-width: 900px) {
  .door-options {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .portfolio-grid-expanded, .demo-grid {
    grid-template-columns: 1fr;
  }
  .editorial-case .case-journey, .cosmic-case .case-journey {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .editorial-case .project-sticky, .cosmic-case .project-sticky {
    position: relative;
    top: 0;
  }
  .outcome-metrics-row {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 700px) {
  .work-door {
    padding-top: 120px;
    padding-bottom: 40px;
  }
  .arrow-story-header {
    min-height: 220px;
  }
  .arrow-svg-wrap {
    height: 120px;
  }
  .arrow-phrase-top span, .arrow-phrase-bottom span {
    font-size: 34px;
  }
  .arrow-phrase-bottom {
    padding-right: 0;
  }
  .device-scene {
    width: 100%;
    padding-right: 25px;
    margin-block: 35px 50px;
  }
  .phone-device {
    border-radius: 16px;
    padding: 3px;
  }
  .phone-device img {
    border-radius: 12px;
  }
  .pinned-narrative {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .work-filters {
    border-radius: 16px;
    justify-content: center;
  }
  .work-filters button {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media(prefers-reduced-motion: reduce) {
  .pinned-story { height: auto !important; }
  .pinned-stage { position: relative !important; }
  .problem-pane, .solution-pane { opacity: 1 !important; transform: none !important; }
}
