/* ==========================================================
   VIAFOODY - Coming soon
   Layout a schermo diviso: countdown fisso a sinistra,
   sezioni a scorrimento verticale a destra.
   ========================================================== */
:root {
  --white: #ffffff;
  --dark: #1d1d1d;
  --line: rgba(255, 255, 255, .85);
  --mask-home: rgba(0, 0, 0, .58);
  --mask-alt: rgba(0, 0, 0, .48);
  --sidebar: 56px;
  --ease: cubic-bezier(.77, 0, .175, 1);
  --speed: .8s;
  --font: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--white);
  background: var(--dark);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
svg { display: block; fill: currentColor; }

/* ---------- LOADER ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  text-align: center;
  font-size: 14px;
  text-transform: uppercase;
  transition: opacity .6s ease, visibility .6s ease;
}
.loader__spin {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }

/* ---------- SFONDO ---------- */
.cover { position: fixed; inset: 0; z-index: 0; }
.cover__img {
  position: absolute;
  inset: 0;
  background: url("../img/background-coming-soon.webp") center / cover no-repeat;
  transform: scale(1.04);
  transition: transform 1.6s ease;
}
.cover__mask {
  position: absolute;
  inset: 0;
  background: var(--mask-alt);
  transition: background-color var(--speed) ease;
}
body.is-home .cover__mask { background: var(--mask-home); }
body:not(.is-home) .cover__img { transform: scale(1); }

/* ---------- MENU IN ALTO ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar);
  z-index: 20;
  height: var(--sidebar);
}
.topbar__menu { display: flex; height: 100%; }
.topbar__menu a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 18px;
  opacity: .9;
  transition: opacity .2s;
}
.topbar__menu a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: rgba(255, 255, 255, .45);
}
.topbar__menu a:hover,
.topbar__menu a.active { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

/* ---------- BARRA LATERALE ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  align-items: center;
}
.sidebar__logo {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 40px;
  height: 40px;
}
.sidebar__logo img { width: 40px; height: 40px; }
.sidebar__menu { width: 100%; }
.sidebar__menu li { position: relative; }
.sidebar__menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--sidebar);
  height: 48px;
  color: var(--white);
  transition: background-color .3s, color .3s;
}
.sidebar__menu svg { width: 20px; height: 20px; }
.sidebar__menu li.active a { background: var(--white); color: var(--dark); }
.sidebar__menu a:hover { background: rgba(255, 255, 255, .15); }
.sidebar__menu li.active a:hover { background: var(--white); }
.sidebar__tip {
  position: absolute;
  top: 50%;
  left: calc(var(--sidebar) + 8px);
  transform: translate(-6px, -50%);
  padding: 4px 10px;
  background: var(--white);
  color: var(--dark);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.sidebar__menu li:hover .sidebar__tip { opacity: 1; transform: translate(0, -50%); }

/* ---------- PANNELLO COUNTDOWN ---------- */
.timer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--sidebar);
  width: calc(50% - var(--sidebar));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.timer::after {
  content: "";
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: var(--line);
}
.timer__content { animation: fadeIn 1.2s .3s ease both; }

