/* Palette from the official MaGio Honey logo: bee yellow #F3BF07 and near-black #1A1207.
   Yellow is for fills and buttons only, never text on light backgrounds (1.7:1).
   All text pairs below pass WCAG AA (4.5:1) on --paper and --cream. */
:root {
  --honey: #f3bf07;       /* logo yellow: buttons, stripes, accents */
  --honey-dark: #9a6b00;  /* large numbers, eyebrow labels: 4.5:1 */
  --amber: #7a5300;       /* links: 6.6:1 */
  --ink: #1a1207;         /* logo black: text, headings: 17.9:1 */
  --muted: #5f5140;       /* secondary text: 7.4:1 */
  --paper: #fffbf2;       /* page background, warm off-white */
  --cream: #fbf1d6;       /* bands and highlights, light honey tint */
  --line: #ebddbe;        /* borders */
  --white: #ffffff;
  --radius: 14px;
  --serif: "Noto Serif", "Noto Serif Georgian", Georgia, serif;
  --sans: "Noto Sans", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
:lang(ka) h1 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); }
p, ul, table { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: .4em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--paper); border-top: 4px solid var(--honey); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; margin-right: auto; padding: 6px 0; }
.brand img { height: 52px; width: auto; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current] { background: var(--cream); }
.lang { display: flex; gap: 2px; order: 3; }
.lang a { text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 4px 8px; border-radius: 6px; border: 1px solid transparent; }
.lang a[aria-current] { color: var(--ink); border-color: var(--line); background: var(--white); }
.menu-btn { display: none; }

.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; }

@media (max-width: 860px) {
  /* One row: logo left, then languages and the menu icon on the right. */
  .header-row { gap: 8px; min-height: 60px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; order: 2; width: 42px; height: 42px; padding: 0; background: var(--cream); color: var(--ink); border: 0; border-radius: 10px; cursor: pointer; }
  .menu-btn[aria-expanded="true"] { background: var(--honey); }
  .lang { order: 1; }
  .site-nav { display: none; order: 4; width: 100%; flex-direction: column; padding-bottom: 12px; }
  .site-nav.open { display: flex; }
}

@media (max-width: 420px) {
  .brand img { height: 40px; }
  .lang { gap: 0; }
  .lang a { padding: 4px 6px; }
}

@media (max-width: 360px) {
  .header-row { gap: 6px; }
  .brand img { height: 34px; }
  .lang a { padding: 3px 4px; font-size: .75rem; }
  .menu-btn { width: 38px; height: 38px; }
}

/* Sections */
main section { padding: 40px 0; }
.page-head { padding-top: 56px; max-width: 760px; }
.lead { font-size: 1.2rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--honey-dark); margin-bottom: .8em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.4em; }
.btn { display: inline-block; background: var(--honey); color: var(--ink); border: 2px solid var(--honey); padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--honey); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.more { font-weight: 600; }
.more::after { content: " \2192"; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 56px; }
.hero-img img, .split figure img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.hero-img img { aspect-ratio: 4 / 4.6; }
figure { margin: 0; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-block: 1px solid var(--line); }
.facts .num { font-family: var(--serif); font-size: 2.4rem; color: var(--honey-dark); margin: 0; line-height: 1.1; }
.facts p { margin: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > div { order: 2; }
.split figure { max-width: 460px; justify-self: center; width: 100%; }
.split h2:first-child { margin-top: 0; }

.band { background: var(--cream); border-radius: var(--radius); padding: 40px clamp(20px, 5vw, 56px) !important; margin: 24px 0; }
.band h2 { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: 1.3rem; margin-top: 0; }
.card .use { color: var(--muted); font-size: .95rem; margin: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding-top: 8px !important; }
.contact-card { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.contact-card:hover { border-color: var(--honey); }
.contact-card .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.contact-card .value { font-size: 1.1rem; font-weight: 600; }

/* Articles */
.posts { display: grid; gap: 16px; padding-top: 0 !important; }
.post { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); }
.post:hover { border-color: var(--honey); }
.post img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; }
.post strong { display: block; font-family: var(--serif); font-size: 1.2rem; margin-bottom: 4px; }
.post span span { color: var(--muted); }

.article { padding: 48px 0 64px; }
.article .crumb { font-size: .9rem; margin-bottom: 1.5em; }
.article .meta { font-size: .9rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 1.2em; margin-bottom: 1.6em; }
.article figure { margin: 2em 0; }
.article figure img { border-radius: 10px; border: 1px solid var(--line); }
.article table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; }
.article th, .article td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.article th { background: var(--cream); font-size: .9rem; }
.article td:last-child, .article th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sources { margin-top: 2.4em; padding: 18px 20px; background: var(--cream); border-radius: 10px; font-size: .92rem; }
.sources h2 { font-size: 1rem; margin: 0 0 .5em; }
.sources p:last-child { margin: 0; }
.back { margin-top: 2em; font-weight: 600; }

/* Footer */
.site-footer { background: var(--ink); color: #eadfc8; margin-top: 48px; padding: 40px 0 20px; }
.site-footer a { color: var(--honey); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 44px; width: auto; margin-bottom: 10px; }
.site-footer .fine { border-top: 1px solid #3a2c18; margin-top: 20px; padding-top: 14px; font-size: .85rem; color: #b8a88c; }
.site-footer p { margin: .3em 0; }

@media (max-width: 760px) {
  .hero, .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse > div { order: 0; }
  .facts { grid-template-columns: 1fr; }
  .post { grid-template-columns: 96px 1fr; gap: 14px; }
  .post img { width: 96px; height: 96px; }
  main section { padding: 28px 0; }
}
