/* ==========================================================================
   Laura Rubino — effetti di movimento
   Caricato dopo style.css. Gli effetti JS sono in js/motion.js.
   ========================================================================== */

/* ---------- Titoli a parole / lettere (kinetic) ---------- */
.wrd{
  display: inline-block;
  white-space: nowrap;
}
/* La maschera taglia il testo in basso e in alto: il padding evita che si tagliano le lettere */
.wd{
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: .06em .02em .14em;
  margin: -.06em -.02em -.14em;
}
.wd__in{
  display: inline-block;
  will-change: transform;
}

/* Il gradiente del nome scorre piano, come una luce che passa sul titolo */
.hero__title .text-gradient{
  display: inline-block;
  background-size: 200% auto;
  animation: grad-shift 7s ease-in-out infinite alternate;
}
@keyframes grad-shift{
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ---------- Striscia in scorrimento (marquee) ---------- */
.marquee{
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0;
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}
.marquee__track{
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__group{
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding-right: 2.2rem;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  white-space: nowrap;
}
.marquee__group span:nth-of-type(odd){ color: var(--text); }
.marquee__group span:nth-of-type(even){
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--coral);
}
.marquee__group i{
  font-style: normal;
  font-size: .5em;
  color: var(--gold);
}

/* ---------- Chi sono: ellisse parabolica ---------- */
.split__media{ position: relative; }
.photo-frame{ position: relative; z-index: 1; }
.chi-art{
  position: absolute;
  z-index: 0;
  top: -7%;
  right: -6%;
  width: 86%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(242,184,75,.22);
  box-shadow: 0 40px 90px -40px rgba(217,70,239,.55);
  pointer-events: none;
}
.chi-art img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hai un evento in mente?: ellisse viola su tutta la sezione ---------- */
.section--contact{ position: relative; overflow: hidden; }
.section--contact > .container{ position: relative; z-index: 1; }
.contact-art{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 40%, transparent 100%);
}
.contact-art img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}

/* Versione di sfondo nella pagina "La mia storia" */
#chi-sono{ position: relative; overflow: hidden; }
#chi-sono > .container{ position: relative; z-index: 1; }
.chi-bg{
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .6;
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 40%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 62% 62% at 50% 40%, #000 30%, transparent 78%);
}
.chi-bg img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Timeline: linea che si disegna ---------- */
.timeline__progress{
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--coral), var(--magenta), var(--indigo));
  transform-origin: top center;
  transform: scaleY(0);
}

/* ---------- Con il movimento attivo, niente transizioni sulle proprietà che GSAP anima ---------- */
.motion-on .proj__photo img,
.motion-on .card-project__photo img{
  transition: none;
}

/* ---------- Riduci movimento: spegne tutto ---------- */
@media (prefers-reduced-motion: reduce){
  .wd__in{ transform: none !important; }
  .hero__title .text-gradient{ animation: none; }
  .marquee__track{ transform: none !important; }
  .chi-art img, .chi-bg img{ transform: none !important; }
}

@media (max-width: 900px){
  .chi-art{ top: -5%; right: -6%; width: 94%; }
}
