/* Bistro № 8 — design system
   Palette: near-black wood + warm amber glow (candle/ember light) */

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

:root {
  --bg: #0b0908;
  --bg-elevated: #161210;
  --bg-card: #1a1512;
  --line: rgba(232, 158, 79, 0.18);
  --text: #ece5db;
  --text-muted: #a89d8d;
  --accent: #e39a45;
  --accent-soft: #c97a2e;
  --glow: rgba(227, 154, 69, 0.55);
  --glow-soft: rgba(227, 154, 69, 0.22);

  --font-script: 'Sacramento', cursive;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;
}

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

html { scroll-behavior: smooth; }

/* ---------- scroll reveal ---------- */
.dish-card, .menu-category, .two-col, .stat-row, .badge-row, .info-list, form:not(.chat-input-row), .dish-spotlight-photo {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.dish-card.in-view, .menu-category.in-view, .two-col.in-view, .stat-row.in-view,
.badge-row.in-view, .info-list.in-view, form.in-view, .dish-spotlight-photo.in-view {
  opacity: 1;
  transform: translateY(0);
}
.menu-category:nth-child(2) { transition-delay: .08s; }
.menu-category:nth-child(3) { transition-delay: .16s; }
.menu-category:nth-child(4) { transition-delay: .24s; }
.grid-3 .dish-card:nth-child(2) { transition-delay: .1s; }
.grid-3 .dish-card:nth-child(3) { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .dish-card, .menu-category, .two-col, .stat-row, .badge-row, .info-list, form, .dish-spotlight-photo {
    opacity: 1; transform: none; transition: none;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* wood-grain + noise texture, no image assets needed */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 4px),
    radial-gradient(ellipse at 50% 0%, rgba(227,154,69,0.06), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ---------- glow helpers ---------- */
.glow-ember {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.text-glow { text-shadow: 0 0 24px var(--glow), 0 0 60px rgba(227,154,69,0.25); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 9, 8, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  font-family: var(--font-script);
  font-size: 30px;
  color: var(--accent);
  text-shadow: 0 0 18px var(--glow-soft);
  letter-spacing: 1px;
}
.logo span { color: var(--text); font-family: var(--font-display); font-size: 15px; letter-spacing: 4px; display: block; text-shadow: none; margin-top: -6px; }

.nav-links {
  display: flex;
  gap: 38px;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

.nav-cta {
  border: 1px solid var(--accent-soft);
  padding: 10px 22px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border-radius: 6px;
  transition: all .3s;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--accent);
  color: #100b08;
  box-shadow: 0 0 26px var(--glow);
}

.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  padding: 17px 40px;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all .35s;
}
.btn:hover {
  background: var(--accent);
  color: #120d0a;
  box-shadow: 0 0 34px var(--glow);
}
.btn-solid {
  background: var(--accent);
  color: #120d0a;
  border-color: var(--accent);
}
.btn-solid:hover { box-shadow: 0 0 34px var(--glow); }

/* ---------- typography ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--text); }
h1 { font-size: 64px; line-height: 1.08; }
h2 { font-size: 42px; line-height: 1.15; }
h3 { font-size: 24px; }
.script { font-family: var(--font-script); color: var(--accent); }
.accent-italic { font-style: italic; color: var(--accent); text-shadow: 0 0 20px var(--glow-soft); }
.muted { color: var(--text-muted); }

section { position: relative; z-index: 1; padding: 110px 0; }

.divider {
  width: 1px;
  height: 64px;
  margin: 0 auto 28px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--glow);
}

/* ---------- hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center 55%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,9,8,.94) 0%, rgba(11,9,8,.8) 28%, rgba(11,9,8,.4) 55%, rgba(11,9,8,.12) 75%, rgba(11,9,8,.4) 100%),
    linear-gradient(180deg, rgba(11,9,8,.3) 0%, rgba(11,9,8,.1) 45%, var(--bg) 100%);
}
.hero .container { z-index: 2; margin: 0; max-width: none; padding-left: 6vw; }
.hero-tag {
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--accent);
  text-shadow: 0 0 20px var(--glow);
}
.hero h1 { margin: 10px 0 22px; max-width: 640px; }
.hero p { max-width: 460px; color: var(--text-muted); margin-bottom: 40px; font-size: 17px; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.badge-row { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 46px; }
.badge-row .badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.badge-row .badge svg { flex: none; width: 15px; height: 15px; fill: var(--accent); filter: drop-shadow(0 0 6px var(--glow-soft)); }

/* ---------- circular dish spotlight ---------- */
.dish-spotlight-photo { position: relative; width: min(640px, 96%); aspect-ratio: 1/1; margin: 0 auto; }
.dish-spotlight-photo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  position: relative; z-index: 2;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.dish-spotlight-photo.cutout img {
  object-fit: contain; border-radius: 0; box-shadow: none;
  filter: none;
}
.dish-spotlight-photo::before {
  content: "";
  position: absolute; inset: -20px;
  border: 1px solid var(--accent-soft);
  border-radius: 50%;
  opacity: .55;
}
.dish-spotlight-photo::after {
  content: "";
  position: absolute; inset: -40px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

/* ---------- cards / grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }

.dish-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .4s, box-shadow .4s, border-color .4s;
}
.dish-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-soft);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px var(--glow-soft);
}
.dish-card .photo {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.dish-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.dish-card:hover .photo img { transform: scale(1.07); }
.dish-card .body { padding: 26px 24px; }
.dish-card h3 { margin-bottom: 8px; }
.dish-card p { color: var(--text-muted); font-size: 14px; }

/* ---------- menu list ---------- */
.menu-category { margin-bottom: 70px; }
.menu-category-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}
.menu-category-head h2 { white-space: nowrap; }
.menu-category-head .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent-soft), transparent);
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--line);
}
.menu-item .name { font-family: var(--font-display); font-size: 21px; color: var(--text); }
.menu-item .desc { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; max-width: 460px; }
.menu-item .dots { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-6px); min-width: 20px; }
.menu-item .price { font-family: var(--font-display); font-size: 20px; color: var(--accent); white-space: nowrap; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  text-align: center;
}
footer .script { font-size: 30px; display: block; margin-bottom: 6px; }
footer .foot-links { display: flex; justify-content: center; gap: 30px; margin: 24px 0; flex-wrap: wrap; }
footer .foot-links a { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }
footer .foot-links a:hover { color: var(--accent); }
footer .copy { color: var(--text-muted); font-size: 12px; margin-top: 20px; opacity: .7; }

