/* ── Design tokens ── */
:root {
  --bg:       #E85D04;
  --dark:     #0D0D0D;
  --dark2:    #1A1A1A;
  --text:     #0D0D0D;
  --text-inv: #E8E8E8;
  --muted:    rgba(0, 0, 0, 0.5);
}

/* ── Reset ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
}

/* ── Base ── */
body {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

/* Grid texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Hazard stripes ── */
.stripes {
  height: 14px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--dark),
    var(--dark) 4px,
    var(--bg) 4px,
    var(--bg) 12px
  );
  position: relative;
  z-index: 1;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 0.65rem 2.5rem;
  border-bottom: 2px solid var(--dark);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.mark {
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mark span {
  display: block;
  height: 4px;
  background: var(--dark);
}
.mark span:nth-child(1) { width: 100%; }
.mark span:nth-child(2) { width: 68%; align-self: flex-end; }
.mark span:nth-child(3) { width: 84%; }
.mark span:nth-child(4) { width: 54%; align-self: flex-end; }
.mark span:nth-child(5) { width: 100%; }

.wordmark {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--dark);
}

.nav-center {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-align: center;
}

/* ── Header nav links ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  justify-content: flex-end;
}

.header-nav a {
  color: var(--dark);
  text-decoration: none;
  letter-spacing: 0.14em;
  font-weight: 500;
  transition: opacity 0.15s;
}

.header-nav a:hover {
  opacity: 0.55;
}

/* ── Footer ── */
footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--bg);
  border-top: 2px solid var(--dark);
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.2em;
}

footer a:hover {
  color: var(--dark);
}

footer .footer-subtle {
  opacity: 0.5;
  font-size: 0.5rem;
}

footer .footer-subtle:hover {
  opacity: 0.8;
}

/* ── Loading / Error states ── */
.state-wrap {
  padding: 5rem 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.loading-text {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.error-box {
  display: inline-block;
  border: 2px solid var(--dark);
  background: var(--dark);
  color: var(--bg);
  padding: 1.25rem 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}
