:root {
  --bg: #73766d;
  --bg-soft: #787c73;
  --line: rgba(242, 234, 216, 0.14);
  --cream: #f7f3e8;
  --cream-dim: rgba(242, 234, 216, 0.90);
  --cream-faint: rgba(242, 234, 216, 0.75);
  --wine: #6B121B;
  --wine-dim: rgba(83, 19, 30, 0.75);
  --wine-bright: #641723;
  --radius: 4px;
  /* --text: #928e47; */
  --font-display: 'Fraunces', serif;
  --header-h: 66px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h)
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em
}

em {
  font-style: italic;
  color: var(--cream)
}

a {
  color: inherit;
  text-decoration: none
}

img,
svg {
  max-width: 100%
}

/* ---- NAV ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: var(--bg);
  backdrop-filter: blur(10px);
  border-color: var(--line)
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1180px;
  margin: 0 auto
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px
}

.brand svg {
  height: 26px;
  width: auto;
  color: var(--cream)
}


.navlinks {
  display: flex;
  gap: 38px;
  font-size: 0.92rem
}

.navlinks a {
  position: relative;
  padding-bottom: 6px;
  color: var(--cream-dim);
  transition: color .25s
}

.navlinks a:hover {
  color: var(--cream)
}

.navlinks a.active {
  color: var(--cream)
}

.navlinks a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--wine-bright)
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px
}

.burger span {
  width: 22px;
  height: 2px;
  border-radius: 5px;
  background: var(--cream)
}


/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 140px 24px 80px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 20%, rgba(105, 0, 0, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(105, 0, 0, 0.18), transparent 70%),
    var(--bg);
}

.hero .eyebrow {
  color: var(--cream-faint);
  font-size: 0.90rem;
  letter-spacing: 0.08em;
  margin-bottom: 28px
}

.hero .eyebrow::before,
.hero .eyebrow::after {
  content: '—';
  margin: 0 12px;
  color: var(--wine)
}

.logo-mark {
  width: min(560px, 80vw);
  color: var(--cream);
  opacity: 0;
  animation: riseIn 1.1s ease forwards .15s
}



@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}


.hero p.tag {
  max-width: 560px;
  margin: 34px auto 0;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--cream-dim)
}

.hero p.tag em {
  color: var(--cream)
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 42px;
  flex-wrap: wrap;
  justify-content: center
}

.btn {
  padding: 15px 32px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-2px)
}

.btn-filled {
  background: var(--wine);
  color: var(--cream)
}

.btn-filled:hover {
  background: var(--wine-bright)
}

.btn-outline {
  border-color: var(--cream-dim);
  color: var(--cream)
}

.btn-outline:hover {
  border-color: var(--cream-faint)
}

.scroll-cue {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream-faint);
  animation: bob 2s ease-in-out infinite;
  cursor: pointer;
}



.scroll-cue img {
  display: block;
  width: 22px;
  height: auto;
  filter: invert(1);
  opacity: .75;
}

@keyframes bob {

  0%,
  100% {
    transform: translate(-50%, 0)
  }

  50% {
    transform: translate(-50%, 6px)
  }
}

/* ---- SECTION GENERIC ---- */
section {
  min-height: 100dvh;
  max-width: 100%;
  padding: 100px 0;
  align-content: center;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-head .eyebrow {
  color: var(--wine-bright);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  font-weight: 600
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.7rem)
}


/* ---- CHI SIAMO ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: start
}

.about-text p {
  color: var(--cream-dim);
  line-height: 1.75;
  margin-bottom: 20px;
  font-size: 1.02rem
}

.pour-art {

  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
  padding: 30px;
}



.pour-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  object-position: center 80%;
}


/* ---- MENU: livello 1 (Da Bere / Da Mangiare) ---- */
.tabs {
  display: flex;
  width: max-content;
  background: var(--bg-soft);
  border: 1px solid var(--cream-faint);
  border-radius: 999px;
  padding: 5px;
  margin: 0 auto 40px;
  gap: 2px;
  scroll-margin-top: 28px;
}

.tab-btn {
  padding: 14px 30px;
  border-radius: 999px;
  border: 0;
  background: none;
  color: var(--cream-dim);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s, color .25s;
  white-space: nowrap
}

.tab-btn.active {
  background: var(--wine);
  color: var(--cream)
}

/* ---- MENU: livello 2 (sottocategorie), discreto e sticky ---- */
.level2-tabs {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--bg-soft);
  padding: 16px 0 14px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line)
}

.level2-tabs::-webkit-scrollbar {
  display: none
}

.level2-btn {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--cream-faint);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 0 12px;
  cursor: pointer;
  position: relative;
  transition: color .25s;
  white-space: nowrap
}

