/* Same Google Fonts artwork, served locally. See fonts/README.md and OFL licenses. */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/cinzel-latin.09941fb1c169.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/crimson-regular-latin.538c7067580f.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/crimson-italic-latin.ded83489adae.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/crimson-semibold-latin.e2ca4f57a77f.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/crimson-bold-latin.60b9b9640fc7.woff2') format('woff2');
}
@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/great-vibes-logo.c8bde523c9a5.woff2') format('woff2');
  unicode-range: U+20, U+4C, U+61, U+63-65, U+6C, U+6E-6F;
}

/* ========================================
   LOCANDA DEL FEUDO - MENU DIGITALE
   Stile Medievale Rustico
   Mobile-first approach
   ======================================== */

/* CSS Custom Properties */
:root {
  /* Color Palette - Parchment & Medieval tones */
  --color-parchment: #f5e6c8;
  --color-parchment-light: #faf3e3;
  --color-parchment-dark: #e8d5a8;
  --color-leather: #5C3A1E;
  --color-leather-light: #7a5230;
  --color-leather-dark: #3d2610;
  --color-ink: #2a1810;
  --color-ink-light: #4a3828;
  --color-gold: #c49a3c;
  --color-gold-light: #d4ad52;
  --color-gold-dark: #a67c20;
  --color-gold-glow: rgba(196, 154, 60, 0.4);
  --color-rust: #8b4513;
  --color-burgundy: #722f37;
  --color-burgundy-light: #8b3a42;
  --color-burgundy-glow: rgba(114, 47, 55, 0.35);
  --color-sage: #6b7c5e;
  --color-cream: #fdf8ef;
  --color-white: #fffef9;
  --color-gray: #7a7060;
  --color-gray-light: #d4c9b8;
  --color-gray-soft: #9a8e7e;

  /* Typography */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Crimson Text', Georgia, serif;
  --font-medieval: 'MedievalSharp', 'Cinzel', serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Borders & Shadows */
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 2px 6px rgba(42, 24, 16, 0.08);
  --shadow-md: 0 4px 14px rgba(42, 24, 16, 0.1);
  --shadow-lg: 0 8px 28px rgba(42, 24, 16, 0.12);
  --shadow-gold: 0 4px 16px var(--color-gold-glow);
  --shadow-inset: inset 0 0 40px rgba(42, 24, 16, 0.06);

  /* Transitions */
  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --filter-duration: 250ms;
  --sticky-tabs-top: 0px;
  --category-tabs-sticky-height: 56px;
  --layer-intro: 200;
  --intro-hold: 1800ms;
  --intro-travel: 1000ms;
  --intro-duration: calc(var(--intro-hold) + var(--intro-travel));
  --stone-rail: clamp(36px, calc((100vw - 700px) / 2 - 24px), 320px);
  --stone-inset: clamp(-10px, calc((100vw - 700px) / 4 - 60px), 110px);
}

/* ========================================
   ACCESSIBILITY FONT SIZES
   ======================================== */

body.font-size-small { font-size: 14px; }
body.font-size-large { font-size: 18px; }
body.font-size-large .logo-text { font-size: 1.35rem; }
body.font-size-large .item-name { font-size: 1.15rem; }
body.font-size-large .item-description { font-size: 0.95rem; }

/* Reduced Motion */
body.reduced-motion,
body.reduced-motion * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

