/* ==========================================================================
   Nam Dao Huu น้ำเต้าหู้ — Chinese Heritage Café Style
   ========================================================================== */

:root {
  --red-deep: #6f1b24;
  --red-brick: #8c2430;
  --red-bright: #a92e33;
  --gold: #c79a3f;
  --gold-light: #e3c877;
  --cream: #f4ead4;
  --cream-soft: #faf3e4;
  --paper: #fffaf0;
  --ink: #241812;
  --ink-soft: #4a352a;
  --wood: #3a2417;
  --wood-dark: #241509;

  --font-serif: 'Noto Serif Thai', serif;
  --font-sans: 'Prompt', sans-serif;
  --font-brush: 'Ma Shan Zheng', cursive;

  --radius: 14px;
  --shadow-soft: 0 20px 45px -20px rgba(36, 24, 18, 0.35);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream-soft);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--wood-dark);
  margin: 0 0 .5em;
  line-height: 1.3;
}

p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Eyebrow / section head ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--red-brick);
  margin-bottom: .9em;
  position: relative;
  padding-left: 34px;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 2px;
  background: var(--gold);
  transform: translateY(-50%);
}
.eyebrow--light { color: var(--gold-light); }
.eyebrow--light::before { background: var(--gold-light); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head--center { max-width: 680px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow { padding-left: 0; }
.section-head--center .eyebrow::before { display: none; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.section-head__desc { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .03em;
  border: 2px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  cursor: pointer;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--wood-dark);
  box-shadow: 0 12px 30px -10px rgba(199, 154, 63, .65);
}
.btn--gold:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(199, 154, 63, .8); }
.btn--outline {
  border-color: rgba(250, 243, 228, .6);
  color: var(--cream-soft);
}
.btn--outline:hover { background: rgba(250, 243, 228, .12); transform: translateY(-3px); }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--wood-dark);
  color: var(--gold-light);
  font-size: .8rem;
  letter-spacing: .03em;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
}
.topbar__phone a { color: var(--cream-soft); }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 243, 228, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(111, 27, 36, .1);
  transition: box-shadow .3s ease;
}
.navbar.is-scrolled { box-shadow: 0 10px 30px -18px rgba(36,24,18,.4); }

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  background: var(--cream-soft);
  padding: 2px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-serif); font-size: 1.05rem; color: var(--red-deep); }
.brand__text em { font-style: normal; font-size: .82rem; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta {
  background: var(--red-deep);
  color: var(--cream-soft) !important;
  padding: 9px 20px !important;
  border-radius: 999px;
}
.nav__cta:hover { background: var(--red-brick); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--red-deep); transition: transform .3s ease, opacity .3s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 35%;
  transform: scale(1.05);
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(36,15,15,.55) 0%, rgba(36,15,15,.72) 55%, rgba(20,10,8,.9) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 760px; padding-top: 60px; padding-bottom: 60px; }
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: var(--cream-soft);
  margin-bottom: .3em;
}
.hero__title span { color: var(--gold-light); }
.hero__subtitle {
  color: rgba(250, 243, 228, .88);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  max-width: 560px;
  margin-bottom: 1.8em;
}
.hero__actions { display: flex; gap: 18px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 2px solid rgba(250,243,228,.6);
  border-radius: 20px;
}
.hero__scroll span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: var(--gold-light);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--red-deep);
  color: var(--gold-light);
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  border-top: 1px solid rgba(227,200,119,.25);
  border-bottom: 1px solid rgba(227,200,119,.25);
}
.marquee__track {
  display: inline-flex;
  gap: 18px;
  animation: marquee 28s linear infinite;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .05em;
  font-size: .95rem;
}
.marquee__track span:nth-child(odd) { color: var(--gold-light); }
.marquee__track span:nth-child(even) { color: rgba(227,200,119,.55); }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Story ---------- */
.story { padding: 100px 0; background: var(--cream-soft); }
.story__grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.story__media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.story__media img { width: 100%; height: 460px; object-fit: cover; }
.story__media-tag {
  position: absolute;
  left: 20px; bottom: 20px;
  background: rgba(36,24,18,.72);
  color: var(--gold-light);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .05em;
  backdrop-filter: blur(4px);
}
.story__text h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.story__text p { color: var(--ink-soft); }
.story__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(111,27,36,.15);
}
.story__stats li { display: flex; flex-direction: column; }
.story__stats strong { font-family: var(--font-serif); color: var(--red-deep); font-size: 1.4rem; }
.story__stats span { font-size: .78rem; color: var(--ink-soft); letter-spacing: .03em; }

