/* =============================================
   LAGO-INSPIRED EFFECTS — Argiva
   ============================================= */

/* =============================================
   LOADING SCREEN
   ============================================= */
body.loading { overflow: hidden; }

#loading-screen {
  position: fixed; inset: 0;
  background: var(--color-ebano);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1rem;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
#loading-screen.loading-screen--done {
  opacity: 0;
  pointer-events: none;
}
.loading-screen__logo {
  width: 270px;
  animation: loadingPulse 1.2s ease-in-out infinite alternate;
}
.loading-screen__line {
  width: 60px; height: 1px;
  background: var(--color-oro);
  animation: loadingExpand 1.2s var(--ease-out) forwards;
  transform-origin: left;
  transform: scaleX(0);
}
@keyframes loadingPulse {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}
@keyframes loadingExpand {
  to { transform: scaleX(1); }
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */
@media (pointer: fine) {
  * { cursor: none !important; }
}

.cursor-ring {
  position: fixed;
  width: 40px; height: 40px;
  border: 1px solid rgba(184, 150, 90, 0.6);
  border-radius: 50%;
  top: -20px; left: -20px;
  pointer-events: none;
  z-index: 9998;
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              border-color 0.3s,
              opacity 0.3s;
  will-change: transform;
}
.cursor-dot {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--color-oro);
  border-radius: 50%;
  top: -2px; left: -2px;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s, height 0.2s, opacity 0.2s;
  will-change: transform;
}
.cursor-ring--hover {
  width: 72px; height: 72px;
  top: -36px; left: -36px;
  border-color: var(--color-oro);
  background: rgba(184, 150, 90, 0.06);
}
.cursor-dot--hover {
  width: 6px; height: 6px;
  top: -3px; left: -3px;
}
.cursor-ring--hidden { opacity: 0; }

/* =============================================
   SPLIT TEXT REVEAL
   ============================================= */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
}
.word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease-out);
}
.word--visible { transform: translateY(0); }

/* =============================================
   CLIP-PATH REVEAL
   ============================================= */
.clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease-out);
}
.clip-reveal--visible { clip-path: inset(0 0% 0 0); }

.clip-reveal-up {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.0s var(--ease-out);
}
.clip-reveal-up.clip-reveal--visible { clip-path: inset(0% 0 0 0); }

/* =============================================
   PARALLAX WRAPPER
   ============================================= */
[data-parallax-wrap] {
  overflow: hidden;
}
[data-parallax] {
  will-change: transform;
  transform: scale(1.08);
}

/* =============================================
   STAGGER GRID ITEMS
   ============================================= */
.stagger-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.stagger-item--visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   DRAGGABLE HORIZONTAL SCROLL
   ============================================= */
.drag-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.drag-scroll::-webkit-scrollbar { display: none; }
.drag-scroll.dragging { cursor: grabbing; }
.drag-scroll-inner {
  display: flex;
  gap: 1.5rem;
  padding: 0 var(--gutter) var(--space-md);
  width: max-content;
}
.drag-scroll-inner > * {
  flex-shrink: 0;
  width: clamp(280px, 33vw, 420px);
}

/* =============================================
   MAGNETIC BUTTON
   ============================================= */
.btn--magnetic {
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}

/* =============================================
   HERO — CINEMATIC (lago-inspired)
   ============================================= */
.hero-cinematic {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-ebano);
}
.hero-cinematic__bg {
  position: absolute; inset: 0;
  overflow: hidden;
}
.hero-cinematic__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  animation: heroCinematicZoom 8s var(--ease-out) forwards;
}
@keyframes heroCinematicZoom {
  to { transform: scale(1.04); }
}
.hero-cinematic__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 46, 103, 0.72) 0%,
    rgba(26, 46, 103, 0.3) 50%,
    rgba(26, 46, 103, 0.55) 100%
  );
}

/* Local streaming video background */
.hero-video-poster {
  position: absolute; inset: 0;
  background: var(--color-ebano);
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  animation: hero-poster-fade 0.5s ease 2s forwards;
}
@keyframes hero-poster-fade {
  to { opacity: 0; }
}

