:root {
  --ink: #f0ede7;
  --paper: #0f0e0c;
  --teal: #1a7a6e;
  --teal-light: #0d2e2b;
  --rule: #2a2825;
  --muted: #9e9890;
  --warn: #d4604f;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
}

/* ── SECTION BACKGROUNDS & SPACING ── */
.section-lede,
.section-problem,
.section-engagement,
.section-outcome,
.section-thinking,
.section-contact {
  padding: 56px 0;
}

.section-engagement { background: #141311; }
.section-outcome    { background: rgba(26,122,110,0.04); }

.inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ── HEADER ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 20px;
  margin-bottom: 48px;
}

.header-left .wordmark {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2px;
}

.header-left .tagline {
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.header-right {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

/* ── LEDE ── */
.lede {
  margin-bottom: 52px;
}

.lede-rule {
  width: 32px;
  height: 2px;
  background: var(--teal);
  margin-bottom: 20px;
}

.lede h1 {
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.lede h1 em {
  font-style: italic;
  color: var(--teal);
}

.lede .sub,
.lede .byline,
.problem-block p,
.root-cause,
.engagement-sub,
.not-for-text,
.section-thinking .sub,
.cta-left p {
  text-align: justify;
}

.lede .sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
}

.lede .byline {
  margin-top: 1.25rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--warn);
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}

/* ── RULE ── */
hr.thin {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 44px 0;
}

/* ── PROBLEM BLOCK ── */
.problem-block {
  margin-bottom: 52px;
}

.problem-block h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.problem-block p {
  font-size: 0.985rem;
  color: var(--muted);
}

.root-cause {
  margin-top: 24px;
  padding: 20px 24px;
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  background: var(--teal-light);
  font-size: 0.985rem;
}

.root-cause strong {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}

/* ── ICP BOX ── */
.icp-box {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
}

.icp-list {
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.85;
}

.icp-list li::before {
  content: "– ";
  color: var(--teal);
}

/* ── ENGAGEMENT HEADING ── */
.engagement-heading {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.engagement-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 28px;
}

/* ── PHASE FLOW (horizontal two-card layout) ── */
.phase-flow {
  display: flex;
  align-items: stretch;
  margin-top: 24px;
  margin-bottom: 16px;
}

.phase-card {
  flex: 1;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phase-card-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--rule);
  background: #1a1916;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.phase-card:first-child .phase-card-header {
  background: var(--teal-light);
}

.phase-card-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -0.02em;
}

.phase-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  padding-right: 80px;
}

