/* digitalmarketing.fyi - Editorial Authority */
:root {
  --surface: #f8f5f0;
  --text: #1a1a1a;
  --accent: #7a2e35;
  --accent-hover: #5e2329;
  --depth: #3d3529;
  --border: #d6cfc4;
  --dark-bg: #1a1a1a;
  --dark-pattern: #2a2420;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --maxw: 1240px;
  --gutter: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: var(--surface); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--surface);
  padding: 12px 18px; z-index: 999;
  font-family: var(--sans); font-size: 14px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ====== Layout ====== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }

/* ====== Typography ====== */
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); }

h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; color: var(--text); }
h1 { font-size: clamp(48px, 6.5vw, 88px); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 3.6vw, 52px); }
h3 { font-size: clamp(24px, 2vw, 30px); font-weight: 600; }
h4 { font-size: 20px; font-weight: 600; }

p { color: var(--text); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--depth);
}
.eyebrow.accent { color: var(--accent); }

/* ====== Nav ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 240, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 280ms ease, background 280ms ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.nav-logo { flex: 0 0 auto; }
.nav-links {
  display: flex; align-items: center; gap: 28px; list-style: none;
  flex: 1;
  margin-left: 16px;
}
.nav-links a {
  position: relative;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  letter-spacing: 0.005em;
}
.nav-links a:hover { text-decoration: none; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 2px;
  height: 1.5px; background: var(--accent);
  transition: right 280ms cubic-bezier(.22,.61,.36,1);
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }

.nav-cta {
  background: var(--accent); color: var(--surface);
  padding: 10px 18px; border-radius: 4px;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 200ms ease, transform 200ms ease;
}
.nav-cta:hover { background: var(--accent-hover); transform: scale(1.02); text-decoration: none; }

.menu-toggle { display: none; }

/* Services dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: -16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  display: grid; grid-template-columns: repeat(2, 200px); gap: 4px 12px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 200ms, transform 200ms, visibility 200ms;
  box-shadow: 0 8px 30px rgba(26,26,26,0.06);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  font-size: 13px;
  padding: 9px 10px;
  border-radius: 3px;
  color: var(--text);
}
.dropdown a::after { display: none; }
.dropdown a:hover { background: rgba(122, 46, 53, 0.06); color: var(--accent); }
.dropdown .dd-eyebrow {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--depth);
  padding: 6px 10px 4px;
}

/* ====== Logo ====== */
.logo-pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  padding: 7px 16px 7px 13px;
  background: transparent;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: border-color 200ms ease;
  white-space: nowrap;
}
.logo-pill:hover { text-decoration: none; border-color: var(--accent); }
.logo-pill .magnifier {
  width: 14px; height: 14px;
  flex: 0 0 auto;
  color: var(--accent);
}
.logo-pill .dot-fyi { color: var(--accent); font-weight: 700; }
.logo-pill .cursor {
  display: inline-block;
  width: 1.5px; height: 0.95em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: -0.12em;
  animation: blink 900ms steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.logo-pill.dark { border-color: var(--surface); color: var(--surface); }
.logo-pill.dark .magnifier { color: var(--accent); }
.logo-pill.dark .dot-fyi { color: var(--accent); }

.logo-pill.lg { font-size: 22px; padding: 10px 22px 10px 18px; }
.logo-pill.lg .magnifier { width: 18px; height: 18px; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease, border-color 200ms ease;
  font-family: var(--sans);
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); text-decoration: none; }
.btn-secondary { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-secondary:hover { background: var(--accent); color: var(--surface); transform: scale(1.02); text-decoration: none; }
.btn-dark { background: var(--surface); color: var(--text); }
.btn-dark:hover { background: var(--accent); color: var(--surface); text-decoration: none; transform: scale(1.02); }
.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Inline link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.link-arrow .arrow { transition: transform 200ms ease; }
.link-arrow:hover { text-decoration: none; border-bottom-color: var(--accent); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ====== Section helpers ====== */
section { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 56px; }
.section-head .lhs { max-width: 640px; }
.section-head h2 { margin-top: 14px; }
.section-head p { color: var(--depth); margin-top: 14px; max-width: 520px; }

.dark-band { background: var(--dark-bg); color: var(--surface); position: relative; overflow: hidden; }
.dark-band h1, .dark-band h2, .dark-band h3, .dark-band h4 { color: var(--surface); }
.dark-band p { color: rgba(248, 245, 240, 0.78); }
.dark-band .eyebrow { color: rgba(248,245,240, 0.55); }
.dark-band .eyebrow.accent { color: var(--accent); }

.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(248,245,240, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  animation: drift 20s linear infinite;
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 28px 28px; } }

/* ====== Reveal ====== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-stagger="2"] { transition-delay: 80ms; }
.reveal[data-stagger="3"] { transition-delay: 160ms; }
.reveal[data-stagger="4"] { transition-delay: 240ms; }
.reveal[data-stagger="5"] { transition-delay: 320ms; }
.reveal[data-stagger="6"] { transition-delay: 400ms; }

/* ====== Hero ====== */
.hero {
  padding: 110px 0 120px;
  position: relative; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--border) 1px, transparent 1px) 0 0/100% 96px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0/96px 100%;
  opacity: 0.35;
  mask: radial-gradient(circle at 70% 30%, #000 0%, transparent 60%);
  -webkit-mask: radial-gradient(circle at 70% 30%, #000 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 980px; }
.hero h1 {
  margin-top: 22px;
  animation: heroFadeUp 900ms cubic-bezier(.22,.61,.36,1) both;
}
.hero .lede {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--depth);
  max-width: 620px;
  animation: heroFadeUp 900ms 120ms cubic-bezier(.22,.61,.36,1) both;
}
.hero .ctas {
  margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap;
  animation: heroFadeUp 900ms 240ms cubic-bezier(.22,.61,.36,1) both;
}
.hero .meta-row {
  margin-top: 64px;
  display: flex; gap: 40px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  animation: heroFadeUp 900ms 360ms cubic-bezier(.22,.61,.36,1) both;
}
.hero .meta-row .item .k {
  font-family: var(--serif); font-size: 36px; color: var(--accent);
  line-height: 1;
}
.hero .meta-row .item .v {
  font-size: 13px; color: var(--depth); margin-top: 6px;
  font-family: var(--mono); letter-spacing: 0.04em;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animated geometric SVG */
.hero-pattern {
  position: absolute;
  right: -80px; top: 60px;
  width: 540px; height: 540px;
  pointer-events: none;
  opacity: 0.55;
}
.hero-pattern circle, .hero-pattern line { stroke: var(--border); fill: none; stroke-width: 1; }
.hero-pattern .ring-anim { animation: rotate 60s linear infinite; transform-origin: center; }
.hero-pattern .ring-anim-2 { animation: rotate 90s linear infinite reverse; transform-origin: center; }
@keyframes rotate { to { transform: rotate(360deg); } }

/* ====== Service cards ====== */
.svc-grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--border);
  border: 1px solid var(--border);
}
.svc-card {
  padding: 36px 32px 32px;
  background: var(--surface);
  position: relative;
  transition: background 220ms ease;
  display: flex; flex-direction: column; min-height: 260px;
}
.svc-card::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width 360ms cubic-bezier(.22,.61,.36,1);
}
.svc-card:hover::before { width: 100%; }
.svc-card .num {
  font-family: var(--mono); font-size: 11px; color: var(--depth); letter-spacing: 0.16em;
}
.svc-card h3 { margin-top: 18px; font-size: 26px; }
.svc-card p { color: var(--depth); margin-top: 12px; font-size: 14.5px; line-height: 1.55; flex: 1; }
.svc-card .more {
  margin-top: 22px;
  font-size: 13px; color: var(--accent); font-weight: 500;
  position: relative; align-self: flex-start;
}
.svc-card .more::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 1px; background: var(--accent);
  transition: right 320ms cubic-bezier(.22,.61,.36,1);
}
.svc-card:hover .more::after { right: 0; }

