/* ============================================
   DTM — Site Styles
   Professional. Restrained. Governance-grade.
   ============================================ */

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

:root {
  --bg:         #0d0d0b;
  --bg2:        #131310;
  --bg3:        #1a1a17;
  --border:     rgba(255,255,255,0.07);
  --border-mid: rgba(255,255,255,0.13);
  --text:       #e8e6df;
  --muted:      #7a7870;
  --dim:        #3d3c39;
  --accent:     #c8a96e;
  --accent-dim: rgba(200,169,110,0.12);
  --green:      #1a3d2e;
  --green-b:    #2a5c44;
  --green-t:    #5ecb98;
  --blue:       #141a36;
  --blue-b:     #222d5c;
  --blue-t:     #7b92e8;
  --blocked:    #3d1a08;
  --blocked-b:  #8a3810;
  --blocked-t:  #e87840;
  --completed-b: #1a4a30;
  --completed-t: #4aaa78;
  --nav-height: 52px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ---------- Nav ---------- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 48px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
  background: rgba(13,13,11,0.94);
  backdrop-filter: blur(12px);
}

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

.nav-left strong {
  color: var(--text);
  font-weight: 500;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.nav-link--active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Main ---------- */

main {
  padding-top: var(--nav-height);
}

/* ---------- Wrap ---------- */

.wrap {
  max-width: 1160px;
  margin: 0 auto;
}

/* ---------- Hero (landing) ---------- */

.hero {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 112px 48px 96px;
  border-bottom: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,169,110,0.2), transparent);
}

/* ---------- Subpage Hero ---------- */

.subpage-hero {
  padding: 80px 48px 64px;
  border-bottom: 0.5px solid var(--border);
  position: relative;
}

.subpage-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,169,110,0.2), transparent);
}

/* ---------- Typography ---------- */

.eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 6vw, 78px);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 800px;
  margin-bottom: 36px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.subpage-hero h1 {
  font-size: clamp(30px, 4.5vw, 56px);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
  font-weight: 300;
}

/* ---------- Section ---------- */

.sec {
  padding: 88px 48px;
  border-bottom: 0.5px solid var(--border);
}

.sec-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--dim);
}

/* ---------- Layout ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ---------- Text components ---------- */

.big-serif {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.25;
  font-weight: 400;
  color: var(--text);
}

.big-serif em {
  font-style: italic;
  color: var(--muted);
}

.body-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  font-weight: 300;
}

.body-text p + p {
  margin-top: 18px;
}

.pull {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--dim);
  border-left: 1px solid var(--border-mid);
  padding-left: 14px;
  line-height: 1.65;
  margin-top: 24px;
}

/* ---------- Layer stack ---------- */

.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 52px 0;
}

.layer {
  border: 0.5px solid;
  border-radius: 5px;
  padding: 22px 26px;
}

.layer.l3 { background: rgba(42,42,42,0.5); border-color: #3a3a38; }
.layer.l2 { background: rgba(20,26,54,0.7); border-color: var(--blue-b); }
.layer.l1 { background: rgba(26,61,46,0.7); border-color: var(--green-b); }

.layer-num {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 3px;
}

.layer-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 3px;
}

.l3 .layer-name { color: #a0a09a; }
.l2 .layer-name { color: var(--blue-t); }
.l1 .layer-name { color: var(--green-t); }

.layer-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 0.5px solid;
}

.l3 .tag { border-color: #3a3a38; color: var(--muted); }
.l2 .tag { border-color: var(--blue-b); color: var(--blue-t); opacity: 0.75; }
.l1 .tag { border-color: var(--green-b); color: var(--green-t); opacity: 0.75; }
.tag.blocked { border-color: var(--blocked-b); color: var(--blocked-t); }
.tag.done    { border-color: var(--completed-b); color: var(--completed-t); }

.connector {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 22px;
  position: relative;
}

.connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0.5px;
  height: 100%;
  background: var(--border-mid);
}

.arrow {
  width: 5px;
  height: 5px;
  border-right: 0.5px solid var(--border-mid);
  border-bottom: 0.5px solid var(--border-mid);
  transform: rotate(45deg);
  position: relative;
  z-index: 1;
  margin-bottom: 1px;
}

/* ---------- Grid 3 ---------- */

.grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 52px;
}

.grid3-item {
  background: var(--bg2);
  padding: 28px 24px;
}

.grid3-num {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 10px;
}

.grid3-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
}

.grid3-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 300;
}

/* ---------- Grid 2 ---------- */

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.grid2-item {
  background: var(--bg2);
  padding: 32px 28px;
}

.grid2-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.grid2-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
  font-weight: 300;
}

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

/* ---------- Kanban strip ---------- */

.kanban-strip {
  display: flex;
  gap: 8px;
  margin-top: 44px;
}