body.reduced-motion [data-parallax] {
  will-change: auto !important;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-parchment);
  background-image:
    /* Vignette — aged darkened edges */
    radial-gradient(ellipse at center, transparent 40%, rgba(92, 58, 30, 0.15) 100%),
    /* Warm light spots */
    radial-gradient(ellipse at 15% 10%, rgba(196, 154, 60, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(139, 69, 19, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(92, 58, 30, 0.04) 0%, transparent 60%),
    /* Aged paper spots */
    radial-gradient(circle at 20% 35%, rgba(139, 69, 19, 0.05) 0%, transparent 18%),
    radial-gradient(circle at 78% 55%, rgba(196, 154, 60, 0.06) 0%, transparent 22%),
    radial-gradient(circle at 35% 75%, rgba(92, 58, 30, 0.04) 0%, transparent 14%),
    radial-gradient(circle at 65% 20%, rgba(139, 69, 19, 0.03) 0%, transparent 16%);
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

.page-clip-wrapper {
  position: relative;
  z-index: 1;
  overflow-x: clip;
  width: 100%;
  min-height: 100vh;
}

body.preload {
  /* The menu stays available if scripts are unavailable. */
  opacity: 1;
  visibility: visible;
}

/* Keep every entrance intact until the resource gate opens. */
body.preload .page-clip-wrapper,
body.preload .page-clip-wrapper * { animation-play-state: paused !important; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========================================
   PARCHMENT TEXTURE OVERLAY
   ======================================== */

.parchment-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ========================================
   MEDIEVAL CORNER ORNAMENTS
   ======================================== */

.medieval-ornaments {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ornament {
  position: absolute;
  width: 100px;
  height: 100px;
  color: var(--color-leather);
  opacity: 0.5;
}

.ornament-top-left { top: 0; left: 0; }
.ornament-top-right { top: 0; right: 0; }
.ornament-bottom-left { bottom: 0; left: 0; }
.ornament-bottom-right { bottom: 0; right: 0; }

@media (min-width: 768px) {
  .ornament { width: 140px; height: 140px; }
}

/* ========================================
   MEDIEVAL STONE ART DECORATIONS
   ======================================== */

.stone-decorations {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 var(--stone-rail), transparent calc(var(--stone-rail) + 32px), transparent calc(100% - var(--stone-rail) - 32px), #000 calc(100% - var(--stone-rail)), #000 100%);
  mask-image: linear-gradient(to right, #000 0, #000 var(--stone-rail), transparent calc(var(--stone-rail) + 32px), transparent calc(100% - var(--stone-rail) - 32px), #000 calc(100% - var(--stone-rail)), #000 100%);
}

.stone-art {
  position: absolute;
  top: calc(var(--stone-position) * 1vh);
  width: clamp(42px, 9vw, var(--stone-size));
  height: auto;
  aspect-ratio: 1;
  color: var(--color-leather);
  opacity: 0.25;
  transform: rotate(var(--stone-rotation));
  transition: opacity 0.5s ease;
  will-change: transform;
  pointer-events: none;
  filter: none;
}

.js .stone-art { top: 0; }

/* ========================================
   HEADER STYLES
   ======================================== */

.header {
  position: relative;
  z-index: 100;
  background: var(--color-leather-dark);
  border-bottom: 1px solid var(--color-gold);
  padding: 14px var(--spacing-md);
  box-shadow: none;
  opacity: 1;
}

body.intro-loaded .header {
  animation: fadeInUI 0.8s ease 0.3s both;
}

@keyframes fadeInUI {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-content {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-parchment-light);
  text-shadow: none;
  white-space: nowrap;
}

.header-mark { flex: 0 0 auto; color: var(--color-gold-light); }
.logo-prefix { display: block; font-size: 0.66rem; letter-spacing: 0.08em; }
.logo-name { display: block; font-size: 1.35rem; font-weight: 600; letter-spacing: 0.14em; }

@media (max-width: 360px) {
  .header-mark { display: none; }
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.accessibility-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.accessibility-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-parchment-light);
  border: 1px solid var(--color-gray-light);
  border-radius: 50%;
  color: var(--color-gray);
  transition: all var(--transition-fast);
}

.accessibility-btn:hover {
  background: var(--color-parchment-dark);
  border-color: var(--color-gold);
  color: var(--color-ink);
  transform: scale(1.05);
}

.accessibility-btn.active {
  background: var(--color-leather);
  border-color: var(--color-leather);
  color: var(--color-parchment-light);
  box-shadow: var(--shadow-gold);
}

/* Language Toggle */
.language-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: var(--color-parchment-light);
  padding: 4px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-light);
}

.lang-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  transition: all var(--transition-fast);
  color: var(--color-gray);
}

.lang-btn:hover { color: var(--color-ink); }

.lang-btn.active {
  background: var(--color-leather);
  color: var(--color-parchment-light);
  box-shadow: var(--shadow-gold);
}

.lang-divider { display: none; }

.header .accessibility-btn {
  width: 34px;
  height: 34px;
  background: transparent;
  border-color: rgba(212, 173, 82, 0.45);
  color: var(--color-parchment-light);
}

.header .accessibility-btn:hover,
.header .accessibility-btn.active {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  color: var(--color-leather-dark);
  box-shadow: none;
}

.header .language-toggle {
  padding: 3px;
  background: transparent;
  border-color: rgba(212, 173, 82, 0.45);
  box-shadow: none;
}

.header .lang-btn { padding: 6px 12px; color: var(--color-parchment-light); }
.header .lang-btn.active { background: var(--color-gold-light); color: var(--color-leather-dark); box-shadow: none; }

/* ========================================
   FILTER TABS
   ======================================== */

.category-tabs {
  position: -webkit-sticky;
  position: sticky;
  top: var(--sticky-tabs-top);
  z-index: 90;
  background: linear-gradient(to bottom, rgba(245, 230, 200, 0.98) 0%, rgba(245, 230, 200, 0.94) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(196, 154, 60, 0.25);
  opacity: 1;
}

body.intro-loaded .category-tabs {
  animation: fadeInTabs 0.8s ease 0.5s both;
}

@keyframes fadeInTabs {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tabs-container {
  max-width: 100%;
  padding: 0 var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--color-parchment-light);
  border: 1px solid var(--color-gray-light);
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-gray);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.tab-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-ink);
  background: var(--color-parchment-dark);
}

