/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

:root{
  --petrol: #061A20;
  --petrol-2: #0B2A32;
  --aqua: #45E6D2;
  --aqua-dim: rgba(69,230,210,.35);
  --stone: #E9E4DA;
  --sand: #C9A876;
  --ease: cubic-bezier(.22,1,.36,1);
  --font: "Space Grotesk", "Segoe UI", Arial, sans-serif;
}

body{
  background: var(--petrol);
  color: var(--stone);
  font-family: var(--font);
  overflow-x: clip;
}

::selection{ background: var(--aqua); color: var(--petrol); }
:focus-visible{ outline: 2px solid var(--aqua); outline-offset: 3px; }

.skip-link{
  position: absolute; left: -999px; top: 0;
  background: var(--aqua); color: var(--petrol);
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus{ left: 1rem; top: 1rem; }

.wordmark{
  position: fixed;
  top: 1.6rem; left: 1.6rem;
  z-index: 40;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .22em;
  color: var(--stone);
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

main{ position: relative; }

.scene{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8vh 6vw;
  overflow: hidden;
}

/* ===== reveal ===== */
.reveal{
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transition: clip-path .5s var(--ease), opacity .5s var(--ease);
}
.reveal.is-hidden{
  clip-path: inset(0 0 0 100%);
  opacity: 0;
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: .95rem 1.9rem;
  border-radius: 2px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.btn--primary{ background: var(--aqua); color: var(--petrol); }
.btn--primary:hover{ transform: translateY(-2px); }
.btn--ghost{ border: 1px solid var(--stone); color: var(--stone); }
.btn--ghost:hover{ background: rgba(233,228,218,.08); }

/* ===== SCENA 1 — HERO ===== */
.scene--hero{ padding: 0; text-align: center; }
.hero__video, .hero__fallback{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__fallback{ display: none; }
.hero__scrim{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,26,32,.55) 0%, rgba(6,26,32,.35) 45%, rgba(6,26,32,.72) 100%);
  z-index: 1;
}
.hero__content{
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1.3rem;
  max-width: 760px; padding: 0 6vw;
}
.hero__eyebrow{
  font-size: .78rem;
  letter-spacing: .3em;
  color: var(--aqua);
  font-weight: 600;
  animation: driftA 7s ease-in-out infinite;
}
.hero__title{
  font-size: clamp(2.4rem, 6.2vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
  animation: driftB 9s ease-in-out infinite;
}
.hero__subtitle{
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--stone);
  opacity: .92;
  max-width: 46ch;
  animation: driftA 8s ease-in-out infinite;
}
@keyframes driftA{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}
@keyframes driftB{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce){
  .hero__eyebrow, .hero__title, .hero__subtitle{ animation: none; }
}

.cta-wrap{ position: relative; margin-top: .6rem; }
.cta-menu{
  position: absolute; top: calc(100% + .6rem); left: 50%;
  transform: translateX(-50%);
  background: var(--stone);
  color: var(--petrol);
  border-radius: 4px;
  overflow: hidden;
  min-width: 280px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
  z-index: 5;
}
.cta-menu[hidden]{ display: none; }
.cta-menu a{
  padding: 1rem 1.3rem;
  font-size: .9rem;
  font-weight: 600;
  text-align: left;
  min-height: 44px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(6,26,32,.12);
}
.cta-menu a:last-child{ border-bottom: 0; }
.cta-menu a:hover{ background: rgba(6,26,32,.06); }

.scroll-hint{
  position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%);
  z-index: 2;
  width: 22px; height: 36px;
  border: 1.5px solid rgba(233,228,218,.6);
  border-radius: 12px;
}
.scroll-hint span{
  position: absolute; top: 7px; left: 50%;
  width: 3px; height: 8px;
  background: var(--aqua);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: hintScroll 1.8s ease-in-out infinite;
}
@keyframes hintScroll{
  0%{ opacity: 1; top: 7px; }
  70%{ opacity: 0; top: 18px; }
  100%{ opacity: 0; top: 7px; }
}
@media (prefers-reduced-motion: reduce){ .scroll-hint span{ animation: none; opacity: .6; } }

/* ===== SCENA 2 — COMPARE ===== */
.scene--compare{ gap: 2.4rem; }
.compare__title{
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}
.compare{ width: min(100%, 1100px); }
.compare__frame{
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--petrol-2);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.compare__img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}
.compare__img--after{
  clip-path: inset(0 0 0 50%);
  will-change: clip-path;
}
.compare__handle{
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px;
  background: var(--aqua);
  transform: translateX(-50%);
  box-shadow: 0 0 16px var(--aqua-dim);
}
.compare__handle-grip{
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--aqua);
  display: flex; align-items: center; justify-content: center;
}
.compare__handle-grip::before{
  content: "";
  width: 16px; height: 16px;
  border-left: 2px solid var(--petrol);
  border-bottom: 2px solid var(--petrol);
  transform: rotate(45deg);
  box-shadow: 22px 22px 0 -19px var(--petrol);
}
.compare__label{
  position: absolute; bottom: 1rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(6,26,32,.55);
  padding: .4rem .8rem;
  border-radius: 2px;
}
.compare__label--before{ left: 1rem; }
.compare__label--after{ right: 1rem; }

