@font-face {
  font-family: 'Giamatti';
  src: url('assets/fonts/giamatti.ttf') format('truetype');
  font-display: swap;
}

:root {
  --cream: #f7f3e5;
  --pastel-blue: #e9f4f2;
  --navy: #24324a;
  --ink: #1b2638;
  --gold: #d7c9a3;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --fade: 0.8s;
}

/* ========= BASE ========= */
* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  color: var(--navy);
  background: var(--cream);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease;
}

.header.scrolled {
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.brand {
  font-family: 'Giamatti', 'Great Vibes', cursive;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 16px; }

/* ========= DESKTOP NAV ========= */
.nav-list {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 6px;
  transition: color .25s ease, background .25s ease;
}
.nav-list a:hover {
  color: var(--ink);
  background: rgba(36,50,74,.06);
}

/* NAV CONTAINER */
.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* ✅ brand sinistra, menu destra */
}


/* DESKTOP MENU */
.nav-desktop {
  margin-left: auto; 
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: color 0.3s ease;
}
.nav-list a:hover {
  color: var(--gold);
}

/* BURGER */
.burger {
 display: none; /* nascosto su desktop */
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: 20px; /* leggero spazio dal menu */
}
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.4s ease;
}
.burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* SOLO SU MOBILE */
@media (max-width: 920px) {
  .nav-desktop { display: none; }     /* nasconde i bottoni classici */
  .burger { display: flex; }          /* mostra il burger */
}

/* MENU OVERLAY MOBILE */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 999;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.overlay-inner {
  text-align: center;
}
.overlay-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.overlay-links li { margin: 20px 0; }
.overlay-links a {
  font-size: 2rem;
  color: white;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  transition: color 0.3s ease;
}
.overlay-links a:hover { color: var(--gold); }

/* CLOSE BUTTON */
.close-overlay {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.close-overlay span {
  position: absolute;
  width: 28px;
  height: 2px;
  background: white;
}
.close-overlay span:first-child { transform: rotate(45deg); }
.close-overlay span:last-child { transform: rotate(-45deg); }
.close-overlay:hover span { background: var(--gold); }


/* Animazione fadeUp */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}



@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}

/* ========= MENU LINKS ========= */
.menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 0;
  margin: 0;
}
.menu-links a {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  transition: color .3s;
}
.menu-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .3s ease;
}
.menu-links a:hover {
  color: var(--gold);
}
.menu-links a:hover::after {
  width: 100%;
}

/* ========= MENU FOOTER ========= */
.menu-footer {
  font-size: .95rem;
  color: var(--ink);
}
.menu-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.social {
  margin-top: 12px;
  display: flex;
  gap: 14px;
}
.social img {
  width: 24px;
  height: 24px;
  opacity: .7;
  transition: opacity .3s;
}
.social img:hover { opacity: 1; }

/* ========= SECTIONS FULL SCREEN ========= */
.section {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(68px + 24px) 24px 24px;
  overflow: hidden;
}
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}
.inner { max-width: 820px; margin-inline: auto; text-align: center; }

/* ========= BACKGROUND GRADIENTS ========= */
.bg-gradient {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 60% 40%, #ffffff 0%, #e9f4f2 45%, #d9ecf6 100%),
    linear-gradient(135deg, #f0faf8 0%, #e9f4f2 50%, #c2e8fc 100%);
  background-blend-mode: multiply;
}
.bg-gradient.subtle {
  background:
    radial-gradient(60% 60% at 70% 30%, #ffffff 0%, #eef7f6 50%, #d9ecf6 100%);
}
.bg-gradient.soft {
  background:
    radial-gradient(70% 70% at 30% 70%, #ffffff 0%, #edf6f5 50%, #d9ecf6 100%);
}

/* ========= FISHBONE ========= */
.fishbone {
  position: absolute;
  top: -120px;
  left: -180px;
  width: min(900px, 75vw);
  aspect-ratio: 5/4;
  background: url('assets/fishbone.png') no-repeat center/contain;
  transform: rotate(30deg);
  opacity: .14;
  pointer-events: none;
  z-index: -1;
  filter: contrast(95%) brightness(105%);
}
.fishbone-inset {
  position: absolute;
  inset: auto auto -140px -120px;
  width: min(520px, 55vw);
  aspect-ratio: 5/4;
  background: url('assets/fishbone.png') no-repeat center/contain;
  transform: rotate(18deg);
  opacity: .10;
  pointer-events: none;
  z-index: 0;
}

/* ========= HERO ========= */
.hero .content { text-align: center; }
.logo-script {
  font-family: 'Giamatti', cursive;
  font-weight: normal;
  color: var(--ink);
  text-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.tagline {
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: .25rem 0 1rem;
}
.subtitle { color: #344; max-width: 760px; margin: 0 auto 1.6rem; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  border-radius: 999px;
  padding: .9rem 1.6rem;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: var(--shadow);
}
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(27,38,56,.28); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid rgba(27,38,56,.16);
}
.btn.ghost:hover {
  background: rgba(255,255,255,.7);
}

/* ========= SCROLL INDICATOR ========= */
.scroll-indicator {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  width: 28px;
  height: 44px;
  border-radius: 18px;
  border: 2px solid rgba(27,38,56,.4);
}
.scroll-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  translate: -50% 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); }
  50% { transform: translateY(14px); }
  100% { transform: translateY(0); }
}

