/* =========================================================
   The SEO Consultant.ai — Component styles
   Built on the tokens in ../colors_and_type.css.
   ========================================================= */

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.section { padding: var(--space-9) 0; }
.section-tight { padding: var(--space-8) 0; }
.section-paper-2 { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-graphite { background: var(--graphite); color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 234, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-display); font-weight: 500;
  font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.logo .dot { color: var(--signal); }
.logo .ai { font-style: italic; color: var(--signal); font-weight: 500; }

/* ---------- Nav ---------- */
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a {
  font-size: 13.5px; font-weight: 500;
  color: var(--ink-3); text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease-std), border-color var(--dur-fast) var(--ease-std);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--signal); }

/* Dropdown — hover + click-toggle, no hover gap between trigger and menu */
.has-dropdown { position: relative; font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.has-dropdown:hover { color: var(--ink); }
.dropdown-trigger {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  background: none; border: 0; color: inherit;
  font: inherit;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.dropdown-trigger::after {
  content: ""; display: inline-block; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); margin-left: 4px;
  transition: transform var(--dur-fast) var(--ease-std);
}
.has-dropdown:hover .dropdown-trigger::after,
.has-dropdown:focus-within .dropdown-trigger::after,
.has-dropdown.is-open .dropdown-trigger::after { transform: rotate(-135deg) translateY(2px); }

.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 240px;
  background: var(--graphite); color: var(--paper);
  border: 1px solid var(--graphite-3);
  /* Padding-top creates a visual offset without leaving a hover gap — the menu
     sits flush against the trigger so mouse can cross into it without losing hover. */
  padding: 12px 0;
  margin-top: 8px;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-std), visibility 0s var(--dur-fast);
  box-shadow: var(--shadow-2);
}
/* Invisible hover bridge — extends the hover area up to the trigger */
.dropdown-menu::before {
  content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.has-dropdown.is-open .dropdown-menu {
  opacity: 1; pointer-events: auto; visibility: visible;
  transition: opacity var(--dur-fast) var(--ease-std);
}
.dropdown-menu a {
  display: block; padding: 10px 20px;
  color: var(--paper); border-bottom: 0; text-decoration: none;
  font-family: var(--font-display); font-weight: 400; font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--graphite-2); color: var(--signal); }