.phase-card-tag {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.phase-card-tag.neutral {
  color: var(--muted);
  border-color: var(--rule);
}

.phase-card-body {
  padding: 18px 22px;
  flex: 1;
}

.phase-card-footer {
  padding: 10px 22px;
  border-top: 1px solid var(--rule);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── PHASE CONNECTOR (horizontal dotted arrow) ── */
.phase-connector-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 68px;
  flex-shrink: 0;
  gap: 8px;
  padding: 0 6px;
}

.phase-connector-h-label {
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
  opacity: 0.7;
}

.phase-connector-h-line {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

.phase-connector-h-line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 14px;
  border-top: 1px dashed rgba(158,152,144,0.45);
  top: 50%;
}

.phase-connector-h-arrow {
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* ── PHASE BULLET ITEMS (shared) ── */
.phase-block-items {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.phase-block-item {
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.phase-block-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ── NOT FOR ── */
.not-for {
  margin-top: 16px;
  padding: 16px 20px;
  background: #1a1916;
  border-left: 2px solid var(--rule);
  border-radius: 0 6px 6px 0;
}

.icp-label,
.not-for-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 6px;
}

.not-for-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── TRANSFORMATION TABLE ── */
.transform-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 52px;
  font-size: 0.9rem;
}

.transform-table thead tr {
  border-bottom: 2px solid var(--ink);
}

.transform-table thead th {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 0 12px;
  text-align: left;
  color: var(--muted);
  font-weight: 400;
}

.transform-table thead th:last-child {
  color: var(--teal);
}

.transform-table tbody tr {
  border-bottom: 1px solid var(--rule);
}

.transform-table tbody td {
  padding: 14px 0;
  vertical-align: top;
}

.transform-table td:first-child {
  color: var(--muted);
  width: 46%;
  padding-right: 32px;
}

.transform-table td:last-child {
  color: var(--ink);
  font-weight: 700;
  background: rgba(26,122,110,0.05);
}

.transform-table td:last-child::before {
  content: "✓  ";
  color: var(--teal);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
}

/* ── HOW IT WORKS FLOW ── */
.how-it-works {
  margin-top: 24px;
}

.how-it-works-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.flow {
  display: flex;
  align-items: center;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.flow-num {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--teal);
  background: rgba(26,122,110,0.12);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flow-step-label {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.flow-sep {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  padding: 0 12px;
  flex-shrink: 0;
  opacity: 0.4;
}

/* ── ARTICLE LIST ── */
.section-thinking h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-thinking .sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
}

.article-list {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.article-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  opacity: 0.7;
}

.article-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.article-meta {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.article-arrow {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--teal);
  flex-shrink: 0;
}

/* ── CTA ── */
.cta {
  border-top: 2px solid var(--ink);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.cta-left h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.cta-left p {
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-right {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-align: right;
  color: var(--muted);
}

.cta-right .cta-email {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── ARTICLE MODAL ── */
#modal-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--teal);
  border-radius: 8px 8px 0 0;
  transition: width 0.08s ease;
}

.modal-body > p:first-of-type {
  color: var(--ink);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 20px;
}

.modal-endmark {
  text-align: center;
  color: var(--teal);
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  margin-top: 36px;
  opacity: 0.5;
}

.modal-author-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,9,8,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #141311;
  border: 1px solid var(--rule);
  border-radius: 8px;
  max-width: 1080px;
  width: 100%;
  padding: 48px 52px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--ink); }

.modal-meta {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.modal-body h1 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}

.modal-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 8px;
  margin-bottom: 10px;
}

.modal-body blockquote {
  margin: 12px 0 14px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--teal);
  background: var(--teal-light);
  border-radius: 0 4px 4px 0;
  font-size: 0.92rem;
  color: var(--ink);
  font-style: italic;
}

.modal-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 28px 0;
}

.modal-body p {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 14px;
  text-align: justify;
}

.modal-body strong {
  color: var(--ink);
  font-weight: 700;
}

.modal-body ul {
  list-style: none;
  margin: 8px 0 14px 0;
}

.modal-body ul li {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.75;
  padding-left: 16px;
  position: relative;
}

.modal-body ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--teal);
}

/* ── PRINT ── */
@media print {
  body { background: var(--paper); }
  .page { padding: 40px 48px; }
}

/* ── TOP NAV ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,14,12,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 56px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
}

.top-nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.top-nav-logo img {
  height: 32px;
  width: 32px;
  object-fit: cover;
  border-radius: 7px;
}

.top-nav-wordmark,
.top-nav-link,
.top-nav-back {
  font-family: 'DM Mono', monospace;
  font-size: 90%;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}

.top-nav-wordmark {
  display: none;
}

.top-nav-link {
  color: var(--muted);
  position: relative;
  transition: color 0.15s;
}

.top-nav-link:hover {
  color: var(--ink);
}

.top-nav-link.active {
  color: var(--ink);
}

.top-nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--teal);
}

#problem,
#engagement,
#outcome,
#contact {
  scroll-margin-top: 68px;
}

.top-nav-back {
  color: #c9a84c;
  font-family: 'DM Mono', monospace;
  transition: color 0.15s;
}

.top-nav-back:hover {
  color: #f0ede7;
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .top-nav { padding: 0 28px; gap: 16px; }
  .top-nav-link { display: none; }

  .modal-overlay { padding: 24px 16px; }
  .modal-box { padding: 36px 24px; }
  .modal-body h1 { font-size: 1.25rem; }

  .page { padding: 40px 0; }
  .inner { padding: 0 28px; }
  .lede h1 { font-size: 1.85rem; }
  .phase-flow { flex-direction: column; }
  .phase-connector-h { flex-direction: row; width: auto; height: 44px; gap: 12px; padding: 0; }
  .phase-connector-h-label { white-space: nowrap; }
  .phase-connector-h-line { flex: 1; }
  .cta { flex-direction: column; gap: 24px; align-items: flex-start; }
}