/* ---------- Menu ---------- */
.menu { padding: 100px 0; background: var(--paper); }
.menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.menu-card {
  background: var(--cream-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
  padding-bottom: 24px;
}
.menu-card:hover { transform: translateY(-8px); box-shadow: 0 26px 50px -22px rgba(36,24,18,.4); }
.menu-card__img { height: 220px; overflow: hidden; }
.menu-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.menu-card:hover .menu-card__img img { transform: scale(1.08); }
.menu-card h3 { font-size: 1.15rem; margin: 20px 24px 8px; }
.menu-card p { color: var(--ink-soft); font-size: .92rem; margin: 0 24px; }

/* ---------- Atmosphere ---------- */
.atmosphere {
  padding: 110px 0;
  background: var(--wood-dark);
  color: var(--cream-soft);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(199,154,63,.12), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(140,36,48,.25), transparent 45%);
}
.atmosphere .eyebrow { color: var(--gold-light); }
.atmosphere .section-head h2 { color: var(--cream-soft); }
.atmosphere .section-head__desc { color: rgba(250,243,228,.75); }

.atmosphere__features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}
.feature {
  background: rgba(250,243,228,.05);
  border: 1px solid rgba(227,200,119,.2);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 1.3rem;
  margin-bottom: 16px;
  font-family: var(--font-brush);
}
.feature h4 { color: var(--cream-soft); font-size: 1.02rem; margin-bottom: .5em; }
.feature p { color: rgba(250,243,228,.68); font-size: .88rem; margin: 0; }

.atmosphere__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 18px;
}
.atmosphere__gallery-item { border-radius: var(--radius); overflow: hidden; }
.atmosphere__gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.atmosphere__gallery-item:hover img { transform: scale(1.06); }
.atmosphere__gallery-item--big { grid-row: span 2; grid-column: span 2; }

/* ---------- Quote band ---------- */
.quote-band {
  background: linear-gradient(135deg, var(--red-deep), var(--red-brick));
  padding: 90px 0;
  text-align: center;
  position: relative;
}
.quote-band__inner { max-width: 720px; margin: 0 auto; }
.quote-band__mark {
  font-family: var(--font-brush);
  font-size: 5rem;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0;
  opacity: .85;
}
.quote-band__text {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--cream-soft);
  margin-bottom: .6em;
}
.quote-band__sub { color: rgba(250,243,228,.8); font-size: .98rem; margin: 0; }

/* ---------- Gallery ---------- */
.gallery { padding: 100px 0; background: var(--cream-soft); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gallery__item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); aspect-ratio: 4/3; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__item:hover img { transform: scale(1.08); }

/* ---------- Locations ---------- */
.locations {
  padding: 100px 0;
  background: var(--paper);
  background-image:
    repeating-conic-gradient(rgba(111,27,36,.05) 0% 25%, transparent 0% 50%);
  background-size: 44px 44px;
}
.locations__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.location-card {
  background: var(--cream-soft);
  border: 1px solid rgba(111,27,36,.12);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease;
}
.location-card:hover { transform: translateY(-6px); }
.location-card__pin { font-size: 1.8rem; display: inline-block; margin-bottom: 12px; }
.location-card h3 { font-size: 1.08rem; margin-bottom: .4em; }
.location-card p { color: var(--ink-soft); font-size: .88rem; margin: 0; }

/* ---------- Contact ---------- */
.contact {
  background: var(--wood-dark);
  color: var(--cream-soft);
  padding: 80px 0;
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact__logo {
  width: 130px;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  background: var(--cream-soft);
  padding: 10px;
  margin-bottom: 18px;
}
.contact__brand p { color: rgba(250,243,228,.75); }
.contact__info h3 { color: var(--gold-light); margin-bottom: .8em; }
.contact__info ul { display: flex; flex-direction: column; gap: 14px; }
.contact__info li {
  display: flex; align-items: center; gap: 14px;
  font-size: .98rem;
}
.contact__info li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: .85rem;
  flex-shrink: 0;
}
.contact__info a:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(250,243,228,.6); padding: 22px 0; }
.footer__inner { text-align: center; font-size: .82rem; letter-spacing: .02em; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--red-deep);
  color: var(--cream-soft);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .story__grid { grid-template-columns: 1fr; }
  .story__media img { height: 340px; }
  .menu__grid { grid-template-columns: repeat(2, 1fr); }
  .atmosphere__features { grid-template-columns: repeat(2, 1fr); }
  .atmosphere__gallery { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 200px); }
  .atmosphere__gallery-item--big { grid-column: span 2; grid-row: span 1; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .locations__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; text-align: center; }
  .contact__info ul { align-items: center; }
}

@media (max-width: 720px) {
  .topbar span:first-child { display: none; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--cream-soft);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 100px 32px 32px;
    transform: translateX(100%);
    transition: transform .35s ease;
    box-shadow: -20px 0 40px -20px rgba(0,0,0,.3);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { font-size: 1.05rem; padding: 10px 0; width: 100%; }
  .nav__cta { text-align: center; margin-top: 12px; }
  .nav-toggle { display: flex; z-index: 101; }
  .nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .menu__grid { grid-template-columns: 1fr; }
  .atmosphere__features { grid-template-columns: 1fr; }
  .atmosphere__gallery { grid-template-columns: 1fr; grid-template-rows: repeat(4, 220px); }
  .atmosphere__gallery-item--big { grid-column: span 1; grid-row: span 1; }
  .gallery__grid { grid-template-columns: 1fr; }
  .locations__grid { grid-template-columns: 1fr; }
  .story__stats { grid-template-columns: repeat(2, 1fr); }
}