/* ========= CARDS / GALLERY / FOOTER ========= */
.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 28px 0 8px;
}
.card {
  border-radius: 20px;
  padding: 28px 22px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27,38,56,.1);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px rgba(0,0,0,.12); }

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  cursor: zoom-in;
}
.grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 36px rgba(0,0,0,.14);
  filter: saturate(1.05);
}

.footer {
  text-align: center;
  padding: 28px 20px;
  color: #fff;
  background: var(--ink);
}

/* ========= ANIMAZIONI / LIGHTBOX / RESPONSIVE ========= */
.fade-in { opacity: 0; transform: translateY(16px); animation: fadeUp var(--fade) forwards; animation-play-state: paused; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.lightbox {
  position: fixed; inset: 0; display: none; place-items: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  z-index: 999;
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 40px 90px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #111;
  font-size: 32px;
  line-height: 48px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ========= RESPONSIVE ========= */
@media (max-width: 1024px) {
  .fishbone { width: min(760px, 85vw); }
}
@media (max-width: 720px) {
  .fishbone { width: min(620px, 95vw); left: -120px; top: -80px; transform: rotate(26deg); }
  .fishbone-inset { width: min(380px, 70vw); inset: auto auto -110px -80px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* ===== COOKIE BANNER 🐟 ===== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  padding: 18px 28px;
  z-index: 9999;
  max-width: 500px;
  text-align: center;
  animation: fadeIn .6s ease forwards;
  font-size: 0.95rem;
}

.cookie-buttons {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.cookie-buttons button {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,.1);
  transition: all 0.25s ease;
}

.cookie-buttons button:hover { transform: translateY(-2px); }

.cookie-buttons #accept-cookies {
  background: var(--ink);
  color: #fff;
}

.cookie-buttons #decline-cookies {
  background: transparent;
  border: 2px solid rgba(27,38,56,.2);
  color: var(--ink);
}
/* ===== LOGO “La Palazzina” – adattamento responsive ===== */

/* Desktop / schermi grandi */
@media (min-width: 1025px) {
  .logo-script {
    font-size: 130px; /* più scenografico sulla hero */
  }
  .brand {
    font-size: 70px; /* coerente con il menu header */
  }
}

/* Mobile / tablet */
@media (max-width: 1024px) {
  .logo-script {
    font-size: 72px; /* più compatto ma sempre elegante */
  }
  .brand {
    font-size: 42px;
  }
}
/* ===== NEW MASONRY GALLERY (collage La Palazzina) ===== */

.masonry-gallery {
  column-count: 3;
  column-gap: 18px;
  padding-top: 20px;
}

.masonry-gallery img {
  width: 100%;
  margin-bottom: 18px;
  border-radius: 22px;
  display: block;
  break-inside: avoid;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  cursor: zoom-in;
  background: #fff;
}

/* Hover elegante */
.masonry-gallery img:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(0,0,0,.16);
  filter: saturate(1.06);
}

/* Varianti proporzioni */
.masonry-gallery img.tall {
  aspect-ratio: 3/4;
  object-fit: cover;
}

.masonry-gallery img.wide {
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Responsivo */
@media (max-width: 980px) {
  .masonry-gallery { column-count: 2; }
}
@media (max-width: 600px) {
  .masonry-gallery { column-count: 1; }
}
