/* Nem bùi Hải Tuyết — hình mẫu chung: góc lá chuối gấp (cắt chéo góc trên bên phải). */

:root {
  /* Màu */
  --ground: #f4eedc;      /* nền kem ấm */
  --ground-2: #ebe2c9;    /* bậc tông cho ô, khối */
  --ink: #1d2a19;         /* chữ chính */
  --muted: #4b5644;       /* chữ phụ */
  --leaf: #2f6328;        /* xanh lá chuối */
  --leaf-deep: #24461f;   /* xanh lá đậm cho mảng lớn */
  --leaf-pale: #e6ecd2;   /* chữ sáng trên nền xanh */
  --red: #8a2a20;         /* đỏ trầm: nút hành động */
  --red-deep: #6f2119;
  --bronze: #a57a3a;      /* vàng đồng, dùng tiết chế */
  --straw: #d8b77d;

  /* Chữ */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Hanken Grotesk", "Segoe UI", Arial, sans-serif;
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.05rem + 1.25vw, 2.25rem);
  --step-head: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem);
  --step-display: clamp(2.75rem, 1.2rem + 4.6vw, 5.75rem);

  /* Khung */
  --m: clamp(16px, 3.4vw, 48px);
  --gap-section: clamp(88px, 10vw, 160px);
  --bar-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-body)/1.55 var(--text);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
figure { margin: 0; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; }
::selection { background: var(--leaf); color: var(--ground); }

.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 { position: absolute; left: var(--m); top: -100px; z-index: 50; background: var(--ink); color: var(--ground); padding: 12px 16px; }
.skip:focus { top: 12px; }

.display { font: 500 var(--step-display)/0.98 var(--display); letter-spacing: -0.035em; font-variation-settings: "opsz" 144; }
.head { font: 500 var(--step-head)/1 var(--display); letter-spacing: -0.03em; font-variation-settings: "opsz" 144; }
.lead-text { font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.015em; }
.small { font-size: var(--step-small); }
figcaption { margin-top: 10px; font-size: var(--step-small); color: var(--muted); }

/* Hình mẫu: góc gấp */
.fold { clip-path: polygon(0 0, calc(100% - var(--f, 48px)) 0, 100% var(--f, 48px), 100% 100%, 0 100%); }

/* Nút — cùng một hình: chữ nhật có góc gấp */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px 0 22px;
  font: 600 1rem/1 var(--text); text-decoration: none; letter-spacing: 0; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: transform .18s var(--ease), background-color .18s, color .18s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--lg { min-height: 60px; font-size: 1.0625rem; padding: 0 30px 0 26px; }
