/* ============================================
   Il Melograno — Premium Italian Restaurant
   ============================================ */

/* === FONTS === */
@font-face {
  font-family: 'Quinoa Round';
  src: url('../fonts/QuinoaRound-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quinoa Round';
  src: url('../fonts/QuinoaRound-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Quinoa Round';
  src: url('../fonts/QuinoaRound-Semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quinoa Round';
  src: url('../fonts/QuinoaRound-SemiboldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* === BRAND COLORS (from logobook) === */
:root {
  --espresso: #3b2418;
  --palace-maroon: #722622;
  --dirty-gold: #B8934A;
  --crispy-ivory: #edded9;
  --black: #181818;

  /* Aliases for easier use */
  --bordeaux: #722622;
  --bordeaux-deep: #3b2418;
  --wine: #722622;
  --cream: #edded9;
  --gold: #B8934A;
  --ink: #181818;

  /* Typography */
  --font-primary: 'Quinoa Round', system-ui, sans-serif;
  --font-accent: 'Quinoa Round', system-ui, sans-serif;

  /* Spacing & timing */
  --section-padding: 8rem 2rem;
  --transition-smooth: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-quick: all 0.3s ease;
}

/* === TEXTURED BACKGROUNDS (from brandbook - tactile) === */
.textured-maroon {
  background-color: #722622;  /* PALACE MAROON */
  background-image: url('../img/fon.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.textured-cream {
  background-color: #edded9;  /* CRISPY IVORY */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-blend-mode: multiply;
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-weight: 500;
  line-height: 1.7;
  color: var(--cream);
  background: var(--bordeaux);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-quick);
}

/* === PRELOADER === */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  width: 400px;
  height: auto;
}

/* Зерна - золоті залиті, спочатку невидимі */
.preloader #path60, .preloader #path61, .preloader #path62,
.preloader #path63, .preloader #path64, .preloader #path65,
.preloader #path66, .preloader #path67, .preloader #path68 {
  fill: var(--gold) !important;
  opacity: 0;
}

/* Коло - золота обводка, буде малюватись */
.preloader #path69 {
  fill: none !important;
  stroke: var(--gold) !important;
  stroke-width: 6 !important;
}

/* Корона - золота обводка, буде малюватись */
.preloader #path70 {
  fill: none !important;
  stroke: var(--gold) !important;
  stroke-width: 5 !important;
  stroke-linejoin: round !important;
}

/* Анімація зерен */
@keyframes seedPop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.seed-animated {
  animation: seedPop 0.4s ease-out forwards;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .preloader #path60, .preloader #path61, .preloader #path62,
  .preloader #path63, .preloader #path64, .preloader #path65,
  .preloader #path66, .preloader #path67, .preloader #path68 {
    opacity: 1 !important;
    animation: none !important;
  }
  .preloader #path69, .preloader #path70 {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
}

/* === HEADER === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 2rem 4rem;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

header.hidden {
  transform: translateY(-100%);
}

header.scrolled {
  background: rgba(59, 36, 24, 0.95);
  backdrop-filter: blur(20px);
  padding: 1.2rem 4rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(64%) sepia(26%) saturate(722%) hue-rotate(8deg) brightness(95%) contrast(87%);
  /* Золотий колір #B8934A */
}

nav {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.cta-button {
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--dirty-gold) 0%, #9A7838 100%);
  color: var(--black);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-radius: 2px;
  transition: var(--transition-quick);
  box-shadow: 0 4px 15px rgba(184, 147, 74, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(184, 147, 74, 0.5);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition-quick);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* === SECTION COUNTER === */
.section-counter {
  position: fixed;
  bottom: 3rem;
  right: 4rem;
  z-index: 500;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 300;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  /* Прибрати червону рамку */
  outline: none;
  border: none;
}

.section-counter.fade {
  opacity: 0;
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  overflow: hidden;
  /* Fallback gradient (якщо відео не завантажиться) */
  background:
    linear-gradient(135deg, rgba(114, 38, 34, 0.85) 0%, rgba(59, 36, 24, 0.95) 100%),
    var(--bordeaux);
  padding: 2rem;
}

/* Розмитий фон-дубль відео (по всій ширині, під всім) */
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(40px) brightness(0.6);
  transform: scale(1.1); /* Щоб розмиття не обрізалось по краях */
}

