/* ========================================================================
   The Pathway Guide — mdevtech Blogs Design System
   Fonts loaded in build.mjs: DM Serif Display, DM Sans, JetBrains Mono
   ======================================================================== */

:root {
  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Light mode palette */
  --paper: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --stone: #78716C;
  --stone-light: #A8A29E;
  --teal: #0F766E;
  --teal-wash: #CCFBF1;
  --teal-glow: rgba(15, 118, 110, 0.06);
  --edge: #E7E5E4;
  --edge-soft: #F5F5F4;

  /* Functional tokens */
  --radius: 8px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.25s var(--ease);
  --content-width: 960px;
  --post-width: 720px;
}

html.dark {
  --paper: #0C0A09;
  --surface: #1C1917;
  --ink: #FAFAF9;
  --stone: #A8A29E;
  --stone-light: #57534E;
  --teal: #2DD4BF;
  --teal-wash: rgba(45, 212, 191, 0.08);
  --teal-glow: rgba(45, 212, 191, 0.05);
  --edge: #292524;
  --edge-soft: #1C1917;
}

/* ── Reset & Base ────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  position: relative;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--edge) 55%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--edge) 50%, transparent) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 46%, color-mix(in srgb, var(--teal) 8%, transparent) 46% 46.5%, transparent 46.5% 100%);
  background-size: 56px 56px, 56px 56px, 420px 420px;
  background-position: center top;
  opacity: 0.32;
  mask-image: linear-gradient(to bottom, black 0%, black 42%, transparent 100%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

html.dark body::before {
  opacity: 0.22;
}

/* ── Typography ──────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--teal-wash);
  color: var(--ink);
}

/* ── Layout Shell ────────────────────────────────────── */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
  min-width: 0;
}

/* ── Site Header ─────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}

/* slight transparency for backdrop blur effect */
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--paper) 85%, transparent);
  }
}

.header-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px var(--teal-glow);
}

.brand span {
  white-space: nowrap;
}

.brand:hover {
  color: var(--teal);
  text-decoration: none;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top-nav {
  display: flex;
  gap: 0.25rem;
}

.top-nav a {
  color: var(--stone);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.top-nav a:hover {
  color: var(--ink);
  background: var(--edge-soft);
  text-decoration: none;
}

/* ── Theme Toggle ────────────────────────────────────── */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--stone);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.theme-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-glow);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }
html.dark .theme-toggle .sun-icon { display: none; }
html.dark .theme-toggle .moon-icon { display: block; }

/* ── Pathway Node Divider (Signature Element) ────────── */

.node-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 0;
}

.node-divider span {
  display: block;
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  position: relative;
  transition: box-shadow 0.4s ease;
}

/* Lines extending from the node */
.node-divider span::before,
.node-divider span::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  width: 48px;
  background: var(--edge);
}

.node-divider span::before {
  right: calc(100% + 8px);
}

.node-divider span::after {
  left: calc(100% + 8px);
}

/* Subtle pulse on scroll-into-view — let CSS handle it with hover on parent sections */
.node-divider:hover span {
  box-shadow: 0 0 0 4px var(--teal-wash);
}

/* ── Hero Section ────────────────────────────────────── */

.hero {
  max-width: 680px;
  padding-bottom: 1rem;
  margin-bottom: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 400; /* DM Serif Display is designed at 400 */
  line-height: 1.15;
  letter-spacing: 0;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.hero > p {
  color: var(--stone);
  font-size: 1.125rem;
  line-height: 1.65;
  margin: 0;
}

.hero-promise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.hero-promise span {
  background: var(--teal-wash);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.hero-note {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--teal-glow);
}

.hero-note strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.hero-note p {
  color: var(--stone);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

html.dark .hero-promise span {
  background: var(--teal-wash);
  color: var(--teal);
}

/* ── Section Heading ─────────────────────────────────── */

.section-heading {
  margin: 0 0 0.5rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.5rem;
}

.section-heading h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* ── Intro Grid (Features) ───────────────────────────── */

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0;
  margin-bottom: 0;
  min-width: 0;
}

.intro-grid article {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 0;
}

.intro-grid article:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 20px var(--teal-glow);
}

