/* endo.cash apex — single-document static landing.
 *
 * Discipline mirrors trade-web: no rounded corners, system fonts only,
 * thin grid lines, hard borders. Bright/light surface (paper) to
 * contrast trade.endo.cash's dark terminal.
 */

:root {
  --bg:       #ffffff;
  --paper:    #ffffff;
  --ink:      #000000;
  --muted:    #5a5a5a;
  --line:     #000000;
  --soft:     rgba(0, 0, 0, 0.18);
  --max:      1600px;
  --pad-x:    clamp(18px, 4.5vw, 80px);
  --pad-y:    clamp(40px, 7vw, 110px);
  --sans:     ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono:     ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 22px;
  font: 800 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}

button:hover, .button:hover {
  background: var(--ink);
  color: var(--paper);
}

.page {
  width: min(100%, var(--max));
  margin: 0 auto;
  background: var(--paper);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
}

/* ---------------- Topbar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
}

.logo {
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-right: 1px solid var(--line);
  font: 900 16px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  overflow: auto;
}

.nav a {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-left: 1px solid var(--line);
  font: 800 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .14s ease, color .14s ease;
}

.nav a:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav .launch {
  background: var(--ink);
  color: var(--paper);
}

.nav .launch:hover {
  background: var(--paper);
  color: var(--ink);
}

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

.hero {
  display: grid;
  grid-template-columns: 46% 54%;
  min-height: calc(100vh - 72px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  border-right: 1px solid var(--line);
  padding: var(--pad-y) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  font: 900 11px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(28px, 7vw, 80px);
}

.hero h1 {
  font: 300 clamp(64px, 9vw, 148px)/.88 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  transform: translateX(.10em);
}

.hero-sub {
  margin-top: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 560px;
  font: 900 clamp(16px, 2vw, 28px)/1.35 var(--mono);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.hero-body {
  margin-top: 22px;
  max-width: 600px;
  font: 500 clamp(14px, 1.15vw, 17px)/1.7 var(--sans);
  letter-spacing: .025em;
  color: var(--ink);
}

.pillars {
  list-style: none;
  margin-top: 28px;
  max-width: 620px;
  display: grid;
  gap: 0;
}

.pillar {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px 18px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.pillar:last-child {
  border-bottom: 1px solid var(--line);
}

.pillar-num {
  font: 900 11px/1 var(--mono);
  letter-spacing: .18em;
  color: var(--muted);
  align-self: start;
  padding-top: 4px;
}

.pillar-head {
  display: block;
  font: 900 clamp(14px, 1.25vw, 18px)/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pillar-body {
  display: block;
  grid-column: 2;
  margin-top: 6px;
  font: 500 clamp(13px, 1.05vw, 15px)/1.65 var(--sans);
  color: var(--ink);
  letter-spacing: .02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-actions .primary {
  background: var(--ink);
  color: var(--paper);
}

.hero-actions .primary:hover {
  background: var(--paper);
  color: var(--ink);
}

.hero-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--paper);
  touch-action: none;
  user-select: none;
}

#hero-gl {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#hero-gl:active {
  cursor: grabbing;
}

/* ---------------- Three-asset strip ---------------- */

.economy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.asset {
  min-height: 300px;
  padding: clamp(36px, 5vw, 70px) var(--pad-x);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.asset:last-child { border-right: 0; }

.asset-num {
  width: 44px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font: 900 12px/1 var(--mono);
  letter-spacing: .15em;
  color: var(--muted);
}

.asset h2 {
  font: 300 clamp(32px, 4vw, 60px)/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.asset p {
  margin-top: 18px;
  max-width: 360px;
  font: 800 12px/1.7 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------------- Doctrine ---------------- */

.doctrine {
  display: grid;
  grid-template-columns: 46% 54%;
  border-bottom: 1px solid var(--line);
}

.doctrine-title {
  padding: var(--pad-y) var(--pad-x);
  border-right: 1px solid var(--line);
}

.tag {
  font: 900 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.doctrine h2 {
  font: 300 clamp(36px, 5vw, 80px)/.98 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.doctrine-copy {
  padding: var(--pad-y) var(--pad-x);
  display: grid;
  align-content: center;
  gap: 26px;
}

.doctrine-copy p {
  font: 500 clamp(15px, 1.2vw, 19px)/1.75 var(--sans);
  letter-spacing: .025em;
  color: var(--ink);
  max-width: 780px;
}

.doctrine-copy strong {
  color: var(--ink);
  font-weight: 850;
}

/* ---------------- Splits ---------------- */

.splits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.split {
  padding: clamp(36px, 5vw, 70px) var(--pad-x);
  border-right: 1px solid var(--line);
  min-height: 240px;
}

.split:last-child { border-right: 0; }

.split-frac {
  font: 300 clamp(48px, 6vw, 96px)/1 var(--sans);
  letter-spacing: .04em;
}

.split-label {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 900 13px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.split-body {
  margin-top: 16px;
  font: 500 14px/1.7 var(--sans);
  color: var(--ink);
  letter-spacing: .02em;
  max-width: 320px;
}

/* ---------------- Notice ---------------- */

.notice {
  padding: 28px var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font: 800 12px/1.75 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.footer {
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px var(--pad-x);
  background: var(--ink);
  color: var(--paper);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 4vw, 40px);
}

.footer a, .fine {
  font: 900 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.fine {
  color: rgba(255,255,255,.66);
  white-space: nowrap;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1120px) {
  .topbar { height: auto; grid-template-columns: 1fr; }
  .logo {
    justify-content: center;
    height: 64px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
  .nav a {
    height: 48px;
    flex: 0 0 auto;
    justify-content: center;
    border-bottom: 1px solid var(--line);
  }

  .hero, .doctrine { grid-template-columns: 1fr; }
  .hero-copy, .doctrine-title {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero { min-height: 0; }
  .hero-visual { min-height: 460px; }

  .economy, .splits { grid-template-columns: 1fr; }
  .asset, .split {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .asset:last-child, .split:last-child { border-bottom: 0; }
}

@media (max-width: 680px) {
  .nav a:not(.launch) { display: none; }
  .nav { justify-content: flex-end; }
  .logo { font-size: 15px; }

  .hero-copy { padding-top: 44px; padding-bottom: 44px; }
  .hero h1 { font-size: clamp(52px, 18vw, 86px); }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }

  .hero-visual { min-height: 380px; }

  .footer { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 28px; }
}

@media (max-width: 360px) {
  :root { --pad-x: 14px; }
  .nav a { padding: 0 12px; font-size: 10px; }
  .hero h1 { font-size: clamp(44px, 16vw, 72px); letter-spacing: .16em; }
  .hero-sub { font-size: 14px; padding-top: 18px; margin-top: 18px; }
  .hero-body { font-size: 13px; }
  .pillar { grid-template-columns: 32px 1fr; gap: 10px 12px; padding: 14px 0; }
  .pillar-num { font-size: 10px; padding-top: 3px; }
  .pillar-head { font-size: 13px; letter-spacing: .06em; }
  .pillar-body { font-size: 12px; line-height: 1.6; }
  .asset h2, .doctrine h2 { letter-spacing: .12em; }
  .doctrine-copy p { font-size: 14px; }
  .split-frac { font-size: 44px; }
  .footer-links { gap: 12px; }
  .fine { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #hero-gl, #hero-gl:active { cursor: default; }
}
