/* ==========================================================================
   CHU HUNG — portfolio
   Bang mau trung tinh + mot tam bang xanh reu. Mau chi con lai o cho no
   mang thong tin: cham xanh = dang chay, cham ho phach = dang duyet.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper: #f2f2ee;
  --surface: #fbfbf8;
  --tint: #e9e9e3;
  --ink: #16181a;
  --muted: #5f6461;
  --line: #dcdcd4;
  --line-strong: #c2c3ba;

  --panel: #12211c;
  --panel-ink: #f4f5f0;
  --panel-muted: #a7b4ac;
  --panel-line: rgba(244, 245, 240, 0.18);

  --live: #3f7d5c;
  --pending: #966c1d;
  --focus: #1f5b45;
  --bar-bg: rgba(242, 242, 238, 0.88);
  --ring: rgba(31, 91, 69, 0.18);

  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 4px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --paper: #101312;
  --surface: #181b19;
  --tint: #12100d;
  --ink: #edefe9;
  --muted: #98a09a;
  --line: #2a2f2c;
  --line-strong: #3e4540;

  --panel: #0a1411;
  --panel-ink: #edefe9;
  --panel-muted: #8d9a93;

  --live: #74c396;
  --pending: #d8ac55;
  --focus: #8fd0ae;
  --bar-bg: rgba(16, 19, 18, 0.88);
  --ring: rgba(143, 208, 174, 0.22);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

.i-xs { width: 13px; height: 13px; flex: 0 0 auto; }
.i-sm { width: 16px; height: 16px; }

/* Nút đổi theme: chỉ hiện icon của chế độ sẽ chuyển tới */
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.skip {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  padding: 9px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip:focus { top: 12px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover { background: #000; }

.btn-quiet {
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn-quiet:hover { border-color: var(--ink); }

.btn-line {
  border-color: var(--line-strong);
  color: inherit;
}

.btn-line:hover { border-color: currentColor; }

.btn-sm {
  padding: 8px 13px;
  font-size: 0.82rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover { border-color: var(--ink); }

.text-btn {
  padding: 0;
  border-bottom: 1px solid currentColor;
  font-size: inherit;
  font-weight: 500;
  color: inherit;
}

.text-btn:hover { color: var(--focus); }

/* ==========================================================================
   BAR
   ========================================================================== */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(18px, 3vw, 40px);
  background: var(--bar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  margin-right: auto;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-role {
  font-size: 0.76rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav a {
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-coffee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.bar-coffee:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: clamp(16px, 2.4vw, 28px) clamp(12px, 3vw, 40px) 0;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: clamp(340px, 36vw, 520px);
  padding: clamp(34px, 4.4vw, 64px) clamp(24px, 3.4vw, 56px) clamp(38px, 4.6vw, 68px);
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 6px;
}

.hero-copy { position: relative; z-index: 2; }

.hero-copy h1 {
  font-size: clamp(2rem, 4.3vw, 3.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 19ch;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 18px;
  font-size: clamp(0.95rem, 1.1vw, 1.02rem);
  color: var(--panel-muted);
  max-width: 34ch;
}

.hero-go {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-panel .btn-solid {
  background: var(--panel-ink);
  color: var(--panel);
}

.hero-panel .btn-solid:hover { background: #fff; }

.hero-panel .btn-line {
  border-color: var(--panel-line);
  color: var(--panel-ink);
}

.hero-panel .btn-line:hover { border-color: var(--panel-ink); }

/* Ảnh hero hiển thị TRỌN màn hình. Với <img>, đặt top/bottom mà height:auto thì
   trình duyệt dùng kích thước gốc — phải đặt height tường minh, bề ngang tự suy ra
   theo đúng tỉ lệ ảnh nên không méo và không bị cắt phần nào. */
.hero-shot {
  --hero-inset: clamp(18px, 2.4vw, 30px);
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(14px, 1.8vw, 30px);
  transform: translateY(-50%);
  height: calc(100% - var(--hero-inset) * 2);
  width: auto;
  max-width: none;
  border: 1px solid rgba(244, 245, 240, 0.16);
  border-radius: 16px;
  box-shadow: 0 36px 70px -30px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   SAN PHAM
   ========================================================================== */
.work {
  padding: clamp(46px, 6vw, 84px) clamp(18px, 3vw, 40px) clamp(34px, 4vw, 56px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(22px, 3vw, 34px);
}

.section-head h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 26px 44px -34px rgba(22, 24, 20, 0.55);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-head h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.42rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.card-head h3 a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.card-head h3 a:hover { border-bottom-color: currentColor; }

.card-head h3 i { color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}

.is-pending .dot { background: var(--pending); }

.card-desc {
  /* Chặn ở 3 dòng: mô tả dài không được đẩy thẻ cao hơn các thẻ cùng hàng. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--muted);
  max-width: 42ch;
}

.card-meta {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.85;
}

/* Khung ảnh cao CỐ ĐỊNH cho mọi sản phẩm: nhờ vậy các thẻ trong cùng hàng
   luôn cao bằng nhau, không còn khoảng trắng do ảnh dọc/ngang lệch tỉ lệ. */
.shot {
  position: relative;
  margin-top: auto;
  height: var(--shot-h, clamp(300px, 27vw, 400px));
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--tint);
}

/* contain: anh luon giu dung ti le, khung quyet dinh khoang trong.
   Dung chung mot co che cho ca anh doc va anh ngang, khong cat, khong meo. */
/* Ảnh ngang: phủ kín khung, neo mép trên. cover chỉ cắt bớt hai bên, không bao giờ méo. */
.shot-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Ảnh điện thoại: xếp thành dải 3 máy cạnh nhau, lấp kín khung ngang.
   Nhờ vậy ảnh dọc không còn bị bóp nhỏ thành một cột giữa khung. */
.shot[data-frame="phone"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 0.9vw, 12px);
  padding: 12px;
}

.shot[data-frame="phone"] img {
  position: static;
  inset: auto;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.shot[data-frame="phone"] img.shot-alt {
  opacity: 0.92;
}

.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.thumb {
  flex: 0 0 auto;
  width: 62px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--tint);
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.thumb img[src*="cogito"] { object-position: center; }

.thumb:hover { opacity: 1; }

.thumb[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 1px;
}

/* ==========================================================================
   BAI VIET
   ========================================================================== */
.writing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px 32px;
  padding: clamp(30px, 4vw, 48px) clamp(18px, 3vw, 40px);
  border-top: 1px solid var(--line);
}

.writing h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.writing p {
  grid-row: 2;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 46ch;
}

.inline-link {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.inline-link:hover { color: var(--focus); border-color: var(--focus); }

/* ==========================================================================
   LIEN HE
   ========================================================================== */
.contact {
  padding: clamp(20px, 3vw, 34px) clamp(12px, 3vw, 40px) clamp(40px, 5vw, 64px);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 40px;
  padding: clamp(30px, 4vw, 52px) clamp(24px, 3.4vw, 52px);
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 6px;
}

.contact-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.032em;
  max-width: 16ch;
}

.contact-panel p {
  margin-top: 12px;
  font-size: 0.94rem;
  color: var(--panel-muted);
}

.contact-go {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-panel .btn-solid {
  background: var(--panel-ink);
  color: var(--panel);
}

.contact-panel .btn-solid:hover { background: #fff; }

.contact-panel .btn-line {
  border-color: var(--panel-line);
  color: var(--panel-ink);
}

.contact-panel .btn-line:hover { border-color: var(--panel-ink); }

.contact-alt {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: var(--panel-muted);
}

.contact-alt .text-btn { color: var(--panel-ink); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px clamp(18px, 3vw, 40px);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot nav a:hover {
  color: var(--ink);
  border-bottom: 1px solid currentColor;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 14, 12, 0.55);
}

.modal[hidden] { display: none; }

.modal-box {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* Popup cà phê: rộng hơn để QR và thông tin tài khoản đọc được trên desktop */
.modal-box-wide {
  width: min(760px, 100%);
  padding: 28px;
}

.modal-box-wide .modal-title {
  font-size: 1.55rem;
}

.modal-box-wide .modal-note {
  font-size: 0.92rem;
}

.modal-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.modal-note {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 0.92rem;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--ring);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.75; }

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.form-go {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

/* Chọn số tiền */
.amount {
  margin-top: 18px;
}

.amount-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 9px;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.amount-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 0 0 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.amount-custom input {
  width: 118px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.amount-custom input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--ring);
}

.coffee {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 32px;
  margin-top: 20px;
  align-items: start;
}

/* Khung quét quanh QR: 4 góc nhấp nháy nhẹ + vệt sáng chạy dọc */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.qr-frame {
  position: relative;
  max-width: 100%;
  padding: 16px;
  border-radius: 10px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(31, 91, 69, 0.09), transparent 70%),
    var(--paper);
  animation: qr-breathe 4.5s ease-in-out infinite;
}

.qr-frame::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.qr-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--focus);
  border-radius: 2px;
  animation: qr-corner 2.6s ease-in-out infinite;
}

.qr-corner.is-tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.qr-corner.is-tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; animation-delay: 0.35s; }
.qr-corner.is-bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; animation-delay: 0.7s; }
.qr-corner.is-br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; animation-delay: 1.05s; }

.qr-scan {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--focus), transparent);
  opacity: 0.75;
  filter: drop-shadow(0 0 6px var(--focus));
  animation: qr-scan 3.2s ease-in-out infinite;
  pointer-events: none;
}

.qr-hint {
  margin-top: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

@keyframes qr-scan {
  0%, 100% { top: 12%; opacity: 0.35; }
  50% { top: 86%; opacity: 0.9; }
}

@keyframes qr-corner {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes qr-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 91, 69, 0); }
  50% { box-shadow: 0 0 0 6px rgba(31, 91, 69, 0.08); }
}

.qr {
  position: relative;
  /* Co theo bề ngang cột: 300px trên desktop, nhỏ lại khi popup hẹp */
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  height: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.qr-img { width: 100%; height: 100%; object-fit: contain; }

.qr-empty {
  padding: 8px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #4a4a44;
  text-align: center;
}

.bank { display: flex; flex-direction: column; }

.modal-box-wide .bank-row {
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  font-size: 1rem;
}

.modal-box-wide .bank-row dt {
  flex-basis: 118px;
  font-size: 0.86rem;
}

.bank-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.bank-row dt {
  flex: 0 0 96px;
  font-size: 0.78rem;
  color: var(--muted);
}

.bank-row dd {
  font-weight: 600;
  word-break: break-word;
}

.bank-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bank-copy .text-btn {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* Chỉ ở bố cục 2 cột: chừa sẵn 3 dòng cho mô tả để mọi thẻ cao bằng nhau tuyệt đối */
@media (min-width: 861px) {
  .card-desc { min-height: calc(3 * 1.58em); }
}

@media (min-width: 1000px) {
  .hero-copy { padding-right: 26%; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: minmax(0, 1fr); }

  .nav { display: none; }

  .contact-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .writing {
    grid-template-columns: minmax(0, 1fr);
  }

  .inline-link {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .hero-copy { padding-right: 22%; }
}

@media (max-width: 640px) {
  .brand-role { display: none; }

  .bar { gap: 14px; }

  .hero-panel {
    padding-bottom: 20px;
  }

  .hero-copy { padding-right: 0; }

  .hero-panel { min-height: 0; }

  .hero-shot {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: min(200px, 58%);
    height: auto;
    margin: 26px 0 0 auto;
    border-radius: 12px;
  }

  .section-note { display: none; }

  .shot[data-frame="phone"] { padding: 10px; }

  /* Màn hẹp: 2 máy thay vì 3, tránh máy thứ ba bị cắt mất mép */
  .shot[data-frame="phone"] img.shot-alt:last-of-type { display: none; }

  .coffee { grid-template-columns: minmax(0, 1fr); }

  .contact-go .btn { flex: 1 1 auto; }
}

@media (max-width: 560px) {
  .bar-coffee { padding: 8px; }
  .bar-coffee-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
