/* ═══════════════════════════════════════════════════════════
   Folio Landing Page — landing.css
   Design tokens extracted from Folio design system.
   Do not import folio.css — this file is self-contained.
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:              #f5f4f1;
  --surface:         #ffffff;
  --surface-raised:  #faf9f7;
  --border:          #e8e6e1;
  --text:            #1a1916;
  --muted:           #7a7670;
  --accent:          #1a1916;
  --btn-primary-bg:  #1c1917;
  --ok:              #059669;
  --warn:            #d97706;
  --danger:          #dc2626;
  --purple:          #7c3aed;

  /* Radius */
  --radius:    10px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Fluid type */
  --text-xs:   clamp(0.688rem, 0.65rem + 0.2vw,  0.75rem);
  --text-sm:   clamp(0.8rem,   0.77rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.9rem,   0.86rem + 0.2vw,  1rem);
  --text-lg:   clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-xl:   clamp(1.125rem, 1rem    + 0.6vw,  1.375rem);
  --text-2xl:  clamp(1.5rem,   1.25rem + 1.25vw, 2.25rem);
  --text-3xl:  clamp(2.25rem,  1.75rem + 2.5vw,  3.75rem);

  /* Spacing rhythm */
  --section-py:  clamp(4rem, 8vw, 7rem);
  --section-gap: clamp(3rem, 6vw, 5rem);

  /* Layout */
  --nav-h: 60px;
}

/* ── BASE ───────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* ── UTILITIES ──────────────────────────────────────────── */
.mono {
  font-family: 'DM Mono', monospace;
  font-size: 0.9em;
}

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