/* Differentiate the "View all services" item from the vertical sub-pages */
.dropdown-menu a:first-child {
  border-bottom: 1px solid var(--graphite-3);
  padding-bottom: 12px;
  margin-bottom: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  padding: 12px 20px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  transition: background var(--dur-fast) var(--ease-std), color var(--dur-fast) var(--ease-std), border-color var(--dur-fast) var(--ease-std), transform var(--dur-fast) var(--ease-std);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-signal { background: var(--signal); color: #fff; }
.btn-signal:hover { background: var(--signal-ink); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero-section { padding: 96px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: end; }
.hero-headline {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 6vw, 76px); line-height: 1.02;
  letter-spacing: -0.025em; margin: 0 0 var(--space-6);
  text-wrap: balance;
}
.hero-headline em { font-style: italic; color: var(--signal); }
.hero-lead {
  font-size: var(--fs-lead); line-height: var(--lh-body);
  color: var(--ink-2); max-width: 52ch;
  margin: 0 0 var(--space-7);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-aside {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
}
.hero-aside-body {
  font-family: var(--font-display); font-size: 22px;
  line-height: 1.3; letter-spacing: -0.01em;
  margin: 10px 0 14px;
}
.hero-aside-body strong { font-weight: 500; }
.hero-aside-link {
  font-size: 13px; color: var(--signal);
  display: inline-flex; align-items: center; gap: 6px;
}

/* ---------- Eyebrow (extra helpers) ---------- */
.eyebrow-block { margin-bottom: var(--space-2); }
.eyebrow-link {
  color: var(--signal);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-std);
}
.eyebrow-link:hover {
  color: var(--signal-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Section header ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: var(--space-7);
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  margin: var(--space-2) 0 0; letter-spacing: -0.02em;
}
.section-head-link { font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.service-card {
  background: var(--paper);
  padding: 32px 28px;
  min-height: 200px;
  transition: background var(--dur-std) var(--ease-std);
}
.service-card:hover { background: var(--paper-2); }
.service-card .icon { color: var(--ink-3); margin-bottom: 16px; }
.service-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; margin: 0 0 8px; letter-spacing: -0.01em;
}
.service-card p {
  font-size: 14.5px; line-height: 1.55;
  color: var(--ink-2); margin: 0 0 16px; max-width: 50ch;
}
.service-card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }

/* ---------- Stat strip ---------- */
.stat-strip { padding: 72px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px; }
.stat-num {
  font-family: var(--font-display); font-weight: 500;
  font-size: 40px; letter-spacing: -0.02em;
  color: var(--signal); line-height: 1;
}
.stat-label { font-size: 13px; line-height: 1.5; color: #C9CCCF; margin-top: 10px; max-width: 26ch; }

/* ---------- Tool card ---------- */
.tool-card-grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: 56px; align-items: center;
}
.tool-card-grid-reverse { grid-template-columns: 1.1fr 1fr; }
.tool-card-grid-reverse > :first-child { order: 1; }
.tool-card-grid-reverse > :last-child  { order: 2; }
.tool-terminal {
  background: var(--graphite); color: var(--paper);
  padding: 24px; border-radius: var(--r-3);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65;
}
.tool-terminal .comment { color: #8A8E93; }
.tool-terminal .row { display: flex; gap: 10px; }
.tool-terminal .score-high { color: #6FB88E; }
.tool-terminal .score-mid  { color: #E0B56F; }
.tool-terminal .score-low  { color: #E08080; }

/* ---------- Product preview (SaaS screenshot frame) ---------- */
.product-preview {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.product-preview img {
  display: block; width: 100%; height: auto;
  background: var(--paper-2);
}
.product-preview figcaption {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); padding: 10px 14px;
  border-top: 1px solid var(--rule);
  letter-spacing: 0.02em;
}

/* ---------- Journal / blog cards ---------- */
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.journal-card { padding-top: 24px; border-top: 1px solid var(--rule); }
.journal-meta {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4);
  margin-bottom: 16px;
  display: flex; justify-content: space-between;
}
.journal-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; line-height: 1.22;
  margin: 0 0 12px; letter-spacing: -0.01em;
}
.journal-card h3 a { color: var(--ink); text-decoration: none; }
.journal-card h3 a:hover { color: var(--signal); }
.journal-card p { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 0; }

/* ---------- CTA ---------- */
.cta-section { padding: 120px 0; text-align: center; }
.cta-quote {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 3.8vw, 52px); line-height: 1.1;
  letter-spacing: -0.02em; margin: 0;
  text-wrap: balance;
}
.cta-quote em { color: var(--signal); font-style: italic; }
.cta-attr { font-size: 14px; color: var(--ink-3); margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 48px 0;
  background: var(--paper);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col h4 {
  font-family: var(--font-body); font-weight: 500;
  font-size: var(--fs-meta); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 12px;
}
.footer-col a {
  display: block;
  font-size: 13px; color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0;
}
.footer-col a:hover { color: var(--signal); }
.footer-blurb { font-size: 13px; line-height: 1.55; color: var(--ink-3); margin-top: 14px; max-width: 32ch; }
.footer-legal {
  max-width: 1180px; margin: 40px auto 0; padding: 24px 32px 0;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4);
}

/* ---------- Blog index ---------- */
.blog-index-header {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.blog-index-header h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 5vw, 64px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 8px 0 0;
}
.blog-list { padding: 48px 0 96px; }
.blog-item {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 32px; align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  transition: background var(--dur-fast) var(--ease-std);
}
.blog-item:hover { background: var(--paper-2); }
.blog-thumb {
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: block;
}
.blog-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-std) var(--ease-out);
}
.blog-item:hover .blog-thumb img { transform: scale(1.03); }
.blog-item-body {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 2px;
}
.blog-item-meta {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); letter-spacing: 0.04em;
  text-transform: uppercase;
}
.blog-item-meta .cat { color: var(--signal); }
.blog-item h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 26px; line-height: 1.22; letter-spacing: -0.01em;
  margin: 4px 0 0;
  text-wrap: balance;
}
.blog-item h2 a { color: var(--ink); text-decoration: none; }
.blog-item:hover h2 a { color: var(--signal); }
.blog-item .excerpt { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); margin: 6px 0 0; max-width: 68ch; }

/* ---------- Blog post ---------- */
/* Two-column reading layout: main article column + sticky right rail.
   The .post-main cell IS the reading column — post-header, post-body, and
   post-footer all live inside it. Rail runs alongside the whole flow. */
.post-layout {
  max-width: clamp(1000px, 90vw, 1280px);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 72px;
  align-items: start;
}
.post-main { min-width: 0; }

