@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:        oklch(0.995 0.002 240);
  --surface:   oklch(0.975 0.004 240);
  --fg:        oklch(0.20  0.02  250);
  --muted:     oklch(0.50  0.015 250);
  --card:      oklch(1 0 0);
  --border:    oklch(0.92  0.006 250);
  --accent:    oklch(0.55  0.18  255);
  --primary:   oklch(0.22  0.025 255);
  --primary-fg:oklch(0.99  0.002 240);
  --radius:    12px;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }
html { -webkit-font-smoothing: antialiased; font-size: 16px; }
body { background: var(--bg); color: var(--fg); font-family: 'Inter', system-ui, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; letter-spacing: -0.02em; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container     { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.container-lg  { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px;
}
.site-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 1px;
}
.site-logo .dot { color: var(--accent); }
.header-btn { background: none; border: none; cursor: pointer; padding: 8px; color: var(--fg); display: grid; place-items: center; }
.header-btn:hover { color: var(--accent); }
.header-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { display: flex; gap: 20px; align-items: center; }
.site-nav a { font-size: 14px; color: var(--muted); transition: color .15s; }
.site-nav a:hover { color: var(--accent); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { margin-top: 80px; border-top: 1px solid var(--border); background: var(--surface); padding: 40px 16px; }
.footer-logo { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; display: flex; align-items: baseline; gap: 1px; margin-bottom: 20px; }
.footer-desc { font-size: 14px; color: var(--muted); max-width: 280px; margin-bottom: 32px; line-height: 1.6; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 16px; margin-bottom: 40px; }
.footer-col__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; margin-bottom: 12px; }
.footer-col__list { list-style: none; }
.footer-col__list li + li { margin-top: 8px; }
.footer-col__list a { font-size: 14px; color: var(--muted); transition: color .15s; }
.footer-col__list a:hover { color: var(--accent); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.footer-bottom p { font-size: 12px; color: var(--muted); }

/* ── Typography helpers ─────────────────────────────────────────────────────── */
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent); font-weight: 500; margin-bottom: 12px; }
.page-title { font-family: 'Fraunces', Georgia, serif; font-size: clamp(28px, 6vw, 36px); line-height: 1.05; letter-spacing: -0.02em; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; border-radius: var(--radius); font-size: 15px; font-weight: 500; padding: 0 24px; gap: 8px; cursor: pointer; transition: opacity .15s, background .15s; border: none; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: var(--card); color: var(--fg); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface); }

