/* ==========================================================================
   Green Across the Board — stylesheet
   Design tokens pulled 1:1 from the original build.
   ========================================================================== */

:root {
  --obsidian: #0A0A0B;
  --ochre: #D4AF37;
  --bone: #F5F5F0;
  --border-1: #2A2A2E;
  --border-2: #3A3A3E;
  --panel: #2A2A2E;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--bone);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font-family: inherit; }

.text-ochre { color: var(--ochre); }
.dim-60 { color: rgba(245,245,240,.6); }
.dim-50 { color: rgba(245,245,240,.5); }
.dim-40 { color: rgba(245,245,240,.4); }
.dim-30 { color: rgba(245,245,240,.3); }
.dim-20 { color: rgba(245,245,240,.2); }

.label-ochre {
  font-size: 10px;
  color: var(--ochre);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.label-ochre-60 {
  display: block;
  font-size: 10px;
  color: rgba(212,175,55,.6);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.label-ochre-faint {
  font-size: 10px;
  color: rgba(212,175,55,.4);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.section-heading {
  font-weight: 700;
  color: var(--bone);
  line-height: 1;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 5vw, 4.5rem);
  margin: 0 0 24px;
}
.section-lead {
  font-size: 14px;
  color: rgba(245,245,240,.6);
  line-height: 1.7;
  margin: 0;
  max-width: 40rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--solid { background: var(--ochre); color: var(--obsidian); }
.btn--solid:hover { background: var(--bone); }
.btn--outline { border-color: var(--ochre); color: var(--ochre); }
.btn--outline:hover { background: var(--ochre); color: var(--obsidian); }

/* ---------- Thread line ---------- */
.thread-line {
  position: fixed;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 40;
  pointer-events: none;
  display: none;
}
@media (min-width: 1024px) { .thread-line { display: block; } }
.thread-line__bar {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--ochre), transparent);
  animation: threadPulse 3s ease-in-out infinite;
}
.thread-line__dot {
  position: absolute;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ochre);
  transform: translateX(-50%);
  animation: dotPulse 2s ease-in-out infinite;
}
.thread-line__dot:nth-child(2) { animation-delay: .5s; }
.thread-line__dot:nth-child(3) { animation-delay: 1s; }
.thread-line__dot:nth-child(4) { animation-delay: 1.5s; }
.thread-line__dot:nth-child(5) { animation-delay: 2s; }

@keyframes threadPulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes dotPulse { 0%, 100% { transform: translateX(-50%) scale(1); opacity: .4; } 50% { transform: translateX(-50%) scale(1.5); opacity: 1; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
@media (min-width: 768px) { .site-header { padding: 16px 48px; } }

.logo { display: flex; align-items: center; gap: 12px; transition: opacity .2s ease; }
.logo:hover { opacity: .8; }
.logo__wordmark {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-size: 11.2px;
  color: var(--bone);
  white-space: nowrap;
}

.sys-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid var(--border-1);
  transition: border-color .2s ease;
}
.sys-status:hover { border-color: var(--ochre); }
.sys-status__label { display: none; font-size: 12px; color: var(--ochre); }
@media (min-width: 768px) { .sys-status__label { display: inline; } }
.sys-status__stack { display: flex; flex-direction: column; gap: 4px; }
.sys-status__agents { font-size: 10px; color: var(--bone); }
.sys-status__load { font-size: 10px; color: var(--ochre); }
.sys-status__pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ochre);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ---------- Nav overlay ---------- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10,10,11,.98);
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 32px;
}
@media (min-width: 768px) { .nav-overlay { padding: 32px 64px; } }
.nav-overlay.is-open { display: flex; }
.nav-overlay__close {
  position: absolute;
  top: 24px; right: 24px;
  font-size: 32px;
  line-height: 1;
  color: var(--bone);
}
.nav-overlay__close:hover { color: var(--ochre); }
.nav-overlay__metrics { margin-bottom: 48px; text-align: right; }
.nav-overlay__metrics p { margin: 0 0 4px; font-size: 12px; color: rgba(245,245,240,.6); }
.nav-overlay__links { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; }
.nav-overlay__links a {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  transition: color .2s ease;
}
.nav-overlay__links a:hover { color: var(--ochre); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--obsidian);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 1024px) { .hero__grid { grid-template-columns: 1fr 1fr; } }