.tab-btn.active {
  background: var(--color-leather);
  border-color: var(--color-leather);
  color: var(--color-parchment-light);
  box-shadow: 0 2px 10px rgba(92, 58, 30, 0.25);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}

.tab-icon .category-svg-icon {
  width: 18px;
  height: 18px;
  transition: all var(--transition-fast);
}

.tab-btn.active .category-svg-icon {
  color: var(--color-parchment-light);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.tab-text { display: inline; }

@media (min-width: 480px) {
  .tab-btn { padding: 10px 20px; }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  text-align: center;
  padding: 24px var(--spacing-md) var(--spacing-lg);
  position: relative;
  z-index: 10;
}

.hero::after {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.real-logo-container {
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  width: min(100%, 210px);
  margin: 18px auto 1rem;
}

.real-logo-container::before {
  content: '';
  position: absolute;
  inset: -16px -24px;
  z-index: -1;
  border: 1px solid rgba(166, 124, 32, 0.5);
  border-radius: 140px 140px 8px 8px;
  pointer-events: none;
}

.hero .real-logo-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (min-width: 768px) {
  .real-logo-container { width: 240px; }
}

.hero-copy { margin-top: 2rem; }
.hero-copy .hero-subtitle {
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--color-ink-light);
}

.hero-menu-title {
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.6vw, 1.8rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--color-leather);
}

.hero-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 0.85rem;
  color: var(--color-gold-dark);
}

