:root {
  --bg-dark: #0b0b0b;
  --bg-darker: #070707;
  --text: #f5f5f5;
  --muted: #c9c9c9;
  --accent: #d4af37; /* gold */
  --accent-2: #9b72cf; /* subtle purple for effects */
  --card: #111;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  background: var(--bg-dark);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Top Navbar ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  width: 100%;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  background: linear-gradient(180deg, rgba(10,10,10,.85), rgba(10,10,10,.35), rgba(10,10,10,0));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: .5px;
  font-size: 1.4rem;
  display: flex; align-items: center; gap: 10px;
}
.menu { display: flex; gap: 24px; align-items: center; }
.menu a { position: relative; font-weight: 500; opacity: .95; }
.menu a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s ease;
  border-radius: 2px;
}
.menu a:hover::after { width: 100%; }

/* Mobile nav */
.burger {
  display: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  align-items: center; justify-content: center; cursor: pointer; transition: transform .2s;
  background: rgba(255,255,255,.03);
}
.burger span { width: 18px; height: 2px; background: #fff; position: relative; display: block; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: #fff; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

.menu-mobile { display: none; position: fixed; inset: 72px 0 auto 0; background: rgba(8,8,8,.96); border-top: 1px solid rgba(255,255,255,.06); backdrop-filter: blur(8px); z-index: 999; }
.menu-mobile a { display: block; padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,.06); }

@media (max-width: 900px) {
  .menu { display: none; }
  .burger { display: inline-flex; border: none; }
}

/* Small iPhone tweak: lighter nav bg to show glass blur clearly */
@media (max-width: 420px) {
  .nav {
    background: rgba(10,10,10,.35);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
    backdrop-filter: blur(12px) saturate(1.05);
    position: fixed;
    top: 0;
    left: 0; right: 0; width: 100%;
  }
}

/* ---- Hero Parallax ---- */
.hero {
  position: relative; height: 100vh; width: 100%; overflow: hidden;
  isolation: isolate;
  /* Ensure any transparent parts match next section color, avoiding seams */
  background: var(--bg-darker);
}
.hero .parallax-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-attachment: fixed; /* desktop parallax */
  transform: translateZ(0);
  filter: saturate(1.05) contrast(1.05);
  z-index: -1; /* stay behind overlay and content */
}
/* Mobile fallback (some mobile browsers ignore background-attachment: fixed) */
@media (max-width: 900px) {
  .hero .parallax-bg { background-attachment: scroll; }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Single linear gradient: starts higher and fully matches next section color */
  background: linear-gradient(to bottom,
    rgba(0,0,0,0) 26%,
    rgba(0,0,0,.58) 56%,
    var(--bg-darker) 100%
  );
  pointer-events: none;
  z-index: 0; /* overlay above bg, below content */
}

.hero-content {
  position: relative; height: 100%; display: grid; place-items: center; text-align: center; padding: 96px 24px 24px; z-index: 1;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.logo-row { display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: nowrap; width: 100%; }
.circle-logo { flex: 1 1 calc(50% - 10px); max-width: 160px; aspect-ratio: 1/1; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.5); box-shadow: var(--shadow); background: rgba(255,255,255,.06); backdrop-filter: blur(4px); }
.circle-logo img { width: 100%; height: 100%; object-fit: cover; }
/* Keep Logo 1 centered and slightly zoomed */
#logo1 {
  object-fit: cover;
  object-position: center;
  transform: scale(1.2);
  transform-origin: center center;
}
@media (min-width: 900px) {
  .circle-logo { flex: 0 0 250px; max-width: 250px; }
}
.hero-caption {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text);
  letter-spacing: .4px;
  background: rgba(0,0,0,.55);
  padding: 24px 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow);
  max-width: 680px;
  text-shadow: 0 2px 4px rgba(0,0,0,.6);
}

/* subtle floating */
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .85rem;
  color: #fff;
  opacity: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 2;
}