.intro-icon-wrapper {
  width: 40px;
  height: 40px;
  background: var(--teal-wash);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

html.dark .intro-icon-wrapper {
  background: var(--teal-wash);
}

.feature-icon {
  color: var(--teal);
}

.intro-grid article h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.intro-grid article p {
  color: var(--stone);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Conversion CTA ──────────────────────────────────── */

.workflow-cta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 10px 30px var(--teal-glow);
}

.workflow-cta h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.workflow-cta p:not(.eyebrow) {
  color: var(--stone);
  margin: 0;
  max-width: 38rem;
}

.workflow-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--teal);
}

.primary-cta {
  background: var(--teal);
  color: white;
}

.primary-cta:hover {
  color: white;
  opacity: 0.9;
}

.secondary-cta {
  color: var(--teal);
  background: transparent;
}

.secondary-cta:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.newsletter-cta.compact {
  margin: 2.5rem 0;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: min(100%, 360px);
}

.newsletter-form input[type="email"] {
  min-height: 42px;
  min-width: min(100%, 220px);
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.65rem 1rem;
  font: inherit;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--teal);
  outline: 2px solid color-mix(in srgb, var(--teal) 22%, transparent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Post Cards Grid ─────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  min-width: 0;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  min-width: 0;
}

.card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--teal-glow);
}

/* ── Card Content ────────────────────────────────────── */

.meta {
  font-family: var(--font-mono);
  color: var(--stone-light);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.25rem 0 0.6rem;
  line-height: 1.35;
}

.card h2 a {
  color: var(--ink);
  transition: color var(--transition);
}

.card h2 a:hover {
  color: var(--teal);
  text-decoration: none;
}

.card > p {
  color: var(--stone);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--edge);
  min-width: 0;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  background: var(--edge-soft);
  color: var(--stone);
  border: 1px solid var(--edge);
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.card-cta {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-cta:hover {
  text-decoration: none;
  transform: translateX(2px);
}

/* ── Blog Post Article ───────────────────────────────── */

.post {
  max-width: var(--post-width);
  margin: 0 auto;
  min-width: 0;
}

.post h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0.5rem 0 1.25rem;
}

.post .meta {
  font-size: 0.8rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--edge);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.breadcrumbs {
  font-family: var(--font-mono);
  color: var(--stone-light);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumbs a {
  color: var(--stone);
}

.breadcrumbs a:hover {
  color: var(--teal);
  text-decoration: none;
}

.breadcrumbs span {
  opacity: 0.4;
}

.lede {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--stone);
  margin-bottom: 2.5rem;
  border-left: 2px solid var(--teal);
  padding-left: 1.25rem;
}

/* Post body content */
.post p, .post li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.post h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--edge);
}

.post h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
}

.post ul, .post ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post li {
  margin-bottom: 0.4rem;
}

/* Inline code */
.post code {
  font-family: var(--font-mono);
  background: var(--edge-soft);
  border: 1px solid var(--edge);
  padding: 0.15rem 0.4rem;
  font-size: 0.85em;
  color: var(--ink);
  border-radius: 4px;
}

/* Code blocks */
.post pre {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: clip;
  margin: 1.75rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post pre code {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.65;
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Tables */
.table-container {
  overflow-x: clip;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  margin: 1.75rem 0;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
  table-layout: fixed;
}

th {
  background: var(--edge-soft);
  color: var(--ink);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--edge);
  font-size: 0.825rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--edge);
  color: var(--stone);
  overflow-wrap: anywhere;
  word-break: break-word;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--teal-glow);
}

/* Blockquotes */
.post blockquote {
  border-left: 2px solid var(--teal);
  background: var(--teal-glow);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post blockquote p {
  margin: 0;
  color: var(--stone);
  font-style: italic;
}

/* ── FAQ Accordion ───────────────────────────────────── */

.faq {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--edge);
}

.faq h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.faq details {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: var(--surface);
  transition: border-color var(--transition);
}

.faq details + details {
  margin-top: 0;
}

.faq summary {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  color: var(--ink);
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  transition: color var(--transition), background var(--transition);
  border-radius: var(--radius);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--teal);
  background: var(--teal-glow);
}