/* ── WORDMARK ───────────────────────────────────────────── */
.wordmark {
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark:hover { color: var(--text); }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background-color: var(--btn-primary-bg);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.35rem;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.5;
  transition: opacity 0.15s ease;
}
.btn-primary:hover { opacity: 0.82; color: #fff; }

.btn-primary--lg {
  font-size: var(--text-base);
  padding: 0.8rem 1.75rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.35rem;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.5;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

.btn-ghost--lg {
  font-size: var(--text-base);
  padding: 0.8rem 1.75rem;
}

/* ── SECTION LABEL ──────────────────────────────────────── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
  margin-bottom: 1rem;
}

/* ════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════ */
.hero {
  padding: clamp(5rem, 13vw, 10rem) 0 clamp(4rem, 9vw, 8rem);
  background-color: var(--bg);
}

.hero-content { max-width: 700px; }

.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.hero-note {
  font-size: var(--text-xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-note .bi { color: var(--ok); }

/* ════════════════════════════════════════════════════════
   WHO WE WORK WITH
   ════════════════════════════════════════════════════════ */
.who-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.who-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.who-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.who-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}
.who-chip .bi {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════
   HOW IT WORKS — ALTERNATING ROWS
   ════════════════════════════════════════════════════════ */
.how-section {
  padding: var(--section-py) 0;
}

.how-section-header {
  margin-bottom: var(--section-gap);
}
.how-section-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 480px;
}

.feature-row {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: 1px solid var(--border); }

.feature-num {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.feature-text h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: var(--text);
}

.feature-text p {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 460px;
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--text);
}

.feature-list .bi {
  color: var(--ok);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ── Illustration panels ── */
.ill-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  justify-content: center;
}

/* Training illustration */
.ill-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
}
.ill-row .bi { font-size: 1.2rem; }
.ill-row .ill-label {
  flex: 1;
  color: var(--text);
}
.ill-row .ill-label--struck {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}
.ill-row .ill-badge {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 500;
}
.ill-badge--ok  { background: #d1fae5; color: #065f46; }
.ill-badge--warn { background: #fef3c7; color: #92400e; }
.ill-badge--pending { background: var(--border); color: var(--muted); }

/* Machine grid illustration */
.ill-machine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.ill-machine {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
}
.ill-machine .bi { font-size: 1.5rem; }
.ill-machine span { font-size: var(--text-xs); font-weight: 500; color: var(--text); }
.ill-machine--auth .bi   { color: var(--ok); }
.ill-machine--locked .bi { color: var(--danger); }
.ill-machine--warn .bi   { color: var(--warn); }
.ill-machine--pending .bi { color: var(--muted); }

/* Workshop tree illustration */
.ill-org-root {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: var(--btn-primary-bg);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.ill-org-root .bi { font-size: 1rem; }

.ill-org-branches {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ill-branch {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 500;
}
.ill-branch .bi { font-size: 1.1rem; color: var(--muted); }

/* Status illustration header (row 4) */
.ill-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.ill-status-header .mono {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════
   FEATURES GRID
   ════════════════════════════════════════════════════════ */
.feat-section {
  padding: var(--section-py) 0;
  background-color: var(--bg);       /* warm neutral — cards float on this */
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feat-header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.feat-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 480px;
}

.feat-card {
  background: var(--surface);        /* white card on warm section bg */
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}

/* Primary trust pillar — near-black surface, maximum focal contrast */
.feat-card--featured {
  background: var(--btn-primary-bg);   /* #1c1917 — Folio's own primary colour */
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
}
.feat-card--featured .feat-icon {
  font-size: 1.75rem;
  color: rgba(255, 255, 255, 0.85);
}
.feat-card--featured h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.65rem;
  color: #fff;
}
.feat-card--featured p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.58);
}

/* Supporting cards: ghost DM Mono number as typographic backdrop */
.feat-card--numbered {
  position: relative;
  overflow: hidden;
  height: 100%;
}
.feat-card--numbered::before {
  content: attr(data-num);
  position: absolute;
  top: -0.6rem;
  right: -0.25rem;
  font-family: 'DM Mono', monospace;
  font-size: 5.5rem;
  font-weight: 500;
  color: var(--border);          /* very light — ghost, not label */
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.feat-card--numbered .feat-icon,
.feat-card--numbered h3,
.feat-card--numbered p {
  position: relative;
  z-index: 1;
}

.feat-icon {
  display: block;
  font-size: 1.4rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
/* Semantic icon colour variants — purposeful, not decorative */
.feat-icon--ok     { color: var(--ok); }      /* security, verification */
.feat-icon--warn   { color: var(--warn); }    /* compliance, integration */
.feat-icon--purple { color: var(--purple); }  /* versioning, community */

.feat-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.feat-card p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
}

/* ════════════════════════════════════════════════════════
   PRICING
   ════════════════════════════════════════════════════════ */
.pricing-section {
  padding: var(--section-py) 0;
}

.pricing-header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.pricing-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 480px;
  margin-bottom: 0.75rem;
}
.pricing-header p {
  font-size: var(--text-base);
  color: var(--muted);
  max-width: 460px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}

.price-card--featured {
  border-color: var(--text);
  border-width: 1.5px;
}

.price-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.price-badge--community { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.price-badge--business  { background: var(--text); color: #fff; }
.price-badge--enterprise { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

.price-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.price-card .price-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.price-amount .price-num {
  font-family: 'DM Mono', monospace;
  font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}
.price-amount .price-per {
  font-size: var(--text-xs);
  color: var(--muted);
}

.price-trial-note {
  font-size: var(--text-xs);
  color: var(--ok);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.price-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.price-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.4;
}
.price-features .bi {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.price-features .bi-check2       { color: var(--ok); }
.price-features .bi-dash          { color: var(--muted); }

.price-cta,
.price-cta--ghost {
  display: block;
  width: 100%;
  text-align: center;
}

/* ════════════════════════════════════════════════════════
   CTA BANNER
   ════════════════════════════════════════════════════════ */
.cta-section {
  padding: var(--section-py) 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
}

.cta-inner { max-width: 520px; }

.cta-inner h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.cta-inner > p {
  font-size: var(--text-base);
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cta-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s ease;
}
.cta-input:focus { border-color: var(--text); }
.cta-input::placeholder { color: var(--muted); }

.cta-note {
  font-size: var(--text-xs);
  color: var(--muted);
}

.cta-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #d1fae5;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.cta-success .bi {
  font-size: 1.1rem;
  color: var(--ok);
  flex-shrink: 0;
}
.cta-success p {
  font-size: var(--text-sm);
  color: #065f46;
  margin: 0;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════
   ANALYTICS TOAST
   ════════════════════════════════════════════════════════ */
.analytics-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(calc(100vw - 2rem), 520px);
}
.analytics-toast__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  font-size: var(--text-sm);
  color: var(--muted);
}
.analytics-toast__inner > .bi-bar-chart-line {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text);
}
.analytics-toast__inner p {
  margin: 0;
  flex: 1;
  line-height: 1.5;
}
.analytics-toast__inner a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.analytics-toast__dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
}
.analytics-toast__dismiss:hover { color: var(--text); }

/* ════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background-color: var(--surface);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-left: auto;
}

/* ════════════════════════════════════════════════════════
   WORKFLOW TIMELINE
   ════════════════════════════════════════════════════════ */
.workflow-section {
  padding: var(--section-py) 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.workflow-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.workflow-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 520px;
  margin-bottom: 0.65rem;
}
.workflow-subhead {
  font-size: var(--text-base);
  color: var(--muted);
  max-width: 480px;
}

/* ── Timeline container ── */
.workflow-timeline {
  display: flex;
  align-items: flex-start;
  position: relative;
}

/* Connecting line drawn behind all markers */
.workflow-timeline::before {
  content: '';
  position: absolute;
  top: 21px;          /* half of 44px marker */
  left: 22px;         /* start at center of first marker */
  right: 22px;        /* end at center of last marker */
  height: 1px;
  background: var(--border);
  z-index: 0;
}

/* ── Individual step ── */
.workflow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* ── Marker circle ── */
.step-marker {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--muted);
  position: relative;
  z-index: 1;               /* sits above the ::before line */
  margin-bottom: 1.25rem;
}

/* ── Final step — success state ── */
.workflow-step--final .step-marker {
  border-color: var(--ok);
  background: #d1fae5;
  color: var(--ok);
}
.workflow-step--final .step-body h3 {
  color: var(--ok);
}

/* ── Step body ── */
.step-body {
  padding: 0 0.75rem;
  max-width: 172px;
}
.step-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.workflow-step h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.workflow-step p {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.55;
}
.workflow-step p em {
  font-style: normal;
  font-weight: 500;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  /* Pricing: 3-col → 2-col — side-by-side comparison still works on tablets */
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-text p { max-width: 100%; }
}

@media (max-width: 639.98px) {
  /* Pricing: 2-col → 1-col — phones get a stacked, focussed view */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-inline: auto;
  }
}

@media (max-width: 767.98px) {
  /* Workflow: flip to vertical timeline */
  .workflow-timeline {
    flex-direction: column;
    gap: 0;
  }
  .workflow-timeline::before {
    top: 22px;
    left: 21px;          /* center of marker */
    right: auto;
    width: 1px;
    height: calc(100% - 44px);
  }
  .workflow-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 1.25rem;
    padding-bottom: 2rem;
  }
  .workflow-step--final { padding-bottom: 0; }
  .step-marker { margin-bottom: 0; }
  .step-body {
    padding: 0;
    max-width: none;
    padding-top: 0.6rem;
  }

  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn-primary--lg,
  .hero-actions .btn-ghost--lg { width: auto; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .footer-copy  { margin-left: 0; }
  .footer-links { flex-wrap: wrap; gap: 0.75rem 1.25rem; }

  .cta-form .btn-primary { width: 100%; text-align: center; }
}

@media (max-width: 575.98px) {
  .ill-machine-grid { grid-template-columns: 1fr 1fr; }
  .ill-org-branches { flex-direction: column; }
  .ill-branch { flex-direction: row; justify-content: flex-start; gap: 0.5rem; }
}

/* ── ACCESSIBILITY ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

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

/* ════════════════════════════════════════════════════════
   SHARED MULTI-PAGE CHROME
   ════════════════════════════════════════════════════════ */

/* Secondary nav links (used across all pages) */
.nav-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: color 0.12s ease, background-color 0.12s ease;
}
.nav-link:hover { color: var(--text); background-color: var(--bg); }
.nav-link--active { color: var(--text); }

