/* ================================================
   SINGLE WORKS — SVCP
   Reset global section padding/overflow per ogni sezione
   ================================================ */

#svcp {
  background: #0a0a0a;
  color: #fff;
  overflow: clip; /* non crea uno scroll container secondario come overflow:hidden farebbe */
}

/* ── HERO ────────────────────────────────────── */

#svcp-hero {
  position: relative !important;
  width: 100%;
  height: var(--vh-full, 100vh); /* schermo intero, anche dietro la barra di Safari (iOS 26) */
  padding: 0 !important;       /* annulla section { padding: 60px 40px } */
  overflow: hidden !important;
}

#svcp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
}

#svcp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,   /* sfumatura in alto: logo e menu leggibili su immagini chiare */
    rgba(0,0,0,0.12) 22%,
    rgba(0,0,0,0.15) 35%,
    rgba(0,0,0,0.75) 100%
  );
  z-index: 1;
}

#svcp-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 60px 40px calc(60px + var(--bottom-ui, 0px)); /* sopra la barra del browser */
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#svcp-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.svcp-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fac400;
  border: 1px solid rgba(250, 196, 0, 0.55);
  padding: 4px 12px;
  border-radius: 100px;
}

/* "+N" solo su mobile (da desktop si vedono tutti i tag) */
.svcp-tag-more {
  display: none;
}

.svcp-year {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
}

#svcp-hero-title {
  font-size: clamp(3rem, 6.5vw, 7rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 1000px;
  opacity: 0;
  color: #fff;
}

/* scroll hint — desktop a destra, mobile centrato */
#svcp-scroll-hint {
  position: absolute;
  bottom: calc(60px + var(--bottom-ui, 0px));
  right: 40px;
  z-index: 3;
  opacity: 0;
}

@media (max-width: 991px) {
  /* Freccia sopra tag e titolo (freccia → tag → titolo), nel flusso del blocco testi */
  #svcp-scroll-hint {
    position: static;
    order: -1;
    margin-bottom: 20px; /* + gap 12px: più aria tra freccia e tag */
  }
}

.svcp-sh-circle {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 50%;
}

.svcp-sh-pulse {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 50%;
}

/* ── TEXT SECTIONS ───────────────────────────── */

.svcp-section {
  padding: 120px 40px !important;  /* sovrascrive section { padding: 60px 40px } */
  overflow: visible !important;
}

.svcp-inner {
  display: flex;
  gap: 100px;
  align-items: flex-start;
}

.svcp-col-40 {
  flex: 0 0 36%;
}

.svcp-col-60 {
  flex: 1;
}

.svcp-col-50 {
  flex: 1;
}

.svcp-section-title {
  font-size: clamp(1.8rem, 3vw, 3rem) !important;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  color: #fff !important;
}

.svcp-section-title::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: #fac400;
  margin-bottom: 24px;
}

.svcp-col-title {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem) !important;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 22px !important;
  color: #fff !important;
}

.svcp-body-text {
  font-size: var(--text-body, clamp(1rem, 1.2vw, 1.1rem)); /* stessa misura del footer (style.css) */
  line-height: 1.8;
  color: rgba(255,255,255,0.78);
}

.svcp-body-text p {
  margin: 0 0 1.2em;
  color: rgba(255,255,255,0.78);
}

.svcp-body-text p:last-child {
  margin-bottom: 0;
}

/* ── GALLERY ─────────────────────────────────── */

.svcp-gallery {
  padding: 0 !important;
  overflow: visible !important;
}

.svcp-grid {
  display: grid;
  gap: 6px;
}

.svcp-grid-3 {
  grid-template-columns: 3fr 2fr;
}

.svcp-pbox {
  overflow: hidden;
  background: #111;
}

.svcp-pbox.svcp-span-2 {
  min-height: 62vh;
}

.svcp-grid-3 .svcp-pbox:not(.svcp-span-2) {
  min-height: 62vh;
}

.svcp-pbox-wide {
  overflow: hidden;
  min-height: 52vh;
  background: #111;
  padding: 0 !important;
}

.svcp-grid-3-equal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.svcp-grid-3-equal .svcp-pbox {
  min-height: 42vh;
}

.svcp-pbox-final {
  overflow: hidden;
  background: #111;
  padding: 0 !important;
}

.svcp-pbox img,
.svcp-pbox-wide img,
.svcp-pbox-final img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.svcp-pbox-final img {
  height: auto;
  object-fit: unset;
}

.svcp-pbox:hover img,
.svcp-pbox-wide:hover img {
  transform: scale(1.04);
}

/* ── SCROLL REVEAL ───────────────────────────── */

.svcp-reveal {
  opacity: 0;
  transform: translateY(48px);
}

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

/* ── NAVIGATION ──────────────────────────────── */

/* Navigazione tra i progetti: precedente · Tutti i Works · successivo */
.svcp-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 72px 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #0a0a0a;
}

.svcp-nav-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.svcp-nav-item:hover {
  text-decoration: none;
}

.svcp-nav-next {
  align-items: flex-end;
  text-align: right;
}

.svcp-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fac400;
}

.svcp-nav-arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.svcp-nav-title {
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  transition: color 0.3s ease;
}

.svcp-nav-item:hover .svcp-nav-title {
  color: #fac400;
}

.svcp-nav-prev:hover .svcp-nav-arrow { transform: translateX(-6px); }
.svcp-nav-next:hover .svcp-nav-arrow { transform: translateX(6px); }