.scroll-indicator span {
  color: #fff;
  text-shadow: 0 0 6px rgba(0,0,0,.7);
}

.scroll-indicator .mouse {
  width: 22px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 14px;
  position: relative;
  opacity: 1;
  box-shadow: 0 0 6px rgba(0,0,0,.7);
}

.scroll-indicator .mouse::after {
  content: "";
  width: 3px;
  height: 6px;
  background: #fff;
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translate(-50%, 0) } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 8px) } }

/* ---- Events (infinite scroll of images) ---- */
section { scroll-margin-top: 84px; }
.section {
  position: relative;
  padding: clamp(56px, 8vw, 100px) 24px;
  --section-bg: var(--bg-dark);
  background: var(--section-bg);
}

/* subtle divider line for each section */
.section::before { display: none; }
.section-title { font-size: clamp(1.4rem, 3vw, 2.2rem); margin: 0 0 24px; letter-spacing: .5px; text-align: center; }
.section-sub { color: var(--muted); margin-top: -8px; margin-bottom: 24px; text-align: center;}

.events { background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #000 100%), var(--bg-darker); color: #fff; --section-bg: var(--bg-darker); }
.marquee {
  position: relative;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scrollbar-width: none;
}
.marquee::-webkit-scrollbar { display: none; }
.marquee-track { display: flex; gap: 16px; width: max-content; }
.marquee-item { width: 380px; height: 240px; border-radius: 14px; overflow: hidden; position: relative; }
.marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.1) contrast(1.05); }
/* Soft vignette like the hero, applied uniformly on all edges */
.marquee-item::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0) 58%,
    rgba(0,0,0,.25) 78%,
    rgba(0,0,0,.55) 100%
  );
  pointer-events: none;
}

/* ---- Storia (split w/ reverse-fade entrance) ---- */
.storia { background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--bg-dark) 100%), #000; --section-bg: #000; }
.split {
  max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 5vw, 56px);
  align-items: center;
}
.split p { color: #e7e7e7; line-height: 1.8; }
.split strong { color: var(--accent); font-weight: 600; }

.reveal-wrap { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.reveal-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: translateX(30px); filter: blur(6px); }
.reveal-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Soft vignette on all edges to match hero feel */
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0) 58%,
    rgba(0,0,0,.25) 78%,
    rgba(0,0,0,.55) 100%
  );
}
.reveal-wrap.is-visible .reveal-img { animation: revealReverse .9s ease forwards; }
/* "Dissolvenza al contrario": entra rimuovendo blur e portando opacità da 0 a 1 con movimento da destra verso sinistra */
@keyframes revealReverse {
  0% { opacity: 0; transform: translateX(30px); filter: blur(6px); }
  100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}



