/* Self-hosted display type — one variable file covers 400+500 normal, one for italic */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
:root {
  --bg: #f7f6f2;
  --bg-alt: #f1efe8;
  --ink: #14140f;
  --muted: #6b6b63;
  --line: #e5e3db;
  --accent: #2f7d4f;
  --card: #ffffff;
  --maxw: 1120px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
a { color: inherit; }
.serif { font-family: "Fraunces", serif; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,246,242,0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { max-width: var(--maxw); margin: 0 auto; padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: 24px; letter-spacing: 0.2px; text-decoration: none; }
.nav-links { display: flex; gap: 38px; }
.nav-links a { text-decoration: none; font-size: 16px; color: var(--ink); transition: color .15s; }
.nav-links a:hover { color: var(--muted); }
.nav-links a.active { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 78px 0 56px; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; font-size: 13px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47,125,79,.5); }
  70% { box-shadow: 0 0 0 7px rgba(47,125,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,125,79,0); }
}
h1 {
  font-family: "Fraunces", serif; font-weight: 400;
  font-size: clamp(44px, 7vw, 82px); line-height: 1.03;
  letter-spacing: -0.015em; margin: 32px 0 0; max-width: 15ch;
}
.lede { color: var(--muted); font-size: clamp(17px,1.5vw,20px); line-height: 1.6; max-width: 60ch; margin: 32px 0 0; }
.stats { display: flex; flex-wrap: wrap; gap: 46px; margin-top: 54px; padding-top: 30px; border-top: 1px solid var(--line); }
.stat { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.stat svg { flex: none; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }

/* ---------- Pull quote ---------- */
.pull-quote { padding: 40px 0; border-top: 1px solid var(--line); }
.pull-quote p {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 400;
  font-size: clamp(18px,2vw,22px); color: var(--muted); max-width: 46ch;
}

/* ---------- Section shell ---------- */
section { padding: 92px 0; border-top: 1px solid var(--line); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.sec-head { font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(30px,4vw,46px); letter-spacing: -0.01em; margin-top: 14px; }
.sec-intro { color: var(--muted); font-size: 18px; max-width: 56ch; margin-top: 16px; }

/* ---------- Case-study cards ---------- */
.work-grid { display: flex; flex-direction: column; gap: 26px; margin-top: 52px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
}
.thumb { position: relative; aspect-ratio: 21/9; display: flex; align-items: flex-end; padding: 22px; color: #fff; font-family: "Fraunces", serif; font-size: 22px; }
.t1 { background: linear-gradient(135deg,#1b6b3a,#2f7d4f 55%,#83c69a); }
.t3 { background: linear-gradient(135deg,#0f2c52,#1d4e89 60%,#5fa8e6); }
.t4 { background: linear-gradient(135deg,#3a2a6b,#6b4fc4 60%,#c3b5f2); }
.award {
  position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center;
  gap: 7px; font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .02em; color: var(--ink); background: rgba(255,255,255,.92);
  padding: 6px 12px; border-radius: 999px;
}
.medal { width: 9px; height: 9px; border-radius: 50%; }
.medal.silver { background: #b8b8b8; }
.medal.bronze { background: #b87333; }
.card-body { padding: 32px 32px 34px; }
.card-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-family: "Fraunces", serif; font-weight: 500; font-size: clamp(22px,2.4vw,28px); margin: 8px 0 16px; letter-spacing: -0.01em; }
.card p { color: #2c2c26; font-size: 16px; line-height: 1.65; max-width: 68ch; }
.card p + p { margin-top: 14px; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 16px; line-height: 1.55; }
.media { margin-top: 22px; border-radius: 10px; overflow: hidden; background: #000; }
.media iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.media img { display: block; width: 100%; height: auto; }
.caption { font-size: 13.5px; color: var(--muted); margin-top: 10px; font-style: italic; }
.tagline { font-family: "Fraunces", serif; font-style: italic; font-size: 17px; color: var(--muted); margin-top: 18px; max-width: 50ch; }
.stat-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pill { font-size: 13px; font-weight: 500; color: var(--ink); border: 1px solid var(--line); background: var(--bg-alt); border-radius: 999px; padding: 7px 14px; }
.card-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; }
.view { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; }
.view:hover { gap: 10px; }

/* ---------- Daily Grind (plain subsection, not a card) ---------- */
.grind { margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--line); }
.grind h3 { font-family: "Fraunces", serif; font-weight: 500; font-size: clamp(20px,2.2vw,24px); margin-bottom: 14px; }
.grind p { color: #2c2c26; font-size: 16px; line-height: 1.65; max-width: 68ch; }
.grind-sub { margin-top: 28px; }
.grind-sub .card-kicker { margin-bottom: 8px; }

/* ---------- About ---------- */
.about-lede { font-size: 18px; line-height: 1.72; color: #2c2c26; max-width: 68ch; margin-top: 24px; }
.trio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 52px; }
.trio-grid .cap-title { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.trio-grid p { font-size: 16px; line-height: 1.65; color: #2c2c26; }
.trio-grid p + p { margin-top: 12px; }

/* ---------- Contact ---------- */
#contact { text-align: center; }
.contact-h { font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(34px,5.4vw,64px); line-height: 1.05; letter-spacing: -0.015em; max-width: 18ch; margin: 18px auto 0; }
.contact-sub { color: var(--muted); font-size: 18px; margin: 22px auto 0; max-width: 48ch; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 16px; padding: 15px 26px; border-radius: 999px; transition: transform .15s, background .15s, border-color .15s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.contact-meta { color: var(--muted); font-size: 15px; margin-top: 28px; }

/* ---------- Footer ---------- */
footer { padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- Blog ---------- */
.blog-list { margin-top: 48px; display: flex; flex-direction: column; }
.post-row { padding: 32px 0; border-top: 1px solid var(--line); display: block; text-decoration: none; color: inherit; }
.post-row:first-child { border-top: 0; }
.post-date { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-row h2 { font-family: "Fraunces", serif; font-weight: 500; font-size: clamp(22px,2.6vw,30px); margin: 10px 0 12px; }
.post-row p { color: var(--muted); font-size: 16px; max-width: 60ch; }
.post-row .view { margin-top: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 24px; }
.back-link:hover { color: var(--ink); }
article header.post-head { position: static; background: none; backdrop-filter: none; border: 0; padding: 0; }
.post-head .kicker { display: block; }
.post-head h1.post-title { font-size: clamp(32px,5vw,54px); max-width: 22ch; margin-top: 16px; }
.post-head .post-date { display: block; margin-top: 20px; }
.post-tag { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
.prose { max-width: 74ch; margin-top: 44px; font-size: 17px; line-height: 1.75; color: #2c2c26; }
.prose h2 { font-family: "Fraunces", serif; font-weight: 500; font-size: 26px; margin: 44px 0 16px; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 32px 0 10px; }
.prose p { margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.prose .table-wrap { overflow-x: auto; margin: 24px 0; }
.prose .table-wrap table { margin: 0; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }

@media (max-width: 820px) {
  .trio-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 680px) {
  .wrap, .nav { padding-left: 22px; padding-right: 22px; }
  .nav-links { display: none; }
  .stats { gap: 20px; }
  .stat { width: 100%; }
  .card-body { padding: 24px 22px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
  * { transition: none !important; }
}
