:root {
  --p: 0;
  --p-bottles: 0;
  --p-logo: 0;
  --p-payoff: 0;
  --p-header: 0;
  --ethyly-red: #B4285A;
  --ethyly-blue: #00E4FF;
  --bottle-grey: #333333;
  --mx: 0;
  --my: 0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: #000;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  cursor: none;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}
a { color: inherit; text-decoration: none; }

.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.18s ease-out;
  mix-blend-mode: difference;
}

.stage {
  position: relative;
  width: 100vw; height: 100vh; height: 100dvh;
  overflow: hidden; background: #000;
  perspective: 1200px;
  perspective-origin: 50% 65%;
  transform-style: preserve-3d;
}
.bottles {
  position: absolute; left: 50%; bottom: 0;
  width: min(95vw, 1400px); height: auto;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  /* 3D piu' drammatico: parto da molto lontano e arrivo molto in avanti */
  transform:
    translate(-50%, calc((1 - var(--p-bottles)) * 8vh))
    translateZ(calc(-700px + var(--p-bottles) * 760px))
    scale(calc(0.42 + var(--p-bottles) * 0.50))
    rotateY(calc(var(--mx) * 8deg * var(--p-bottles)))
    rotateX(calc(var(--my) * -5deg * var(--p-bottles)));
  opacity: var(--p-bottles);
  will-change: transform, opacity, filter;
  user-select: none; -webkit-user-drag: none;
  pointer-events: none;
  filter:
    brightness(calc(0.5 + var(--p-bottles) * 0.6))
    drop-shadow(0 calc(30px + var(--p-bottles) * 70px) calc(50px + var(--p-bottles) * 80px) rgba(0,0,0,calc(0.5 + var(--p-bottles) * 0.4)))
    drop-shadow(0 0 calc(var(--p-bottles) * 120px) rgba(0,0,0,0.6));
}
.stage::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 60%, transparent 30%, rgba(0,0,0,0.65) 80%),
    linear-gradient(180deg, #000 0%, transparent 25%, transparent 75%, #000 100%);
  pointer-events: none; z-index: 2;
}
.lockup {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) translateY(calc((1 - var(--p-logo)) * 24px)) scale(calc(0.96 + var(--p-logo) * 0.04));
  opacity: var(--p-logo);
  width: min(58vw, 620px);
  z-index: 3;
  pointer-events: none;
}
.lockup img {
  width: 100%; height: auto;
  display: block;
  user-select: none; -webkit-user-drag: none;
}
.payoff {
  position: absolute; left: 50%; top: calc(50% + 12vh);
  transform: translate(-50%, 0) translateY(calc((1 - var(--p-payoff)) * 16px));
  opacity: var(--p-payoff);
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-indent: 0.48em;
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
}
.hint {
  position: absolute; left: 50%; bottom: 32px;
  transform: translateX(-50%);
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-indent: 0.4em;
  opacity: calc(1 - var(--p));
  z-index: 4;
  pointer-events: none;
  animation: hintPulse 2.4s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: calc(1 - var(--p)); }
  50%      { transform: translateX(-50%) translateY(6px); opacity: calc((1 - var(--p)) * 0.5); }
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 50;
  opacity: var(--p-header);
  transform: translateY(calc((1 - var(--p-header)) * -10px));
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.topbar.active { pointer-events: auto; }
.topbar-left {
  display: flex; align-items: center; gap: 32px; justify-self: start;
}
.topbar-left a, .nav-link {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
  text-indent: 0.28em;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.35s ease, letter-spacing 0.35s ease;
}
.nav-distribuzione:hover, .nav-distribuzione:focus-visible { color: var(--ethyly-blue); outline: none; }
.nav-export:hover,       .nav-export:focus-visible       { color: var(--ethyly-red); outline: none; }
.nav-consulenza:hover,   .nav-consulenza:focus-visible   { color: #fff; letter-spacing: 0.32em; outline: none; }
.nav-contattaci:hover,   .nav-contattaci:focus-visible   { color: var(--ethyly-blue); outline: none; }

.topbar-center { justify-self: center; display: flex; align-items: center; }
.topbar-center a { display: block; line-height: 0; }
.topbar-center img {
  height: 26px; width: auto; display: block;
  user-select: none; -webkit-user-drag: none;
}
.topbar-right {
  display: flex; align-items: center; gap: 22px; justify-self: end;
}
.lang-divider { width: 1px; height: 14px; background: rgba(255,255,255,0.18); }
.lang-group { display: flex; align-items: center; gap: 14px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none; cursor: pointer;
  font-family: 'Josefin Sans', sans-serif; font-weight: 700;
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-indent: 0.22em;
  transition: color 0.25s ease;
}
.lang-btn.active { color: #fff; }
.lang-btn .flag {
  width: 18px; height: 12px; display: inline-block;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
  border-radius: 1px; opacity: 0.55;
  transition: opacity 0.25s ease;
  overflow: hidden;
  line-height: 0;
}
.lang-btn.active .flag { opacity: 1; }
.lang-btn .flag svg { display: block; width: 100%; height: 100%; }
.lang-sep { width: 1px; height: 12px; background: rgba(255,255,255,0.18); }
.contact-sep { width: 1px; height: 14px; background: rgba(255,255,255,0.18); }

/* BOTTOMBAR — CTA grandi */
.bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 80px;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  z-index: 50;
  opacity: var(--p-header);
  transform: translateY(calc((1 - var(--p-header)) * 10px));
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.bottombar.active { pointer-events: auto; }
.cta {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 18.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 2px;
  display: inline-block;
  position: relative;
  text-indent: 0.36em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s ease;
  transform-origin: center;
  will-change: transform;
}
.cta:hover, .cta:focus-visible {
  transform: scale(1.18);
  outline: none;
}
.cta-left   { justify-self: start; }
.cta-center { justify-self: center; }
.cta-right  { justify-self: end; }
.cta-left:hover, .cta-left:focus-visible {
  transform-origin: left center;
  color: var(--ethyly-blue);
}
.cta-center:hover, .cta-center:focus-visible {
  transform-origin: center;
  color: var(--ethyly-red);
}
.cta-right:hover, .cta-right:focus-visible {
  transform-origin: right center;
  color: #fff;
}

@media (max-width: 1024px) {
  .topbar-left { gap: 22px; }
  .topbar-left a { font-size: 11px; letter-spacing: 0.22em; }
  .topbar-right { gap: 16px; }
  .cta { font-size: 15px; letter-spacing: 0.28em; }
}
@media (max-width: 768px) {
  .lockup { width: 78vw; }
  .payoff { font-size: 11px; letter-spacing: 0.32em; top: calc(50% + 9vh); }
  .bottles { width: 110vw; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  .topbar { height: 56px; padding: 0 16px; grid-template-columns: 1fr auto 1fr; }
  .topbar-left { gap: 12px; }
  .topbar-left a { font-size: 9px; letter-spacing: 0.16em; }
  .topbar-center img { height: 18px; }
  .topbar-right { gap: 10px; }
  .nav-contattaci { font-size: 9px !important; letter-spacing: 0.16em !important; }
  .lang-btn { font-size: 9px; letter-spacing: 0.14em; gap: 4px; }
  .lang-btn .flag { width: 13px; height: 9px; }
  .lang-group { gap: 8px; }
  .bottombar { padding: 0 18px; height: 64px; }
  .cta { font-size: 13px; letter-spacing: 0.22em; }
}

/*mobile-v1*/
@media (max-width: 640px) {
  body { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  .topbar { height: 56px !important; padding: 0 18px !important; }
  .lang-btn > span:not(.flag) { display: none; }
  .lang-btn .flag { width: 18px !important; height: 12px !important; }
  .topbar-center { display: none !important; }
  .topbar { justify-content: space-between !important; padding: 0 12px !important; gap: 12px !important; }
  .topbar-left { position: static !important; display: flex !important; gap: 12px !important; transform: none !important; opacity: 1 !important; }
  .topbar-left a, .topbar-right .nav-contattaci { font-size: 9px !important; letter-spacing: 0.12em !important; white-space: nowrap; color: rgba(255,255,255,0.75) !important; }
  .topbar-left a.is-current { color: #00D4FF !important; }
  .topbar-right { gap: 8px !important; }
  .topbar-right .contact-sep, .lang-sep { display: none !important; }
  .lang-group { gap: 6px !important; }
  .lang-btn .flag { width: 16px !important; height: 11px !important; }
  .brand-viewport { overflow-x: auto !important; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-mask-image: none !important; mask-image: none !important; }
  .brand-viewport::-webkit-scrollbar { display: none; }
  .brand-track { transform: none !important; gap: 28px !important; padding-left: 22px !important; padding-right: 22px !important; width: max-content; }
  .brand-item { scroll-snap-align: start; scroll-margin-left: 22px; }
  .brand-item { width: 150px !important; flex: 0 0 150px !important; }
  .brand-track { align-items: flex-start !important; }
  .brand-item { justify-content: flex-start !important; }
  .brand-bottle { flex: 0 0 auto; object-fit: contain; object-position: center bottom; width: 100% !important; }
  .brand-caption { width: 100% !important; }
  .brand-name, .brand-region { white-space: normal !important; text-align: center; overflow-wrap: break-word; }
  .brand-bottle { height: 220px !important; }
  .brand-row-sub { display: block; font-size: 0.5em; white-space: nowrap; margin-top: 6px; letter-spacing: 0.08em; }
  .bottles { width: auto !important; height: 88vh !important; max-width: none !important; }
}

/*ethyly-intro-video*/
video.bottles{object-fit:contain;background:transparent;
  -webkit-mask-image:radial-gradient(ellipse 52% 62% at 50% 58%,#000 62%,transparent 100%);
  mask-image:radial-gradient(ellipse 52% 62% at 50% 58%,#000 62%,transparent 100%);}

.sr-only{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;}