/* ====== Editorial post cards ====== */
.posts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--border);
}
.post-card {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 32px 28px 28px;
  background: var(--surface);
  transition: background 220ms ease;
  display: flex; flex-direction: column;
}
.post-card:last-child { border-right: 1px solid var(--border); }
.posts-grid > .post-card:nth-child(3n) { border-right: none; }
.post-card:hover { background: rgba(122, 46, 53, 0.025); }
.post-card .meta { display: flex; gap: 12px; align-items: center; }
.post-card .meta .date {
  font-family: var(--mono); font-size: 11px;
  color: var(--depth); letter-spacing: 0.06em;
  transition: color 200ms ease;
}
.post-card:hover .meta .date { color: var(--accent); }
.post-card .tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 999px;
  transition: border-color 200ms ease;
}
.post-card:hover .tag { border-color: var(--accent); }
.post-card h3 {
  margin-top: 18px; font-size: 24px; line-height: 1.18;
}
.post-card .excerpt { margin-top: 12px; color: var(--depth); font-size: 14.5px; line-height: 1.55; flex: 1; }
.post-card .read {
  margin-top: 22px;
  display: flex; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--depth); letter-spacing: 0.08em;
}

/* ====== Differentiators ====== */
.diffs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.diff .num {
  font-family: var(--serif); font-size: 56px; line-height: 1;
  color: var(--accent); font-weight: 500;
}
.diff h4 { margin-top: 18px; font-size: 22px; }
.diff p { margin-top: 10px; color: var(--depth); font-size: 14.5px; line-height: 1.55; }