/* Основне вертикальне відео 9:16 по центру */
.hero-video-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  width: auto;
  max-width: 50vw; /* Обмежити ширину на великих екранах */
  object-fit: cover;
  z-index: 1;
}

/* Виньєтка + затемнення (особливо знизу для читабельності тексту) */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(114, 38, 34, 0.3) 70%),
    linear-gradient(to bottom,
      rgba(59, 36, 24, 0.2) 0%,
      rgba(59, 36, 24, 0.4) 50%,
      rgba(114, 38, 34, 0.8) 100%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 60%;
  text-align: left;
  margin: 0;
  padding: 0 4rem;
  align-self: flex-start;
  margin-top: auto;
  margin-bottom: 6rem;
}

/* Весь контент hero поверх відео і затемнення */
.hero > *:not(.hero-video-bg):not(.hero-video-center):not(::after) {
  position: relative;
  z-index: 3;
}

/* Текст-маніфест hero (як Arzak) */
.hero-manifesto {
  font-size: clamp(22px, 2.6vw, 40px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--cream);
  opacity: 0.9;
  margin-bottom: 3rem;
}

.hero-manifesto em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
  opacity: 1;
}

/* Порядкова поява рядків маніфесту (як титри Arzak) */
.hero .line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero .line.in {
  opacity: 1;
  transform: translateY(0);
}

/* Footer hero: адреса + кнопка (як контакти Arzak) */
.hero-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  flex-wrap: wrap;
  /* Анімація появи (після тексту-маніфесту) */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-footer.in {
  opacity: 0.7;
  transform: translateY(0);
}

.hero-address {
  font-weight: 500;
}

.hero-separator {
  opacity: 0.5;
}

.hero-reserve {
  font-weight: 500;
  color: var(--gold);
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.hero-reserve:hover {
  opacity: 1;
}

/* === SECTIONS === */
section {
  position: relative;
  padding: var(--section-padding);
}

.section-cream {
  background: var(--cream);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

.section-cream::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -5%;
  width: 300px;
  height: 300px;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 30% 40%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 70% 40%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 15% 60%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 50% 60%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 85% 60%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 30% 80%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 70% 80%, rgba(114, 38, 34, 0.03) 8px, transparent 8px),
    radial-gradient(circle at 50% 95%, rgba(114, 38, 34, 0.03) 8px, transparent 8px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.5;
}

.section-bordeaux {
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

/* Застосувати фактуру до ВСІХ бордових секцій */
.section-bordeaux {
  background-color: #722622 !important;
  background-image: url('../img/fon.svg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Прибрати червону рамку на anchor navigation */
:target {
  outline: none !important;
  box-shadow: none !important;
}

.section-bordeaux::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 350px;
  height: 350px;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 30% 40%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 70% 40%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 15% 60%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 50% 60%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 85% 60%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 30% 80%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 70% 80%, rgba(184, 147, 74, 0.04) 9px, transparent 9px),
    radial-gradient(circle at 50% 95%, rgba(184, 147, 74, 0.04) 9px, transparent 9px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.4;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.container-wide {
  max-width: 1600px;
  margin: 0 auto;
}

/* === ПЛАВНІ ПЕРЕХОДИ МІЖ СЕКЦІЯМИ === */

/* Секції йдуть звичайним потоком, БЕЗ sticky */
section[data-section] {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Непрозорий фон, щоб секції не просвічували */
  opacity: 1;
  padding: 5rem 2rem;
}

/* Hero — окрема перша секція, БЕЗ sticky */
section.hero[data-section="1"] {
  position: relative;
  min-height: 100vh;
  background: var(--bordeaux);
  padding: 2rem;
}

/* Непрозорі фони для кожної секції */
section[data-section="2"] {
  background: var(--cream);
}
section[data-section="3"] {
  /* Background від .section-bordeaux */
}
section[data-section="4"] {
  background: var(--cream);
}
section[data-section="5"] {
  /* Background від .section-bordeaux */
}
section[data-section="6"] {
  /* Background від .textured-maroon */
}

/* Контент всередині секцій вже має padding вище */

/* Плавна поява секції при вході у в'юпорт */
section[data-section]:not(.hero) {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

section[data-section]:not(.hero).in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero завжди видима */
section.hero[data-section="1"] {
  opacity: 1;
  transform: none;
}

/* 2. PARALLAX фону всередині секцій (легкий, коеф 0.1) */
.parallax-bg {
  /* Паралакс для фонових зображень — рухається повільніше за скрол */
  /* will-change додається через JS тільки під час скролу */
  position: relative;
}

/* Старі reveal класи — вимикаємо, щоб не конфліктували */
.reveal {
  /* opacity: 1; */
  /* transform: none; */
}

/* === SECTION DIVIDER === */
.section-divider {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pomegranate-pattern {
  width: 80px;
  height: 80px;
  position: relative;
  opacity: 0.5;
}

.pomegranate-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 15%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 30% 40%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 70% 40%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 15% 60%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 50% 60%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 85% 60%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 30% 80%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 70% 80%, currentColor 3px, transparent 3px),
    radial-gradient(circle at 50% 95%, currentColor 3px, transparent 3px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* === MANIFESTO SECTION === */
.manifesto {
  text-align: center;
  padding: 4rem 2rem;
}

.manifesto-text {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.6;
  font-weight: 500;
  max-width: 900px;
  margin: 0 auto;
  letter-spacing: 0.02em;
}

.manifesto-text em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  color: var(--palace-maroon);
}

/* === SPLIT SECTION === */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: auto;
  padding: 0 !important;
}

.split-image {
  background:
    linear-gradient(135deg, rgba(184, 147, 74, 0.2) 0%, rgba(114, 38, 34, 0.3) 100%),
    var(--espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.split-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 147, 74, 0.15) 0%, rgba(114, 38, 34, 0.2) 100%);
  z-index: 1;
  pointer-events: none;
}

.split-content {
  padding: 6rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.split-content h2 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
  text-transform: none;
  display: block;
}

.split-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-top: 2rem;
  transition: var(--transition-quick);
}

.text-link:hover {
  gap: 1.2rem;
}

/* === MENU PREVIEW === */
.menu-preview {
  padding: 4rem 2rem;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 5rem;
  color: var(--ink);
}

.section-title em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  color: var(--palace-maroon);
  display: block;
  font-size: 0.7em;
  margin-top: 0.5rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.menu-item {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(114, 38, 34, 0.05) 0%, transparent 100%);
  border: 1px solid rgba(114, 38, 34, 0.15);
  transition: var(--transition-smooth);
}

.menu-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(114, 38, 34, 0.15);
}

