/* =========================================================
   Khuôn landing page — Bộ sách tranh "Khám phá văn hoá Việt Nam"
   Dùng chung cho mọi cuốn trong bộ. Mỗi cuốn chỉ đổi biến màu
   (--accent, --accent-soft) trong <style> của trang đó.
   Vietales — 20261017 - V1
   ========================================================= */

:root {
  --paper: #FFFEF9;          /* trùng màu giấy của tranh */
  --paper-2: #F7F1E3;
  --beige: #EFE3C6;
  --ink: #27272A;
  --ink-2: #57534E;
  --muted: #8A847B;
  --line: rgba(39, 39, 42, .12);
  --purple: #833E8D;         /* màu thương hiệu Vietales */
  --gold: #F4BF3A;
  --accent: #A8432F;         /* mỗi cuốn tự đặt */
  --accent-soft: #F6E4DC;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Patrick Hand", "Be Vietnam Pro", cursive;
  --max: 1120px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(60, 40, 20, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.hero .wrap > *, .reason > *, .info-grid > *, .order-grid > *, .layers > *, .stories > *, .toc > * { min-width: 0; }
body { overflow-x: clip; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hand { font-family: var(--hand); }
.eyebrow {
  font: 600 12.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4.2vw, 40px); margin-bottom: 14px; }
h3 { font-size: 20px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); }
section { padding: clamp(56px, 8vw, 96px) 0; }
.sec-head { max-width: 680px; margin-bottom: 36px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

/* ---------- Thanh trên ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand b { font-family: var(--serif); font-size: 21px; color: var(--purple); letter-spacing: .01em; }
.brand b i { font-style: normal; color: var(--gold); }
.brand span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .btn { min-height: 40px; padding: 0 18px; font-size: 14.5px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); margin-bottom: 18px; }
.hero h1 small {
  display: block; font: 500 clamp(15px, 1.6vw, 18px)/1.4 var(--sans); color: var(--ink-2);
  letter-spacing: 0; margin-bottom: 10px;
}
.hero h1.hero-why { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.18; margin-bottom: 14px; }
.hero-book { font-family: var(--hand); font-size: 21px; color: var(--accent); margin-bottom: 16px; }
.hero-book b { font-weight: 400; }
.hero-ticks { list-style: none; padding: 0; margin: 0 0 22px; }
.hero-ticks li { position: relative; padding-left: 30px; margin-bottom: 8px; color: var(--ink-2); }
.hero-ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 16px; height: 9px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

/* ---------- Vì sao bố mẹ chọn ---------- */
.why { padding-top: clamp(40px, 6vw, 72px); }
.reasons { display: grid; gap: 28px; }
.reason { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; }
.reason:nth-child(even) figure { order: 2; }
.reason figure { margin: 0; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.reason figure img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.reason .num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 12px; }
.reason h3 { font-size: clamp(21px, 2.4vw, 26px); }
.reason p { color: var(--ink-2); }

.hero-q { list-style: none; padding: 0; margin: 0 0 22px; }
.hero-q li { font-family: var(--hand); font-size: clamp(20px, 2.4vw, 24px); line-height: 1.35; color: var(--accent); padding-left: 26px; position: relative; margin-bottom: 4px; }
.hero-q li::before { content: "?"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--gold); }
.hero-art { position: relative; }
.hero-art img { width: 100%; height: auto; border-radius: 6px; }
.hero-art .tag {
  position: absolute; left: 6%; bottom: 4%; background: #fff; border-radius: 10px; padding: 8px 14px;
  font-family: var(--hand); font-size: 18px; color: var(--ink-2); box-shadow: var(--shadow); transform: rotate(-2deg);
}

.price-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 18px; box-shadow: var(--shadow);
}
.price-box .p-now { font: 700 28px/1 var(--serif); color: var(--accent); }
.price-box .p-old { color: var(--muted); text-decoration: line-through; font-size: 16px; margin-left: 6px; }
.price-box .p-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.price-box .p-meta { font-size: 14px; color: var(--ink-2); border-left: 1px solid var(--line); padding-left: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* ---------- Thẻ thông tin nhanh ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--paper); padding: 18px 16px; text-align: center; }
.facts b { display: block; font: 700 24px/1.2 var(--serif); color: var(--ink); }
.facts span { font-size: 13.5px; color: var(--muted); }

