/* ============================================================
   X-9 Food & Coffee — one-page site
   Dark & moody theme: charcoal, cream, leaf green, warm gold
   ============================================================ */

:root {
  --bg: #0d0f0c;
  --bg-2: #131610;
  --card: #1a1e17;
  --card-2: #20251d;
  --line: #2b3026;
  --cream: #f2ede2;
  --text: #c7c2b4;
  --muted: #8f8b7e;
  --leaf: #a9c98a;
  --green-deep: #40573f;
  --gold: #d9a441;
  --gold-soft: #e6c07a;
  --wa: #25d366;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans Lao", "Phetsarath OT", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

::selection { background: var(--gold); color: #14110a; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: 22px; }

/* ---------- typography helpers ---------- */

.kicker {
  font-family: "Dancing Script", cursive;
  color: var(--gold-soft);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  display: inline-block;
  margin-bottom: 0.35rem;
}

h1, h2, h3 { color: var(--cream); font-weight: 800; line-height: 1.35; }

.section { padding: 96px 0; }

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

.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 0.5rem; }

.section-head .sub { color: var(--muted); font-size: 1rem; }

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

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

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b9821f);
  color: #171204;
  box-shadow: 0 10px 28px rgba(217, 164, 65, 0.28);
}

.btn-ghost {
  border-color: rgba(242, 237, 226, 0.35);
  color: var(--cream);
  background: rgba(13, 15, 12, 0.25);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

.btn-wa { background: var(--wa); color: #06250f; }

.btn svg { flex: none; }

/* ---------- topbar ---------- */

.topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  border-bottom: 1px solid transparent;
}

.topbar.scrolled {
  background: rgba(13, 15, 12, 0.88);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 0.65rem; }

.brand .mark {
  width: 42px;
  height: 42px;
  flex: none;
}

.brand .word { display: flex; flex-direction: column; line-height: 1.1; }

.brand .word b { color: var(--cream); font-size: 1.15rem; letter-spacing: 0.06em; }

.brand .word span {
  font-family: "Dancing Script", cursive;
  color: var(--gold-soft);
  font-size: 0.95rem;
}

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

.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.3rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.nav a:hover { color: var(--cream); }
.nav a:hover::after { width: 100%; }

.nav .btn { padding: 0.5rem 1.15rem; font-size: 0.9rem; }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  color: var(--cream);
  cursor: pointer;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
  padding: 120px 0 90px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-image: url("../img/hero-1920.webp");
}

@media (max-width: 640px) {
  .hero-bg { background-image: url("../img/hero-960.webp"); }
}

.hero-script {
  font-family: "Dancing Script", cursive;
  color: var(--gold-soft);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: -0.4rem 0 1.2rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(13, 15, 12, 0.25) 0%, rgba(13, 15, 12, 0.78) 78%),
    linear-gradient(180deg, rgba(13, 15, 12, 0.55) 0%, rgba(13, 15, 12, 0.35) 40%, var(--bg) 98%);
}

.hero-logo { width: clamp(130px, 18vw, 190px); margin: 0 auto 1.4rem; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.3rem);
  max-width: 820px;
  margin: 0 auto 1rem;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.55);
}

.hero h1 em { font-style: normal; color: var(--gold-soft); }

.hero .lead {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: #ddd8ca;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
}

.hero-cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.6rem; }

.hero-chips { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(242, 237, 226, 0.16);
  background: rgba(13, 15, 12, 0.45);
  backdrop-filter: blur(6px);
  font-size: 0.88rem;
  color: #d8d3c5;
}

.chip svg { color: var(--leaf); flex: none; }

/* ---------- menu ---------- */

#menu { background: var(--bg-2); border-block: 1px solid var(--line); }