.faq summary::after {
  content: '\25BE';
  font-size: 0.75rem;
  color: var(--stone-light);
  transition: transform 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}

.faq details[open] {
  border-color: var(--teal);
}

.faq details[open] summary {
  border-bottom: 1px solid var(--edge);
  border-radius: var(--radius) var(--radius) 0 0;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
  color: var(--teal);
}

.faq p {
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--stone);
  line-height: 1.65;
}

/* ── Related Posts ────────────────────────────────────── */

.related {
  margin-top: 3.5rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
}

.related h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related li a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--transition);
}

.related li a::before {
  content: '\25CF';
  color: var(--teal);
  font-size: 0.45rem;
  transition: transform var(--transition);
}

.related li a:hover {
  color: var(--teal);
  text-decoration: none;
}

.related li a:hover::before {
  transform: scale(1.5);
}

/* ── Static Pages ────────────────────────────────────── */

.page {
  max-width: var(--post-width);
  margin: 0 auto;
}

.page h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.page p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--stone);
  margin-bottom: 1.5rem;
}

/* ── Site Footer ─────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--edge);
  margin-top: 6rem;
  padding: 3.5rem 0 2.5rem;
  background: var(--surface);
  transition: background var(--transition), border-color var(--transition);
}

.footer-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}

.footer-brand {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex-shrink: 0;
}

.footer-tagline {
  color: var(--stone);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.footer-links-section {
  display: flex;
  gap: 4rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-column h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.footer-column a {
  color: var(--stone);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: var(--teal);
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--content-width);
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.5rem 0;
  border-top: 1px solid var(--edge);
  color: var(--stone-light);
  font-size: 0.8rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

/* ── Responsive: Tablet ──────────────────────────────── */

@media (max-width: 768px) {
  main {
    padding: 2.5rem 1.25rem 4rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .grid {
    gap: 1rem;
  }

  .workflow-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem;
  }

  .workflow-cta-actions,
  .newsletter-form {
    justify-content: flex-start;
  }

  .newsletter-form {
    width: 100%;
  }

  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links-section {
    gap: 3rem;
  }

  .node-divider {
    padding: 2rem 0;
  }
}

/* ── Responsive: Mobile ──────────────────────────────── */

@media (max-width: 600px) {
  .header-container {
    padding: 0.875rem 1rem;
  }

  .brand {
    font-size: 1rem;
  }

  .top-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .hero {
    padding-bottom: 0.5rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero > p {
    font-size: 1rem;
  }

  .hero-promise {
    gap: 0.4rem;
    margin-top: 1.25rem;
  }

  .hero-promise span {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .card {
    padding: 1.35rem 1.25rem;
  }

  .card h2 {
    font-size: 1.1rem;
  }

  .card > p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-top: 0.875rem;
  }

  .card-cta {
    align-self: flex-end;
  }

  .post h1 {
    font-size: 1.75rem;
  }

  .post h2 {
    font-size: 1.3rem;
    margin-top: 2.5rem;
  }

  .post h3 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
  }

  .post p, .post li {
    font-size: 0.975rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
  }

  .lede {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
  }

  .post pre {
    padding: 1.25rem 1rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
  }

  .faq summary {
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
  }

  .faq p {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }

  .related {
    padding: 1.5rem 1.25rem;
  }

  .page h1 {
    font-size: 1.75rem;
  }

  .section-heading h2 {
    font-size: 1.25rem;
  }

  .node-divider {
    padding: 1.5rem 0;
  }

  .node-divider span::before,
  .node-divider span::after {
    width: 32px;
  }
}

@media (max-width: 480px) {
  .footer-links-section {
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
  }

  .header-container {
    gap: 0.5rem;
  }

  .nav-wrapper {
    gap: 0.125rem;
  }

  .top-nav {
    gap: 0.125rem;
  }

  .top-nav a {
    font-size: 0.75rem;
    padding: 0.25rem 0.35rem;
  }

  .theme-toggle {
    margin-left: 0.25rem;
    width: 2rem;
    height: 2rem;
  }
}

/* ── Reduced Motion ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .card:hover {
    transform: none;
  }

  .card-cta:hover {
    transform: none;
  }
}