/* Single-column wrapper used by non-blog long-form pages (privacy, AEO, etc.) */
.post-column {
  max-width: clamp(720px, 62vw, 960px);
  margin: 0 auto;
  padding: 0 40px;
}

/* Right rail */
.post-rail {
  position: sticky; top: 32px;
  display: flex; flex-direction: column; gap: 20px;
  padding-top: 112px; /* aligns rail start roughly with post-header top padding */
}
.rail-module {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 20px;
}
.rail-module.rail-graphite {
  background: var(--graphite); color: var(--paper);
  border-color: var(--graphite-3);
}
.rail-module .eyebrow { margin-bottom: 10px; color: var(--ink-4); }
.rail-module.rail-graphite .eyebrow { color: #8A8E93; }
.rail-module h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 18px; letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.rail-module.rail-graphite h3 { color: var(--paper); }
.rail-module p {
  font-size: 13.5px; line-height: 1.55;
  color: var(--ink-2); margin: 0 0 14px;
}
.rail-module.rail-graphite p { color: #C9CCCF; }
.rail-module a.rail-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-weight: 500; font-size: 13px;
  color: var(--signal); text-decoration: none;
  text-underline-offset: 3px;
}
.rail-module a.rail-cta:hover { color: var(--signal-ink); text-decoration: underline; }
.rail-module.rail-graphite a.rail-cta { color: #7FA8FF; }
.rail-module.rail-graphite a.rail-cta:hover { color: var(--paper); }

/* Author rail-module: horizontal avatar + text */
.rail-author { display: flex; flex-direction: column; gap: 12px; }
.rail-author .author-row { display: flex; align-items: center; gap: 14px; }
.rail-author .author-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--rule);
  object-fit: cover;
  background: var(--paper-2);
  filter: saturate(0.95);
}
.rail-author .author-name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; letter-spacing: -0.01em;
  margin: 0; color: var(--ink);
}
.rail-author .author-role {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 2px;
}

/* ---------- Fan-Out tool screenshots ---------- */
.fan-out-shot {
  margin: 32px 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 0;
  overflow: hidden;
}
.fan-out-shot img { display: block; width: 100%; height: auto; background: var(--paper); }
.fan-out-shot figcaption {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4);
  padding: 10px 14px; border-top: 1px solid var(--rule); letter-spacing: 0.02em;
}

/* ---------- Tool embed (iframes on ai-seo-tools page) ---------- */
.tool-embed {
  margin: 32px 0 40px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 0;
  overflow: hidden;
}
.tool-embed iframe {
  display: block; width: 100%; height: 760px; border: 0; background: var(--paper);
}
.tool-embed figcaption {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); padding: 10px 14px;
  border-top: 1px solid var(--rule); letter-spacing: 0.02em;
}
.tool-embed figcaption a { color: var(--signal); }

/* Post-body h4 for deeper nesting on tool docs */
.post-body h4 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 18px; color: var(--ink);
  margin-top: 32px; margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.post-body hr {
  border: 0; border-top: 1px solid var(--rule);
  margin: 56px 0;
}

/* ---------- TL;DR block (blog posts) ---------- */
.tldr {
  background: var(--paper-2);
  border-left: 2px solid var(--signal);
  padding: 20px 24px;
  margin: 0 0 48px;
  max-width: none;
}
.tldr .eyebrow { margin-bottom: 8px; color: var(--ink-3); }
.tldr p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.tldr a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Category filter bar ---------- */
.cat-filter {
  display: flex; flex-wrap: wrap;
  column-gap: 28px; row-gap: 4px;
  padding: 0 0 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.cat-filter a {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease-std), border-color var(--dur-fast) var(--ease-std);
}
.cat-filter a:hover { color: var(--ink); }
.cat-filter a.is-active {
  color: var(--signal);
  border-bottom-color: var(--signal);
  font-weight: 600;
}