/* ====== Whitepaper spotlight ====== */
.wp-spotlight {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end;
  position: relative; z-index: 1;
}
.wp-spotlight .id { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(248,245,240,0.55); }
.wp-spotlight h2 { margin-top: 16px; }
.wp-spotlight .desc { margin-top: 22px; color: rgba(248,245,240,0.78); font-size: 16px; line-height: 1.6; }
.wp-spotlight .ctas { margin-top: 32px; display: flex; gap: 14px; }

.stat-block {
  border-left: 1px solid rgba(248,245,240,0.2);
  padding: 8px 0 8px 28px;
}
.stat-block .big {
  font-family: var(--serif); font-size: clamp(72px, 8vw, 120px); line-height: 1;
  color: var(--accent); font-weight: 500;
}
.stat-block .label { color: rgba(248,245,240,0.7); font-size: 14px; margin-top: 14px; max-width: 260px; }

/* ====== Final CTA ====== */
.final-cta { text-align: center; padding: 130px 0 140px; border-top: 1px solid var(--border); }
.final-cta .eyebrow { display: block; }
.final-cta h2 { margin-top: 18px; max-width: 720px; margin-left: auto; margin-right: auto; }
.final-cta h2 .draw {
  position: relative; padding-bottom: 6px;
}
.final-cta h2 .draw::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 3px; background: var(--accent);
  transition: right 1200ms cubic-bezier(.22,.61,.36,1);
}
.final-cta.in h2 .draw::after { right: 0; }
.final-cta .btn { margin-top: 36px; }

/* ====== Footer ====== */
footer.site {
  background: var(--dark-bg); color: var(--surface);
  padding: 80px 0 40px;
  position: relative; overflow: hidden;
}
footer.site .ftr-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
}
footer.site h5 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(248,245,240,0.55); font-weight: 500; margin-bottom: 18px;
}
footer.site .col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer.site .col a {
  color: rgba(248,245,240,0.85);
  font-size: 14px;
  position: relative;
  display: inline-block;
  padding: 2px 0;
}
footer.site .col a::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 0; height: 1px; background: var(--accent);
  transition: width 300ms cubic-bezier(.22,.61,.36,1);
}
footer.site .col a:hover { color: var(--surface); text-decoration: none; }
footer.site .col a:hover::before { width: 10px; }
footer.site .tag-line {
  margin-top: 22px;
  font-family: var(--serif); font-style: italic; font-size: 18px;
  color: rgba(248,245,240,0.7);
}
footer.site .ftr-bottom {
  border-top: 1px solid rgba(248,245,240,0.12);
  margin-top: 64px; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: rgba(248,245,240,0.5); letter-spacing: 0.06em;
}

/* ====== Service page ====== */
.svc-hero { padding: 100px 0 60px; border-bottom: 1px solid var(--border); }
.svc-hero .eyebrow { color: var(--accent); }
.svc-hero h1 { margin-top: 22px; max-width: 900px; }
.svc-hero .lede { margin-top: 24px; font-size: 20px; color: var(--depth); max-width: 720px; line-height: 1.55; }

.svc-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--border);
  margin-top: 56px;
  background: var(--surface);
}
.svc-meta .cell { padding: 22px 24px; border-right: 1px solid var(--border); }
.svc-meta .cell:last-child { border-right: none; }
.svc-meta .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--depth); }
.svc-meta .v { font-family: var(--serif); font-size: 22px; margin-top: 8px; color: var(--text); }