.hero__left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 96px 24px 0;
}
@media (min-width: 768px) { .hero__left { padding-left: 48px; padding-right: 48px; } }
@media (min-width: 1024px) { .hero__left { padding: 0 0 0 80px; } }

.hero__number-wrap { overflow: hidden; }
.hero__number {
  display: block;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  letter-spacing: -0.04em;
  font-size: clamp(8rem, 20vw, 24rem);
  -webkit-text-stroke: 2px var(--ochre);
}
.hero__eyebrow { margin-top: 16px; margin-bottom: 12px; font-size: 13px; }
@media (min-width: 1024px) { .hero__eyebrow { margin-top: 24px; } }
.hero__headline {
  color: var(--bone);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.02em;
  font-size: 18px;
  max-width: 28rem;
  margin: 0;
}
@media (min-width: 768px) { .hero__headline { font-size: 20px; } }
@media (min-width: 1024px) { .hero__headline { font-size: 24px; } }

.hero__ctas { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

.hero__right { position: relative; display: flex; align-items: center; justify-content: center; padding: 24px; }
@media (min-width: 1024px) { .hero__right { justify-content: flex-end; padding-right: 0; } }
.hero__image-wrap {
  position: relative;
  width: 100%;
  max-width: 32rem;
  height: 60vh;
}
@media (min-width: 1024px) { .hero__image-wrap { max-width: none; height: 85vh; } }
.hero__image { width: 100%; height: 100%; object-fit: cover; transition: filter .1s ease; }
.hero__image:hover { filter: contrast(1.1); }
.hero__image-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to left, transparent, transparent, rgba(10,10,11,.6));
}
.hero__readout {
  position: absolute;
  left: 24px; bottom: 24px;
  font-size: 10px;
  color: rgba(212,175,55,.6);
  animation: fadePulse 3s ease-in-out infinite;
}
.hero__readout p { margin: 0 0 4px; }
@keyframes fadePulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

.hero__scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(245,245,240,.4);
  animation: bob 2s ease-in-out infinite;
}
.hero__scroll span { font-size: 10px; letter-spacing: .2em; }
.hero__scroll svg { color: rgba(212,175,55,.6); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Operator profile ---------- */
.profile {
  background: var(--panel);
  padding: 80px 24px;
}
@media (min-width: 768px) { .profile { padding-left: 48px; padding-right: 48px; } }
@media (min-width: 1024px) { .profile { padding: 112px 80px; } }

.profile__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}
@media (min-width: 1024px) { .profile__grid { grid-template-columns: 1fr 1fr; gap: 96px; } }

.profile__heading {
  font-weight: 700;
  color: var(--bone);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0 0 32px;
}
.profile__copy { max-width: 32rem; display: flex; flex-direction: column; gap: 16px; }
.profile__copy p { margin: 0; font-size: 14px; line-height: 1.7; color: rgba(245,245,240,.6); }
.profile__copy p.dim { color: rgba(245,245,240,.5); }

.profile__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stat-card { border: 1px solid var(--border-2); padding: 24px; }
@media (min-width: 1024px) { .stat-card { padding: 32px; } }
.stat-card__value {
  display: block;
  font-weight: 700;
  color: var(--ochre);
  line-height: 1;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 12px;
}
.stat-card__label { font-size: 10px; color: rgba(245,245,240,.4); letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Agent forge ---------- */
.forge { position: relative; background: var(--obsidian); padding: 96px 0; overflow: hidden; }
@media (min-width: 1024px) { .forge { padding: 128px 0; } }
.forge__bg { position: absolute; inset: 0; opacity: .1; }
.forge__bg img { width: 100%; height: 100%; object-fit: cover; }
.forge__inner { position: relative; z-index: 1; padding: 0 24px; }
@media (min-width: 768px) { .forge__inner { padding: 0 48px; } }
@media (min-width: 1024px) { .forge__inner { padding: 0 80px; } }

.forge__intro { margin-bottom: 64px; max-width: 42rem; margin-left: auto; text-align: right; }
@media (min-width: 1024px) { .forge__intro { margin-bottom: 96px; } }

.forge__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(42,42,46,.4);
}
@media (min-width: 768px) { .forge__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .forge__grid { grid-template-columns: 1fr 1fr 1fr; } }