.lane {
  flex: 1;
  background: var(--bg3);
  border: 0.5px solid var(--border-mid);
  border-radius: 5px;
  padding: 16px 14px;
}

.lane-header {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--border);
}

.lane-header.running  { color: var(--muted); }
.lane-header.blocked  { color: var(--blocked-t); }
.lane-header.done     { color: var(--completed-t); }

.kcard {
  background: var(--bg2);
  border: 0.5px solid var(--border-mid);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 11px;
}

.kcard-title {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 3px;
}

.kcard-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--dim);
}

.kcard.is-blocked { background: var(--blocked); border-color: var(--blocked-b); }
.kcard.is-blocked .kcard-title { color: var(--blocked-t); }
.kcard.is-blocked .kcard-sub   { color: rgba(232,120,64,0.5); }

.kcard.is-done    { background: rgba(26,61,46,0.4); border-color: var(--completed-b); }
.kcard.is-done .kcard-title    { color: var(--completed-t); }
.kcard.is-done .kcard-sub      { color: rgba(74,170,120,0.5); }

.gate-note {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--blocked-t);
  border-top: 0.5px solid var(--blocked-b);
  margin-top: 6px;
  padding-top: 8px;
  line-height: 1.5;
}

/* ---------- Assembly row ---------- */

.assembly-row {
  display: flex;
  align-items: stretch;
  gap: 1px;
  margin-top: 44px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.agent {
  flex: 1;
  background: var(--bg2);
  padding: 20px 16px;
  text-align: center;
}

.agent-name {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.agent-role {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 300;
}

.agent-sep {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---------- Hygiene list ---------- */

.hygiene-list {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hygiene-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--border);
}

.hygiene-item:first-child { border-radius: 5px 5px 0 0; overflow: hidden; }
.hygiene-item:last-child  { border-radius: 0 0 5px 5px; overflow: hidden; }

.hygiene-key {
  background: var(--bg3);
  padding: 18px 20px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  border-right: 0.5px solid var(--border);
}

.hygiene-val {
  background: var(--bg2);
  padding: 18px 24px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

.hygiene-val strong {
  color: var(--text);
  font-weight: 500;
}

/* ---------- Closing ---------- */

.closing {
  padding: 112px 48px;
  text-align: center;
  border-bottom: 0.5px solid var(--border);
}

.closing-h {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 400;
  line-height: 1.18;
  color: var(--text);
  max-width: 680px;
  margin: 0 auto 20px;
}

.closing-sub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  max-width: 440px;
  margin: 0 auto;
}

/* ---------- Page cards (landing) ---------- */

.page-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 52px;
}

.page-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  padding: 36px 32px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.page-card:hover {
  background: var(--bg3);
}

.page-card-num {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 16px;
}

.page-card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
}

.page-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 300;
  flex: 1;
  margin-bottom: 20px;
}

.page-card-cta {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.06em;
}

/* ---------- Roadmap list ---------- */

.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 52px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  background: var(--border);
}

.roadmap-item:first-child { border-radius: 5px 5px 0 0; overflow: hidden; }
.roadmap-item:last-child  { border-radius: 0 0 5px 5px; overflow: hidden; }

.roadmap-phase {
  background: var(--bg3);
  padding: 28px 24px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.roadmap-item--active .roadmap-phase {
  color: var(--accent);
}

.roadmap-body {
  background: var(--bg2);
  padding: 28px 32px;
}

.roadmap-body h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.roadmap-body p {
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.75;
}

/* ---------- Footer ---------- */

footer {
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 0.5px solid var(--border);
}

.footer-l {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
}

.footer-l span {
  font-size: 9px;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s ease;
}

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

/* ============================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================ */

@media (max-width: 768px) {

  nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13,13,11,0.98);
    border-bottom: 0.5px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links--open {
    display: flex;
  }

  .nav-links a {
    font-size: 12px;
    padding: 4px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 80px 20px 64px;
    min-height: 70vh;
  }

  .subpage-hero {
    padding: 60px 20px 48px;
  }

  .sec {
    padding: 64px 20px;
  }

  .wrap {
    padding: 0 20px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

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

  .page-cards {
    grid-template-columns: 1fr;
  }

  .kanban-strip {
    flex-direction: column;
  }

  .assembly-row {
    flex-direction: column;
  }

  .agent-sep {
    width: auto;
    height: 1px;
  }

  .hygiene-item {
    grid-template-columns: 1fr;
  }

  .hygiene-key {
    border-right: none;
    border-bottom: 0.5px solid var(--border);
  }

  .roadmap-item {
    grid-template-columns: 1fr;
  }

  .roadmap-phase {
    padding: 16px 20px 8px;
  }

  .roadmap-body {
    padding: 8px 20px 24px;
  }

  footer {
    padding: 24px 20px;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .closing {
    padding: 80px 20px;
  }

}