.btn--red { background: var(--red); color: #fbf6e8; }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost { background: var(--ground-2); color: var(--ink); }
.btn--ghost:hover { background: #e0d5b6; }
.btn--cream { background: var(--ground); color: var(--ink); }
.btn--cream:hover { background: #fff; }
.btn--line { background: #1a3417; color: var(--leaf-pale); }
.btn--line:hover { background: #12260f; }
.btn--sm { min-height: 44px; padding: 0 20px 0 16px; font-size: .9375rem; }
.btn:focus-visible { outline-offset: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Thanh đầu trang: dính trên cùng để nút gọi luôn trong tầm tay */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--bar-h); padding: 12px var(--m);
  background: var(--ground);
}
.wordmark { font: 600 1.75rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; color: var(--leaf-deep); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); }
.nav a:not(.btn) { position: relative; text-decoration: none; font-weight: 500; padding: 8px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.menu-btn { display: none; }

/* Màn hình đầu */
.hero {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center;
  padding: clamp(24px, 3vw, 40px) var(--m) clamp(40px, 4vw, 56px);
}
.hero-text { grid-column: 1 / 7; }
.hero h1 span:not(.sr-only) { display: block; }
.hero h1 span:last-child { color: var(--leaf); }
.hero-lead { margin-top: 32px; max-width: 34em; }
.hero-note { margin-top: 12px; color: var(--muted); font-weight: 500; }
.hero .actions { margin-top: 32px; }
.hero-fig { grid-column: 7 / 13; }
.hero-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 75% 80%; --f: 72px; }

/* Đặt hàng */
.order {
  background: var(--leaf-deep); color: var(--leaf-pale);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px;
  padding: clamp(48px, 6vw, 88px) var(--m);
}
.order-main { grid-column: 1 / 6; }
.order-main h2 { color: var(--ground); }
.order-main p { margin-top: 20px; max-width: 26em; }
.order-info { grid-column: 6 / 13; }
.order-phone {
  display: inline-block; text-decoration: none; color: var(--straw);
  font: 500 var(--step-head)/1 var(--display); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.order-phone:hover { color: #ecd3a3; }
.order-info address { margin-top: 20px; font-size: clamp(1.25rem, 1rem + .8vw, 1.75rem); line-height: 1.25; color: var(--ground); font-family: var(--display); letter-spacing: -0.015em; }
.order-info address p + p { margin-top: 6px; }
.order-info .actions { margin-top: 32px; }
.partner {
  grid-column: 6 / 13; background: #1a3417; padding: 24px 28px;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}
.partner h3 { font: 600 var(--step-body)/1.3 var(--text); color: var(--ground); }
.partner p { margin-top: 8px; }
.partner a { font-weight: 600; color: var(--straw); }
.partner:focus { outline: 3px solid var(--straw); outline-offset: 3px; }

/* Sản phẩm */
.product {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; align-items: start;
  padding: var(--gap-section) var(--m) 0;
}
.product-text { grid-column: 1 / 7; }
.product-text .lead-text { margin-top: 24px; max-width: 22em; }
.ingredients { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.ingredients li { position: relative; padding-left: 26px; }
.ingredients li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; background: var(--leaf); clip-path: polygon(0 0, 66% 0, 100% 34%, 100% 100%, 0 100%); }
.note { margin-top: 32px; max-width: 34em; color: var(--muted); }
.note a { font-weight: 600; color: var(--red); }
.product-pics { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product-pics img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; --f: 32px; }
.product-pics figure:last-child { margin-top: 64px; }

/* Hương vị và cơ sở */
.taste { padding: var(--gap-section) var(--m) 0; }
.taste-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; }
.taste-head h2 { grid-column: 1 / 5; }
.points { grid-column: 5 / 13; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.points h3 { font: 600 var(--step-body)/1.3 var(--text); }
.points p { margin-top: 8px; }
.process { margin-top: 56px; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.process-big { grid-row: span 2; }
.process img { width: 100%; height: 100%; object-fit: cover; }
.process-big img { aspect-ratio: 16 / 10.5; --f: 64px; }
.process figure:not(.process-big) img { aspect-ratio: 3 / 2; }

/* Câu chuyện */
.story { padding: var(--gap-section) var(--m) 0; }
.story-panel {
  background: var(--leaf-deep); color: var(--leaf-pale);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: clamp(32px, 4vw, 56px);
  clip-path: polygon(0 0, calc(100% - 56px) 0, 100% 56px, 100% 100%, 0 100%);
}
.story-left { grid-column: 1 / 7; }
.story-left h2 { color: var(--ground); max-width: 8em; }
.story-fig { margin-top: 40px; }
.story-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 78% 50%; --f: 40px; }
.story-fig figcaption { color: #cfe0b4; }
.story-right { grid-column: 8 / 13; }
.story-block + .story-block { margin-top: 32px; }
.story-block h3, .timeline h3 { font: 600 var(--step-body)/1.3 var(--text); color: var(--ground); }
.story-block p { margin-top: 8px; }
.timeline { margin-top: 48px; }
.tl-list { list-style: none; margin: 16px 0 0; padding: 0; }
.tl-list li { padding: 10px 0; }
.tl-year { display: block; font: 500 var(--step-lead)/1 var(--display); color: var(--straw); }
.tl-list p { margin-top: 6px; }
.tl-years { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tl-years button {
  font: 600 1rem/1 var(--text); min-height: 44px; padding: 0 16px 0 14px; border: 0; cursor: pointer;
  background: #1a3417; color: var(--leaf-pale);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color .18s, color .18s;
}
.tl-years button:hover { background: #2f5a29; }
.tl-years button[aria-pressed="true"] { background: var(--straw); color: var(--ink); }
.js .tl-list li { display: none; }
.js .tl-list li.is-active { display: block; min-height: 8.5em; }
.js .tl-list li.is-active .tl-year { font-size: var(--step-head); }

/* Báo chí */
.press { padding: var(--gap-section) var(--m) 0; }
.press-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; align-items: start; }
.press-article { grid-column: 1 / 6; }
.press-article h3 { margin-top: 28px; font: 500 var(--step-lead)/1.15 var(--display); letter-spacing: -0.02em; }
.press-article p { margin-top: 14px; max-width: 30em; }
.press-top figure { grid-column: 6 / 13; }
.press-top img { width: 100%; height: auto; }
.link-arrow { display: inline-block; margin-top: 20px; font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.link-arrow:hover { color: var(--red-deep); text-decoration-thickness: 3px; }
.awards { margin-top: 56px; }
.awards h3 { font: 600 var(--step-body)/1.3 var(--text); }
.awards ul { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 16px; }
.awards img { height: clamp(96px, 13vw, 190px); width: auto; }
.awards .small { margin-top: 4px; color: var(--muted); }
.tiles { margin-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { background: var(--ground-2); padding: 24px; min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.tile-big { font: 500 var(--step-lead)/1 var(--display); letter-spacing: -0.02em; color: var(--leaf); }
.press-note { margin-top: 16px; color: var(--muted); font-size: var(--step-small); }

/* Cuối trang */
.foot { margin-top: var(--gap-section); background: var(--ink); color: #e8e3d0; padding: 56px var(--m) 32px; }
.blocks { width: 100%; height: auto; }
.foot-grid { margin-top: 48px; display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.foot-links { display: grid; grid-template-columns: repeat(3, max-content); gap: 10px 48px; align-content: start; }
.foot-links a, .foot-contact a { text-decoration: none; }
.foot-links a:hover, .foot-contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-contact { display: grid; gap: 12px; }
.foot-last { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* Nút gọi cố định trên điện thoại */
.call-fab { display: none; }

/* Chuyển động */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .shutter { clip-path: polygon(100% 0, 100% 0, 100% var(--f), 100% 100%, 100% 100%); }
.js .shutter.is-open { clip-path: polygon(0 0, calc(100% - var(--f)) 0, 100% var(--f), 100% 100%, 0 100%); transition: clip-path 1.1s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity .3s linear; }
  .js .shutter, .js .shutter.is-open { clip-path: polygon(0 0, calc(100% - var(--f)) 0, 100% var(--f), 100% 100%, 0 100%); transition: none; }
  .btn, .call-fab { transition: none; }
}

/* Máy tính bảng */
@media (max-width: 1080px) {
  .nav { gap: 14px; font-size: 1rem; }
  .hero { display: block; }
  .hero-fig { margin-top: 40px; }
  .order-main, .order-info, .partner { grid-column: 1 / -1; }
  .product-text, .product-pics { grid-column: 1 / -1; }
  .taste-head h2, .points { grid-column: 1 / -1; }
  .story-left, .story-right { grid-column: 1 / -1; }
  .story-right { margin-top: 40px; }
  .press-article, .press-top figure { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* Thanh điều hướng thu gọn */
@media (max-width: 900px) {
  :root { --bar-h: 64px; }
  .wordmark { font-size: 1.5rem; }
  .menu-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px 0 14px;
    font: 600 1rem/1 var(--text); color: var(--ground); background: var(--leaf-deep); border: 0; cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); padding: 8px var(--m) 24px;
    box-shadow: 0 18px 30px -18px rgba(29, 42, 25, .45); /* taste-skill-ignore: menu nổi trên nội dung */
  }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav a:not(.btn) { font: 500 1.75rem/1.2 var(--display); padding: 10px 0; }
  .nav .btn { margin-top: 16px; }
}

/* Điện thoại */
@media (max-width: 760px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .hero { padding-top: 20px; }
  .hero-lead { margin-top: 20px; }
  .hero .actions { margin-top: 24px; }
  .hero .actions .btn { flex: 1 1 100%; }
  .hero-fig img { --f: 40px; aspect-ratio: 4 / 3; }

  .order .actions .btn { flex: 1 1 100%; }
  .order-phone { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .partner { padding: 20px; }

  .product-pics { gap: 10px; }
  .product-pics figure:last-child { margin-top: 32px; }

  .points { grid-template-columns: 1fr; gap: 24px; }
  .process { display: flex; flex-direction: column; margin-top: 40px; }
  .process-big img { --f: 36px; }

  .story { padding-left: 10px; padding-right: 10px; }
  .story-panel { display: flex; flex-direction: column; padding: 32px 20px; clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%); }
  .story-left h2 { font-size: clamp(2.25rem, 8.5vw, 3rem); }
  .js .tl-list li.is-active { min-height: 7.5em; }
  .story-fig img { aspect-ratio: 3 / 2; object-position: 82% 50%; }

  .tiles { gap: 6px; }
  .tile { padding: 18px; min-height: 150px; }

  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { grid-template-columns: repeat(2, max-content); }

  .call-fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    min-height: 52px; background: var(--red); color: #fbf6e8; font-weight: 600; text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    transition: transform .3s var(--ease);
  }
  .call-fab:active { transform: scale(.98); }
  /* Ẩn khi màn hình đã có sẵn nút gọi (màn hình đầu, phần đặt hàng, cuối trang) */
  .call-fab.is-hidden { transform: translateY(calc(100% + 24px)); }
}