.hero-signature span { width: min(17vw, 96px); height: 1px; background: currentColor; opacity: 0.6; }
body.intro-running .hero-copy { opacity: 0; }
body.intro-complete .hero-copy { animation: heroCopyEntrance 500ms cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes heroCopyEntrance {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) and (max-height: 740px) {
  .real-logo-container { width: 175px; }
  .hero { padding-top: 20px; }
  .hero-copy { margin-top: 1.65rem; }
}

.hero-crest {
  margin-bottom: var(--spacing-md);
  display: flex;
  justify-content: center;
}

.crest-icon {
  color: var(--color-gold);
  filter: drop-shadow(0 2px 6px var(--color-gold-glow));
  animation: crest-glow 4s ease-in-out infinite;
}

@keyframes crest-glow {
  0%, 100% { filter: drop-shadow(0 2px 6px var(--color-gold-glow)); }
  50% { filter: drop-shadow(0 2px 12px var(--color-gold-glow)); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.title-line {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-leather);
  text-shadow: 0 2px 4px rgba(92, 58, 30, 0.15);
  position: relative;
}

.title-line::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.title-script {
  font-family: var(--font-medieval);
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  color: var(--color-gold-dark);
  margin-top: var(--spacing-xs);
  letter-spacing: 0.06em;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gray);
}

.hero-divider {
  margin-top: var(--spacing-lg);
  display: flex;
  justify-content: center;
  color: var(--color-gold);
}

body.intro-loaded .hero {
  animation: none;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   MENU CONTAINER
   ======================================== */

.menu-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 var(--spacing-md) var(--spacing-2xl);
  position: relative;
  z-index: 2;
}

body.intro-loaded .menu-sections {
  animation: fadeInUI 0.8s ease 0.6s both;
}

.menu-sections {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.menu-empty-state {
  display: none;
  margin: var(--spacing-lg) 0 0;
  padding: 12px 14px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(196, 154, 60, 0.3);
  background: rgba(253, 248, 239, 0.9);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  font-style: italic;
  box-shadow: var(--shadow-sm);
}

.menu-empty-state.visible {
  display: block;
  animation: fadeInUp 0.25s ease both;
}

/* ========================================
   CATEGORY STYLES
   ======================================== */

.menu-category {
  animation: fadeInUp 0.5s ease calc(var(--delay)) both;
  transition: opacity var(--filter-duration) ease, transform var(--filter-duration) ease;
}

.menu-category.hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.menu-category.is-hidden { display: none; }

.category-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  position: relative;
  flex-wrap: wrap;
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-svg-icon {
  width: 26px;
  height: 26px;
  color: var(--color-gold);
  filter: drop-shadow(0 0 3px var(--color-gold-glow));
}

.category-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-leather);
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light), transparent);
  border-radius: 1px;
  min-width: 40px;
}

/* ========================================
   MENU ITEM STYLES
   ======================================== */

.menu-items {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-md) + 1.8rem);
  position: relative;
}

.menu-subsection.is-hidden { display: none; }

.menu-subsection + .menu-subsection {
  margin-top: var(--spacing-sm);
}

.menu-subcategory-title {
  margin: var(--spacing-md) 0 var(--spacing-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: var(--spacing-md);
  padding-left: calc(var(--spacing-md) + 4px);
  background: var(--color-parchment-light);
  border-radius: var(--border-radius);
  border: 1px solid rgba(196, 154, 60, 0.15);
  border-left: 3px solid var(--color-gold);
  transition: all var(--transition-normal);
  animation: fadeInUp 0.4s ease calc(var(--item-delay)) both;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  contain: layout style;
}

/* Subtle shimmer on hover */
.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(196, 154, 60, 0.06), transparent);
  transition: transform 0.6s ease;
}

.menu-item:hover::before,
.menu-item:active::before {
  transform: translateX(200%);
}

.menu-item:hover,
.menu-item:active {
  background: var(--color-cream);
  border-color: rgba(196, 154, 60, 0.35);
  transform: translateX(3px);
  box-shadow: var(--shadow-md), 0 0 12px rgba(196, 154, 60, 0.08);
}

/* Hidden state for filtering */
.menu-item.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.menu-item.is-hidden { display: none; }

.item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.item-header {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.item-name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-leather);
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.menu-item:hover .item-name {
  color: var(--color-gold-dark);
}

/* Badge with medieval style */
.item-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold) 100%);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 20px;
  box-shadow: 0 2px 6px var(--color-gold-glow);
}

.item-description {
  font-size: 0.82rem;
  color: var(--color-gray);
  font-weight: 400;
  line-height: 1.5;
  font-style: italic;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xs);
}

.item-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}

.price-euro {
  font-size: 0.75rem;
  color: var(--color-gold-dark);
  font-weight: 600;
}

.price-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-gold-dark);
}

/* Add to Favorites Button */


.add-to-cart-btn {
  height: 36px;
  min-width: 36px;
  width: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: var(--color-parchment-light);
  border: 1.5px solid var(--color-gold);
  border-radius: 18px;
  color: var(--color-gold);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s, border-color 0.3s;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.add-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.icon-plus,
.icon-check {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-plus {
  font-size: 1.6rem;
  font-weight: 500;
  transform: translate(-50%, -52%);
}

.icon-check {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, -49%) rotate(-180deg) scale(0.5);
}

.add-text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.3s ease, padding 0.3s ease;
}

