/* ==========================================================================
   KALO Pasticceria - Stylesheet
   Reconstruction autonome en CSS pur
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Manrope:wght@400;500;600;700&display=swap');

/* --- Variables & Thème --- */
:root {
  --bg: #FDFBF7;
  --bg-rgb: 253, 251, 247;
  --text: #2D2926;
  --text-rgb: 45, 41, 38;
  --text-muted: rgba(45, 41, 38, 0.7);
  --text-faint: rgba(45, 41, 38, 0.4);
  --border-subtle: rgba(45, 41, 38, 0.12);
  --border-medium: rgba(45, 41, 38, 0.2);
  
  --gold: #AF9156;
  --gold-rgb: 175, 145, 86;
  --gold-hover: #C7AA70;
  --gold-dark: #8B633A;
  
  --reviews-bg: rgba(232, 213, 208, 0.45);
  --header-bg: rgba(253, 251, 247, 0.92);
  --card-bg: #FDFBF7;
  --card-hover-bg: #E8D5D0;
  
  --font-serif: 'Cormorant Garamond', Georgia, Cambria, 'Times New Roman', serif;
  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --transition-theme: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.8s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark {
  --bg: #221210;
  --bg-rgb: 34, 18, 16;
  --text: #EFECE7;
  --text-rgb: 239, 236, 231;
  --text-muted: rgba(239, 236, 231, 0.7);
  --text-faint: rgba(239, 236, 231, 0.4);
  --border-subtle: rgba(239, 236, 231, 0.12);
  --border-medium: rgba(239, 236, 231, 0.2);
  
  --reviews-bg: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(34, 18, 16, 0.92);
  --card-bg: #221210;
  --card-hover-bg: rgba(255, 255, 255, 0.05);
}

/* --- Reset de base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-theme);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: var(--transition-theme);
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* --- Typographie & Utilitaires --- */
.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

.eyebrow {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--gold);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.05;
  margin-top: 1.25rem;
  font-weight: 400;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3.75rem;
    line-height: 1;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 4.5rem;
    line-height: 1;
  }
}

.section-shell {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 6rem 1.25rem;
}

@media (min-width: 768px) {
  .section-shell {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .section-shell {
    padding-top: 9rem;
    padding-bottom: 9rem;
  }
}

/* --- Boutons et Contrôles --- */
.control-pill {
  border-radius: 9999px;
  border: 1px solid currentColor;
  opacity: 0.85;
  padding: 0.5rem 0.75rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-pill:hover {
  opacity: 1;
  border-color: var(--gold);
  color: var(--gold);
}

.control-round {
  display: grid;
  height: 2.25rem;
  width: 2.25rem;
  place-items: center;
  border-radius: 9999px;
  border: 1px solid currentColor;
  opacity: 0.85;
  transition: all 0.2s ease;
}

.control-round:hover {
  opacity: 1;
  border-color: var(--gold);
  color: var(--gold);
}

.button-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--gold);
  color: #221210;
  padding: 0.875rem 1.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid transparent;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button-gold:hover {
  background-color: var(--gold-hover);
}

.button-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid currentColor;
  border-color: var(--border-medium);
  padding: 0.875rem 1.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  transition: all 0.3s ease;
}

.button-line:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-pill {
  border-radius: 9999px;
  border: 1px solid var(--border-medium);
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-pill.active {
  border-color: var(--gold);
  background-color: var(--gold);
  color: #221210;
  font-weight: 600;
}

.gold-thread {
  position: absolute;
  left: 1.75rem;
  top: 0;
  height: 4rem;
  width: 1px;
  background-color: var(--gold);
}

@media (min-width: 1024px) {
  .gold-thread {
    left: 4rem;
  }
}

@media (min-width: 1280px) {
  .gold-thread {
    left: 6rem;
  }
}

/* --- Curseur Croissant Interactif --- */
.croissant-cursor {
  position: fixed;
  z-index: 9999;
  left: -14px;
  top: -14px;
  pointer-events: none;
  font-size: 25px;
  filter: sepia(1) saturate(0.8) drop-shadow(0 2px 4px rgba(34, 18, 16, 0.25));
  transition: transform 0.05s linear, scale 0.4s ease;
  will-change: transform;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .croissant-cursor {
    display: block;
  }
}

.croissant-cursor.is-active {
  scale: 0.78;
}

/* --- Header / Navbar --- */
header.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--header-bg);
  color: var(--text);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-theme);
}