/* ---------- forms ---------- */
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: 3px;
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--glow-soft);
}
.field textarea { resize: vertical; min-height: 110px; }

/* ---------- misc ---------- */
.page-hero {
  padding: 200px 0 90px;
  position: relative;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,9,8,0.72), var(--bg) 95%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: 52px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.two-col img { border-radius: 6px; }

.stat-row { display: flex; gap: 60px; margin-top: 40px; flex-wrap: wrap; }
.stat-row .num { font-family: var(--font-display); font-size: 40px; color: var(--accent); }
.stat-row .label { color: var(--text-muted); font-size: 13px; letter-spacing: 1px; margin-top: 4px; }

.info-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-muted); font-size: 15px; }
.info-list li strong { color: var(--text); min-width: 140px; display: inline-block; font-weight: 500; }

.map-embed {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  filter: grayscale(0.4) contrast(1.1) brightness(0.75);
}

/* ---------- chat widget ---------- */
.chat-widget { position: fixed; right: 24px; bottom: 24px; z-index: 200; }

.chat-toggle {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #120d0a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px var(--glow), 0 10px 26px rgba(0,0,0,.55);
  transition: transform .3s, box-shadow .3s;
}
.chat-toggle:hover { transform: scale(1.06); box-shadow: 0 0 42px var(--glow), 0 10px 26px rgba(0,0,0,.55); }
.chat-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-toggle .icon-close { display: none; }
.chat-widget.open .chat-toggle .icon-chat { display: none; }
.chat-widget.open .chat-toggle .icon-close { display: block; }

.chat-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw;
  background: var(--bg-card);
  border-left: 1px solid var(--accent-soft);
  border-radius: 0;
  box-shadow: 0 0 46px var(--glow-soft), -24px 0 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform .35s ease;
  overflow: hidden;
}
.chat-widget.open .chat-panel { transform: translateX(0); pointer-events: auto; }

.chat-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(227,154,69,.1), transparent);
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.chat-header .script { font-size: 22px; }
.chat-header .chat-status { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.chat-header .chat-status::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--glow); margin-right: 6px;
}

.chat-body {
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1; min-height: 0; overflow-y: auto;
}
.chat-msg { font-size: 13.5px; line-height: 1.5; padding: 10px 14px; border-radius: 12px; max-width: 85%; }
.chat-msg.bot { background: var(--bg-elevated); border: 1px solid var(--line); color: var(--text); align-self: flex-start; border-bottom-left-radius: 3px; }
.chat-msg.user { background: var(--accent); color: #120d0a; align-self: flex-end; border-bottom-right-radius: 3px; }

.chat-input-row { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 15px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: border-color .3s, box-shadow .3s;
}
.chat-input-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 14px var(--glow-soft); }
.chat-input-row button {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%; border: none;
  background: var(--accent); color: #120d0a;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .3s;
}
.chat-input-row button:hover { box-shadow: 0 0 18px var(--glow); }
.chat-input-row button svg { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 560px) {
  .chat-widget { right: 16px; bottom: 16px; }
  .chat-panel { width: 100vw; max-width: 100vw; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  h1 { font-size: 42px; }
  .hero h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  section { padding: 70px 0; }
  .container { padding: 0 20px; }
  .menu-item { flex-direction: column; align-items: flex-start; }
  .menu-item .dots { display: none; }
}