.add-to-cart-btn:hover {
  background: var(--color-gold);
  color: var(--color-white);
  box-shadow: var(--shadow-gold);
}

.add-to-cart-btn:hover:not(.added) .icon-plus {
  transform: translate(-50%, -52%) scale(1.15) rotate(90deg);
}

.add-to-cart-btn:active {
  transform: scale(0.95);
}

.add-to-cart-btn.added {
  width: 130px; 
  background: var(--color-sage);
  border-color: var(--color-sage);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(107, 124, 94, 0.3);
}

.add-to-cart-btn.added .icon-plus {
  opacity: 0; 
  transform: translate(-50%, -52%) rotate(180deg) scale(0.5); 
}

.add-to-cart-btn.added .icon-check {
  opacity: 1; 
  transform: translate(-50%, -49%) rotate(0deg) scale(1);
}

.add-to-cart-btn.added .add-text {
  opacity: 1;
  padding-right: 14px;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.footer {
  background: var(--color-leather-dark);
  color: var(--color-parchment-light);
  padding: var(--spacing-2xl) var(--spacing-md);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-gold), var(--color-gold-light), var(--color-gold), transparent);
}

.footer-content {
  max-width: 650px;
  margin: 0 auto;
  padding-bottom: var(--spacing-3xl);
  text-align: center;
}

.footer-crest {
  margin-bottom: var(--spacing-lg);
  color: var(--color-gold);
  display: flex;
  justify-content: center;
}

.footer-text {
  font-size: 0.82rem;
  color: rgba(245, 230, 200, 0.65);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
  font-style: italic;
}


.footer-credits {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: rgba(245, 230, 200, 0.5);
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.atelier-credit {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.7rem;
  max-width: 100%;
  text-align: left;
  min-height: 48px;
  margin-top: 1rem;
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid rgba(212, 173, 82, 0.65);
  color: var(--color-parchment-light);
  transition: color 180ms ease, border-color 180ms ease;
}

.atelier-credit-label {
  grid-column: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0;
}

.atelier-credit-name {
  grid-column: 1;
  font-weight: 600;
  font-size: 0.85rem;
}

.atelier-credit svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.atelier-credit:hover,
.atelier-credit:focus-visible {
  color: var(--color-gold-light);
  border-color: var(--color-gold-light);
}

.atelier-credit:hover svg,
.atelier-credit:focus-visible svg { transform: translate(2px, -2px); }

/* ========================================
   SHOPPING CART / FAVORITES
   ======================================== */

.shopping-cart {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-parchment-light);
  border-top: 2px solid var(--color-gold);
  box-shadow: 0 -4px 20px rgba(42, 24, 16, 0.12);
  z-index: 110;
  transition: transform var(--transition-normal), height var(--transition-normal);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  opacity: 1;
}

body.intro-loaded .shopping-cart {
  animation: fadeInUI 0.8s ease 0.7s both;
}

.shopping-cart[data-expanded="false"] { height: 60px; }
.shopping-cart[data-expanded="true"] { height: 80vh; }

.cart-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: linear-gradient(135deg, var(--color-leather) 0%, var(--color-leather-light) 100%);
  color: var(--color-parchment-light);
  cursor: pointer;
  flex-shrink: 0;
}

.cart-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: var(--color-parchment-light);
  cursor: pointer;
  line-height: 0;
  transition: all var(--transition-fast);
}

.cart-toggle svg { display: block; }
.cart-toggle:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.05); }

.cart-toggle .cart-icon-collapsed,
.cart-toggle .cart-icon-expanded { display: block; }
.shopping-cart[data-expanded="false"] .cart-icon-expanded { display: none; }
.shopping-cart[data-expanded="true"] .cart-icon-collapsed { display: none; }

.cart-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  margin: 0;
  letter-spacing: 0.03em;
}