.menu-tabs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
  margin-bottom: 1.8rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.tab {
  flex: none;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tab:hover { border-color: var(--green-deep); color: var(--cream); }

.tab.active {
  background: linear-gradient(135deg, var(--gold), #b9821f);
  border-color: transparent;
  color: #171204;
}

.tab .count { opacity: 0.6; font-weight: 400; font-size: 0.82rem; margin-left: 0.25rem; }

.menu-panel { display: none; }
.menu-panel.active { display: block; animation: fadeUp 0.35s ease; }

.menu-list {
  list-style: none;
  columns: 2;
  column-gap: 3.2rem;
}

.menu-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.68rem 0;
  border-bottom: 1px dashed rgba(43, 48, 38, 0.9);
  break-inside: avoid;
}

.menu-item .dish { display: flex; flex-direction: column; }

.menu-item .lo { color: var(--cream); font-weight: 600; font-size: 1rem; }

.menu-item .en { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.02em; }

.menu-item .dots { flex: 1; border-bottom: 2px dotted rgba(143, 139, 126, 0.4); transform: translateY(-4px); }

.menu-item .price { color: var(--gold-soft); font-weight: 700; white-space: nowrap; }

.menu-item.np .dots { visibility: hidden; }

.menu-note {
  margin-top: 2.2rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.menu-note svg { color: var(--gold); flex: none; }

.menu-note a { color: var(--gold-soft); font-weight: 700; }

/* ---------- parties ---------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.2rem;
  align-items: center;
}

.split .section-head { margin-bottom: 20px; }

.feature-list { list-style: none; display: grid; gap: 0.85rem; margin: 1.4rem 0 2rem; }

.feature-list li { display: flex; gap: 0.75rem; align-items: flex-start; }

.feature-list svg { color: var(--leaf); flex: none; margin-top: 0.3rem; }

.feature-list b { color: var(--cream); font-weight: 700; }

.collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 150px;
  gap: 14px;
}

.collage figure { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); margin: 0; }

.collage img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }

.collage figure:hover img { transform: scale(1.05); }

.collage .tall { grid-row: span 2; }
.collage .wide { grid-column: span 2; }

/* ---------- gallery ---------- */

#gallery { background: var(--bg-2); border-block: 1px solid var(--line); }

.masonry { columns: 3; column-gap: 16px; }

.masonry figure {
  margin: 0 0 16px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  position: relative;
}

.masonry img { width: 100%; transition: transform 0.4s ease, filter 0.4s ease; }

.masonry figure:hover img { transform: scale(1.04); filter: brightness(1.08); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.2rem;
  align-items: center;
}

.portrait {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--green-deep);
  box-shadow: var(--shadow);
  position: relative;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 15, 12, 0.55));
}

.about-copy p { margin-bottom: 1rem; }

.team-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 1.6rem; }

.team-strip figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.team-strip img { width: 100%; height: 170px; object-fit: cover; }

.team-strip figcaption { font-size: 0.82rem; color: var(--muted); padding: 0.5rem 0.8rem; background: var(--card); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem; align-items: stretch; }

.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.info-row { display: flex; gap: 1rem; align-items: flex-start; }

.info-row .ico {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(169, 201, 138, 0.08);
  border: 1px solid var(--green-deep);
  color: var(--leaf);
}

.info-row h3 { font-size: 0.98rem; margin-bottom: 0.15rem; }

.info-row p, .info-row a.val { color: var(--muted); font-size: 0.95rem; }

.info-row a.val:hover { color: var(--gold-soft); }

.info-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: auto; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 420px;
  background: var(--card);
}

.map-wrap iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0;
  background: var(--bg-2);
}

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

.foot small { color: var(--muted); font-size: 0.85rem; }

/* ---------- floating WhatsApp ---------- */

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.35);
  animation: pulse 2.6s infinite;
}

.fab:hover { transform: scale(1.07); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45), 0 12px 30px rgba(0, 0, 0, 0.4); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 12px 30px rgba(0, 0, 0, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 12px 30px rgba(0, 0, 0, 0.4); }
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 9, 7, 0.92);
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lightbox[hidden] { display: none; }

/* ---------- reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }

.reveal.in { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fab { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .split, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .masonry { columns: 2; }
  .menu-list { columns: 1; }
  .section { padding: 72px 0; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 15, 12, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.4rem 1.2rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.85rem 0.2rem; border-bottom: 1px solid rgba(43, 48, 38, 0.6); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 0.9rem; justify-content: center; }
  .burger { display: block; }
  .masonry { columns: 2; column-gap: 10px; }
  .masonry figure { margin-bottom: 10px; }
  .collage { grid-auto-rows: 110px; }
  .team-strip img { height: 130px; }
}