.menu-item h3 {
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--palace-maroon);
}

.menu-item p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.8;
  font-style: italic;
}

.center-link {
  text-align: center;
}

/* === GALLERY PREVIEW === */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.gallery-item {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--palace-maroon) 0%, var(--espresso) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

/* === RESERVATION BLOCK === */
.reservation-block {
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  /* Фактурний бордовий фон */
  background-color: #722622;
  background-image: url('../img/fon.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.reservation-block::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 10%;
  width: 250px;
  height: 250px;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 30% 40%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 70% 40%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 15% 60%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 50% 60%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 85% 60%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 30% 80%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 70% 80%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 50% 95%, rgba(184, 147, 74, 0.05) 9px, transparent 9px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.4;
}

.reservation-block::after {
  content: '';
  position: absolute;
  bottom: 15%;
  right: 10%;
  width: 280px;
  height: 280px;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 30% 40%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 70% 40%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 15% 60%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 50% 60%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 85% 60%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 30% 80%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 70% 80%, rgba(184, 147, 74, 0.05) 9px, transparent 9px),
    radial-gradient(circle at 50% 95%, rgba(184, 147, 74, 0.05) 9px, transparent 9px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.3;
}

.pomegranate-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 2;
}

.reservation-block h2 {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.reservation-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.btn-primary,
.btn-secondary {
  padding: 1.1rem 2.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: var(--transition-quick);
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--dirty-gold) 0%, #9A7838 100%);
  color: var(--black);
  box-shadow: 0 4px 15px rgba(184, 147, 74, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(184, 147, 74, 0.5);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--dirty-gold);
  color: var(--dirty-gold);
}

.btn-secondary:hover {
  background: rgba(184, 147, 74, 0.1);
  transform: translateY(-3px);
}

