/* Dabee Spa — shared styles across all landing pages.
   Palette derived from the DaBee mascot logo (espresso ink, honey-gold, sage
   green) — see knowledge/conventions.md for the exact rationale and the
   accessibility notes on which pairs are safe for body text vs. accents only. */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap&subset=vietnamese');

:root {
  /* Warm, cream-and-espresso palette — logo-derived, not the earlier jade/lotus set */
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --surface-sage: #F0F4EC;
  --ink: #33201A;
  --ink-soft: #6B5647;
  --espresso: #4A2E1F;
  --espresso-deep: #2E1B12;
  --honey: #E8963A;
  --honey-soft: #FBEAD2;
  --honey-deep: #C9782A;
  --sage: #7C9473;
  --sage-deep: #4F6349;
  --line: #E8DDD0;
  --critical: #B23A2E;
  --shadow: 0 12px 32px -16px rgba(46, 27, 18, 0.28);
  --radius-organic: 42% 58% 61% 39% / 46% 40% 60% 54%;
  --radius-card: 22px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--espresso-deep);
  margin: 0;
}

/* Fluid instead of a fixed size — the hero heading is the tallest element on the
   page, and on a short mobile viewport it was pushing the open/closed status
   (the whole reason a QR-scan visitor lands here) below the first screen. */
.hero h1 { font-size: clamp(26px, 6.5vw, 42px); }

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

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ───────── Top nav ───────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.brand-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 19px; color: var(--espresso-deep); }

.nav-links {
  display: none;
  gap: 4px;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--honey-soft); color: var(--espresso-deep); }

/* ───────── Homepage section quick-nav (scrollspy) ───────── */

.section-nav {
  position: sticky;
  top: 73px;
  z-index: 39;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.section-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.section-nav a:hover { background: var(--surface-sage); color: var(--espresso-deep); }
.section-nav a.active { background: var(--honey-soft); color: var(--espresso-deep); }

.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: none;
  flex-direction: column;
  padding: 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  font-family: 'Baloo 2', sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--espresso-deep);
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* ───────── Hero + breathing animation ───────── */

.hero { padding: 40px 0 20px; text-align: center; }
.hero-location { display: inline-block; margin-top: 10px; color: var(--honey-deep); font-size: 14px; font-weight: 700; text-decoration: none; }
.hero-location:hover, .hero-location:focus-visible { text-decoration: underline; }

.breathe-stage {
  position: relative;
  height: 220px;
  margin: 28px auto 8px;
  display: grid;
  place-items: center;
}
.breathe-ring {
  position: absolute;
  border-radius: var(--radius-organic);
  background: var(--sage);
  opacity: 0.16;
}
.breathe-ring.r1 { width: 200px; height: 200px; }
.breathe-ring.r2 { width: 150px; height: 150px; background: var(--honey); opacity: 0.22; }
.breathe-core {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-organic);
  background: linear-gradient(155deg, var(--honey), var(--sage));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.breathe-core img { width: 44px; height: auto; max-height: 26px; }
.breathe-label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

/* Decorative floating leaves in the hero background */
.leaf-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.leaf {
  position: absolute;
  font-size: 0;
  width: 22px;
  height: 22px;
  background: var(--sage);
  opacity: 0.18;
  border-radius: 0% 70% 0% 70%;
}

/* ───────── Cards / sections ───────── */

section { padding: 34px 0; }
section.tinted { background: var(--surface-sage); }
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
  font-weight: 700;
  margin: 0 0 8px;
}
/* Clears the sticky .topbar (73px) + .section-nav (~38px) stack when a quick-nav click lands here via scrollIntoView, which doesn't know about sticky elements on its own. */
.section-title { font-size: 26px; margin-bottom: 6px; scroll-margin-top: 130px; }
.section-sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 22px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow);
}

.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--honey-soft);
  display: grid; place-items: center;
  color: var(--honey-deep);
  margin-bottom: 12px;
}
.feature-icon svg { width: 22px; height: 22px; }

/* ───────── Buttons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--espresso); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 10px 24px -10px rgba(74, 46, 31, 0.55); }
.btn-ghost { background: var(--surface); color: var(--espresso); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--sage-deep); }

/* ───────── Price list (dotted leader, carried over from the original page) ───────── */

