/* ninhbinh.info -- design system
   Family look: DM Serif Display (headings) + Source Sans 3 (body)
   Palette evokes Ninh Binh: rice/karst green, warm gold, limestone cream. */

:root {
  --green-900: #14392a;
  --green-800: #1c4a37;
  --green-700: #256048;
  --green-600: #2f7857;
  --green-100: #e3efe8;
  --gold-600: #b9802f;
  --gold-500: #c8893a;
  --gold-100: #f6ead6;
  --cream: #f8f6f0;
  --cream-2: #f1ede3;
  --ink: #20302a;
  --ink-soft: #4a5b53;
  --line: #e0dccf;
  --white: #ffffff;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(20, 57, 42, 0.08);
  --shadow-sm: 0 4px 14px rgba(20, 57, 42, 0.07);

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--green-900); }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 1.8em 0 .5em; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); margin: 1.6em 0 .4em; }

p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 240, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 18px;
}
.brand {
  font-family: var(--serif); font-size: 1.4rem; color: var(--green-900);
  text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 9px;
}
.brand:hover { color: var(--green-900); }
.brand .dot { color: var(--gold-500); }
.brand svg { flex: 0 0 auto; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { background: var(--green-100); color: var(--green-800); }
.nav-links a.cta {
  background: var(--gold-500); color: #fff; margin-left: 6px;
}
.nav-links a.cta:hover { background: var(--gold-600); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 40px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; display: none; box-shadow: var(--shadow-sm);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; }
  .nav-links a.cta { margin: 6px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(200,137,58,.18), transparent 60%),
    linear-gradient(160deg, var(--green-800) 0%, var(--green-900) 100%);
  color: #f3f1e7;
}
.hero .container { position: relative; z-index: 2; padding-top: 64px; padding-bottom: 72px; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lead { font-size: 1.25rem; max-width: 60ch; color: #e2ecd9; margin-bottom: 1.6em; }
.hero .karst {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; width: 100%; height: auto; opacity: .9;
}
.eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  font-size: .8rem; color: var(--gold-500); margin-bottom: 14px;
}
.hero .eyebrow { color: var(--gold-100); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; font-size: 1rem; border: 2px solid transparent;
  transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold-500); color: #fff; }
.btn-primary:hover { background: var(--gold-600); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { background: #fff; color: var(--green-800); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-100); color: var(--green-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Layout: content + breadcrumb ---------- */
.breadcrumb { font-size: .9rem; color: var(--ink-soft); padding: 16px 0 0; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb span { color: var(--green-800); }

main { padding-bottom: 10px; }
.page { padding: 30px 0 60px; }
.prose { max-width: 760px; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }

/* lead paragraph */
.lead-in { font-size: 1.2rem; color: var(--ink-soft); }

/* featured image (top of content pages) */
.feature-img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); margin: 4px 0 26px; box-shadow: var(--shadow-sm);
}
@media (min-width: 760px) { .feature-img { aspect-ratio: 21 / 9; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
  display: block; transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.card h3 { margin: 0 0 .35em; color: var(--green-800); }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold-600); background: var(--gold-100); padding: 3px 9px; border-radius: 99px; margin-bottom: 12px;
}

/* ---------- Callout / info box ---------- */
.callout {
  background: var(--green-100); border-left: 4px solid var(--green-600);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 1.6em 0;
}
.callout.gold { background: var(--gold-100); border-left-color: var(--gold-500); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--green-900); }

/* ---------- Fact table ---------- */
.facts { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 1rem; }
.facts th, .facts td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { background: var(--cream-2); font-weight: 700; color: var(--green-900); }
.facts tr:last-child td { border-bottom: none; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  color: #f3f1e7; border-radius: var(--radius); padding: 36px; margin: 40px 0 10px;
  box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; margin: 0 0 .3em; }
.cta-banner p { color: #dfeada; max-width: 60ch; }

/* ---------- "Explore more" network block ---------- */
.network { background: var(--cream-2); border-top: 1px solid var(--line); padding: 48px 0; margin-top: 50px; }
.network h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #cfe0d3; padding: 50px 0 30px; font-size: .96rem; }
.site-footer a { color: #e7efe2; text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer .brand-foot { font-family: var(--serif); font-size: 1.5rem; color: #fff; margin-bottom: 10px; }
.site-footer .muted { color: #9fb7a6; font-size: .88rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------- TOC chips on long pages ---------- */
.chiplist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.6em; padding: 0; list-style: none; }
.chiplist a {
  text-decoration: none; font-size: .92rem; font-weight: 600; color: var(--green-800);
  background: #fff; border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px;
}
.chiplist a:hover { background: var(--green-100); }

/* utility */
.center { text-align: center; }
.mt0 { margin-top: 0; }
.section { padding: 50px 0; }
hr.rule { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