/* ===== SCENA 3 — PROCESSO ===== */
.scene--process{ padding: 0; align-items: stretch; }
.process__scroller{ height: 340vh; }
.process__sticky{
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem;
  padding: 5vh 6vw;
}
.process__title{
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 700;
  text-align: center;
}
.process__row{
  width: min(100%, 900px);
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.process__stage-wrap{
  position: relative;
  flex: 1 1 420px;
  max-width: 720px;
  aspect-ratio: 4/3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--petrol-2);
}
.process__stage-img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.process__stage-img.is-active{ opacity: 1; }
.process__info{
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: .4rem;
  min-width: 140px;
}
.process__num{
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  color: var(--aqua);
  line-height: 1;
}
.process__meter{
  width: min(100%, 900px);
  height: 4px;
  background: rgba(233,228,218,.15);
  border-radius: 4px;
  overflow: hidden;
}
.process__meter-fill{
  display: block;
  height: 100%;
  width: 0%;
  background: var(--aqua);
  transition: width .1s linear;
}
.process__label{
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--stone);
  font-weight: 600;
}

/* ===== SCENA 4 — PRECISIONE ===== */
.scene--precision{ gap: 2.2rem; text-align: center; }
.precision__words{
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .6rem 1.4rem;
  max-width: 1100px;
}
.precision__words li{
  font-size: clamp(1.8rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--stone);
  position: relative;
}
.precision__words li:not(:last-child)::after{
  content: "·";
  color: var(--aqua);
  margin-left: 1.4rem;
  position: absolute;
}
.precision__line{
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: var(--aqua);
  max-width: 46ch;
}
.precision__partner{
  font-size: .8rem;
  letter-spacing: .05em;
  color: rgba(233,228,218,.55);
}

/* ===== SCENA 5 — CONTATTO ===== */
.scene--contact{ padding: 0; text-align: center; }
.contact__bg{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.contact__scrim{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,26,32,.75) 0%, rgba(6,26,32,.55) 50%, rgba(6,26,32,.85) 100%);
}
.contact__content{
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  max-width: 720px; padding: 0 6vw;
}
.contact__content h2{
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
}
.contact__actions{ display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem; }
.contact__address{ font-size: .82rem; color: rgba(233,228,218,.7); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal, .btn, .process__stage-img, .compare__handle{
    transition-duration: .01ms !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px){
  .scene{ padding: 6vh 5vw; }
  .wordmark{ font-size: .92rem; top: 1.1rem; left: 1.1rem; }
  .compare__frame{ aspect-ratio: 3/4; }
  .precision__words li:not(:last-child)::after{ display: none; }
  .process__row{ flex-direction: column; gap: 1rem; }
  .process__stage-wrap{ width: 100%; max-width: 100%; aspect-ratio: 4/3; }
  .process__info{ flex-direction: row; align-items: baseline; gap: .8rem; min-width: 0; }
  .process__sticky{ gap: .9rem; padding: 4vh 5vw; }
}
@media (max-width: 480px){
  .cta-menu{ min-width: 240px; }
  .hero__title{ font-size: clamp(2rem, 8vw, 2.8rem); }
}
