/* Page Transition Carousel – full-bleed, full-height, motion + blur */
:root{
  --ptc-accent: var(--accent, #da291c);
  --ptc-ink: var(--ink, #111);
  --ptc-surface: var(--surface, #000);
  --header-h: 0px; /* valorizzata via JS */
}

/* Full viewport visibile: 100vh meno header+ticker */
.ptc.ptc--full{
  position: relative;
  inline-size: 100vw;
  block-size: calc(100vh - var(--header-h));
  overflow: clip;
  background: var(--ptc-surface);
  color: #fff; /* testi bianchi */
}

/* Stage */
.ptc__viewport{ position: relative; inline-size: 100%; block-size: 100%; }
.ptc__slideshow{ position: relative; inline-size: 100%; block-size: 100%; }

/* Slide */
.ptc__slide{
  position: absolute; inset: 0;
  z-index: -1;
  display: grid;
  align-content: end;      /* testo in basso */
  justify-items: start;    /* testo a sinistra */
}
.ptc__slide:nth-child(1){ z-index: 0; }

/* Immagine full-bleed */
.ptc__media{
  position: absolute; inset: 0;
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
  transform: scale(1);
}

/* Ken Burns su slide attiva */
.ptc__slide.is-active .ptc__media{
  animation: kenburns-in 12s ease-out forwards;
}
@keyframes kenburns-in{
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* Scrim per leggibilità */
.ptc__scrim{
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.60), rgba(0,0,0,.18));
  pointer-events: none;
}

/* Contenuto */
.ptc__content{
  position: relative; z-index: 1;
  inline-size: min(92vw, 1040px);
  padding: clamp(16px, 4vw, 48px);
  padding-bottom: clamp(18px, 6vh, 80px);
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* Tipografia – bianchi */
.ptc__title{
  margin: 0 0 6px 0;
  font: 800 clamp(28px, 5vw, 56px)/1.05 "Roboto Condensed", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #fff;
}
.ptc__subtitle{
  margin: 0 0 10px 0;
  font: 500 clamp(16px, 2.3vw, 22px)/1.25 "Inter", system-ui, sans-serif;
  color: #fff;
  opacity: .95;
}
.ptc__abstract{
  margin: 0 0 14px 0;
  font: 400 clamp(14px, 1.9vw, 18px)/1.45 "Inter", system-ui, sans-serif;
  max-inline-size: 60ch;
  color: #fff;
}
.ptc .cta{ margin-top: 4px; }

/* Dots */
.ptc__dots{
  position: absolute; inset-inline: 0; inset-block-end: 16px;
  display: grid; place-items: center; z-index: 2;
}
.ptc__dots > div{
  display:inline-grid; grid-auto-flow:column; gap:10px;
  background: color-mix(in oklab, #000 40%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid color-mix(in oklab, #fff 18%, transparent);
  padding: 6px 10px; border-radius: 999px;
}
.ptc__dot{
  inline-size: 10px; block-size: 10px; border-radius: 50%; border: 0;
  background: color-mix(in oklab, #fff 35%, #000);
  opacity: .55; cursor: pointer;
}
.ptc__dot[aria-current="true"]{ background: var(--ptc-accent); opacity: 1; }

/* Barre di transizione */
.ptc__bars{
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(5, 1fr);
  pointer-events: none;
}
.ptc__bar{
  transform: scaleY(0);
  transform-origin: top;
  background:
    linear-gradient(to bottom,
      color-mix(in oklab, var(--ptc-accent) 100%, transparent) 0%,
      color-mix(in oklab, var(--ptc-accent) 88%, black) 100%);
  opacity: .95;
}

/* Animazioni testo: fade + rise + blur */
@keyframes rise-blur-in{
  0%   { opacity:0; transform: translateY(14px); filter: blur(8px); }
  100% { opacity:1; transform: translateY(0);    filter: blur(0); }
}
@keyframes rise-blur-out{
  0%   { opacity:1; transform: translateY(0);    filter: blur(0); }
  100% { opacity:0; transform: translateY(-12px); filter: blur(8px); }
}

/* Stati applicati via JS sulla slide attiva */
.ptc__slide.is-active .ptc__title    { animation: rise-blur-in 800ms cubic-bezier(0.215,0.61,0.355,1) 180ms both; }
.ptc__slide.is-active .ptc__subtitle { animation: rise-blur-in 800ms cubic-bezier(0.215,0.61,0.355,1) 280ms both; }
.ptc__slide.is-active .ptc__abstract { animation: rise-blur-in 800ms cubic-bezier(0.215,0.61,0.355,1) 380ms both; }
.ptc__slide.is-active .cta           { animation: rise-blur-in 800ms cubic-bezier(0.215,0.61,0.355,1) 480ms both; }

/* Riduci motion → niente barre e animazioni */
@media (prefers-reduced-motion: reduce){
  .ptc__bar{ display:none; }
  .ptc__slide.is-active .ptc__title,
  .ptc__slide.is-active .ptc__subtitle,
  .ptc__slide.is-active .ptc__abstract,
  .ptc__slide.is-active .cta{ animation: none !important; }
}
