/* EternalExchange — deepslate & emerald.
   Subtle, blocky, simple: square corners, beveled buttons, amber numbers. */

/* ---------- fonts (self-hosted variable woff2) ---------- */
@font-face {
  font-family: 'Rubik';
  src: url('assets/fonts/rubik.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: optional;
}

/* ---------- tokens ---------- */
:root {
  --bg: #1A1C20;
  --surface: #22252A;
  --well: #141619;          /* inset slot interiors */
  --rule: #363A41;
  --text: #EDEEF0;
  --text2: #A9B0B8;
  --emerald: #4BD07A;
  --amber: #F2B93B;
  --btn-text: #10281A;
  --body: 'Rubik', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--emerald); color: var(--btn-text); }

a { color: var(--text); text-decoration-color: var(--text2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--emerald); }

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--well);
  border: 1px solid var(--rule);
  padding: .08em .35em;
}

b { font-weight: 600; }
strong { font-weight: 600; }
.amber {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.visually-hidden {
  position: absolute;
  left: 0;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 200;
  background: var(--emerald);
  color: var(--btn-text);
  font-weight: 500;
  font-size: .9rem;
  padding: .6em 1em;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ---------- type ---------- */
h1 {
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 1.75rem;
  display: flex;
  align-items: center;
  gap: .55em;
}
/* the one blocky flourish: an emerald block before every heading */
h2::before {
  content: '';
  width: .5em; height: .5em;
  background: var(--emerald);
  flex-shrink: 0;
}
h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 .5rem;
}
p { margin: 0 0 1rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1080px;
  margin-inline: auto;
  padding: 0 clamp(20px, 4vw, 40px);
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.block-mark {
  width: 14px; height: 14px;
  background: var(--emerald);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .3), inset 3px 3px 0 rgba(255, 255, 255, .25);
}
.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: .92rem;
  color: var(--text2);
  text-decoration: none;
  white-space: nowrap;
  padding-block: .5em;
}
.nav-links a:hover { color: var(--text); }
.version-chip {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: .4em .7em;
  white-space: nowrap;
}
.version-chip:hover { color: var(--text); border-color: var(--emerald); }

/* ---------- buttons: chunky game-style bevel, no textures ---------- */
.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  padding: .85em 1.5em;
  border: 0;
  transition: filter .12s;
}
.btn-primary {
  background: var(--emerald);
  color: var(--btn-text);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .28), inset 0 2px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { box-shadow: inset 0 4px 0 rgba(0, 0, 0, .28); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--rule);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .28), inset 0 2px 0 rgba(255, 255, 255, .05);
}
.btn-secondary:hover { border-color: var(--text2); }
.btn-secondary:active { box-shadow: inset 0 4px 0 rgba(0, 0, 0, .28); }

/* ---------- slot: inventory-style inset panel ---------- */
.slot {
  background: var(--well);
  border: 1px solid var(--rule);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .4), inset -2px -2px 0 rgba(255, 255, 255, .05);
}

/* ---------- sections ---------- */
section { padding-block: clamp(3.5rem, 8vh, 5.5rem) 0; }

/* hero */
.hero {
  text-align: center;
  padding-block: clamp(4.5rem, 12vh, 8rem) clamp(2rem, 4vh, 3rem);
}
.hero .lede {
  max-width: 44rem;
  margin: 0 auto 2.25rem;
  color: var(--text2);
  font-size: 1.15rem;
}
.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .9rem;
}
.hero-meta {
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text2);
}

/* values */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.split-text p { color: var(--text2); }
.split-text p strong { color: var(--text); }
.values-panel { padding: 1.5rem 1.5rem 1.1rem; }
.v-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: .6rem;
}
.v-row + .v-row { border-top: 1px solid var(--rule); }
.v-row span { color: var(--text); }
.v-row b {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.v-foot {
  border-top: 1px solid var(--rule);
  margin-top: .5rem;
  padding-top: .9rem;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text2);
}

/* how it works */
.steps3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.step p { color: var(--text2); margin: 0; }
.step-no {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--emerald);
  background: var(--well);
  border: 1px solid var(--rule);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .4), inset -2px -2px 0 rgba(255, 255, 255, .05);
}

/* features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3.5rem;
}
.feature p { color: var(--text2); }
.feature p code, .feature p b { color: var(--text); }
.feature p b.amber { color: var(--amber); }
.feature pre {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.7;
  color: var(--text2);
}
.feature pre code { background: none; border: 0; padding: 0; }
.feature pre b { color: var(--amber); font-family: var(--mono); font-weight: 600; }

/* screenshots */
.section-note { color: var(--text2); max-width: 44rem; margin-bottom: 2rem; }
.shots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}
.shot { margin: 0; }
.shot .slot { padding: 6px; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.shot figcaption {
  margin-top: .6rem;
  font-size: .9rem;
  color: var(--text2);
}

/* install */
.install-steps {
  margin: 0 0 1.75rem;
  padding-left: 1.4rem;
  max-width: 46rem;
}
.install-steps li { margin-bottom: 1rem; color: var(--text2); }
.install-steps li::marker { font-family: var(--mono); font-weight: 600; color: var(--emerald); }
.install-steps b { color: var(--text); }
.reqs-line { color: var(--text2); }
.reqs-line b { color: var(--text); white-space: nowrap; }

/* faq */
details { border-top: 1px solid var(--rule); max-width: 52rem; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  padding-block: 1.1rem;
  font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  content: '+' / '';
  margin-left: auto;
  padding-left: 1rem;
  font-family: var(--mono);
  color: var(--emerald);
}
details[open] summary::after { content: '−'; content: '−' / ''; }
summary:hover { color: var(--emerald); }
details p { color: var(--text2); margin: 0 0 1.25rem; }
details a { color: var(--text); }

/* footer */
footer {
  margin-top: clamp(4rem, 9vh, 6rem);
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 2rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
}
.foot-credit { color: var(--text2); margin: 0; }
.foot-credit a { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot-links a {
  font-size: .9rem;
  color: var(--text2);
  text-decoration: none;
  padding-block: .4em;
}
.foot-links a:hover { color: var(--text); }
.foot-legal {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.foot-legal p {
  font-size: .8rem;
  line-height: 1.7;
  color: var(--text2);
  margin: 0 0 .35rem;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .values-panel { max-width: 30rem; }
  .features-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .steps3 { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  /* header goes static on phones — no permanent chrome while reading */
  .nav { position: static; }
  html { scroll-padding-top: 16px; }
  .nav-inner { flex-wrap: wrap; padding-block: .6rem .3rem; gap: .3rem 1rem; }
  /* links wrap instead of scrolling, so nothing ever clips */
  .nav-links {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0 1.1rem;
    font-size: .88rem;
    padding-bottom: .25rem;
  }
  .nav-links a { padding-block: .7em; }
  .version-chip { margin-left: auto; padding-block: .55em; }
  .foot-links a { padding-block: .7em; }
  .shots-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .feature pre { padding: .8rem .9rem; font-size: .78rem; }
}

/* reduced motion: no transitions, no animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
