:root {
  --bg: #12100d;
  --bg-alt: #181510;
  --card: #1c1812;
  --border: #3a3226;
  --text: #ede4d3;
  --text-muted: #a89c85;
  --accent: #ffb454;
  --accent-2: #7ec699;
  --danger: #d97757;
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
  color: var(--text);
  font-family: "IBM Plex Serif", Georgia, serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1, h2, h3, .brand, .nav-links a, .login-link, .card-tag, .card h3 {
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

h2 {
  text-transform: lowercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.3em;
}

.tag {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px dashed var(--border);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-right: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.login-link {
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
}

.login-link:hover {
  border-color: var(--accent);
  background: rgba(255, 180, 84, 0.08);
}

.login-link--inline {
  display: inline-block;
  margin-top: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */

.hero {
  padding: 4.5rem 1.5rem 3.5rem;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.hero-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--text);
  margin: 0 0 0.5rem;
  text-align: center;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 1.5rem;
  text-align: center;
}

.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0e0c09;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px dashed var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #e05555; }
.dot-yellow { background: #e0b855; }
.dot-green { background: #6ec46e; }

.terminal-title {
  margin-left: 0.6rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.terminal-body {
  padding: 1.2rem 1.4rem 1.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
}

.terminal-body p {
  margin: 0.3rem 0;
}

.prompt {
  color: var(--accent-2);
}

.terminal-output {
  color: var(--text-muted);
  padding-left: 1.1rem;
}

.hero-note {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 1.5rem;
}

/* Error pages */

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-main {
  display: flex;
  flex: 1;
  align-items: center;
}

.error-view {
  width: 100%;
  max-width: 680px;
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.error-code {
  margin: 0 0 0.2rem;
  color: var(--danger);
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
  text-align: center;
}

.error-view .terminal {
  margin-top: 1.8rem;
}

/* Sections */

section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.services {
  background: var(--bg-alt);
  max-width: none;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.services > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  font-size: 0.9rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.step strong {
  color: var(--text);
}

.section-lede {
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 2rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.radio {
  background: var(--bg-alt);
  max-width: none;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.radio > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.about {
  max-width: 680px;
}

.about-block {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin: 1rem 0;
}

.comment {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.about p:not(.comment) {
  color: var(--text-muted);
}

/* Cards */

/* 6 tracks so a card can take a third (span 2) or a half (span 3) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}

.card-grid > .card {
  grid-column: span 2;
}

/* Leftover row of two: 50% each instead of two thirds and a hole */
.card-grid > .card:nth-last-child(2):nth-child(3n + 1),
.card-grid > .card:last-child:nth-child(3n + 2) {
  grid-column: span 3;
}

/* Leftover row of one: full width */
.card-grid > .card:last-child:nth-child(3n + 1) {
  grid-column: span 6;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
}

.card-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-up {
  background: var(--accent-2);
  box-shadow: 0 0 6px var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.4; }
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
}

/* Footer */

.site-footer {
  text-align: left;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
  border-top: 1px dashed var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
}

.footer-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-top: 0.6rem;
}

.footer-sites a {
  color: var(--text-muted);
}

.footer-sites a:hover {
  color: var(--accent);
}

/* Mobile */

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid > .card,
  .card-grid > .card:nth-last-child(2):nth-child(3n + 1),
  .card-grid > .card:last-child:nth-child(3n + 2),
  .card-grid > .card:last-child:nth-child(3n + 1) {
    grid-column: auto;
  }

  .card-grid > .card:last-child:nth-child(odd) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid > .card:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px dashed var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
}