.agent-card {
  background: var(--obsidian);
  border: 1px solid transparent;
  padding: 32px;
  cursor: crosshair;
  transition: background-color .3s ease, border-color .3s ease;
}
@media (min-width: 1024px) { .agent-card { padding: 40px; } }
.agent-card.is-active { background: rgba(212,175,55,.1); border-color: rgba(212,175,55,.3); }
.agent-card--wide { grid-column: span 2 / span 2; }
@media (min-width: 1024px) { .agent-card--wide { grid-column: span 1 / span 1; } }

.agent-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.agent-card__num { font-size: 10px; color: rgba(212,175,55,.6); }
.agent-card__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-1); transition: background-color .2s ease; }
.agent-card.is-active .agent-card__dot { background: var(--ochre); animation: dotBeat 1s ease-in-out infinite; }
@keyframes dotBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.agent-card h3 { font-size: 14px; font-weight: 700; color: var(--bone); letter-spacing: .05em; margin: 0 0 16px; transition: color .2s ease; }
.agent-card:hover h3 { color: var(--ochre); }
.agent-card__desc { font-size: 12px; line-height: 1.7; color: rgba(245,245,240,.5); margin: 0 0 24px; }
.agent-card__output { border-top: 1px solid var(--border-1); padding-top: 16px; }
.agent-card__output p:last-child { font-size: 12px; color: rgba(245,245,240,.7); margin: 0; }

.forge__status {
  margin-top: 32px;
  border: 1px solid var(--border-1);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color .3s ease;
}
.forge__status.is-active { border-color: var(--ochre); }
.forge__status-left { display: flex; align-items: center; gap: 16px; font-size: 12px; color: rgba(245,245,240,.6); }
.forge__status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-1); }
.forge__status-dot--live { background: var(--ochre); animation: pulse 2s ease-in-out infinite; }
.forge__status.is-active .forge__status-dot { background: var(--ochre); }

/* ---------- Legacy ledger ---------- */
.legacy { position: relative; background: var(--obsidian); padding: 96px 0; overflow: hidden; }
@media (min-width: 1024px) { .legacy { padding: 128px 0; } }
.legacy__bg { position: absolute; inset: 0; opacity: .05; }
.legacy__bg img { width: 100%; height: 100%; object-fit: cover; }

.legacy__intro { position: relative; z-index: 1; padding: 0 24px; margin-bottom: 64px; }
@media (min-width: 768px) { .legacy__intro { padding: 0 48px; } }
@media (min-width: 1024px) { .legacy__intro { padding: 0 80px; } }
.legacy__lead { max-width: 36rem; }

.legacy__scroller {
  position: relative; z-index: 1;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 0 24px 32px;
  scrollbar-width: none;
}
.legacy__scroller::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .legacy__scroller { padding: 0 48px 32px; } }
@media (min-width: 1024px) { .legacy__scroller { padding: 0 80px 32px; } }

.case-card {
  min-width: 85vw;
  flex-shrink: 0;
  border: 1px solid var(--border-1);
  padding: 24px;
  transition: border-color .2s ease;
}
@media (min-width: 768px) { .case-card { min-width: 45vw; padding: 32px; } }
@media (min-width: 1024px) { .case-card { min-width: 35vw; } }
.case-card:hover { border-color: rgba(212,175,55,.4); }

.case-card__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.case-card__head h3 { font-size: 18px; font-weight: 700; color: var(--bone); letter-spacing: -0.03em; margin: 0; }
.case-card:hover .case-card__head h3 { color: var(--ochre); }
.case-card__year { font-size: 12px; color: rgba(245,245,240,.3); }

.case-card__bars { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.case-bar__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 10px; }
.case-bar__track { height: 4px; background: var(--border-1); width: 100%; }
.case-bar__fill { height: 100%; width: 0; transition: width 1.2s ease; }
.case-bar__fill--gold { background: var(--ochre); }
.case-bar__fill--bone { background: var(--bone); }

.case-card__foot { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--border-1); padding-top: 24px; }
.case-card__foot p:last-child { font-size: 12px; line-height: 1.7; color: rgba(245,245,240,.6); margin: 0; }

