/* Милария — премиальный warm light UI */

:root {
  --bg: #faf6f1;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --cream: #2a221c;
  --cream-soft: #4a4038;
  --muted: #7a6e62;
  --terracotta: #c45c3a;
  --terracotta-hot: #d45a36;
  --gold: #b07a3a;
  --charcoal: #1f1a16;
  --line: rgba(42, 34, 28, 0.1);
  --shadow: 0 14px 40px rgba(42, 34, 28, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 72px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI", Georgia, "Times New Roman", serif;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(250, 246, 241, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(250, 246, 241, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(42, 34, 28, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.logo-mark {
  display: block;
  line-height: 0;
}

.logo-mark img {
  height: 52px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}

.logo-sub {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.nav a {
  font-size: 0.92rem;
  color: var(--cream-soft);
  opacity: 0.88;
  transition: color 0.2s, opacity 0.2s;
}

.nav a:hover {
  color: var(--cream);
  opacity: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--terracotta-hot), var(--terracotta));
  color: #fff;
  box-shadow: 0 10px 28px rgba(196, 92, 58, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(196, 92, 58, 0.45);
}

.btn-ghost {
  border: 1px solid rgba(42, 34, 28, 0.18);
  background: rgba(255, 255, 255, 0.55);
  color: var(--cream);
}

.btn-ghost:hover {
  border-color: rgba(42, 34, 28, 0.32);
  background: rgba(255, 255, 255, 0.85);
}

.btn-sm {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

.header-cta {
  flex-shrink: 0;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cream);
  position: relative;
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--cream);
}

.burger span::before {
  top: -6px;
}

.burger span::after {
  top: 6px;
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(480px, 78vh, 760px);
  display: grid;
  align-items: start;
  padding-top: clamp(3rem, 10vh, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/hero.jpg") center / cover no-repeat;
}

/* Semi-transparent dark overlay — text stays readable, photo still visible */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(18, 12, 8, 0.58) 0%,
      rgba(18, 12, 8, 0.42) 42%,
      rgba(18, 12, 8, 0.62) 100%
    ),
    radial-gradient(ellipse 70% 55% at 50% 70%, rgba(196, 92, 58, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-content {
  padding: 2.25rem 1.75rem;
  max-width: 720px;
  align-self: start;
  margin-left: max(0.75rem, calc(50% - 360px - 1.75rem));
  margin-right: auto;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fffaf5;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: #f0c4b0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fffaf5;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-slogan {
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: rgba(255, 250, 245, 0.92);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.hero .btn-ghost {
  border-color: rgba(42, 34, 28, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--cream);
}

.hero .btn-ghost:hover {
  border-color: rgba(196, 92, 58, 0.45);
  background: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections common */
.section {
  padding: 4.5rem 0;
}

.section--alt {
  background: linear-gradient(180deg, #f3ebe2 0%, #f7f1ea 100%);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head--sm {
  margin-bottom: 1.35rem;
}

.section-head--center {
  text-align: center;
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--terracotta-hot);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 700;
}

.section-head h2,
.menu-category h2 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  font-weight: 700;
}

.section-head p,
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* About */
.about-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.about-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.about-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.about-content .section-head {
  margin-bottom: 1rem;
}

.about-text p {
  margin: 0 0 1rem;
  color: var(--cream-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Menu */
#menu {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.menu-category {
  scroll-margin-top: calc(var(--header-h) + 72px);
  padding-top: 1.25rem;
  margin-bottom: 2.5rem;
}

.menu-category:last-child {
  margin-bottom: 0;
}

.menu-tabs-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  margin: 0 0 1.5rem;
  padding: 0.65rem 0;
  background: linear-gradient(180deg, rgba(250, 246, 241, 0.98), rgba(250, 246, 241, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.menu-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}

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

.menu-tab {
  flex: 0 0 auto;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cream-soft);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.menu-tab:hover,
.menu-tab.is-active {
  background: rgba(196, 92, 58, 0.12);
  border-color: rgba(196, 92, 58, 0.45);
  color: var(--cream);
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

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

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

.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(42, 34, 28, 0.06);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(212, 165, 116, 0.25);
}

.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, #efe6db, #e4d8c8);
  position: relative;
}

.card-media.is-empty::after {
  content: "Милария";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(42, 34, 28, 0.22);
  font-family: var(--display);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.menu-card:hover .card-media img {
  transform: scale(1.06);
}

.card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--cream);
}

.card-price {
  margin: auto 0 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.01em;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

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

.gallery-item {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg-card);
}

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

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

/* Delivery */
.delivery-grid {
  display: grid;
  gap: 1rem;
}

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

.delivery-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
}

.delivery-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.delivery-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.delivery-note {
  margin-top: 1.5rem;
  color: var(--cream-soft);
  max-width: 720px;
}

/* Contacts */
.contacts-wrap {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .contacts-wrap {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
  }
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  display: grid;
  gap: 0.2rem;
}

.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 600;
}

.contact-value {
  font-size: 1.08rem;
  color: var(--cream);
}

.contact-value a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(212, 165, 116, 0.45);
}

.contact-value a:hover {
  color: var(--gold);
}

.contact-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  box-shadow: var(--shadow);
}

.contact-panel p {
  margin: 0;
  color: var(--muted);
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
}

.map-link:hover {
  color: var(--terracotta);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.4rem;
  background: #efe6db;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-meta a {
  color: var(--gold);
}

.footer-meta a:hover {
  color: var(--cream);
}

/* Mobile nav */
@media (max-width: 900px) {
  .burger {
    display: grid;
  }

  .header-cta {
    display: none;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(250, 246, 241, 0.98);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.25rem 1.25rem 2rem;
    gap: 0.35rem;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav a {
    padding: 0.9rem 0.35rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav .btn {
    margin-top: 1rem;
    width: 100%;
  }
}

@media (min-width: 901px) {
  .nav .btn {
    display: none;
  }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--terracotta-hot);
  outline-offset: 3px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
