/* ==========================================================================
   Hà Ký Mì Gia — styles
   Warm food-brand palette: deep red / warm brown / cream
   ========================================================================== */

/* --- Fonts -------------------------------------------------------------- */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bvp-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bvp-400-vi.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/bvp-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/bvp-600-vi.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fraunces-vi.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}

/* --- Design tokens ------------------------------------------------------ */
:root {
  --paper: #f6efe1;
  --paper-2: #efe4cf;
  --paper-3: #fbf6ec;
  --ink: #2b2016;
  --ink-soft: #6b5847;
  --wood: #3a2a1c;
  --wood-2: #2a1d12;
  --red: #9b2b22;
  --red-deep: #7a1f1a;
  --gold: #b9833d;
  --gold-soft: #d9b277;
  --line: rgba(58, 42, 28, 0.14);
  --line-cream: rgba(246, 239, 225, 0.16);

  --font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Be Vietnam Pro", Georgia, serif;

  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 66px;
  --shadow: 0 22px 50px -26px rgba(43, 32, 22, 0.5);
  --shadow-sm: 0 10px 26px -18px rgba(43, 32, 22, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #241a12;
    --paper-2: #2c2016;
    --paper-3: #31241a;
    --ink: #f1e6d3;
    --ink-soft: #c9b79d;
    --wood: #1a110a;
    --wood-2: #140d08;
    --red: #c24a3f;
    --red-deep: #d95c50;
    --gold: #d8a65c;
    --gold-soft: #e6c284;
    --line: rgba(241, 230, 211, 0.16);
    --line-cream: rgba(246, 239, 225, 0.16);
    --shadow: 0 22px 50px -26px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 10px 26px -18px rgba(0, 0, 0, 0.6);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--red);
  color: var(--paper);
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--red);
  color: #fff7ec;
  box-shadow: 0 12px 26px -14px rgba(154, 43, 34, 0.7);
}
.btn-primary:hover { background: var(--red-deep); }

.btn-ghost {
  background: transparent;
  border-color: rgba(246, 239, 225, 0.5);
  color: var(--paper);
}
.btn-ghost:hover { background: rgba(246, 239, 225, 0.12); border-color: rgba(246, 239, 225, 0.8); }

/* --- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(43, 32, 22, 0.5);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-chop {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--red);
  color: #fff7ec;
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 236, 0.18);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
}
.nav-menu a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  transition: color 0.18s ease;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--red);
  transition: right 0.22s ease;
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: max(560px, 100svh);
  display: flex;
  align-items: center;
  color: var(--paper);
  overflow: hidden;
  background:
    linear-gradient(96deg, rgba(20, 13, 8, 0.82) 0%, rgba(20, 13, 8, 0.62) 44%, rgba(20, 13, 8, 0.28) 100%),
    url("images/hero.jpg") center 40% / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(to top, rgba(20, 13, 8, 0.55), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 26px);
  padding-top: 70px;
  padding-bottom: 90px;
}

.hero-kicker {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero-title {
  font-size: clamp(2.9rem, 9.5vw, 6rem);
  font-weight: 600;
  color: var(--paper);
  max-width: 12ch;
  text-wrap: balance;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.6;
  color: rgba(246, 239, 225, 0.92);
  max-width: 40ch;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: clamp(18px, 3vw, 30px);
  padding-top: clamp(16px, 2.5vw, 22px);
  border-top: 1px solid rgba(246, 239, 225, 0.22);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(246, 239, 225, 0.82);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px;
  height: 42px;
  border-radius: 20px;
  border: 2px solid rgba(246, 239, 225, 0.5);
}
.hero-scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--paper);
  animation: hero-scroll 1.8s ease-in-out infinite;
}
@keyframes hero-scroll {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* --- Sections ----------------------------------------------------------- */
.section { padding-block: clamp(64px, 10vw, 118px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
}

.section h2 {
  font-size: clamp(1.8rem, 4.6vw, 2.9rem);
  color: var(--ink);
  max-width: 20ch;
  text-wrap: balance;
  margin-top: 14px;
}

.section-head { max-width: 620px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-sub {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* --- About -------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.about-media {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-media::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(246, 239, 225, 0.14);
  border-radius: inherit;
  pointer-events: none;
}
.about-media::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(154, 43, 34, 0.5);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-body > p { margin-top: 16px; color: var(--ink-soft); max-width: 58ch; }

.about-facts {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}
.about-facts li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.fact-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}
.fact-icon svg { width: 22px; height: 22px; }
.fact-icon-lg { width: 50px; height: 50px; border-radius: 14px; }
.fact-icon-lg svg { width: 26px; height: 26px; }
.about-facts strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.about-facts span:last-child { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }

/* --- Menu --------------------------------------------------------------- */
.menu { background: var(--paper-2); }
.menu .section-head { margin-inline: auto; text-align: center; }
.menu .section-head .eyebrow { justify-content: center; }
.menu .section-sub { margin-inline: auto; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 28px);
}

.dish {
  display: flex;
  flex-direction: column;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.dish:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.dish-media {
  margin: 0;
  position: relative;
  overflow: hidden;
}
.dish-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.dish:hover .dish-media img { transform: scale(1.04); }

.dish-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}
.dish-body h3 {
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.dish-body p { margin-top: 8px; color: var(--ink-soft); font-size: 0.94rem; line-height: 1.6; flex: 1; }
.dish-price {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--red);
  font-family: var(--font-display);
  letter-spacing: 0;
  flex: none !important;
}
.dish-price span { font-size: 0.8em; font-weight: 600; margin-left: 2px; }

.menu-note {
  margin: clamp(28px, 4vw, 40px) auto 0;
  max-width: 560px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.menu-note strong { color: var(--red); }

/* --- Location ----------------------------------------------------------- */
.location .section-head { margin-inline: auto; text-align: center; }
.location .section-head .eyebrow { justify-content: center; }
.location .section-sub { margin-inline: auto; }

.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 28px);
  max-width: 820px;
  margin-inline: auto;
}

.location-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(24px, 4vw, 34px);
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.location-card h3 {
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.location-card address {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 600;
}
.location-card .btn { margin-top: 6px; }
.location-value { color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.location-sub { color: var(--ink-soft); font-size: 0.98rem; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--wood);
  color: rgba(246, 239, 225, 0.8);
  border-top: 1px solid var(--line-cream);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding-block: clamp(40px, 6vw, 60px);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--paper);
}
.footer-tag {
  color: var(--gold-soft);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.footer-copy {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line-cream);
  font-size: 0.82rem;
  color: rgba(246, 239, 225, 0.55);
  max-width: 60ch;
}

/* --- Reveal on scroll --------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

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

@media (min-width: 920px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-media { order: 2; }
  .about-body { order: 1; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .js .nav-toggle { display: flex; }
  .js .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 20px 20px;
    margin: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .js .nav-menu.is-open { opacity: 1; transform: none; visibility: visible; }
  .js .nav-menu a {
    display: block;
    padding: 12px 4px;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--line);
  }
  .js .nav-menu li:last-child a { border-bottom: 0; }
  .js .nav-menu a::after { display: none; }
}

/* --- Mobile: gọn hình ảnh hơn trên điện thoại --------------------------- */
@media (max-width: 640px) {
  .about-media img {
    aspect-ratio: 16 / 11;
    max-height: 320px;
  }
  .dish-media img {
    aspect-ratio: 16 / 10;
    max-height: 220px;
  }
  .hero { min-height: max(480px, 82svh); }
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
