/* ƐMinds — OBDA consultancy. Architectural, dark-forward, spare. */
:root {
  --bg: #07080a;
  --bg-elev: #0d0f12;
  --bg-panel: #111418;
  --bg-panel-hover: #161a1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8e6e1;
  --text-dim: #8a8780;
  --text-mute: #5c5954;
  --accent: #c4a574;
  --accent-soft: rgba(196, 165, 116, 0.14);
  --danger: #c45c4a;
  --danger-soft: rgba(196, 92, 74, 0.12);
  --ok: #6b9e7a;
  --ok-soft: rgba(107, 158, 122, 0.12);
  --font-display: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

/* ——— Header ——— */
.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  padding: 1.35rem 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0; /* space lives in markup: ƐMinds */
}

.logo .mark {
  color: var(--accent);
  font-weight: 600;
}

.logo .tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-left: 0.55rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line-strong);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav a:hover { color: var(--text); }

/* ——— Hero ——— */
.hero {
  padding: clamp(4.5rem, 12vw, 8.5rem) 0 clamp(4rem, 10vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero h1 {
  font-weight: 500;
  font-size: clamp(2.35rem, 6.2vw, 3.85rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin-bottom: 1.75rem;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 42rem;
  margin-bottom: 2.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.9rem 1.35rem;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--line-strong);
  padding-inline: 1.15rem;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn .arrow { font-size: 0.95em; opacity: 0.7; }

/* ——— Sections ——— */
.section {
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1.1rem;
}

.section h2 {
  font-weight: 500;
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 22ch;
}

.section .intro {
  color: var(--text-dim);
  max-width: 36rem;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* ——— Comparison ——— */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 780px) {
  .compare { grid-template-columns: 1fr; }
}

.compare-col {
  background: var(--bg-elev);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compare-col.obda {
  background: linear-gradient(165deg, #10140f 0%, var(--bg-elev) 55%);
}

.compare-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.compare-head .kind {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare-col.llm .kind { color: var(--danger); }
.compare-col.obda .kind { color: var(--ok); }

.compare-head h3 {
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.metric-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.metric:last-child { border-bottom: none; }

.metric .label {
  font-size: 0.8rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

.metric .value {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-align: right;
}

.compare-col.llm .value { color: var(--danger); }
.compare-col.obda .value { color: var(--ok); }

.loop-steps {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.loop-step {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.loop-step .n {
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.compare-col.obda .loop-step .n {
  border-color: rgba(107, 158, 122, 0.35);
  color: var(--ok);
}

/* ——— Tripartite ——— */
.engine-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 680px) {
  .engine-grid { grid-template-columns: 1fr; }
}

.engine-card {
  background: var(--bg-panel);
  padding: clamp(1.6rem, 3vw, 2.15rem);
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.engine-card:hover { background: var(--bg-panel-hover); }

.engine-card .idx {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1.35rem;
}

.engine-card h3 {
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.engine-card .role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1.1rem;
}

.engine-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: auto;
}

/* ——— Industries ——— */
.industry-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.industry {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: 1.5rem 2.5rem;
  padding: 1.85rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

@media (max-width: 560px) {
  .industry {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

.industry h3 {
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.industry p {
  color: var(--text-dim);
  font-size: 0.98rem;
  max-width: 38rem;
}

/* ——— Audit ——— */
.audit {
  background:
    linear-gradient(180deg, transparent 0%, rgba(196, 165, 116, 0.03) 100%);
}

.audit-panel {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 780px) {
  .audit-panel { grid-template-columns: 1fr; }
}

.audit-panel h2 {
  max-width: none;
  margin-bottom: 0.85rem;
}

.audit-panel .intro {
  margin-bottom: 1.5rem;
}

.deliverables {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.deliverables li {
  font-size: 0.95rem;
  color: var(--text-dim);
  padding-left: 1.25rem;
  position: relative;
}

.deliverables li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 1px;
  background: var(--accent);
}

.price-box {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.price-box .phase {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.65rem;
}

.price-box .range {
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.price-box .duration {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

.price-box .btn { width: 100%; justify-content: center; }

/* ——— Footer ——— */
.site-footer {
  padding: 2.5rem 0 3rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-mute);
}

.footer-brand {
  letter-spacing: -0.01em;
  color: var(--text-dim);
}

.footer-brand span { color: var(--accent); }

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

.footer-links a {
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.footer-links a:hover { color: var(--text-dim); }

/* ——— Whitepaper stub ——— */
.stub {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.stub h1 {
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.stub p {
  color: var(--text-dim);
  max-width: 32rem;
  margin-bottom: 2rem;
}

/* ——— Progressive / mobile nav ——— */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 1.1rem;
}

.nav-toggle-bars span {
  display: block;
  height: 1px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.site-header.is-open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.site-header.is-open .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
.site-header.is-open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(18rem, 86vw);
    z-index: 40;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    background: var(--bg-elev);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0.22s;
  }

  .site-header.is-open .nav {
    transform: translateX(0);
    visibility: visible;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.85rem;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
  }

  .site-header.is-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open { overflow: hidden; }
}

@media (min-width: 781px) {
  .nav {
    position: static;
    transform: none !important;
    visibility: visible !important;
    flex-direction: row;
    width: auto;
    padding: 0;
    background: transparent;
    border: none;
  }
  .nav-backdrop { display: none !important; }
}

/* ——— Essay long-form ——— */
.essay-hero {
  padding: clamp(3.5rem, 10vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.essay-hero .series {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1.25rem;
}

.essay-hero h1 {
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: 1.5rem;
}

.essay-hero .deck {
  color: var(--text-dim);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
  max-width: 36rem;
}

.essay-meta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.essay-body {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.essay-body .prose {
  max-width: 38rem;
}

.essay-body .prose > * + * {
  margin-top: 1.35rem;
}

.essay-body h2 {
  font-weight: 500;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 3.25rem;
  margin-bottom: 0.15rem;
  max-width: none;
}

.essay-body .prose > h2:first-child { margin-top: 0; }

.essay-body p {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
}

.essay-body strong { color: var(--text); font-weight: 500; }

.essay-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.essay-body ul li {
  color: var(--text-dim);
  padding-left: 1.25rem;
  position: relative;
  font-size: 1.02rem;
  line-height: 1.6;
}

.essay-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.45rem;
  height: 1px;
  background: var(--accent);
}

.essay-figure {
  margin: clamp(2.5rem, 6vw, 4rem) 0;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  overflow-x: auto;
}

.essay-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.essay-figure svg {
  width: 100%;
  min-width: 720px;
  display: block;
}

.essay-pull {
  margin: 2.5rem 0;
  padding: 1.5rem 0 1.5rem 1.25rem;
  border-left: 1px solid var(--accent);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.55;
  letter-spacing: -0.015em;
  max-width: 32rem;
}

.essay-end {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.essay-end .next {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ——— Essays index list ——— */
.essay-index {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  max-width: 38rem;
}

.essay-index-item {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.essay-index-series {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0;
}

.essay-index-title {
  color: var(--accent);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-decoration: none;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.essay-index-title:hover {
  color: #d4b888;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.essay-index-blurb {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0;
  max-width: 34rem;
}