.level2-btn.active {
  color: var(--cream)
}

.level2-btn.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--wine)
}

.menu-panel,
.sub-panel {
  display: none
}

.menu-panel.active,
.sub-panel.active {
  display: block
}



.menu-cat h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}



.asporto {
  justify-self: center;
  text-align: center;
  padding-bottom: 50px;
  font-style: italic;
  color: var(--wine);

}



.menu-cat .cat-note {
  color: var(--wine);
  font-size: 0.82rem;
  margin-bottom: 28px
}

.dish {
  padding: 20px 0;
  border-bottom: 1px solid var(--line)
}

.dish:first-of-type {
  padding-top: 0
}

.dish-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline
}

.dish-top h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem
}

.dish-top .price {
  color: var(--wine-bright);
  font-family: var(--font-display);
  font-size: 1.1rem;
  white-space: nowrap;
  padding-right: 1rem;
}

.dish p {
  color: var(--cream-dim);
  font-size: 0.92rem;
  margin-top: 6px;
  line-height: 1.55
}

.tag-chip {
  display: inline-block;
  margin-top: 10px;
  margin-right: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--wine-dim);
  border: 1px solid var(--wine-dim);
  border-radius: 999px;
  padding: 4px 12px
}


.back-to-categories {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--cream-dim);
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
  padding: 0;
  scroll-margin-top: 28px;
}



.back-to-categories:hover {
  color: var(--cream)
}




/* ---- DOVE SIAMO ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  align-items: start
}

.info-stack {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.info-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px
}

.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px
}

.info-card p,
.info-card .row {
  color: var(--cream-dim);
  font-size: 0.94rem;
  line-height: 1.6
}

.info-card .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line)
}

.info-card .row:last-child {
  border-bottom: 0
}

.info-card .row .closed {
  color: var(--wine-bright)
}


.contact-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Stile per i link dei contatti cliccabili */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.contact-links a {
  color: var(--cream-dim);
  transition: color 0.2s ease;
}

.contact-links a:hover {
  color: var(--wine);
}


.social-link-clean {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-weight: 500;
  transition: color 0.2s ease;
}

.social-link-clean:hover {
  color: var(--wine-bright);
  /* Diventa rosso bordeaux al passaggio del mouse */
}

/* Forza la dimensione dell'icona Instagram a 22px per evitare che esploda */
.social-link-clean svg {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0;
}

/* Su smartphone, mettili uno sotto l'altro per non schiacciarli troppo */
@media (max-width: 600px) {
  .contact-row-split {
    grid-template-columns: 1fr;
  }
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.94rem;
}

.contact-item:hover {
  color: var(--cream);
}

/* Forza la dimensione delle icone mail e telefono a 18px */
.contact-item svg {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0;
  color: inherit;
}





.map-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 450px;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  margin: 0;
  padding: 30px;
}



footer {
  /** background-color: var(--bg-soft);**/
  border-top: 1px solid var(--line);
  padding: 36px 0;
  text-align: center;
  color: var(--cream-faint);
  font-size: 0.85rem
}



.allergen-list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.allergen-icon {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex-shrink: 0;
}


/* Tooltip */
.allergen-icon::after {
  content: attr(data-allergen);
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  transform: translateX(-50%) translateY(4px);

  background: var(--wine-bright);
  /* Errore corretto: prima era var(--soft) */
  color: var(--cream);
  border: 1px solid var(--wine);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  /* Aggiunta ombra per leggibilità */

  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}


.allergen-icon.show::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-50%);
}

/* hover e tastiera solo dove c'è un mouse */
@media (hover: hover) {
  .allergen-icon:hover {
    color: var(--cream);
    border-color: var(--cream-dim);
  }
  .allergen-icon:hover::after,
  .allergen-icon:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-50%);
  }
}

.tag-chip:hover {
  color: var(--cream);
  border-color: var(--cream-dim);
}

.wine-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.wine-category {
  width: 100%;
}

.wine-category h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  text-transform: uppercase;
  border-left: 4px solid var(--wine-bright);
  padding-left: 8px;
}

.wine-category .cat-note {
  color: var(--cream-faint);
  font-size: 0.82rem;
  margin-bottom: 28px;
  padding-bottom: 1.5rem;
}

.wine-category-dishes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}

@media (max-width: 840px) {
  .wine-category-dishes {
    grid-template-columns: 1fr;
  }
}

/* Spazio tra le sezioni (Bollicine / Bianchi / Rossi / Dolci) */
.wine-list+.wine-list {
  margin-top: 56px;
}

/* Riga vuota (es. Champagne senza produttore) non deve alterare l'altezza */
.wine-category-dishes .dish p:empty {
  display: none;
}