/* ---------- Lật thử trang ---------- */
.flip { background: var(--paper-2); }
.flip-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 820px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 20px 22px;
  scrollbar-width: thin; scrollbar-color: var(--beige) transparent;
  max-width: calc(var(--max) + 40px); margin: 0 auto;
}
.flip-item { scroll-snap-align: center; margin: 0; }
.flip-item button { all: unset; cursor: zoom-in; display: block; width: 100%; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.flip-item button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.flip-item img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.flip-item figcaption { padding: 12px 4px 0; font-size: 15px; color: var(--ink-2); }
.flip-item figcaption b { color: var(--ink); font-weight: 600; }
.flip-item figcaption em { font-style: normal; color: var(--muted); font-size: 13px; margin-left: 6px; }
.flip-nav { display: flex; gap: 10px; justify-content: flex-end; max-width: var(--max); margin: 0 auto; padding: 0 20px 6px; }
.flip-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; font-size: 18px; }
.flip-nav button:hover { border-color: var(--ink); }

/* ---------- Câu chuyện ---------- */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.story { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; }
.story .kind {
  align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.kind-su { background: #EAE3F0; color: var(--purple); }
.kind-dan-gian { background: #FBF0D2; color: #8A6410; }
.kind-doi-song { background: var(--accent-soft); color: var(--accent); }
.story p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 10px; }
.story .src { margin-top: auto; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.legend-note { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* ---------- Hai tầng đọc ---------- */
.layers { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.layer { border-radius: var(--radius); padding: 28px 26px; }
.layer.kid { background: var(--accent-soft); }
.layer.adult { background: #EFEAF2; }
.layer h3 { font-size: 22px; }
.layer .who { font-family: var(--hand); font-size: 20px; color: var(--ink-2); margin-bottom: 12px; display: block; }
.layer ul { margin: 0; padding-left: 20px; }
.layer li { margin-bottom: 8px; }

/* ---------- Mục lục ---------- */
.toc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: chang; }
.toc-col { border-top: 3px solid var(--accent); padding-top: 14px; }
.toc-col h3 { font-size: 17px; }
.toc-col h3::before { counter-increment: chang; content: "Chặng " counter(chang); display: block; font: 600 12px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.toc-col ul { list-style: none; margin: 0; padding: 0; }
.toc-col li { font-family: var(--hand); font-size: 19px; color: var(--ink-2); line-height: 1.4; padding: 3px 0; }

/* ---------- Thông tin sách ---------- */
.info-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; }
.spec { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.spec th, .spec td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 38%; font-weight: 500; color: var(--muted); padding-right: 14px; }
.refs { background: var(--paper-2); border-radius: var(--radius); padding: 22px 24px; font-size: 14.5px; color: var(--ink-2); }
.refs h3 { font-size: 17px; }
.refs ul { margin: 0; padding-left: 18px; }
.refs li { margin-bottom: 6px; }

/* ---------- Đặt trước ---------- */
.order { background: var(--ink); color: #F4F1EA; }
.order h2 { color: #fff; }
.order .lead { color: #CFC9BE; }
.order .eyebrow { color: var(--gold); }
.order-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.steps { list-style: none; margin: 26px 0 0; padding: 0; counter-reset: st; }
.steps li { position: relative; padding: 0 0 18px 48px; color: #CFC9BE; font-size: 15.5px; }
.steps li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.steps li b { color: #fff; display: block; font-weight: 600; }
.order-card { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label i { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; height: 48px; }
.qty button { width: 46px; height: 100%; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty input { border: 0; text-align: center; min-height: 0; height: 100%; padding: 0; width: 100%; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sum { background: var(--paper-2); border-radius: 12px; padding: 14px 16px; margin: 6px 0 16px; font-size: 15px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.sum .total { font-weight: 700; font-size: 17px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 9px; color: var(--accent); }
.order-card .btn { width: 100%; }
.form-msg { font-size: 14px; margin-top: 10px; color: var(--muted); }
.form-msg.err { color: #B42318; }
.policy { font-size: 13.5px; color: var(--muted); margin-top: 14px; }

.pay { display: none; text-align: center; }
.pay.show { display: block; }
.pay h3 { font-size: 22px; }
.pay img { width: 240px; max-width: 100%; margin: 14px auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.pay dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; font-size: 15px; background: var(--paper-2); padding: 14px 16px; border-radius: 12px; margin: 0 0 12px; }
.pay dt { color: var(--muted); }
.pay dd { margin: 0; font-weight: 600; word-break: break-word; }
.copy { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0 0 0 6px; }

/* ---------- Cùng bộ ---------- */
.series { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.series a, .series div { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.series .now { border: 2px solid var(--accent); }
.series b { font-family: var(--serif); font-size: 19px; display: block; margin-bottom: 4px; }
.series span { font-size: 13.5px; color: var(--muted); }

/* ---------- Hỏi đáp ---------- */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 6px; }

/* ---------- Chân trang ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 110px; font-size: 14.5px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot b { color: var(--purple); font-family: var(--serif); font-size: 18px; }

/* ---------- Thanh đặt trước dính đáy (mobile) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none;
  background: var(--paper); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -8px 24px rgba(0,0,0,.06);
  transform: translateY(110%); transition: transform .25s;
}
.sticky-cta.on { transform: none; }
.sticky-cta .s-price { font: 700 19px/1.1 var(--serif); color: var(--accent); }
.sticky-cta .s-price small { display: block; font: 400 12px/1.3 var(--sans); color: var(--muted); }
.sticky-cta .btn { min-height: 46px; padding: 0 22px; }

/* ---------- Xem tranh phóng to ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(20, 18, 16, .94); display: none; align-items: center; justify-content: center; padding: 56px 12px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 4px; }
.lightbox .lb-cap { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #E7E2D8; font-size: 14px; padding: 0 60px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lightbox .lb-close { top: 10px; right: 12px; }
.lightbox .lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stories { grid-template-columns: 1fr 1fr; }
  .toc { grid-template-columns: 1fr 1fr; }
  .info-grid, .order-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 20px 0 40px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-art { order: -1; margin: 0 -16px; }
  .hero-art img { border-radius: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .stories, .layers { grid-template-columns: 1fr; }
  .reason { grid-template-columns: 1fr; gap: 14px; }
  .reason:nth-child(even) figure { order: 0; }
  .reason figure { margin: 0 -16px; border-radius: 0; box-shadow: none; }
  .flip-track { grid-auto-columns: 92%; padding: 6px 16px 18px; gap: 12px; }
  .flip-nav { display: none; }
  .row-2 { grid-template-columns: 1fr; }
  .order-card { padding: 20px 16px; }
  .brand span { display: none; }
  .sticky-cta { display: flex; }
  .price-box .p-meta { border-left: 0; padding-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .toc { grid-template-columns: 1fr; }
}

/* ---------- Chọn bộ (combo) — chỉ hiện khi trang khai báo options (20261030) ---------- */
[hidden] { display: none !important; }
.combo-hint { font-size: 14.5px; color: var(--ink-2); margin: 12px 0 0; }
.combo-hint a { color: var(--accent); font-weight: 600; }
.combo { background: var(--paper-2); }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.opt {
  all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; text-align: left; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.opt:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.opt-img { display: block; position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: var(--paper-2); }
.opt-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opt-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.opt-name { font: 700 19px/1.3 var(--serif); }
.opt-price { font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--accent); }
.opt-items { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; color: var(--ink-2); }
.opt-items span + span::before { content: "+ "; color: var(--accent); font-weight: 700; }
.opt-note { font-size: 13.5px; color: var(--muted); }
.opt-check { display: none; margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.opt-check::before { content: ""; display: inline-block; width: 12px; height: 7px; margin: 0 8px 3px 2px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); }
.opt[aria-pressed="true"] .opt-check { display: block; }
.combo-cta { margin-top: 26px; }
@media (max-width: 760px) {
  .opt-grid { grid-template-columns: 1fr; gap: 12px; }
  .opt { flex-direction: row; }
  .opt-img { width: 112px; flex: none; align-self: stretch; aspect-ratio: auto; }
  .opt-body { padding: 12px 14px; gap: 4px; }
  .opt-name { font-size: 17px; }
  .opt-price { font-size: 19px; }
  .combo-cta .btn { width: 100%; }
}

/* ---------- Header và footer theo tranh màu nước của sách (20261030) ----------
   Nền giấy, vệt màu nước xanh lá và vàng lúa, nét viền vẽ tay.
   Ảnh: kpvh-<cuốn>-chim.png (họa tiết chim trong sách), kpvh-<cuốn>-foot-bat.jpg (cụm món ăn). */
:root { --script: "Dancing Script", var(--hand); --wash-green: #EEF4E4; --wash-leaf: #A8C47A; }

.topbar {
  border-bottom: 0;
  background:
    radial-gradient(60% 140% at 6% 0%, rgba(201, 224, 150, .45), transparent 70%),
    radial-gradient(40% 120% at 96% 100%, rgba(244, 191, 58, .16), transparent 70%),
    color-mix(in srgb, var(--paper) 94%, transparent);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 10px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6 C 120 2 240 10 380 6 S 640 1 800 6 S 1060 11 1200 5' fill='none' stroke='%23A8C47A' stroke-width='2.5' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.topbar .wrap { height: 68px; }
.brand { align-items: center; gap: 10px; }
.brand-bird { width: 64px; height: auto; flex: none; margin: -4px 0 0 -6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font-size: 21px; }
.brand-text > span { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text em { font: 700 17px/1 var(--script); font-style: normal; color: var(--accent); }
.topnav { display: flex; gap: 22px; margin-left: auto; margin-right: 8px; }
.topnav a { font: 400 19px/1 var(--hand); color: var(--ink-2); text-decoration: none; padding: 6px 0; background: linear-gradient(var(--wash-leaf), var(--wash-leaf)) left 88% / 0 3px no-repeat; transition: background-size .25s, color .2s; }
.topnav a:hover { color: var(--ink); background-size: 100% 3px; }

.foot {
  position: relative; border-top: 0; margin-top: 40px; padding: 64px 0 28px; color: var(--ink-2);
  background:
    radial-gradient(50% 60% at 15% 30%, rgba(201, 224, 150, .35), transparent 70%),
    radial-gradient(40% 50% at 70% 85%, rgba(244, 191, 58, .14), transparent 70%),
    var(--wash-green);
}
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 L0 16 C 90 6 170 20 260 14 S 430 2 540 12 S 760 24 880 12 S 1080 4 1200 14 L1200 30 Z' fill='%23EEF4E4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.foot .wrap.foot-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1.2fr; gap: 28px; align-items: start; }
.foot-quote { font: 700 clamp(24px, 3vw, 30px)/1.25 var(--script); color: var(--accent); margin: 0 0 6px; }
.foot-src { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.foot-name { margin: 0; display: flex; flex-direction: column; }
.foot-name b { font: 700 22px/1.2 var(--serif); color: var(--purple); }
.foot-name b i { font-style: normal; color: var(--gold); }
.foot-name span { font: 400 18px/1.3 var(--hand); color: var(--ink-2); }
.foot-col { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.foot-col h3 { font: 400 21px/1.2 var(--hand); color: var(--ink); margin: 0 0 4px; }
.foot-col a { color: var(--ink-2); text-decoration: none; width: fit-content; }
.foot-col a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.foot-col small { color: var(--muted); }
.foot-art {
  width: 100%; max-width: 340px; justify-self: end; mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.foot .wrap.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 16px; border-top: 1px dashed rgba(39, 39, 42, .18); font-size: 13px; color: var(--muted); }

@media (max-width: 960px) {
  .topnav { display: none; }
  .foot .wrap.foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-art { grid-column: 1 / -1; justify-self: center; max-width: 280px; order: -1; }
}
@media (max-width: 760px) {
  .topbar .wrap { height: 60px; }
  .brand-bird { width: 50px; }
  .brand .brand-text { display: flex; }
  .brand .brand-text > span { display: block; font-size: 12px; }
  .foot { padding: 48px 0 110px; }
}
@media (max-width: 420px) {
  .brand .brand-text > span { display: none; }
}