.svc-section { padding: 88px 0; border-bottom: 1px solid var(--border); }
.svc-section h2 { margin-bottom: 28px; max-width: 720px; }
.svc-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.svc-two-col p { color: var(--depth); font-size: 16.5px; line-height: 1.7; max-width: 560px; }
.svc-two-col p + p { margin-top: 16px; }

.included-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 48px; }
.included-list li {
  padding: 18px 0 18px 28px;
  border-top: 1px solid var(--border);
  position: relative;
}
.included-list li::before {
  content: ""; position: absolute; left: 0; top: 26px;
  width: 10px; height: 10px; border: 1.5px solid var(--accent); border-radius: 999px;
}
.included-list li strong { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.included-list li span { color: var(--depth); font-size: 14px; line-height: 1.55; margin-top: 4px; display: block; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.process::before {
  content: ""; position: absolute; left: 0; right: 0; top: 38px; height: 1px;
  background: var(--border); z-index: 0;
}
.process .step { position: relative; padding-right: 24px; z-index: 1; }
.process .step .n {
  font-family: var(--serif); color: var(--accent); font-size: 56px; line-height: 1;
  background: var(--surface); padding-right: 18px; display: inline-block;
}
.process .step h4 { margin-top: 18px; font-size: 21px; }
.process .step p { margin-top: 10px; color: var(--depth); font-size: 14.5px; line-height: 1.55; }

/* ====== Blog index ====== */
.blog-hero { padding: 80px 0 30px; border-bottom: 1px solid var(--border); }
.blog-hero h1 { font-size: clamp(48px, 5vw, 72px); }
.blog-hero p { margin-top: 16px; color: var(--depth); font-size: 18px; max-width: 560px; }

.cat-bar {
  display: flex; gap: 8px; padding: 24px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--depth);
  white-space: nowrap;
  transition: all 200ms ease;
  background: transparent;
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: var(--surface); }

.blog-list { padding: 24px 0 64px; }
.blog-row {
  display: grid; grid-template-columns: 180px 1fr 200px;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: padding 200ms ease;
}
.blog-row:hover { padding-left: 8px; }
.blog-row .date { font-family: var(--mono); font-size: 12px; color: var(--depth); letter-spacing: 0.05em; transition: color 200ms ease; }
.blog-row:hover .date { color: var(--accent); }
.blog-row h3 { font-size: 28px; line-height: 1.15; }
.blog-row h3 a { color: var(--text); }
.blog-row h3 a:hover { color: var(--accent); text-decoration: none; }
.blog-row .excerpt { margin-top: 10px; color: var(--depth); font-size: 15px; line-height: 1.55; max-width: 620px; }
.blog-row .meta-r { font-family: var(--mono); font-size: 11px; color: var(--depth); letter-spacing: 0.06em; text-align: right; }
.blog-row .meta-r .tag { display: inline-block; color: var(--accent); margin-bottom: 6px; }

/* ====== Article ====== */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px var(--gutter) 100px;
  gap: 80px;
  align-items: start;
}
.article {
  max-width: 720px;
}
.article .crumbs { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--depth); }
.article .crumbs a { color: var(--depth); }
.article .crumbs a:hover { color: var(--accent); }
.article h1 { font-size: clamp(38px, 4vw, 56px); margin-top: 18px; line-height: 1.1; }
.article .meta-bar {
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center;
  margin-top: 28px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--depth);
}
.article .meta-bar .tag { color: var(--accent); }
.article .meta-bar .by { font-family: var(--sans); font-size: 13px; letter-spacing: 0; color: var(--text); }

.article .body { margin-top: 36px; font-size: 17px; line-height: 1.78; color: var(--text); }
.article .body p { margin-top: 22px; }
.article .body p:first-child { margin-top: 0; }
.article .body p:first-child::first-line { font-variant: small-caps; letter-spacing: 0.06em; }
.article .body h2 { font-size: 32px; margin-top: 56px; line-height: 1.2; }
.article .body h3 { font-size: 22px; margin-top: 36px; }
.article .body a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 200ms; }
.article .body a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.article .body ul { margin-top: 22px; padding-left: 0; list-style: none; }
.article .body ul li { padding-left: 28px; position: relative; margin-top: 10px; }
.article .body ul li::before { content: ""; position: absolute; left: 0; top: 13px; width: 12px; height: 1px; background: var(--accent); }
.article .body code {
  font-family: var(--mono); font-size: 0.86em;
  background: rgba(122, 46, 53, 0.07); color: var(--accent);
  padding: 2px 6px; border-radius: 3px;
}

