/* karbon.bz — system fonts only, no external requests */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1b1d1f;
  --muted: #5e6469;
  --line: #e2ded5;
  --accent: #0e6e74;
  --accent-ink: #ffffff;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  --w: 1120px;
  --narrow: 720px;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1a1d20;
    --ink: #e9e6df;
    --muted: #9aa1a7;
    --line: #2a2e32;
    --accent: #4fb8be;
    --accent-ink: #0b1314;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { font: 600 22px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; margin-right: auto; }
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
.lang { gap: 4px !important; padding-left: 20px !important; border-left: 1px solid var(--line) !important; }
.lang a { font: 500 12px/1 var(--mono); padding: 6px 7px; border-radius: 6px; }
.lang a[aria-current] { background: var(--ink); color: var(--bg); }
.nav-toggle, .nav-burger { display: none; }

@media (max-width: 760px) {
  .nav-burger { display: grid; place-items: center; width: 40px; height: 40px; cursor: pointer; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
  }
  .nav-burger span::before { position: absolute; top: -6px; }
  .nav-burger span::after { position: absolute; top: 6px; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; padding: 16px; gap: 16px;
  }
  .site-nav ul { flex-direction: column; gap: 12px; }
  .site-nav a { font-size: 18px; }
  .lang { flex-direction: row !important; border: 0 !important; padding: 0 !important; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center;
  padding-block: clamp(48px, 9vw, 120px) clamp(32px, 6vw, 72px);
}
.eyebrow { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); margin: 0 0 20px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 38em; margin: 0; }
.hero-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50% 50% var(--r) 50%; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-img { order: -1; max-width: 220px; }
}

/* Page head */
.page-head { padding-block: clamp(40px, 7vw, 88px) 24px; }
.page-head h1 { font-size: clamp(34px, 5vw, 54px); margin: 0 0 14px; }

/* Blocks */
main > section, main > figure, main > blockquote { margin-block: clamp(32px, 5vw, 56px); }
.prose { max-width: var(--narrow); }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 14px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.5em 0; padding-left: 1em; color: var(--muted); }

.figure { margin-inline: auto; }
.figure img { border-radius: var(--r); width: 100%; }
.figure.wide img { border-radius: 0; max-height: 72vh; object-fit: cover; }
.figure figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.figure.wide figcaption { width: min(var(--w), 100% - 32px); margin-inline: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { font-size: 22px; margin: 0; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.card .more { font-weight: 600; text-decoration: none; }

.quote { text-align: center; }
.quote p { font: italic 400 clamp(22px, 3vw, 30px)/1.4 var(--serif); margin: 0 0 12px; }
.quote cite { font-style: normal; color: var(--muted); font-size: 15px; }

.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  background: var(--ink); color: var(--bg); border-radius: var(--r); padding: clamp(28px, 5vw, 56px);
}
.contact h2 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 36px); }
.contact p { margin: 0; opacity: .8; }
.contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: center; }
.contact li span { display: block; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; opacity: .6; margin-bottom: 4px; }
.contact a { color: var(--bg); font-size: 20px; text-decoration: none; }
.contact a:hover { text-decoration: underline; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 96px); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 28px; font-size: 14px; color: var(--muted); }
.footer-inner p { margin: 0; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.footer-inner a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