.price-list { display: flex; flex-direction: column; gap: 2px; }
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line);
}
.price-list > .price-row:only-child { border-bottom: 0; }
.price-name { font-weight: 600; }
.price-fill { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.price-amount { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--espresso-deep); white-space: nowrap; }
.price-group-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--sage-deep);
  margin: 22px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 10px;
  margin-left: -10px;
  margin-right: -10px;
  border-radius: 10px;
}
button.price-group-title {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}
.price-group-title:first-child { margin-top: 0; }
.price-group-title:hover { background: var(--surface-sage); }
.price-group-title:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.price-group-title::after {
  content: '▾';
  font-size: 13px;
  color: var(--sage-deep);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.price-group-title.collapsed::after { transform: rotate(-90deg); }

.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-sage);
  border-radius: 12px;
  margin-bottom: 18px;
}
.view-toggle-btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn:hover { color: var(--ink); }
.view-toggle-btn.active { background: var(--surface); color: var(--espresso-deep); box-shadow: var(--shadow); }
.view-panel[hidden] { display: none; }
.menu-image-stack { display: grid; gap: 14px; }
.menu-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* ───────── Gallery placeholder tiles ───────── */

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-tile {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  background: linear-gradient(155deg, var(--surface-sage), var(--honey-soft));
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
  padding: 12px;
  border: 1px dashed var(--line);
}
.gallery-tile svg { width: 30px; height: 30px; margin-bottom: 8px; color: var(--sage-deep); }

/* ───────── Footer ───────── */

footer {
  background: var(--espresso-deep);
  color: #F2E9DE;
  padding: 36px 0 28px;
  margin-top: 20px;
}
footer .wrap { display: flex; flex-direction: column; gap: 18px; }
footer a { text-decoration: none; color: #F2E9DE; opacity: 0.85; }
footer a:hover { opacity: 1; }
footer .cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
footer h4 { font-family: 'Baloo 2', sans-serif; font-size: 14px; color: var(--honey); margin: 0 0 10px; }
footer p, footer li { font-size: 13.5px; opacity: 0.85; margin: 0 0 6px; }
footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(242,233,222,0.15); padding-top: 16px; font-size: 12px; opacity: 0.65; }

/* ───────── Sticky bottom action bar ───────── */

.action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
  display: flex;
  gap: 10px;
  /* Matches .wrap's content width instead of stretching edge-to-edge on wide
     screens — the original single-page version kept this bar content-width too. */
  max-width: 720px;
  margin: 0 auto;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}
/* Side borders only make sense once the bar stops being edge-to-edge (below
   its own max-width, i.e. mobile) — flush against the screen edge, a side
   border reads as a stray line rather than framing anything. */
@media (min-width: 721px) {
  .action-bar {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
.action-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
}
.action-bar .call, .action-bar .directions { background: var(--surface-sage); color: var(--espresso-deep); }
.action-bar .booking { background: var(--espresso); color: var(--bg); flex: 1.3; }
.action-bar svg { width: 18px; height: 18px; }

.zalo-bubble,
.back-to-top {
  right: max(16px, calc((100vw - 720px) / 2 + 16px), env(safe-area-inset-right));
}

.zalo-bubble {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 44;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--surface);
  background: #0068ff;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.zalo-bubble img { width: 100%; height: 100%; object-fit: cover; }

body:has(.action-bar) .zalo-bubble {
  bottom: calc(84px + env(safe-area-inset-bottom));
}

body:has(.action-bar) .back-to-top {
  bottom: calc(136px + env(safe-area-inset-bottom));
}

.back-to-top {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 44;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--espresso-deep);
  box-shadow: var(--shadow);
  font: 700 22px/1 'Nunito', sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.back-to-top.is-visible,
.back-to-top:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ───────── Menu language selector ───────── */

.language-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.language-card img { margin: 0 auto 14px; }
.language-card h1 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  color: var(--espresso-deep);
  margin: 0 0 4px;
}
.language-card p { font-size: 13px; color: var(--ink-soft); margin: 0 0 20px; }
.language-option {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface-sage);
  color: var(--espresso-deep);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.language-option:last-child { margin-bottom: 0; }
.language-option:hover { background: var(--honey-soft); border-color: var(--honey); }

.menu-language-link {
  display: inline-block;
  margin: 10px 6px 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--honey-deep);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.menu-language-link + .btn {
  margin: 10px 6px 0;
}

.menu-booking-end {
  padding: 24px 0 48px;
  text-align: center;
}

.menu-booking-end-link {
  width: min(100%, 420px);
  justify-content: center;
}

/* ───────── Motion ───────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .breathe-core, .breathe-ring, .leaf { animation: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.reveal { opacity: 0; }

/* ───────── Booking form (#dat-lich) ───────── */

.booking-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  text-align: left;
  max-width: 560px;
  margin: 28px auto 0;
}
.booking-form .field-wide { grid-column: 1 / -1; }
.booking-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.booking-form input,
.booking-form select,
.booking-form textarea {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus { border-color: var(--sage-deep); }
.booking-form textarea { resize: vertical; min-height: 64px; }
.booking-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B5647' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}
.booking-form select option:disabled { color: var(--line); }
.booking-form .btn { width: 100%; margin-top: 4px; }
.booking-form-note {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-align: center;
}
.booking-msg {
  grid-column: 1 / -1;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
}
.booking-msg.ok { background: var(--surface-sage); color: var(--sage-deep); }
.booking-msg.err { background: #f7e2df; color: var(--critical); }
.booking-msg[hidden] { display: none; }

@media (max-width: 520px) {
  .booking-form { grid-template-columns: 1fr; }
}