.cart-count {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold);
  color: var(--color-leather-dark);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
  display: none;
}

.shopping-cart[data-expanded="true"] .cart-content { display: block; }

.cart-items { margin-bottom: var(--spacing-lg); }

.cart-empty {
  text-align: center;
  color: var(--color-gray);
  padding: var(--spacing-xl);
  font-style: italic;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--color-parchment);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  transition: all var(--transition-fast);
  border: 1px solid rgba(196, 154, 60, 0.12);
}

.cart-item:hover {
  background: var(--color-parchment-dark);
  transform: translateX(2px);
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-leather);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.cart-item-price {
  color: var(--color-gold-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-item-remove {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-gray);
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.cart-item-remove:hover {
  background: var(--color-burgundy);
  color: var(--color-parchment-light);
  transform: scale(1.1);
}

.cart-actions {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-gray-light);
}

.cart-note {
  margin-top: var(--spacing-md);
  color: var(--color-ink);
  font-size: 0.85rem;
  text-align: center;
  font-style: italic;
}

.cart-clear {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--color-gray-light);
  color: var(--color-ink);
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
}

.cart-clear:hover {
  background: var(--color-burgundy);
  color: var(--color-parchment-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-burgundy-glow);
}

.cart-clear:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

.scroll-top {
  position: fixed;
  bottom: 120px;
  right: var(--spacing-lg);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-leather) 0%, var(--color-leather-light) 100%);
  color: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(92, 58, 30, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all var(--transition-normal);
  z-index: 98;
  border: 1px solid var(--color-gold);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.shopping-cart[data-expanded="true"] ~ .scroll-top.visible {
  bottom: calc(80vh + var(--spacing-lg));
}

.scroll-top:hover {
  background: linear-gradient(135deg, var(--color-leather-dark) 0%, var(--color-leather) 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(92, 58, 30, 0.35), 0 0 16px var(--color-gold-glow);
}

.scroll-top:active { transform: translateY(-2px) scale(1); }

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */

@media (min-width: 480px) {
  :root {
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
  }

  .category-title { font-size: 1.4rem; }
  .item-name { font-size: 1.05rem; }
  .item-description { font-size: 0.85rem; }
}

/* ========================================
   RESPONSIVE DESIGN - DESKTOP
   ======================================== */

@media (min-width: 768px) {
  .menu-container {
    max-width: 700px;
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-3xl);
  }

  .hero { padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg); }

  .menu-item { padding: var(--spacing-lg); }

  .footer-crest svg { width: 50px; height: 58px; }

  /* Shopping cart on larger screens */
  .shopping-cart[data-expanded="true"] {
    right: 0;
    left: auto;
    width: 400px;
    max-width: 90vw;
    border-left: 2px solid var(--color-gold);
    border-top-left-radius: var(--border-radius-lg);
  }

  .shopping-cart[data-expanded="false"] {
    right: 0;
    left: auto;
    width: 300px;
  }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --color-gray: #555555;
    --color-gray-light: #aaaaaa;
  }
  .menu-item { border-color: var(--color-gray-light); }
}

