:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --paper-strong: #fffdf8;
  --ink: #202426;
  --muted: #5f6864;
  --line: #c9c3b7;
  --green: #d8e5dd;
  --blue: #d9e2ee;
  --red: #a9362d;
  --red-dark: #7f211b;
  --shadow: 0 14px 30px rgba(32, 36, 38, 0.08);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--red-dark);
  text-decoration-color: rgba(127, 33, 27, 0.35);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
  text-decoration-color: currentColor;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  background: var(--red);
  box-shadow: 5px 5px 0 var(--green);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 15px;
}

.top-nav a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--red-dark);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--red);
  color: #fffdf8;
}

.button.secondary {
  background: var(--paper-strong);
  color: var(--ink);
}

.intro-art {
  justify-self: end;
  width: min(100%, 420px);
}

.retro-panel {
  min-height: 220px;
  padding: 28px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #b8b8b8;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.retro-gif {
  display: block;
  width: 170px;
  height: 170px;
  image-rendering: pixelated;
}

.ansi-sign {
  display: block;
  width: 100%;
  margin: 0;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #151819;
  color: #d8e5dd;
  box-shadow: var(--shadow);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(7px, 1.3vw, 12px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  overflow: hidden;
  text-shadow: 0 0 8px rgba(216, 229, 221, 0.28);
  white-space: pre;
}

.ansi-sign::selection {
  background: var(--red);
  color: #fffdf8;
}

.note,
.free-software {
  margin: 20px 0 42px;
  padding: 22px 24px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--green);
}

.note h2,
.free-software h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.note p {
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.service-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--blue);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 800;
}

.service-state {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.service-card h3 {
  margin: 0;
  font-size: 22px;
}

.service-card p {
  margin: 10px 0 18px;
  color: var(--muted);
}

.service-card a {
  margin-top: auto;
  font-weight: 800;
}

.service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
}

.service-links a {
  margin-top: 0;
}

.free-software {
  display: grid;
  grid-template-columns: minmax(190px, 0.35fr) minmax(0, 1fr);
  gap: 28px;
  background: var(--paper-strong);
}

.free-software p {
  margin: 0;
  color: var(--muted);
}

.free-software p + p {
  margin-top: 12px;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
}

.resource-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 34px;
  }

  .intro-art {
    justify-self: start;
    max-width: 480px;
  }

  h1 {
    font-size: 36px;
  }

  .lede {
    font-size: 18px;
  }

  .service-grid,
  .free-software {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  main,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 31px;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .note {
    padding: 18px;
  }
}