/* Desktop: i primi DUE vini (prima riga) partono entrambi senza padding sopra,
   e l'ultima riga non ha la linea di chiusura */
@media (min-width: 841px) {
  .wine-category-dishes .dish:nth-child(2) {
    padding-top: 0;
  }


}


@media (max-width:840px) {
  .navlinks {
    display: none
  }

  .burger {
    display: flex
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px
  }


  section {
    padding: 64px 0
  }

  .wrap {
    padding: 0 22px
  }



  .tabs {
    flex-direction: column;
    background: none;
    border: 0;
    padding: 0;
    gap: 32px;
    /* width: 100%;
  margin: 12px 0 28px; */
    width: min(78%, 300px);
    /* era 100% */
    margin: 12px auto 28px;
    /* auto = centrati */
  }

  .tab-btn {
    position: relative;
    width: 100%;
    background: var(--wine);
    color: var(--cream);
    border: 0;
    border-radius: 999px;
    padding: 20px 48px;
    font-size: 1.05rem;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 1° ombra = cornice vuota (colore dello sfondo della sezione), 2° = bordo chiaro */
    box-shadow: 0 0 0 10px var(--bg-soft), 0 0 0 11.5px var(--cream-dim);
  }

  .tab-btn.active {
    background: var(--wine);
    color: var(--cream);
  }

  .tab-btn::after {
    content: '›';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-52%);
    color: var(--cream-dim);
    font-size: 1.4rem;
    margin: 0;
  }



  #menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0 110px;   /* sopra poco, sotto tanto = il blocco sale */

  }

  #menu .section-head {
    margin-bottom: 32px;     /* era 64px: titolo e pulsanti più vicini */
  }


  #menuMain.collapsed .menu-panel {
    display: none !important
  }

  #menuMain:not(.collapsed) .tabs {
    display: none
  }

  #menuMain:not(.collapsed) .back-to-categories {
    display: flex
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .logo-mark { opacity: 1; }
}

.drawer,
.drawer-overlay {
  display: none;
}

body.no-scroll {
  overflow: hidden;
}

@media (max-width: 840px) {
  .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
    z-index: 200;
  }

  .drawer-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 70%;
    max-width: 340px;
    background: var(--wine);
    padding: calc(env(safe-area-inset-top, 0px) + 20px) 28px 32px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), visibility .35s;
    z-index: 210;
  }

  .drawer.open {
    transform: translateX(0);
    visibility: visible;
  }

  .drawer-close {
    align-self: flex-end;
    background: none;
    border: 0;
    color: var(--cream);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    margin-bottom: 40px;
  }

  .drawer-links {
    display: flex;
    flex-direction: column;
  }

  .drawer-links a {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    padding-bottom: 5px;
    padding-top: 15px;
    border-bottom: 1px solid var(--line);
    color: var(--cream-faint);
  }

  .drawer-links a.active {
    color: var(--cream);
  }
}

/* ---- GALLERIA A NASTRO ---- */
.ribbon {
  --ribbon-h: 220px;
}

.ribbon-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  touch-action: pan-y;
  /* lo scroll verticale della pagina resta libero */
  -webkit-touch-callout: none;
  /* niente menù "salva immagine" tenendo premuto */
  user-select: none;
}

.ribbon-row {
  overflow: hidden;
}

.ribbon-track {
  display: flex;
  width: max-content;
  animation: ribbon-scroll var(--ribbon-duration, 60s) linear infinite;
  will-change: transform;
}

.ribbon-track--reverse {
  animation-direction: reverse;
}

@keyframes ribbon-scroll {
  to {
    transform: translateX(-50%);
  }
}

.ribbon-tile {
  flex: none;
  height: var(--ribbon-h);
  margin-right: 20px;
  /* margine e non gap: serve per il giro perfetto */
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-soft);
}

.ribbon-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* pausa al passaggio del mouse: solo dove l'hover esiste davvero (non su touch) */
@media (hover: hover) {
  .ribbon-rows:hover .ribbon-track {
    animation-play-state: paused;
  }
}

/* pausa tenendo premuto il dito (la classe la mette il JS) */
.ribbon.is-paused .ribbon-track {
  animation-play-state: paused;
}

@media (max-width: 840px) {
  .ribbon {
    --ribbon-h: 250px;
  }

  /* era 140px */
  .ribbon-rows {
    gap: 25px;
  }

  .ribbon-tile {
    margin-right: 18px;
  }
}

/* chi ha "riduci movimento": niente animazione, le righe si scorrono a mano */
@media (prefers-reduced-motion: reduce) {
  .ribbon-track {
    animation: none;
  }

  .ribbon-row {
    overflow-x: auto;
    scrollbar-width: none;
  }
}