/* ---- Chi Siamo (team) ---- */
.team {
  /* Ensure bottom edge matches next section: mask last slice to var(--bg-dark) */
  background:
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 92%, var(--bg-dark) 100%),
    radial-gradient(1200px 600px at 50% 100%, rgba(212,175,55,.1), transparent 40%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--bg-dark) 100%),
    var(--bg-dark);
  --section-bg: var(--bg-dark);
}
.team-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.member { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: 20px; padding: 24px; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; }
.member::after { content:""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.05), transparent 30%); animation: spin 8s linear infinite; }
.member > * { position: relative; z-index: 2; }
@keyframes spin { to { transform: rotate(360deg);} }
.avatar { width: 140px; height: 140px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.member h4 { margin: 8px 0 6px; font-size: 1.2rem; letter-spacing: .4px; }
.role { color: var(--muted); font-size: .95rem; }

@media (max-width: 680px) { .team-grid { grid-template-columns: 1fr; } }

/* ---- Menù degustazione ---- */
.menu-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.menu-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.menu-card .price {
  margin-top: auto;
  font-weight: 600;
  color: var(--accent);
}

/* ---- Contattaci ---- */
.contact {
  position: relative; color: #fff; isolation: isolate;
  background: #000; /* fallback */
  --section-bg: #000;
}
.contact .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; filter: brightness(.35) saturate(1.1);
  z-index: -2;
}
.contact::after {
  content: "";
  position: absolute; inset: 0;
  /* Top blend with previous section color + bottom blend to footer */
  background:
    linear-gradient(to bottom, var(--bg-dark) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(10,10,10,.85) 78%, #0a0a0a 100%);
  z-index: -1;
}

.contact-card { max-width: 980px; margin: 0 auto; background: rgba(15,15,15,.65); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: clamp(20px, 4vw, 32px); backdrop-filter: blur(6px); box-shadow: var(--shadow); }
form { display: grid; grid-template-columns: 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
label { font-size: .95rem; color: #e8e8e8; }
/* phone prefix + number inline layout */
.phone-inputs { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; }
.phone-inputs select, .phone-inputs input { width: 100%; }
/* match select style to other inputs */
.phone-inputs select {
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font: inherit;
  transition: border .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.phone-inputs select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}
@media (max-width: 480px) { .phone-inputs { grid-template-columns: 100px 1fr; } }
input, textarea {
  width: 100%;
  background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 12px 14px; outline: none; font: inherit; transition: border .2s, box-shadow .2s;
}
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
textarea { min-height: 120px; resize: vertical; }

.btn {
  padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(212,175,55,.25), rgba(155,114,207,.25)); color: #fff; font-weight: 600; letter-spacing: .5px;
  cursor: pointer; transition: transform .15s ease, filter .2s ease, background .3s ease; backdrop-filter: blur(4px);
}
.field.full, .btn { grid-column: 1 / -1; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

@media (min-width: 760px) { form { grid-template-columns: repeat(2, 1fr); } }

/* ---- Footer ---- */
footer { padding: 28px 24px; background: #0a0a0a; color: #cfcfcf; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-brand { font-family: 'Montserrat', sans-serif; font-weight: 600; }
.socials { display: flex; gap: 12px; }
.socials a { padding: 8px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; font-size: .9rem; opacity: .85; }

/* Small helper utilities */
.container { max-width: 1200px; margin: 0 auto; }
.muted { color: var(--muted); }

/* ---- Mobile typography (slightly larger) ---- */
@media (max-width: 680px) {
  /* Mild bump to overall text size */
  body { font-size: 17.5px; line-height: 1.7; }

  /* Headings and prominent texts */
  .section-title { font-size: clamp(1.55rem, 6vw, 2.2rem); }
  .hero-caption { font-size: clamp(1.08rem, 3.6vw, 1.28rem); }
  .member h4 { font-size: 1.25rem; }

  /* Supporting text */
  .role, label, .socials a { font-size: 1rem; }
  .menu-mobile a { font-size: 1.05rem; }
}

/* ---- Toasts ---- */
#toastContainer {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: grid;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(18,18,18,.95), rgba(22,22,22,.85));
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  font-size: 1rem;
  font-weight: 500;
  min-width: 260px;
  max-width: min(92vw, 560px);
  animation: toast-in-top .22s ease-out;
}
.toast::before {
  content: "";
  display: inline-block;
  width: 6px; height: 100%; border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(212,175,55,.45);
}
.toast.success { border-color: rgba(60,203,127,.45); }
.toast.success::before { background: #3ccb7f; box-shadow: 0 0 12px rgba(60,203,127,.55); }
.toast.error { border-color: rgba(255,90,90,.45); }
.toast.error::before { background: #ff5a5a; box-shadow: 0 0 12px rgba(255,90,90,.55); }
.toast.warn { border-color: rgba(255,200,90,.45); }
.toast.warn::before { background: #ffc85a; box-shadow: 0 0 12px rgba(255,200,90,.55); }
.toast button.toast-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #fff;
  opacity: .8;
  cursor: pointer;
  font-size: 1rem;
}
.toast button.toast-close:hover { opacity: 1; }
@keyframes toast-in-top { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