/* Print styles */
@media print {
  .parchment-texture,
  .medieval-ornaments,
  .stone-decorations,
  .scroll-top,
  .shopping-cart,
  .accessibility-controls,
  .language-toggle,
  .category-tabs,
  .add-to-cart-btn {
    display: none !important;
  }

  body { background: white; }
  .header { position: static; background: white; }

  .menu-item {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .menu-category.hidden,
  .menu-item.hidden {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
  }

  .footer { background: white; color: var(--color-ink); }
}

@keyframes menuCategoryEntrance {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ========================================
   THE LOCANDA PORTAL
   ======================================== */

.intro-stage { display: none; }

.js .intro-stage {
  display: block;
  position: fixed;
  inset: 0;
  z-index: var(--layer-intro);
  overflow: hidden;
  pointer-events: none;
  animation: introSafetyExit 20s step-end forwards;
}

body.intro-pending .intro-stage { animation: none; }
body.intro-running .intro-stage { animation: introSafetyExit calc(var(--intro-duration) + 600ms) step-end forwards; }

.intro-status {
  display: none;
  position: absolute;
  top: 50%;
  width: 100%;
  padding: 1rem;
  text-align: center;
  color: #f3e5ab;
  font: italic 1rem/1.5 Georgia, serif;
}

body.intro-pending .intro-status { display: block; }

.intro-panel {
  position: absolute;
  inset-block: 0;
  width: 50%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(196, 154, 60, 0.1), transparent 65%),
    linear-gradient(155deg, #3d2610, #180d06);
}

.intro-panel::after {
  content: '';
  position: absolute;
  inset: clamp(16px, 3vw, 40px);
  border: 1px solid rgba(212, 173, 82, 0.26);
}

.intro-panel-left { left: 0; border-right: 1px solid rgba(243, 229, 171, 0.4); }
.intro-panel-right { right: 0; border-left: 1px solid rgba(243, 229, 171, 0.4); }

.intro-running .intro-panel-left {
  animation: openPortalLeft 850ms cubic-bezier(0.76, 0, 0.24, 1) var(--intro-hold) both;
}

.intro-running .intro-panel-right {
  animation: openPortalRight 850ms cubic-bezier(0.76, 0, 0.24, 1) var(--intro-hold) both;
}

.intro-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(84vw, 540px);
  aspect-ratio: 1;
  border: 1px solid rgba(212, 173, 82, 0.32);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(196, 154, 60, 0.16), transparent 68%);
  opacity: 0;
}

.intro-halo::before,
.intro-halo::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(212, 173, 82, 0.15);
  border-radius: inherit;
}

.intro-halo::before { inset: 14px; }
.intro-halo::after { inset: 38px; }

.intro-running .intro-halo { animation: portalHalo calc(var(--intro-hold) + 550ms) ease-out both; }

.intro-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(175px, 58vw, 250px);
  aspect-ratio: 500 / 620;
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: transform, opacity;
}

.intro-logo { display: block; width: 100%; height: auto; border-radius: 8px; }

.intro-caption {
  position: absolute;
  top: calc(50% + min(36vw, 170px) + 20px);
  left: 0;
  width: 100%;
  padding: 0 1rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(1.12rem, 4.2vw, 1.35rem);
  font-style: italic;
  letter-spacing: 0.08em;
  color: #f3e5ab;
  opacity: 0;
}

.intro-running .intro-caption { animation: portalCaption calc(var(--intro-hold) + 300ms) ease both; }

.intro-skip {
  position: absolute;
  bottom: clamp(24px, 5vh, 56px);
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.5rem 0;
  transform: translateX(-50%);
  color: #f3e5ab;
  border-bottom: 1px solid rgba(243, 229, 171, 0.55);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  pointer-events: auto;
}

.intro-skip:hover { color: var(--color-white); border-color: currentColor; }

.intro-running .intro-skip { animation: portalSkipExit 250ms ease calc(var(--intro-hold) + 250ms) forwards; }

body.intro-pending,
body.intro-running { overflow-y: hidden; }
body.intro-running .hero .real-logo-svg { visibility: hidden; }

@keyframes openPortalLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-101%); }
}

@keyframes openPortalRight {
  from { transform: translateX(0); }
  to { transform: translateX(101%); }
}

@keyframes portalHalo {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  20%, 70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes portalCaption {
  0%, 5% { opacity: 0; transform: translateY(8px); }
  14%, 84% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes introSafetyExit {
  to { visibility: hidden; }
}

@keyframes portalSkipExit {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .intro-stage { display: none; }
  body.intro-running { overflow-y: auto; }
  body.intro-running .hero .real-logo-svg { visibility: visible; }
  .stone-art { will-change: auto; }
}

body.reduced-motion .intro-stage { display: none; }
body.reduced-motion.intro-running { overflow-y: auto; }
body.reduced-motion.intro-running .hero .real-logo-svg { visibility: visible; }

@media print {
  .js .intro-stage { display: none; }
  body.intro-running { overflow-y: visible; }
  body.intro-running .hero .real-logo-svg { visibility: visible; }
}
