/* ============================================================
   ENGRAM - CODE PROVENANCE INTELLIGENCE
   Light mode, NASA technical manual aesthetic
   ============================================================ */

:root {
  --bg:             #f4f1ea;
  --surface:        #ebe7de;
  --fg:             #1c1a14;
  --fg-mid:         #4a4740;
  --fg-dim:         #8a8680;
  --accent:         #7a5c1a;
  --accent-light:   #c9a550;
  --accent-line:    rgba(122, 92, 26, 0.18);
  --border:         1px solid rgba(122, 92, 26, 0.2);

  --font-mono:      'Space Mono', monospace;
  --font-body:      'Inter', sans-serif;
  --font-display:   'Playfair Display', Georgia, 'Times New Roman', serif;
}

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

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HERO - full viewport, two-column grid
   ============================================================ */

#hero {
  height: 100vh;
  display: grid;
  grid-template-columns: 38fr 62fr;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem 3.5rem 2.5rem;
  border-right: 1px solid var(--accent-line);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 8.5rem);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin-bottom: 1.25rem;
}

.hero-divider {
  width: 100%;
  height: 1px;
  background: var(--accent-line);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 400;
  font-style: italic;
  color: var(--fg);
  line-height: 1.5;
  margin-bottom: 2rem;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */

.cta-primary,
.cta-secondary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.625rem 1.5rem;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.cta-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

.cta-primary:hover {
  background: #5e4612;
  border-color: #5e4612;
}

.cta-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.cta-secondary:hover {
  background: rgba(122, 92, 26, 0.08);
}

/* ============================================================
   HERO RIGHT - image
   ============================================================ */

.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  padding: 2rem;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.hero-fig-label {
  position: absolute;
  bottom: 1.25rem;
  left: 2rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}

/* ============================================================
   PROOF BAND
   ============================================================ */

#proof {
  background: var(--surface);
  padding: 5rem 2.5rem;
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
}

.proof-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.proof-statement {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  font-style: italic;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 2rem;
}

.proof-terms {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.proof-term {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.proof-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  flex-shrink: 0;
}

.proof-kicker {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--fg-mid);
  line-height: 1.55;
}

/* ============================================================
   MECHANISM BAND
   ============================================================ */

#mechanism {
  padding: 4.5rem 2.5rem;
  border-bottom: 1px solid var(--accent-line);
}

.mechanism-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
}

.mechanism-step {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.step-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 0.625rem;
}

.step-desc {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--fg-mid);
  line-height: 1.55;
}

.mechanism-connector {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-top: 0.625rem;
  color: var(--accent-light);
  font-size: 1rem;
  opacity: 0.6;
}

.mechanism-connector::after {
  content: '\2192';
}

/* ============================================================
   PAYOFF BAND
   ============================================================ */

#payoff {
  background: var(--surface);
  padding: 4.5rem 2.5rem;
  border-bottom: 1px solid var(--accent-line);
}

.payoff-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.payoff-block {
  display: flex;
  flex-direction: column;
}

.terminal {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  border: var(--border);
  padding: 1rem 1.125rem;
  white-space: pre;
  overflow-x: auto;
  margin: 0 0 0.75rem 0;
  flex: 1;
}

.payoff-desc {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--fg-mid);
  line-height: 1.5;
}

/* ============================================================
   INSTALL
   ============================================================ */

#install {
  padding: 4rem 2.5rem;
  border-bottom: 1px solid var(--accent-line);
}

.install-inner {
  max-width: 600px;
  margin: 0 auto;
}

.install-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg);
  line-height: 1.7;
  background: var(--surface);
  border: var(--border);
  padding: 0.875rem 1rem;
  white-space: pre;
  overflow-x: auto;
}

.install-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

#footer {
  padding: 0 2.5rem;
  height: 44px;
  display: flex;
  align-items: center;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-links a {
  color: var(--fg-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
}

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

/* ============================================================
   RESPONSIVE - stack at 900px
   ============================================================ */

@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 100vh;
  }

  .hero-left {
    border-right: none;
    border-bottom: 1px solid var(--accent-line);
    padding: 2.5rem 1.5rem;
    order: 2;
  }

  .hero-right {
    order: 1;
    height: auto;
    max-height: 65vw;
    padding: 1.25rem;
  }

  .hero-image {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .hero-title {
    font-size: clamp(4rem, 13vw, 6rem);
  }

  .cta-row {
    flex-wrap: wrap;
  }

  #proof {
    padding: 3.5rem 1.5rem;
  }

  .proof-terms {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  #mechanism {
    padding: 3rem 1.5rem;
  }

  .mechanism-inner {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .mechanism-step {
    padding: 0;
  }

  .mechanism-connector {
    display: none;
  }

  #payoff {
    padding: 3rem 1.5rem;
  }

  .payoff-inner {
    grid-template-columns: 1fr;
  }

  #install {
    padding: 3rem 1.5rem;
  }
}