.header-inner {
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

@media (min-width: 1024px) {
  .header-inner {
    padding: 0 2.5rem;
  }
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  font-weight: 500;
}

.logo-img-wrapper {
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  border-radius: 9999px;
  overflow: hidden;
  background-color: #FDFBF7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

html.dark .logo-img-wrapper img {
  mix-blend-mode: normal;
}

nav.main-nav {
  display: none;
  gap: 2rem;
}

@media (min-width: 1024px) {
  nav.main-nav {
    display: flex;
  }
}

nav.main-nav a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  transition: color 0.2s ease;
}

nav.main-nav a:hover {
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.25) 50%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 1.75rem 4rem;
  color: #FFFFFF;
}

@media (min-width: 1024px) {
  .hero-content {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (min-width: 1280px) {
  .hero-content {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

.hero-title {
  margin-top: 1.75rem;
  max-width: 56rem;
  white-space: pre-line;
  font-family: var(--font-serif);
  font-size: 3.125rem;
  line-height: 0.98;
  font-weight: 400;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

@media (min-width: 1280px) {
  .hero-title {
    font-size: 6.5rem;
  }
}

.hero-body {
  margin-top: 2rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
  .hero-body {
    font-size: 1.125rem;
  }
}

.hero-buttons {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-line-hero {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

.button-line-hero:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-locate-link {
  margin-top: 3rem;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.hero-locate-link:hover {
  color: var(--gold);
}

/* --- Section Histoire / Philosophie (#storia) --- */
.story-grid {
  display: grid;
  align-items: center;
  gap: 3.5rem;
}

@media (min-width: 1024px) {
  .story-grid {
    grid-template-columns: 0.82fr 1.18fr;
    gap: 6rem;
  }
}

.story-image-wrap {
  position: relative;
  order: 2;
}

@media (min-width: 1024px) {
  .story-image-wrap {
    order: 1;
  }
}

.story-frame-border {
  position: absolute;
  left: -1.25rem;
  top: -1.25rem;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(175, 145, 86, 0.45);
  pointer-events: none;
}

.story-image {
  position: relative;
  height: 520px;
  width: 100%;
  object-fit: cover;
  object-position: 55% 45%;
}

.story-content {
  order: 1;
}

@media (min-width: 1024px) {
  .story-content {
    order: 2;
  }
}

.story-pillars {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  text-align: center;
}

.pillar-number {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  color: var(--gold);
}

.pillar-label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

/* --- Section Créations (#creazioni) --- */
.creations-section {
  padding: 6rem 0;
}

@media (min-width: 1024px) {
  .creations-section {
    padding: 9rem 0;
  }
}

.filter-bar {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-scroll-container {
  margin-top: 3rem;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2rem;
  padding-left: max(1.25rem, calc((100vw - 1400px) / 2));
  padding-right: max(1.25rem, calc((100vw - 1400px) / 2));
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.gallery-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 9999px;
}

.gallery-card {
  position: relative;
  aspect-ratio: 3/4;
  height: 470px;
  width: 390px;
  max-width: 85vw;
  flex-shrink: 0;
  scroll-snap-align: center;
  overflow: hidden;
  background-color: #E8DFCF;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 7rem 1.75rem 1.75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  color: #FFFFFF;
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-overlay,
.gallery-card:focus-within .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-overlay-title {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 400;
}

.gallery-overlay-soul {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

/* --- Section Menù (#menu) --- */
.menu-section {
  padding: 6rem 0;
}

@media (min-width: 1024px) {
  .menu-section {
    padding: 9rem 0;
  }
}

.menu-board-wrapper {
  max-width: 1100px;
  margin: 3.5rem auto 0;
  padding: 0 1.25rem;
}

.menu-board {
  position: relative;
  background-color: #1A1A1A;
  color: #FFFFFF;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 10px solid #8B633A;
  border-image: linear-gradient(135deg, #A07850, #8B633A 40%, #A07850 70%, #8B633A) 1;
}

@media (min-width: 768px) {
  .menu-board {
    padding: 3rem;
  }
}

.menu-board-header {
  text-align: center;
}

.menu-board-title {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  letter-spacing: 0.18em;
  color: #FFFFFF;
}

@media (min-width: 768px) {
  .menu-board-title {
    font-size: 3rem;
  }
}

.menu-board-divider {
  width: 6rem;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0.75rem auto 0;
}

.menu-board-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .menu-board-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .menu-board-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.menu-column-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .menu-column-title {
    font-size: 1.5rem;
  }
}

.menu-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.menu-item-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

.menu-item-name {
  line-height: 1.2;
}

.menu-item-dots {
  flex: 1;
  margin: 0 0.5rem;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.menu-item-price {
  white-space: nowrap;
}

.menu-board-footer {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  text-align: center;
}

.menu-kg-price {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: 0.22em;
  color: var(--gold);
}

@media (min-width: 768px) {
  .menu-kg-price {
    font-size: 1.5rem;
  }
}

.menu-board-pattern {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px), radial-gradient(circle at 70% 60%, #fff 1px, transparent 1px);
  background-size: 40px 40px, 55px 55px;
}

.menu-photo-card {
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.menu-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Section Avis (#recensioni) --- */
.reviews-section {
  background-color: var(--reviews-bg);
  padding: 6rem 0;
  transition: var(--transition-theme);
}

@media (min-width: 1024px) {
  .reviews-section {
    padding: 9rem 0;
  }
}

.reviews-header {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

@media (min-width: 768px) {
  .reviews-header {
    flex-direction: row;
    align-items: flex-end;
  }
}

.reviews-grid {
  margin-top: 4rem;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  border-top: 1px solid var(--gold);
  padding-top: 1.75rem;
}

@media (min-width: 1024px) {
  .review-card:nth-child(2) {
    transform: translateY(2.5rem);
  }
}

.review-stars {
  display: flex;
  gap: 0.25rem;
  color: var(--gold);
}

.review-quote {
  margin-top: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 2.25rem;
  font-weight: 400;
}

.review-author {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* --- Section Visite & Horaires (#visita) --- */
.visit-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .visit-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
  }
}

.hours-box {
  margin-top: 2.5rem;
  border-left: 1px solid var(--gold);
  padding-left: 1.5rem;
}

.hours-header {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.hours-row {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  font-size: 0.875rem;
}

.map-container {
  overflow: hidden;
  border: 1px solid rgba(175, 145, 86, 0.4);
  background-color: #E8DFCF;
  height: 560px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(0.65) sepia(0.25);
}

/* --- Page Contacts (/contatti.html) --- */
.contacts-page-shell {
  min-height: 85vh;
  padding-top: 10rem;
}

.back-link {
  margin-bottom: 3.5rem;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.contacts-grid {
  margin-top: 3.5rem;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background-color: var(--border-subtle);
}

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

.contact-card {
  display: flex;
  min-height: 8rem;
  align-items: center;
  gap: 1.25rem;
  background-color: var(--card-bg);
  padding: 1.75rem;
  transition: background-color 0.2s ease;
}

.contact-card:hover {
  background-color: var(--card-hover-bg);
}

.contact-icon {
  color: var(--gold);
  flex-shrink: 0;
}

/* --- Footer --- */
footer.site-footer {
  background-color: #221210;
  color: #EFECE7;
  padding: 4rem 1.25rem;
}

@media (min-width: 1024px) {
  footer.site-footer {
    padding: 4rem 2.5rem;
  }
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  letter-spacing: 0.28em;
  font-weight: 400;
}

.footer-brand-sub {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--gold);
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links-list a:hover {
  color: var(--gold);
}

.footer-right {
  text-align: left;
}

@media (min-width: 768px) {
  .footer-right {
    text-align: right;
  }
}

.footer-contacts-link {
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 8px;
}

.footer-copyright {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}