/* Make category label on each blog-item clickable */
.blog-item-meta a.cat {
  color: var(--signal);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-std);
}
.blog-item-meta a.cat:hover {
  color: var(--signal-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-header { padding: 112px 0 56px; }
.post-header .eyebrow { margin-bottom: 16px; }
.post-header h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 28px; text-wrap: balance;
}
.post-meta {
  display: flex; gap: 24px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-4); letter-spacing: 0.02em;
}
.post-body {
  font-size: 18px; line-height: 1.7; color: var(--ink-2);
  /* Default (standalone static pages): self-constrained reading column */
  max-width: clamp(720px, 62vw, 960px);
  margin-left: auto; margin-right: auto;
  padding: 48px 40px 80px;
}
/* Inside the two-column blog post layout, let post-body fill its grid cell instead */
.post-layout .post-body {
  max-width: none;
  margin: 0;
  padding: 48px 0 80px;
}
.post-body h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 2.8vw, 36px);
  letter-spacing: -0.01em; color: var(--ink);
  margin-top: 64px; margin-bottom: 24px;
  line-height: 1.15; text-wrap: balance;
}
.post-body h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; color: var(--ink);
  margin-top: 44px; margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.post-body p { margin-top: 0; margin-bottom: 22px; text-wrap: pretty; }
.post-body ul, .post-body ol { margin-top: 0; margin-bottom: 26px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body li strong { color: var(--ink); }
.post-body a:not(.btn) { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:not(.btn):hover { color: var(--signal-ink); }
.post-body figure {
  margin: 40px 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 0;
}
.post-body figure img { display: block; width: 100%; height: auto; }
.post-body figcaption {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); padding: 10px 14px;
  border-top: 1px solid var(--rule); text-align: center;
  max-width: none;
}
.post-body blockquote {
  border-left: 2px solid var(--signal);
  padding: 0 0 0 24px;
  font-family: var(--font-display); font-style: italic;
  font-size: 22px; line-height: 1.4;
  color: var(--ink);
  margin: 40px auto;
}

.post-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
}
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3); text-decoration: none;
  letter-spacing: 0.02em;
}
.back-link:hover { color: var(--signal); }

/* ---------- About page ---------- */
.about-hero { padding: 96px 0 48px; }
.about-hero .container { display: grid; grid-template-columns: 240px 1fr 280px; gap: 48px; align-items: end; }
.about-portrait {
  margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  align-self: end;
}
.about-portrait img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  filter: saturate(0.95);
}
.about-portrait figcaption {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.about-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 5vw, 72px); line-height: 1.02;
  letter-spacing: -0.025em; margin: 8px 0 24px;
  text-wrap: balance;
}
.about-hero h1 em { font-style: italic; color: var(--signal); }
.about-hero .lead { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.about-sidecard {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 24px;
}
.about-sidecard dt {
  font-family: var(--font-body); font-weight: 500;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 4px;
}
.about-sidecard dd {
  font-family: var(--font-display); font-size: 18px;
  letter-spacing: -0.01em; color: var(--ink);
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.about-sidecard dd:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.about-body {
  padding: 64px 0 112px;
  border-top: 1px solid var(--rule);
}
.about-body .container { max-width: clamp(720px, 62vw, 960px); }
.about-body h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 2.8vw, 36px);
  letter-spacing: -0.01em;
  margin: 64px 0 24px;
  text-wrap: balance;
}
.about-body h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; letter-spacing: -0.01em;
  margin: 48px 0 14px;
}
.about-body p { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 24px; }
.about-body a:not(.btn) { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.about-body a:not(.btn):hover { color: var(--signal-ink); }

/* ---------- Service page ---------- */
.service-hero {
  padding: 88px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.service-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.04; letter-spacing: -0.025em;
  margin: 12px 0 24px; max-width: 18ch;
  text-wrap: balance;
}
.service-hero .lead {
  font-size: 20px; line-height: 1.5;
  color: var(--ink-2); max-width: 58ch;
}
.service-hero .actions { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }

.service-intro {
  padding: 72px 0;
}
.service-intro .container { max-width: clamp(720px, 62vw, 960px); }
.service-intro p { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 24px; }
.service-intro h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 2.8vw, 36px);
  letter-spacing: -0.01em;
  margin: 56px 0 24px;
  text-wrap: balance;
}
.service-intro figure {
  margin: 48px 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.service-intro figcaption {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-4); padding: 10px 14px;
  border-top: 1px solid var(--rule);
}

.service-checklist {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 72px 0;
}
.checklist-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.checklist-item {
  background: var(--paper);
  padding: 28px 24px;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin: -1px 0 0 -1px;
}
.checklist-item .num {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--signal); letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.checklist-item h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 20px; letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.checklist-item p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }

/* ---------- Contact page ---------- */
.contact-body { padding: 48px 0 112px; }
.contact-grid {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 56px; align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--ink-2); letter-spacing: 0;
}
.form-row label .req { color: var(--signal); font-weight: 400; }
.form-row label .opt {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: 0.08em; text-transform: uppercase;
  margin-left: 6px;
}
.contact-form input, .contact-form textarea {
  font: inherit;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 12px 14px;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-std);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form button[type="submit"] { align-self: flex-start; }