.legacy__scroll-hint {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; margin-top: 32px;
}
@media (min-width: 768px) { .legacy__scroll-hint { padding: 0 48px; } }
@media (min-width: 1024px) { .legacy__scroll-hint { padding: 0 80px; } }
.legacy__scroll-line { height: 1px; flex: 1; background: var(--border-1); }
.legacy__scroll-hint span:last-child { font-size: 10px; letter-spacing: .2em; }

/* ---------- Contact ---------- */
.contact { position: relative; min-height: 100vh; background: var(--obsidian); overflow: hidden; }
.contact__bg { position: absolute; inset: 0; opacity: .05; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; }

.contact__form-view { position: relative; z-index: 1; padding: 96px 24px; }
@media (min-width: 768px) { .contact__form-view { padding: 96px 48px; } }
@media (min-width: 1024px) { .contact__form-view { padding: 128px 80px; } }

.contact__intro { margin-bottom: 64px; }
@media (min-width: 1024px) { .contact__intro { margin-bottom: 96px; } }
.contact__lead { max-width: 32rem; }

.contact__form { max-width: 48rem; display: flex; flex-direction: column; gap: 48px; }
.field { border-bottom: 1px solid var(--border-1); padding-bottom: 16px; transition: border-color .2s ease; }
.field:focus-within { border-color: var(--ochre); }
.field label { display: block; margin-bottom: 12px; }
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--bone);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(245,245,240,.15); }
.field textarea { font-weight: 500; font-size: 18px; letter-spacing: -0.02em; resize: none; min-height: 100px; }

.contact__submit-row { display: flex; justify-content: flex-end; padding-top: 16px; }
.contact__submit-row .btn { padding: 16px 32px; }
.contact__submit-row .btn svg { transition: transform .2s ease; }
.contact__submit-row .btn:hover svg { transform: translateX(4px); }
.contact__submit-row .btn:disabled { opacity: .5; cursor: not-allowed; }

.contact__terminal { margin-top: 64px; border: 1px solid var(--border-1); padding: 24px; max-width: 48rem; }
.contact__terminal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.contact__terminal pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(245,245,240,.5);
  white-space: pre-wrap;
}

.contact__done-view {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 24px;
}
.contact__done-dot { width: 12px; height: 12px; margin-bottom: 32px; }
.contact__done-heading { font-weight: 700; color: var(--bone); font-size: clamp(28px, 6vw, 48px); letter-spacing: -0.04em; margin: 0 0 16px; }
.contact__done-copy { font-size: 14px; color: rgba(245,245,240,.6); max-width: 28rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--obsidian); border-top: 1px solid var(--border-1); overflow: hidden; }
.site-footer__inner { position: relative; padding: 64px 24px; }
@media (min-width: 768px) { .site-footer__inner { padding: 64px 48px; } }
@media (min-width: 1024px) { .site-footer__inner { padding: 96px 48px; } }
.site-footer__mark { margin-bottom: 32px; }

.site-footer__wordmark {
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-1);
  line-height: .85;
  letter-spacing: -0.05em;
  font-size: clamp(2.5rem, 10vw, 11rem);
  margin: 0;
  user-select: none;
}

.site-footer__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  border-top: 1px solid var(--border-1);
  padding-top: 32px;
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 1fr 1fr; } }
.site-footer__grid p { margin: 0 0 4px; font-size: 12px; }
.footer-link { display: block; margin-top: 4px; font-size: 12px; color: rgba(245,245,240,.6); transition: color .2s ease; }
.footer-link:hover { color: var(--ochre); }
.footer-status { display: flex; align-items: center; gap: 8px; }

.site-footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
@media (min-width: 768px) { .site-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.site-footer__bottom p { font-size: 10px; margin: 0; }
.site-footer__bottom-links { display: flex; gap: 24px; }
.site-footer__bottom-links a, .site-footer__bottom-links button { font-size: 10px; transition: color .2s ease; }
.site-footer__bottom-links a:hover, .site-footer__bottom-links button:hover { color: var(--ochre); }

.site-footer__glow {
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--ochre), transparent);
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse { 0%, 100% { opacity: .2; } 50% { opacity: .6; } }

/* ---------- Scroll reveal ---------- */
.reveal-init { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal-init.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