.svcp-nav-all {
  padding: 13px 24px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.svcp-nav-all:hover {
  background: #fac400;
  border-color: #fac400;
  color: #000;
  text-decoration: none;
}

/* ── MOBILE ──────────────────────────────────── */

@media (max-width: 991px) {
  #svcp-hero-content {
    padding: 40px 20px calc(48px + var(--bottom-ui, 0px)) !important; /* la freccia ora sta sopra i tag */
    gap: 12px;
  }

  /* Tanti tag: più compatti, primi 3 + "+N" */
  #svcp-hero-meta {
    gap: 6px;
  }

  .svcp-tag {
    font-size: 0.58rem;
    padding: 3px 10px;
  }

  .svcp-tag-extra {
    display: none;
  }

  .svcp-tag-more {
    display: block;
  }

  .svcp-section {
    padding: 70px 20px !important;  /* mobile: 20px match header mobile */
  }

  /* Testi ↔ immagini più vicini: 40px invece di 70+70 (la regola sopra annullava
     anche il padding-top:0 scritto nella gallery) */
  .svcp-text1 {
    padding-bottom: 40px !important;
  }

  .svcp-section.svcp-gallery {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .svcp-text2 {
    padding-top: 40px !important;
  }

  .svcp-inner {
    flex-direction: column;
    gap: 36px;
  }

  .svcp-col-40,
  .svcp-col-60,
  .svcp-col-50 {
    flex: unset;
    width: 100%;
  }

  .svcp-grid-3 {
    grid-template-columns: 1fr;
  }

  .svcp-pbox.svcp-span-2,
  .svcp-grid-3 .svcp-pbox:not(.svcp-span-2) {
    min-height: 55vw;
  }

  .svcp-pbox-wide {
    min-height: 50vw;
  }

  .svcp-grid-3-equal {
    grid-template-columns: 1fr 1fr;
  }

  .svcp-grid-3-equal .svcp-pbox:last-child:nth-child(3) {
    grid-column: span 2;
  }

  .svcp-grid-3-equal .svcp-pbox {
    min-height: 44vw;
  }

  /* Navigazione progetti: "Tutti i Works" sopra, precedente e successivo affiancati */
  .svcp-nav {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding: 48px 20px;
  }

  .svcp-nav-all {
    grid-column: 1 / -1;
    order: -1;
    justify-self: center;
  }

  .svcp-nav-title {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
  }
}


/* ── LIGHT SECTIONS ──────────────────────────── */

.svcp-section.svcp-light {
  background: #fff;
}

.svcp-section.svcp-light .svcp-section-title,
.svcp-section.svcp-light .svcp-col-title {
  color: #111 !important;
}

.svcp-section.svcp-light .svcp-section-title::before {
  background: #fac400;
}

.svcp-section.svcp-light .svcp-body-text,
.svcp-section.svcp-light .svcp-body-text p {
  color: rgba(0, 0, 0, 0.70);
}

/* ── FINAL BACKGROUND SECTION ────────────────── */

.svcp-final-bg {
  position: relative;
  height: var(--vh-initial, 100dvh);
  background-image: url('../img/schermo-super.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden !important;
}

.svcp-final-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
  z-index: 1;
}

.svcp-final-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 991px) {
  .svcp-final-bg {
    /* height = 2×vw × (IMG_H/IMG_W) = 200vw × 2090/3500 ≈ 119.4vw — nessun spazio vuoto */
    height: calc(200vw * 2090 / 3500) !important;
    padding: 0 !important;
    background-size: 200% auto;
    background-position: center center;
  }

  .svcp-screen-label {
    bottom: 16px;
  }
}

.svcp-no-pb {
  padding-bottom: 0 !important;
}

/* ── SCREEN OVERLAY ──────────────────────────── */

@keyframes screen-glow {
  0%, 100% {
    box-shadow:
      0 0 60px 25px rgba(130,175,255,0.10),
      0 0 130px 60px rgba(110,155,255,0.06),
      inset 0 4px 18px 4px rgba(0,0,0,0.70),
      inset 0 -4px 18px 4px rgba(0,0,0,0.70),
      inset 4px 0 18px 4px rgba(0,0,0,0.55),
      inset -4px 0 18px 4px rgba(0,0,0,0.55);
  }
  50% {
    box-shadow:
      0 0 90px 40px rgba(130,175,255,0.18),
      0 0 180px 90px rgba(110,155,255,0.11),
      inset 0 4px 18px 4px rgba(0,0,0,0.70),
      inset 0 -4px 18px 4px rgba(0,0,0,0.70),
      inset 4px 0 18px 4px rgba(0,0,0,0.55),
      inset -4px 0 18px 4px rgba(0,0,0,0.55);
  }
}

.svcp-screen-link {
  position: absolute;
  z-index: 2;
  display: none; /* JS posiziona e mostra */
  overflow: hidden;
  cursor: pointer;
  animation: screen-glow 4s ease-in-out infinite;
}

/* riflesso schermo */
.svcp-screen-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -25%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.09) 0%,
    rgba(255,255,255,0.03) 35%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 3;
}

.svcp-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  opacity: 0.80;
  transition: opacity 0.3s ease;
}

.svcp-screen-link:hover .svcp-screen-img {
  opacity: 1;
}

/* CTA label — sul fondo della section finale */
.svcp-screen-label {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: #fff;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 991px) {
  .svcp-screen-label {
    bottom: 100px;
    font-size: clamp(0.65rem, 2.8vw, 0.85rem);
    letter-spacing: 0.14em;
    white-space: normal;
    text-align: left;
    width: calc(100% - 40px);
    left: 20px;
    transform: none;
  }
}


/* ── HERO TITLE WORDS (SplitText) ────────────── */

.svcp-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

/* Mobile: sfumatura in cima che parte da nero pieno, senza scalino dalla barra nera di Safari */
@media (max-width: 991px) {
  #svcp-hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,1) 0%,
      rgba(0,0,0,0.12) 28%,
      rgba(0,0,0,0.15) 40%,
      rgba(0,0,0,0.75) 100%
    );
  }
}