.form-note { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }

.contact-aside {
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
/* Honeypot field — hidden from both sight and accessibility tree */
.honeypot {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}
/* Error banner (shown via ?error=1 query param) */
.contact-error {
  border-left: 2px solid var(--score-low);
  background: var(--score-low-wash);
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 14px; line-height: 1.5; color: var(--ink);
}
.contact-error a { color: var(--signal); }
/* Big editorial email link (used if contact form is ever replaced with email-only) */
.contact-direct { display: flex; flex-direction: column; gap: 12px; }
.email-link {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.01em;
  color: var(--signal); text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding: 8px 0 12px;
  align-self: flex-start;
}
.email-link:hover { color: var(--signal-ink); border-bottom-color: var(--signal); }
.contact-item .eyebrow { margin-bottom: 4px; }
.contact-item p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.contact-item a { color: var(--signal); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Clients strip ---------- */
.clients-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 72px 0;
}
.clients-logos {
  margin: 0;
  padding: 16px 0;
  display: flex; justify-content: center;
}
.clients-logos img {
  max-width: 100%; height: auto;
  width: 980px;
  /* Unify the warm-paper palette: desaturate the WP-export logo sheet */
  filter: grayscale(1) contrast(0.92) brightness(0.98);
  mix-blend-mode: multiply;
  opacity: 0.88;
}

/* ---------- Inline bits ---------- */
.signal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.rule-hair { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-aside { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .tool-card-grid { grid-template-columns: 1fr; gap: 32px; }
  .journal-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-hero .container { grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
  .about-hero .about-sidecard { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .blog-item { grid-template-columns: 120px 1fr; gap: 20px; }
  .blog-item h2 { font-size: 20px; }
  .post-layout { grid-template-columns: 1fr; column-gap: 0; max-width: 860px; }
  .post-rail { position: static; padding-top: 32px; border-top: 1px solid var(--rule); margin-top: 32px; }
  .checklist-grid { grid-template-columns: 1fr; }
}

/* Hamburger button — hidden on desktop (base), shown via media query below */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin-left: auto;
  cursor: pointer;
  width: 44px;
  height: 44px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-2, #2A2E34);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

@media (max-width: 720px) {
  .container, .container-narrow, .header-inner, .footer-legal { padding-left: 20px; padding-right: 20px; }
  .hero-section { padding: 56px 0 48px; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 72px 0; }
  .about-hero .container { grid-template-columns: 1fr; }

  /* Mobile nav: hide desktop links, show hamburger */
  .site-header { position: relative; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper-1, #F7F2E7); border-top: 1px solid var(--rule, rgba(0,0,0,0.08)); box-shadow: 0 16px 32px rgba(0,0,0,0.08); padding: 12px 20px 20px; z-index: 100; }
  .site-header.is-open .site-nav { display: flex; }
  .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav > a, .site-nav .has-dropdown { padding: 12px 0; border-bottom: 1px solid var(--rule, rgba(0,0,0,0.06)); }
  .site-nav > a:last-child { border-bottom: 0; }
  .has-dropdown { display: flex; flex-direction: column; }
  .dropdown-trigger { text-align: left; padding: 0; background: none; border: 0; font-weight: 600; color: var(--ink-2); font-family: inherit; font-size: inherit; cursor: default; letter-spacing: inherit; }
  .dropdown-trigger::after { display: none; }
  .dropdown-menu { position: static; display: flex !important; flex-direction: column; background: none; box-shadow: none; border: 0; padding: 8px 0 0 16px; margin: 0; opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .dropdown-menu a { padding: 8px 0; border-bottom: 0; color: var(--ink-2); font-family: inherit; font-weight: 400; font-size: 14px; white-space: normal; }
  .dropdown-menu a:first-child { border-bottom: 0; padding-bottom: 8px; margin-bottom: 0; font-weight: 600; }
  .dropdown-menu a:hover { background: none; color: var(--signal-ink); }
}


/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 20px 0 0; font-size: 13px; color: var(--ink-3); letter-spacing: 0.01em; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 10px; color: var(--ink-4); }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink-2); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }

/* ---------- Pull-quote ---------- */
.pull-quote {
  margin: 48px 0;
  padding: 28px 32px;
  border-left: 4px solid var(--signal);
  background: var(--signal-wash);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.35;
  color: var(--ink-2);
  letter-spacing: -0.01em;
  border-radius: 0 6px 6px 0;
  font-weight: 500;
}
.pull-quote p { margin: 0; }
.pull-quote cite { display: block; margin-top: 14px; font-family: var(--font-sans, system-ui); font-size: 13px; color: var(--ink-3); font-style: normal; letter-spacing: 0; }
.pull-quote cite::before { content: "— "; }

/* ---------- Comparison table ---------- */
.compare-table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 15px; line-height: 1.5; }
.compare-table thead th { font-family: var(--font-display); font-weight: 600; color: var(--ink); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; padding: 14px 16px; border-bottom: 2px solid var(--ink-3); }
.compare-table tbody th { font-weight: 600; color: var(--ink-2); width: 24%; min-width: 140px; padding: 14px 16px; vertical-align: top; text-align: left; border-top: 1px solid var(--rule); }
.compare-table tbody td { padding: 14px 16px; vertical-align: top; color: var(--ink-3); border-top: 1px solid var(--rule); }
.compare-table tbody td + td { border-left: 1px solid var(--rule); }
@media (max-width: 720px) {
  .compare-table { font-size: 14px; }
  .compare-table tbody th, .compare-table tbody td { padding: 10px 12px; }
}

/* ---------- TL;DR (styled) ---------- */
aside.tldr { background: var(--signal-wash); border-left: 4px solid var(--signal); padding: 22px 28px; margin: 0 0 40px; border-radius: 0 6px 6px 0; }
aside.tldr .eyebrow { font-size: 11px; letter-spacing: 0.18em; color: var(--signal-ink); font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
aside.tldr p { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 0; font-weight: 450; }

/* ---------- Metric callouts ---------- */
.metric-callout { display: block; padding: 22px 24px; background: var(--paper-2); border-radius: 6px; border: 1px solid var(--rule); }
.metric-callout .num { display: block; font-family: var(--font-display); font-size: clamp(30px, 3.5vw, 44px); font-weight: 500; color: var(--ink); letter-spacing: -0.02em; line-height: 1; margin-bottom: 10px; }
.metric-callout .label { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 32px 0; }

/* ---------- Pills ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.7; vertical-align: middle; }
.pill-high, .pill-green  { background: var(--score-high-wash); color: var(--score-high); }
.pill-mid, .pill-yellow  { background: var(--score-mid-wash);  color: var(--score-mid); }
.pill-low, .pill-red     { background: var(--score-low-wash);  color: var(--score-low); }
.pill-signal, .pill-blue { background: var(--signal-wash);     color: var(--signal-ink); }
.pill-neutral            { background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--rule); }

/* ---------- Case-study expandables (native <details>) ---------- */
details.case-study { border-left: 3px solid var(--ink-4); background: var(--paper-2); padding: 16px 22px; margin: 28px 0; border-radius: 0 4px 4px 0; }
details.case-study summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-size: 17px; }
details.case-study summary::-webkit-details-marker { display: none; }
details.case-study summary::before { content: "▸"; display: inline-block; color: var(--ink-4); transition: transform 0.2s ease; font-size: 14px; }
details.case-study[open] summary::before { transform: rotate(90deg); }
details.case-study[open] summary { margin-bottom: 12px; }
details.case-study[open] > *:not(summary) { margin-top: 0; }
details.case-study p:last-child { margin-bottom: 0; }

/* ---------- Code blocks ---------- */
pre { background: #1E2226; color: #E8E8E8; padding: 18px 22px; border-radius: 6px; overflow-x: auto; margin: 24px 0; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.6; }
pre code { background: transparent; padding: 0; color: inherit; font-family: inherit; font-size: inherit; }
:not(pre) > code { background: var(--paper-3); padding: 2px 6px; border-radius: 4px; font-size: 0.92em; color: var(--ink-2); overflow-wrap: anywhere; word-break: break-word; }

/* ---------- Related posts (cross-linking) ---------- */
.related-posts { margin: 56px 0 24px; }
.related-posts h2 { font-family: var(--font-display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.related-card { display: block; padding: 18px 20px; background: var(--paper-2); border-radius: 6px; text-decoration: none; color: inherit; transition: background 0.15s ease, transform 0.15s ease; }
.related-card:hover { background: var(--paper-3); transform: translateY(-1px); }
.related-eyebrow { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); font-weight: 700; margin-bottom: 8px; }
.related-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--ink); margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
@media (max-width: 720px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