.hero-video-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--color-ebano);
  pointer-events: none;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border: none;
  background: var(--color-ebano);
}
.hero-cinematic__content {
  position: relative; z-index: 2;
  color: var(--color-avorio);
  padding-top: 72px;
}
.hero-cinematic__eyebrow {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeInDown 1s var(--ease-out) 0.4s both;
}
.hero-cinematic__eyebrow-line {
  width: 40px; height: 1px;
  background: var(--color-oro);
}
.hero-cinematic__eyebrow-text {
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-oro-light);
}
.hero-cinematic__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  line-height: 0.92;
  margin-bottom: 2rem;
  overflow: hidden;
}
.hero-cinematic__title-line {
  display: block;
  overflow: hidden;
}
.hero-cinematic__title-line span {
  display: block;
  animation: slideUp 1s var(--ease-out) both;
}
.hero-cinematic__title-line:nth-child(1) span { animation-delay: 0.5s; }
.hero-cinematic__title-line:nth-child(2) span { animation-delay: 0.7s; }
.hero-cinematic__title-line:nth-child(3) span { animation-delay: 0.9s; }
.hero-cinematic__title-line span em {
  font-style: italic;
  color: var(--color-oro-light);
}
.hero-cinematic__sub {
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s var(--ease-out) 1.1s both;
}
.hero-cinematic__actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  animation: fadeInUp 1s var(--ease-out) 1.3s both;
}
.hero-cinematic__scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  animation: fadeIn 1s ease 1.8s both;
  transition: opacity 0.4s;
}
.hero-cinematic__scroll-text {
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  writing-mode: vertical-rl;
}
.hero-cinematic__scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--color-oro), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* =============================================
   CINEMATIC FULL-BLEED SECTION (lago-style)
   ============================================= */
.fullbleed-section {
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex; align-items: center;
}
.fullbleed-section__img-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
.fullbleed-section__img {
  width: 100%; height: 110%;
  object-fit: cover;
  transform: translateY(-5%);
}
.fullbleed-section__overlay {
  position: absolute; inset: 0;
}
.fullbleed-section__content {
  position: relative; z-index: 2;
}

/* =============================================
   STICKY TEXT + IMAGE (lago split scroll)
   ============================================= */
.sticky-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 0;
}
.sticky-split__text {
  position: sticky;
  top: calc(50vh - 220px);
  padding: var(--space-xl) var(--space-xl) var(--space-xl) 0;
  max-width: 520px;
}
.sticky-split__images {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: var(--space-xl) 0 var(--space-2xl);
}
.sticky-split__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  width: 100%;
}
.sticky-split__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}
.sticky-split__image:hover img { transform: scale(1.03); }

@media (max-width: 900px) {
  .sticky-split { grid-template-columns: 1fr; gap: var(--space-lg); }
  .sticky-split__text { position: static; top: auto; padding: 0; max-width: none; }
  .sticky-split__images { padding: 0 0 var(--space-lg); }
  .sticky-split__image { aspect-ratio: 16/9; }
}

/* =============================================
   NUMBERS SECTION (lago-style large stats)
   ============================================= */
.numbers-section {
  background: var(--color-ebano);
  padding: var(--space-2xl) 0;
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.numbers-item {
  padding: var(--space-xl) var(--space-lg);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}
.numbers-item__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--color-oro);
  line-height: 1;
  margin-bottom: 0.75rem;
  white-space: nowrap;
}
.numbers-item__label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 768px) {
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .numbers-grid { grid-template-columns: 1fr; border-left: none; }
  .numbers-item { border: none; border-bottom: 1px solid rgba(255, 255, 255,0.1); }
}

/* =============================================
   PRODUCT HORIZONTAL STRIP (lago-style)
   ============================================= */
.product-strip-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
  margin-bottom: var(--space-lg);
  padding: 0 var(--gutter);
}

.product-strip-card {
  background: var(--color-white);
  overflow: hidden;
  position: relative;
}
.product-strip-card__img-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}
.product-strip-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.product-strip-card:hover .product-strip-card__img { transform: scale(1.06); }
.product-strip-card__info {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26, 46, 103,0.8) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.product-strip-card:hover .product-strip-card__info { opacity: 1; }
.product-strip-card__body { padding: 1.25rem 0; }
.product-strip-card__brand {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-oro);
  margin-bottom: 0.35rem;
}
.product-strip-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: 0.35rem;
}
.product-strip-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================
   IMAGE GRID (lago asymmetric)
   ============================================= */
