/* ============================================
   AirSelects Essay Dark Stylesheet
   Shared by all essay and workflow pages
   ============================================ */

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

:root {
  --bg-primary: #0d0c0b;
  --bg-secondary: #161514;
  --bg-elevated: #1e1d1b;

  --text-primary: #f5f3f0;
  --text-secondary: #a8a5a0;
  --text-muted: #6b6966;

  --accent: #e8a84c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(245, 241, 232, 0.22);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", -apple-system, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, monospace;
}

/* Grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* Base */
html {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

a { color: inherit; text-decoration: none; }

/* Nav lives in nav.css */

/* ============================================
   ESSAY LAYOUT
   ============================================ */
.essay-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 120px 20px 100px;
  position: relative;
  z-index: 1;
}

.essay-eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.essay-h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

/* ============================================
   ESSAY BODY
   ============================================ */
.essay-body p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.essay-body p:last-child {
  margin-bottom: 0;
}

.essay-body p + p {
  /* handled by margin-bottom on previous p */
}

/* Workflow arc list (essay 4) */
.essay-body .workflow-arc {
  margin: 2rem 0;
  padding: 1.625rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  list-style: none;
}

.essay-body .workflow-arc li {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 1px solid rgba(245, 241, 232, 0.06);
}

.essay-body .workflow-arc li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.essay-body .workflow-arc li:first-child {
  padding-top: 0;
}

/* ============================================
   BACK LINK
   ============================================ */
.essay-back {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  transition: color 0.15s ease;
}

.essay-back:hover {
  color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.essay-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 20px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ============================================
   WORKFLOW PAGE SPECIFICS
   ============================================ */
.wf-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.wf-hero {
  padding: 140px 0 80px;
  position: relative;
  z-index: 1;
}

.wf-eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.wf-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 780px;
}

.wf-lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.55;
}

.wf-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.wf-section-head {
  margin-bottom: 2.5rem;
}

.wf-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.625rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.wf-section-head p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 680px;
}

/* Flow steps grid */
.wf-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.wf-flow-step {
  min-height: 178px;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.02);
}

.wf-flow-step + .wf-flow-step {
  border-left: 1px solid var(--border);
}

.wf-step-num {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.875rem;
}

.wf-flow-step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.625rem;
}

.wf-flow-step p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Product grid */
.wf-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.wf-product {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  padding: 30px;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: border-color 0.15s ease;
}

.wf-product:hover {
  border-color: var(--border-strong);
}

.wf-product--selects {
  border-top: 3px solid #4dd0c8;
}

.wf-product--dam {
  border-top: 3px solid #9ec48a;
}

.wf-product-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.375rem;
}

.wf-product h3 {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.875rem;
}

.wf-product > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.wf-product-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 1.625rem;
}

.wf-product-list li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* Manifesto split */
.wf-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.wf-manifesto {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.125rem);
  font-weight: 400;
  line-height: 1.18;
}

.wf-manifesto span {
  color: #4dd0c8;
}

.wf-large-copy {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Essays grid on workflow page */
.wf-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wf-post {
  min-height: 240px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease;
}

.wf-post:hover {
  border-color: var(--border-strong);
}

.wf-post .wf-step-num {
  margin-bottom: 2.5rem;
}

.wf-post h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.625rem;
}

.wf-post p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ============================================
   ESSAYS INDEX PAGE
   ============================================ */
.essays-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 140px 20px 100px;
  position: relative;
  z-index: 1;
}

.essays-page__eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.essays-page__h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.essays-page__lead {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin-bottom: 3rem;
}

.essays-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.essay-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease;
}

.essay-card:hover {
  border-color: var(--border-strong);
}

.essay-card__label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.essay-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.625rem;
}

.essay-card__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 920px) {
  .wf-flow {
    grid-template-columns: 1fr;
  }
  .wf-flow-step + .wf-flow-step {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .wf-product-grid {
    grid-template-columns: 1fr;
  }
  .wf-split {
    grid-template-columns: 1fr;
  }
  .wf-post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  /* Essay pages */
  .essay-page {
    padding: 96px 20px 64px;
  }

  .essay-h1 {
    font-size: 1.875rem;
    line-height: 1.15;
  }

  .essays-page {
    padding: 96px 20px 64px;
  }

  .essays-grid {
    grid-template-columns: 1fr;
  }

  /* Workflow page */
  .wf-hero {
    padding: 96px 0 24px;
  }

  .wf-h1 {
    font-size: 1.875rem;
    line-height: 1.15;
  }

  .wf-lead {
    font-size: 1rem;
  }

  .wf-section {
    padding: 48px 0;
  }

  .wf-section-head h2 {
    font-size: 1.5rem;
  }

  .wf-manifesto {
    font-size: 1.375rem;
  }

  .wf-product {
    padding: 22px;
  }
}