.pull {
  margin: 48px 0; padding: 8px 0 8px 28px;
  position: relative;
  font-family: var(--serif); font-style: italic;
  font-size: 26px; line-height: 1.4;
  color: var(--text);
  max-width: 640px;
}
.pull::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
  height: 0;
  transition: height 1200ms cubic-bezier(.22,.61,.36,1);
}
.pull.in::before { height: 100%; }
.pull cite { display: block; font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--depth); margin-top: 14px; letter-spacing: 0.06em; }

/* Sidebar */
.article-side {
  position: sticky; top: 90px;
  align-self: start;
}
.viz-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 22px 24px;
  border-radius: 6px;
}
.viz-card .id { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--depth); }
.viz-card h4 { font-size: 18px; margin-top: 6px; line-height: 1.2; }
.viz-card .desc { font-size: 12.5px; color: var(--depth); margin-top: 8px; line-height: 1.5; }

.viz-bars { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.viz-bars .row { font-size: 12px; color: var(--text); }
.viz-bars .row .lbl { display: flex; justify-content: space-between; margin-bottom: 6px; font-family: var(--mono); letter-spacing: 0.04em; }
.viz-bars .bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; position: relative; }
.viz-bars .bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1200ms cubic-bezier(.22,.61,.36,1); }

.viz-donut { display: flex; gap: 18px; align-items: center; margin-top: 18px; }
.viz-donut .donut {
  --p: 0; --c: var(--accent);
  width: 110px; height: 110px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--border) 0);
  display: grid; place-items: center; position: relative;
  transition: --p 1400ms cubic-bezier(.22,.61,.36,1);
}
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.viz-donut .donut::before {
  content: ""; position: absolute; inset: 14px; background: var(--surface); border-radius: inherit;
}
.viz-donut .donut .n {
  position: relative; z-index: 1; font-family: var(--serif); font-size: 30px; color: var(--text);
}
.viz-donut .legend { font-size: 12px; color: var(--depth); line-height: 1.5; }
.viz-donut .legend strong { color: var(--text); display: block; font-family: var(--serif); font-size: 16px; font-weight: 600; }

.viz-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 18px; background: var(--border); border: 1px solid var(--border); }
.viz-stats .s { padding: 14px; background: var(--surface); }
.viz-stats .s .n { font-family: var(--serif); font-size: 28px; color: var(--accent); line-height: 1; }
.viz-stats .s .l { font-size: 11px; color: var(--depth); margin-top: 6px; font-family: var(--mono); letter-spacing: 0.04em; }

.viz-checks { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.viz-checks li { padding-left: 22px; position: relative; font-size: 13px; color: var(--text); line-height: 1.45; }
.viz-checks li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border: 1.5px solid var(--accent); border-radius: 2px;
}
.viz-checks li.done::after {
  content: ""; position: absolute; left: 3px; top: 7px;
  width: 6px; height: 3px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.viz-card.hidden { display: none; }

/* ====== Whitepapers ====== */
.wp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.wp-card {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 32px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
  transition: background 220ms ease;
}
.wp-card:hover { background: rgba(122, 46, 53, 0.025); }
.wp-card .id { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--depth); }
.wp-card h3 { font-size: 26px; line-height: 1.18; }
.wp-card .framework {
  font-family: var(--serif); font-style: italic;
  color: var(--accent); font-size: 18px;
  position: relative; align-self: flex-start; padding-bottom: 2px;
}
.wp-card .framework::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent);
  transition: right 380ms cubic-bezier(.22,.61,.36,1);
}
.wp-card:hover .framework::after { right: 0; }
.wp-card .desc { color: var(--depth); font-size: 14.5px; line-height: 1.55; flex: 1; }
.wp-card .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.wp-card .badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; color: var(--depth);
}
.wp-card .row {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.wp-card .dl {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--surface);
  padding: 10px 16px; border-radius: 4px;
  font-size: 13px; font-weight: 500;
  transition: background 220ms ease;
}
.wp-card .dl:hover { background: var(--accent-hover); text-decoration: none; }
.wp-card .dl .arr { transition: transform 360ms cubic-bezier(.22,.61,.36,1); }
.wp-card:hover .dl .arr { transform: translateY(3px); }