.image-grid-asymm {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
.image-grid-asymm__main {
  grid-row: span 2;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.image-grid-asymm__side {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.image-grid-asymm img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.image-grid-asymm div:hover img { transform: scale(1.04); }

@media (max-width: 768px) {
  .image-grid-asymm { grid-template-columns: 1fr; }
  .image-grid-asymm__main { grid-row: span 1; aspect-ratio: 4/3; }
}

/* =============================================
   MARQUEE / INFINITE TICKER
   ============================================= */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  padding: 1.2rem 0;
}
.marquee-track {
  display: flex;
  gap: 4rem;
  animation: marqueeScroll 20s linear infinite;
  width: max-content;
}
.marquee-track--reverse { animation-direction: reverse; }
.marquee-item {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.4);
  display: flex; align-items: center; gap: 4rem;
}
.marquee-item span.dot {
  width: 6px; height: 6px;
  background: var(--color-oro);
  border-radius: 50%;
  display: inline-block;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================
   HOVER IMAGE REVEAL on text
   ============================================= */
.text-hover-image {
  position: relative;
  display: inline-block;
}
.text-hover-image__preview {
  position: fixed;
  width: 280px; height: 200px;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.92) rotate(-2deg);
  overflow: hidden;
  border-radius: 2px;
}
.text-hover-image__preview img { width: 100%; height: 100%; object-fit: cover; }
.text-hover-image:hover .text-hover-image__preview {
  opacity: 1;
  transform: scale(1) rotate(-1deg);
}

/* =============================================
   VIDEO SECTION
   ============================================= */
.video-section {
  position: relative;
  overflow: hidden;
  background: var(--color-ebano);
}
.video-section__video {
  width: 100%; height: 70vh; min-height: 400px;
  object-fit: cover;
  opacity: 0.6;
  display: block;
}
.video-section__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--color-avorio);
  padding: var(--gutter);
}

/* =============================================
   ANIMATIONS KEYFRAMES
   ============================================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}
@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* =============================================
   GALLERY HOVER EFFECTS (lago-style)
   ============================================= */
.gallery-item--lago {
  position: relative;
  overflow: hidden;
  display: block;
}
.gallery-item--lago img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.gallery-item--lago:hover img { transform: scale(1.06); }
.gallery-item--lago__caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(26, 46, 103,0.7), transparent);
  color: var(--color-avorio);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
}
.gallery-item--lago:hover .gallery-item--lago__caption { transform: translateY(0); }

/* =============================================
   SECTION TRANSITIONS (colored border accent)
   ============================================= */
.section--accent-border {
  border-top: 2px solid var(--color-oro);
}

/* =============================================
   MOBILE ADJUSTMENTS
   ============================================= */
@media (max-width: 768px) {
  .hero-cinematic__title { font-size: clamp(2.5rem, 14vw, 5rem); }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .drag-scroll { overflow-x: auto; cursor: auto; }
  .drag-scroll-inner { padding: 0 1rem 1rem; }
  .drag-scroll-inner > * { width: clamp(260px, 70vw, 320px); }
}
@media (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none; }
  * { cursor: auto !important; }
}

/* =============================================
   PREFERS-REDUCED-MOTION
   Il sito non ne teneva conto da nessuna parte: parallasse, zoom dell'hero,
   marquee, split-text, contatori e wipe partivano comunque.
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Il cursore custom e' pura decorazione: torna quello di sistema. */
  .cursor-ring,
  .cursor-dot { display: none !important; }
  @media (pointer: fine) {
    * { cursor: auto !important; }
    a, button, .filter-btn { cursor: pointer !important; }
  }

  /* Elementi che vengono rivelati da JS: mostrali gia' al loro posto,
     altrimenti restano invisibili. */
  .js-reveal,
  .stagger-item,
  .clip-reveal,
  .word { opacity: 1 !important; transform: none !important; clip-path: none !important; }

  /* Nessuna traslazione da scroll. */
  [data-parallax] { transform: none !important; }

  .marquee-track { animation: none !important; }
}