.clock { position: relative; display: inline-block; padding: 0 36px; }
.clock__main { position: relative; display: inline-block; }
.clock__days {
  display: block;
  font-size: clamp(96px, 11vw, 140px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.clock__days-label {
  position: absolute;
  top: .55em;
  left: 100%;
  margin-left: 14px;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}
/* parentesi decorative attorno al countdown */
.clock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  height: 58px;
  border: 1px solid var(--line);
  border-bottom: 0;
  -webkit-mask: linear-gradient(90deg, #000 12px, transparent 12px, transparent calc(100% - 12px), #000 calc(100% - 12px));
          mask: linear-gradient(90deg, #000 12px, transparent 12px, transparent calc(100% - 12px), #000 calc(100% - 12px));
}
.clock__row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: -6px -36px 0;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.clock__row::before,
.clock__row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.clock__row::before { margin-right: 10px; }
.clock__row::after { margin-left: 10px; }
.clock__row .thin { font-weight: 300; margin-right: 6px; }
.clock__row .thin:last-child { margin-right: 0; }

.timer__caption { margin-top: 48px; font-size: 16px; }
.timer__caption strong { font-weight: 700; }

/* ---------- SEZIONI A DESTRA ---------- */
.pages {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 5;
  overflow: hidden;
}
.pages__track {
  height: 100%;
  transition: transform var(--speed) var(--ease);
  will-change: transform;
}
.page {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.page__content {
  width: 100%;
  max-width: 100%;
  padding: 0 64px 0 32px;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .7s ease .25s, transform .9s ease .2s;
}
.page.is-active .page__content { opacity: 1; transform: none; }

/* Home */
.brand__name {
  font-size: clamp(44px, 5.2vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.brand__name strong { font-weight: 700; }
.brand__right { margin: 10px 0 0 4px; }
.brand__right h2 {
  display: inline-block;
  padding-left: 12px;
  border-left: 3px solid var(--white);
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.badge {
  display: inline-block;
  margin: 12px 0 0 34px;
  padding: 1px 10px;
  background: var(--white);
  color: var(--dark);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Titoli sezione */
.ptitle h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 6px solid rgba(255, 255, 255, .3);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}
.ptitle h3 svg { width: 22px; height: 22px; }
.ptitle--row { display: flex; align-items: flex-start; justify-content: space-between; }
.ptitle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, .15);
  transition: background-color .3s;
}
.ptitle__btn:hover { background: rgba(255, 255, 255, .3); }
.ptitle__btn svg { width: 20px; height: 20px; }

.subhead {
  position: relative;
  margin-top: 14px;
  padding-left: 40px;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}
.subhead::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 26px;
  height: 2px;
  background: var(--white);
}
.subhead .light { font-weight: 300; }
.text { margin-top: 10px; }
.text--spaced { margin-top: 24px; }
.text p { font-size: 16px; line-height: 1.65; }

/* Contatti */
.contact {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
}
.contact__col li + li { margin-top: 18px; }
.contact__col--right { text-align: right; }
.contact h4 { font-size: 20px; font-weight: 700; text-transform: uppercase; }
.contact p { font-size: 16px; }
.contact a:hover { text-decoration: underline; }
.socialnet { display: flex; justify-content: flex-end; gap: 14px; margin-top: 6px; }
.socialnet a { display: block; opacity: .9; transition: opacity .2s, transform .2s; }
.socialnet a:hover { opacity: 1; transform: translateY(-2px); }
.socialnet svg { width: 22px; height: 22px; }
.legal { margin-top: 36px; }
.legal p { font-size: 15px; color: rgba(255, 255, 255, .75); }

/* Pulsante scorri (fisso, centrato sulla linea divisoria) */
.scrolldown {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  transform: translateX(-50%);
  transition: opacity .4s ease;
}
.scrolldown.is-hidden { opacity: 0; pointer-events: none; }
.scrolldown__before, .scrolldown__after { width: 70px; }
.scrolldown__before { text-align: right; }
.scrolldown__circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  transition: background-color .3s;
}
.scrolldown:hover .scrolldown__circle { background: rgba(255, 255, 255, .25); }
.scrolldown__circle svg { width: 26px; height: 26px; fill: none; }
.scrolldown .wheel { animation: wheel 1.6s ease infinite; }

/* ---------- PALLINI DESTRA ---------- */
.dots {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dots a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
}
.dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--white);
  transition: all .3s ease;
}
.dots a:hover span { width: 8px; height: 8px; }
.dots a.active span { width: 12px; height: 12px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }

/* ---------- SOCIAL IN BASSO A SINISTRA ---------- */
.corner-social {
  position: fixed;
  left: 9px;
  bottom: 8px;
  z-index: 20;
  display: flex;
  gap: 8px;
}
.corner-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--white);
  color: var(--dark);
  transition: background-color .3s, color .3s;
}
.corner-social a:hover { background: var(--dark); color: var(--white); }
.corner-social svg { width: 18px; height: 18px; }

/* ---------- ANIMAZIONI ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(5px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- TABLET E MOBILE ---------- */
@media (max-width: 900px) {
  body { overflow: auto; }
  html { scroll-behavior: smooth; }

  .sidebar { width: auto; bottom: auto; height: var(--sidebar); }
  .sidebar__menu { display: none; }
  .topbar { left: auto; right: 8px; }
  .topbar__menu a { font-size: 15px; padding: 0 12px; }
  .dots { display: none; }

  .timer {
    position: relative;
    left: 0;
    width: 100%;
    min-height: 62vh;
    min-height: 62svh;
    padding: 90px 20px 24px;
  }
  .timer::after {
    top: auto;
    bottom: 0;
    right: auto;
    left: 50%;
    width: 50%;
    height: 1px;
    transform: translateX(-50%);
  }
  .timer__caption { margin-top: 32px; }

  .pages { position: relative; width: 100%; height: auto; overflow: visible; }
  .pages__track { transform: none !important; }
  .page { height: auto; padding: 64px 0; justify-content: center; }
  .page__content { max-width: 100%; padding: 0 24px; opacity: 1; transform: none; }
  .page--home .page__content { text-align: center; }
  .brand__right { margin-left: 0; }
  .badge { margin-left: 0; }
  .scrolldown { display: none; }
  .page--home { padding-bottom: 64px; }
  .page--contact { padding-bottom: 96px; }
}

@media (max-width: 520px) {
  .clock { padding: 0 24px; }
  .clock__row { margin: -6px -24px 0; font-size: 17px; }
  .clock__days-label { font-size: 15px; margin-left: 8px; }
  .ptitle h3 { font-size: 26px; }
  .subhead { font-size: 17px; }
  .contact { flex-direction: column; }
  .contact__col--right { text-align: left; }
  .socialnet { justify-content: flex-start; }
}
