/* Fermented Hanoi — styles shared by Home, About and Blog pages.
   Same look as shop.html: Roboto Mono, dark header, clay accent. */
:root {
  --ink: #181818;
  --header: #191919;
  --paper: #ffffff;
  --clay: #b28564;
  --clay-deep: #8f6648;
  --line: #e4ddd6;
  --mute: #6f6760;
  --wash: #f7f3ef;
  --mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14px/1.75 var(--mono); }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

/* language: show only the chosen language */
html[lang="vi"] .en, html[lang="en"] .vi { display: none !important; }

/* header */
.top { background: var(--header); color: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.top-in { max-width: 1240px; margin: 0 auto; padding-inline: 24px; height: 72px; display: flex; align-items: center; gap: 24px; }
.logo { display: block; height: 48px; flex: none; }
.logo img { height: 48px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; opacity: .85; }
.nav a:hover { opacity: 1; }
.nav a[aria-current] { opacity: 1; border-bottom: 1px solid var(--clay); }
.lang { display: flex; border: 1px solid #555; flex: none; }
.lang button { background: none; border: 0; color: #bbb; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 12px; letter-spacing: .08em; }
.lang button[aria-pressed="true"] { background: var(--clay); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid #555; color: #fff; font: inherit; font-size: 12px; padding: 4px 10px; cursor: pointer; }

/* hero */
.hero { position: relative; color: #fff; background: #3a2a20 linear-gradient(120deg, #2b1d15, #6b4632); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(20, 12, 8, .5); }
.hero-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 72px 24px 64px; }
.eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; margin: 0 0 10px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 600; margin: 0 0 14px; line-height: 1.15; max-width: 22ch; text-wrap: balance; }
.hero p { max-width: 58ch; margin: 0; font-size: 15px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-block; text-decoration: none; padding: 11px 20px; font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid currentColor; }
.btn.solid { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn.solid:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: var(--clay-deep); border-color: var(--clay-deep); }

/* sections */
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
.sec { padding-block: 64px; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec.tint { background: var(--wash); border-top: 0; }
.sec h2 { color: var(--clay); font-weight: 600; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
.lede { color: var(--mute); margin: 0 0 32px; max-width: 64ch; }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.1em; font-size: 15px; }
.prose h2 { margin-top: 1.6em; }
.prose figure { margin: 28px 0; }
.prose figure img { width: 100%; height: auto; background: var(--wash); }
.prose figure.tall img { max-width: 440px; margin-inline: auto; }
.prose blockquote { margin: 0 0 1.2em; padding: 4px 0 4px 18px; border-left: 2px solid var(--clay); color: #3d3733; }
.prose blockquote p { font-size: 14px; }
.prose blockquote cite { display: block; font-style: normal; color: var(--mute); font-size: 12px; }
.lang-note { background: var(--wash); border: 1px solid var(--line); padding: 10px 14px; font-size: 13px; color: var(--mute); margin: 0 0 24px; }

/* post list */
.post-list { display: grid; gap: 28px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mini-card { text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--paper); }
.mini-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }
.mini-card div { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.mini-card time { color: var(--mute); font-size: 12px; }
.mini-card h3 { font-size: 15.5px; line-height: 1.4; margin: 0; text-wrap: balance; }
.mini-card p { margin: 4px 0 0; color: var(--mute); font-size: 13px; line-height: 1.55; }
.mini-card:hover h3 { color: var(--clay-deep); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.split img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }

/* category tiles */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tile { text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--paper); }
.tile .ph { aspect-ratio: 1; background: var(--wash); overflow: hidden; }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover .ph img { transform: scale(1.04); }
.tile b { display: block; padding: 10px 12px 2px; font-size: 15px; }
.tile span { display: block; padding: 0 12px 12px; color: var(--mute); font-size: 12px; line-height: 1.45; }

/* steps */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 14px; }
.steps li::before { content: "0" counter(s); display: block; color: var(--clay); font-weight: 700; font-size: 13px; letter-spacing: .1em; margin-bottom: 6px; }
.steps b { display: block; font-size: 15px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--mute); }

/* info list */
.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.info h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
.info p { margin: 0; }

/* blog card */
.post-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; text-decoration: none; align-items: center; border: 1px solid var(--line); }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }
.post-card div { padding: 20px 24px 20px 0; }
.post-card time { color: var(--mute); font-size: 12px; }
.post-card h3 { font-size: 20px; line-height: 1.35; margin: 6px 0 10px; text-wrap: balance; }
.post-card p { margin: 0 0 12px; color: var(--mute); }
.more { color: var(--clay-deep); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.post-head { padding-block: 56px 8px; }
.post-head time { color: var(--mute); font-size: 13px; }
.post-head h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.2; margin: 8px 0 0; max-width: 24ch; text-wrap: balance; }
.back { display: inline-block; margin-bottom: 18px; color: var(--mute); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--clay-deep); }

/* footer */
footer { background: var(--header); color: #ddd; }
.foot { max-width: 1240px; margin: 0 auto; padding-inline: 24px; padding-block: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 13px; }
.foot h4 { color: #fff; margin: 0 0 8px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.foot p { margin: 0; }
.foot a { color: #ddd; }

@media (max-width: 960px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .post-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .post-card div { padding: 0 20px 20px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--header); flex-direction: column; gap: 0; padding: 8px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid #333; }
  .menu-btn { display: block; margin-left: auto; }
  .lang { margin-left: 0; }
}
@media (max-width: 560px) {
  .top-in, .wrap, .hero-in, .foot { padding-inline: 16px; }
  .top-in { gap: 12px; }
  .hero-in { padding-block: 48px 40px; }
  .sec { padding-block: 44px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .steps, .info, .foot, .post-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .tile .ph img { transition: none; } }