/* ====== About ====== */
.about-hero { padding: 110px 0 80px; }
.about-hero .eyebrow { color: var(--accent); }
.about-hero .stmt { font-size: clamp(28px, 3vw, 40px); font-family: var(--serif); line-height: 1.25; max-width: 920px; margin-top: 24px; }
.about-hero .stmt em { color: var(--accent); font-style: normal; }

.about-section { padding: 80px 0; border-top: 1px solid var(--border); }
.about-section .grid { display: grid; grid-template-columns: 280px 1fr; gap: 64px; }
.about-section .grid .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--depth); }
.about-section h2 { font-size: 36px; }
.about-section p { color: var(--depth); font-size: 16.5px; line-height: 1.7; max-width: 620px; margin-top: 18px; }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 32px; }
.principle { border-top: 1px solid var(--border); padding-top: 22px; }
.principle .n { font-family: var(--serif); font-size: 36px; color: var(--accent); line-height: 1; }
.principle h4 { margin-top: 12px; font-size: 20px; }
.principle p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; max-width: 460px; }

/* ====== Contact ====== */
.contact-wrap {
  padding: 110px 0 120px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px;
}
.contact-wrap h1 { font-size: clamp(40px, 4.4vw, 64px); max-width: 540px; }
.contact-wrap .lede { margin-top: 24px; color: var(--depth); font-size: 17px; line-height: 1.6; max-width: 460px; }
.contact-wrap .channels { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.contact-wrap .channels .row { display: flex; gap: 16px; align-items: baseline; }
.contact-wrap .channels .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--depth); width: 90px; flex: 0 0 auto; }
.contact-wrap .channels .v { font-family: var(--serif); font-size: 19px; }

.form { display: flex; flex-direction: column; gap: 28px; }
.form .field { position: relative; padding-top: 18px; }
.form .field label {
  position: absolute; left: 0; top: 22px;
  font-size: 14px; color: var(--depth);
  font-family: var(--sans);
  pointer-events: none;
  transition: all 200ms ease;
}
.form .field input,
.form .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 0 10px;
  font: inherit; font-size: 16px;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
}
.form .field textarea { min-height: 100px; resize: vertical; }
.form .field::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent);
  transition: right 280ms cubic-bezier(.22,.61,.36,1);
}
.form .field:focus-within::after { right: 0; }
.form .field:focus-within label,
.form .field.filled label {
  top: 0;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  font-family: var(--mono);
}
.form .submit { margin-top: 8px; align-self: flex-start; }
.form .hp { position: absolute; left: -9999px; }

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid > .post-card:nth-child(3n) { border-right: 1px solid var(--border); }
  .posts-grid > .post-card:nth-child(2n) { border-right: none; }
  .diffs { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .process::before { display: none; }
  .article-wrap { grid-template-columns: 1fr; gap: 40px; }
  .article-side { display: none; }
  .wp-spotlight { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .contact-wrap { grid-template-columns: 1fr; gap: 56px; }
  .footer-grid, footer.site .ftr-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .blog-row { grid-template-columns: 120px 1fr; }
  .blog-row .meta-r { display: none; }
  .svc-meta { grid-template-columns: repeat(2, 1fr); }
  .svc-meta .cell { border-bottom: 1px solid var(--border); }
  .svc-meta .cell:nth-child(2n) { border-right: none; }
  .included-list { grid-template-columns: 1fr; }
  .about-section .grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  .nav-links { display: none; position: fixed; top: 64px; right: 0; left: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 16px var(--gutter); gap: 4px; margin: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; padding: 8px; }
  .has-dropdown .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0; grid-template-columns: 1fr; }
  .svc-grid, .posts-grid, .wp-grid, .diffs { grid-template-columns: 1fr; }
  .posts-grid > .post-card { border-right: 1px solid var(--border); }
  .process { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 80px; }
  .svc-two-col { grid-template-columns: 1fr; gap: 24px; }
  footer.site .ftr-grid { grid-template-columns: 1fr; }
  footer.site .ftr-bottom { flex-direction: column; gap: 12px; align-items: start; }
}