/* Page header (blog list, docs index) */
.page-header {
  padding: clamp(5rem, 13vw, 10rem) 0 clamp(4rem, 9vw, 8rem);
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 0.85rem;
}
.page-header p {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
}

/* Category tags */
.category-tag {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
  white-space: nowrap;
}
.category-tag--product      { border-color: var(--ok);     color: var(--ok);     background: #d1fae5; }
.category-tag--guide        { border-color: var(--warn);   color: var(--warn);   background: #fef3c7; }
.category-tag--case-study   { border-color: var(--purple); color: var(--purple); background: #ede9fe; }
.category-tag--engineering  { border-color: var(--border); color: var(--muted);  background: var(--bg); }
.category-tag--highlight    { border-color: #b45309;       color: #92400e;       background: #fef3c7; }

/* Article date / meta */
.article-date {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════
   BLOG LIST PAGE
   ════════════════════════════════════════════════════════ */
.blog-section {
  padding: var(--section-py) 0;
}

/* Featured article */
.article-featured {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2.5rem;
}
.article-featured-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.article-featured h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.article-featured h2 a {
  color: inherit;
  text-decoration: none;
}
.article-featured h2 a:hover { text-decoration: underline; text-decoration-color: var(--border); }
.article-featured p {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 1.25rem;
}

/* Article cards grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.article-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}
.article-card:hover { border-color: var(--muted); color: var(--text); }
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.article-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.article-card p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.1rem;
}
.article-read-more {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
}

@media (max-width: 991.98px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .article-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════
   BLOG POST PAGE
   ════════════════════════════════════════════════════════ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--text); }

.post-header {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.post-header h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 720px;
  margin-bottom: 0;
}

/* Article body prose */
.article-body {
  max-width: 680px;
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--text);
}
.article-body > p:first-child {
  font-size: var(--text-xl);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.article-body p   { margin-bottom: 1.25rem; }
.article-body h2  {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.article-body h3  {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.article-body ul,
.article-body ol  { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li  { margin-bottom: 0.4rem; }
.article-body blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  color: var(--muted);
  font-style: italic;
}
.article-body code {
  font-family: 'DM Mono', monospace;
  font-size: 0.85em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

/* Callout box */
.callout {
  border-left: 2px solid var(--border);
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}
.callout--info { border-left-color: var(--ok); }
.callout--warn { border-left-color: var(--warn); }
.callout p     { margin-bottom: 0; font-size: var(--text-base); color: var(--muted); }
.callout strong { color: var(--text); }

/* Related articles */
.related-section {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
  margin-top: 3rem;
}
.related-section h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 575.98px) {
  .related-articles-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════
   DOCS PAGE
   ════════════════════════════════════════════════════════ */
.docs-page {
  padding: var(--section-py) 0;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  max-height: calc(100vh - var(--nav-h) - 4rem);
  overflow-y: auto;
}
.docs-nav-section  { margin-bottom: 1.75rem; }
.docs-nav-title {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.4rem;
}
.docs-nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.docs-nav-link {
  display: block;
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: color 0.12s ease, background 0.12s ease;
  line-height: 1.4;
}
.docs-nav-link:hover     { color: var(--text); background: var(--bg); }
.docs-nav-link--active   { color: var(--text); font-weight: 500; background: var(--bg); }

/* Mobile nav (select) */
.docs-mobile-nav { display: none; margin-bottom: 2rem; }
.docs-mobile-select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  outline: none;
}
.docs-mobile-select:focus { border-color: var(--text); }

/* Content area */
.docs-content-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.docs-content-header h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.docs-content-header p {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.65;
  max-width: 580px;
}

.docs-section          { margin-bottom: 3.5rem; }
.docs-section h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  padding-top: 1rem;
}
.docs-section h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.docs-section p {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 1rem;
}
.docs-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.docs-section li {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

/* Code blocks */
.docs-section pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'DM Mono', monospace;
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}
.docs-section pre code {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}

/* Responsive YouTube embed */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  margin: 1.75rem 0;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  border-radius: calc(var(--radius) - 1px);
}
.video-caption {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 0.5rem;
  display: block;
}

/* Docs definition / term block */
.docs-term {
  border-left: 2px solid var(--border);
  padding: 0.85rem 1.25rem;
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.85rem;
}
.docs-term dt {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: 0.2rem;
}
.docs-term dd {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Docs: responsive sidebar */
@media (max-width: 991.98px) {
  .docs-layout           { grid-template-columns: 1fr; }
  .docs-sidebar          { display: none; }
  .docs-mobile-nav       { display: block; }
}