/* ── Section header ────────────────────────────────────────────────────────── */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 16px; margin-bottom: 20px; }
.section-header__title { font-family: 'Fraunces', Georgia, serif; font-size: 22px; line-height: 1.2; }
.section-header__link { font-size: 12px; color: var(--accent); font-weight: 500; white-space: nowrap; }
.section-header__link:hover { text-decoration: underline; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-grid { display: grid; gap: 16px; padding: 0 16px; }

/* Article row (list page) */
.article-row { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; border-bottom: 1px solid var(--border); transition: color .15s; }
.article-row:last-child { border-bottom: none; }
.article-row:hover h2 { color: var(--accent); }
.article-row .cat { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); font-weight: 500; }
.article-row h2 { font-family: 'Fraunces', Georgia, serif; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; transition: color .15s; }
.article-row .excerpt { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.article-row .date { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Featured article card (horizontal scroll) */
.article-card { display: block; width: 78vw; max-width: 320px; flex-shrink: 0; }
.article-card:hover h3 { color: var(--accent); }
.article-card__img { aspect-ratio: 4/5; overflow: hidden; border-radius: 10px; background: var(--surface); margin-bottom: 16px; }
.article-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.article-card:hover .article-card__img img { transform: scale(1.03); }
.article-card .cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
.article-card h3 { font-family: 'Fraunces', Georgia, serif; font-size: 22px; line-height: 1.15; margin-bottom: 8px; transition: color .15s; }
.article-card .excerpt { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Feed item (compact, with thumb) */
.feed-item { display: flex; gap: 16px; align-items: flex-start; }
.feed-item:hover h3 { color: var(--accent); }
.feed-item__thumb { width: 96px; height: 96px; flex-shrink: 0; overflow: hidden; border-radius: 8px; background: var(--surface); }
.feed-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-item .cat { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.feed-item h3 { font-family: 'Fraunces', Georgia, serif; font-size: 16px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s; }
.feed-item .date { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Project card */
.project-card .type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.project-card h2 { font-family: 'Fraunces', Georgia, serif; font-size: 18px; line-height: 1.2; }
.project-card .location { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.project-card .location svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }
.project-card .desc { font-size: 14px; color: var(--muted); margin: 12px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.project-card__metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.metric__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 4px; }
.metric__value { font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 600; }
.metric__value--accent { color: var(--accent); }

/* Risk badge */
.risk { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 100px; font-size: 11px; font-weight: 500; flex-shrink: 0; }
.risk--low    { background: #ecfdf5; color: #065f46; }
.risk--mid    { background: #fffbeb; color: #92400e; }
.risk--high   { background: #fef2f2; color: #991b1b; }

/* Case card */
.case-card .segment { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.case-card h2 { font-family: 'Fraunces', Georgia, serif; font-size: 18px; line-height: 1.25; }
.case-card .desc { font-size: 14px; color: var(--muted); margin: 8px 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.case-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--border); padding-top: 16px; }
.case-stat { padding: 0 12px; }
.case-stat:first-child { padding-left: 0; }
.case-stat:last-child { padding-right: 0; }
.case-stat + .case-stat { border-left: 1px solid var(--border); }
.case-stat__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 4px; }
.case-stat__value { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600; line-height: 1.2; }
.case-stat__value--accent { color: var(--accent); }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero { padding: 32px 16px 40px; }
.hero__title { font-family: 'Fraunces', Georgia, serif; font-size: clamp(32px, 8vw, 44px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 20px; }
.hero__desc { font-size: 15px; color: var(--muted); line-height: 1.65; max-width: 380px; margin-bottom: 28px; }
.hero__cta { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.hero__stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.stat__k { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; line-height: 1; margin-bottom: 6px; }
.stat__v { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.section { padding: 32px 0; }
.section--surface { background: var(--surface); }
.h-scroll { overflow-x: auto; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll__inner { display: flex; gap: 16px; padding: 0 16px 8px; width: max-content; }
.px-4 { padding-left: 16px; padding-right: 16px; }

/* ── Article page ───────────────────────────────────────────────────────────── */
.article-page { max-width: 680px; margin: 0 auto; padding: 40px 16px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb__sep { opacity: .4; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.article-cat { display: inline-block; background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent); padding: 2px 12px; border-radius: 100px; font-size: 12px; font-weight: 500; }
.article-date { font-size: 12px; color: var(--muted); }
.article-title { font-family: 'Fraunces', Georgia, serif; font-size: clamp(24px, 5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 24px; }
.article-excerpt { font-size: 16px; color: var(--muted); line-height: 1.65; margin-bottom: 32px; border-left: 2px solid var(--accent); padding-left: 16px; }
.article-hero { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--surface); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-back a { font-size: 14px; color: var(--accent); }
.article-back a:hover { text-decoration: underline; }

/* ── Rich content ───────────────────────────────────────────────────────────── */
.rich h2 { font-family: 'Fraunces', Georgia, serif; font-size: 1.4rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.5rem; }
.rich h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.35rem; }
.rich p { margin-bottom: 1rem; line-height: 1.7; }
.rich strong { font-weight: 700; }
.rich em { font-style: italic; }
.rich ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.rich ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.rich li { margin-bottom: 4px; line-height: 1.65; }
.rich blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--muted); }
.rich hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.rich a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rich img { border-radius: 10px; margin: 1rem 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 14px; }
.rich th { background: var(--surface); font-weight: 600; text-align: left; padding: 8px 12px; border: 1px solid var(--border); }
.rich td { padding: 8px 12px; border: 1px solid var(--border); }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); }
.space-y > * + * { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.empty-state { padding: 80px 0; text-align: center; font-size: 14px; color: var(--muted); }