/* === FOOTER === */
footer {
  color: var(--cream);
  padding: 6rem 4rem 3rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 5%;
  width: 200px;
  height: 200px;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 30% 40%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 70% 40%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 15% 60%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 50% 60%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 85% 60%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 30% 80%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 70% 80%, rgba(184, 147, 74, 0.03) 7px, transparent 7px),
    radial-gradient(circle at 50% 95%, rgba(184, 147, 74, 0.03) 7px, transparent 7px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.3;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto 4rem;
}

.footer-column h4 {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.footer-column p,
.footer-column a {
  font-size: 0.95rem;
  line-height: 1.9;
  opacity: 0.85;
  transition: var(--transition-quick);
}

.footer-column a:hover {
  color: var(--gold);
  opacity: 1;
}

.footer-logo-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo-section svg {
  width: 60px;
  height: 60px;
}

.footer-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.7;
}

.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(184, 147, 74, 0.2);
  font-size: 0.85rem;
  opacity: 0.6;
  letter-spacing: 0.1em;
}

/* === MAP SECTION === */
.map-section {
  height: 500px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(184, 147, 74, 0.3);
  border-bottom: 1px solid rgba(184, 147, 74, 0.3);
  /* Фактурний бордовий фон */
  background-color: #722622;
  background-image: url('../img/fon.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.map-wrapper {
  width: 100%;
  height: 100%;
  filter: grayscale(0.3) sepia(0.2) contrast(1.1);
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* === MENU PAGE === */
.menu-page-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bordeaux);
  text-align: center;
}

.pdf-section {
  background: var(--cream);
  padding: 4rem 2rem;
  min-height: 80vh;
}

.pdf-container {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.pdf-container iframe {
  width: 100%;
  height: 1000px;
  border: none;
  display: block;
}

.pdf-fallback {
  text-align: center;
  padding: 4rem 2rem;
}

/* === ABOUT PAGE === */
.about-section {
  padding: 6rem 2rem;
}

.about-section:nth-child(even) {
  background: var(--cream);
  color: var(--ink);
}

.about-section:nth-child(odd) {
  background: var(--bordeaux);
  color: var(--cream);
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content.reverse {
  direction: rtl;
}

.about-content.reverse > * {
  direction: ltr;
}

.about-text h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.about-text h2 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
  display: block;
  font-size: 0.8em;
  margin-top: 0.5rem;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.about-image {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--palace-maroon) 0%, var(--espresso) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.about-image::after {
  content: 'FOTO';
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  opacity: 0.3;
}

/* === GALLERY PAGE === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-grid .gallery-item {
  aspect-ratio: 3/4;
  cursor: pointer;
  position: relative;
}

.gallery-grid .gallery-item .gallery-caption {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition: var(--transition-quick);
}

.gallery-grid .gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(59, 36, 24, 0.97);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  background: linear-gradient(135deg, var(--palace-maroon) 0%, var(--espresso) 100%);
  padding: 2rem;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  color: var(--gold);
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  transition: var(--transition-quick);
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  :root {
    --section-padding: 5rem 2rem;
  }

  header,
  header.scrolled {
    padding: 1.5rem 2rem;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--espresso);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: right 0.4s ease;
  }

  nav.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .section-counter {
    bottom: 2rem;
    right: 2rem;
    font-size: 0.75rem;
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .split-content {
    padding: 4rem 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-content.reverse {
    direction: ltr;
  }

  .gallery-preview-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .reservation-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-location {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* Вимкнути всі анімації */
  .hero-video-bg,
  .hero-video-center {
    display: none;
  }

  /* Секції показуються одразу */
  section[data-section] {
    position: static !important;
    min-height: auto !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .parallax-bg {
    transform: none !important;
    will-change: auto !important;
  }

  /* Рядки hero з'являються одразу без затримок */
  .hero .line,
  .hero-footer {
    opacity: 1 !important;
    transform: none !important;
  }

  header.hidden {
    transform: none !important;
  }
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
  /* Вимкнути parallax на мобільних для продуктивності */
  .parallax-bg {
    transform: none !important;
    will-change: auto !important;
  }

  /* Вертикальне відео на мобільних на всю ширину */
  .hero-video-center {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* Hero контент на мобільних */
  .hero-content {
    max-width: 100%;
    padding: 0 2rem;
    margin-bottom: 4rem;
  }

  .hero-manifesto {
    font-size: clamp(18px, 5vw, 24px);
    margin-bottom: 2rem;
  }

  .hero-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero-separator {
    display: none;
  }
}
