:root {
  --lime: #d8ff7c;
  --logo-lime: #c7f355;
  --ink: #1c1c1c;
  --ink-strong: #0e0e0e;
  --raised: #eae5db;
  --muted: #4a463f;
  --danger: #7a2a20;
  --success: #133f26;
  --sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --border: 2px solid var(--ink);
  --radius: 4px;
  --shadow-chip: 2px 2px 0 0 var(--ink);
  --shadow-card: 4px 4px 0 0 var(--ink);
  --shadow-button: 5px 5px 0 0 var(--ink);
  --slab: 8px;
  --max: 1152px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--lime);
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--lime);
  padding: 8px 12px;
  border: var(--border);
  z-index: 5;
}

.skip:focus {
  transform: none;
}

.nav,
.hero,
.cards,
.footer {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand img {
  width: 64px;
  height: 64px;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.chip {
  margin: 0;
  border: var(--border);
  background: var(--raised);
  box-shadow: var(--shadow-chip);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: center;
  padding: 36px 0 28px;
}

.kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 38ch;
  margin: 22px 0 0;
  font-size: 18px;
}

form {
  margin-top: 28px;
  max-width: 520px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.fields {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 14px;
  background: var(--raised);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

input::placeholder {
  color: var(--muted);
}

input:focus-visible,
button:focus-visible,
.brand:focus-visible,
.skip:focus {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 4px 4px 0 0 var(--danger);
}

button {
  height: 56px;
  padding: 0 26px;
  background: var(--ink);
  color: var(--lime);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-button);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 140ms linear, box-shadow 140ms linear;
}

button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 0 var(--ink);
}

button:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 0 var(--ink);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

button:disabled:hover,
button:disabled:active {
  transform: none;
  box-shadow: var(--shadow-button);
}

.error,
.success {
  margin: 14px 0 0;
  max-width: 46ch;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

.success {
  display: block;
  padding: 14px 16px;
  background: var(--raised);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--success);
  font-weight: 600;
}

.success[hidden],
.error[hidden],
.fields[hidden] {
  display: none;
}

.fineprint {
  margin: 14px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
}

.window {
  position: relative;
  margin: 0;
  background: var(--raised);
  border: var(--border);
}

.window::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--slab);
  top: var(--slab);
  width: 100%;
  height: 100%;
  background: var(--ink);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: var(--border);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.dots {
  display: inline-flex;
  gap: 6px;
}

.dots i {
  width: 12px;
  height: 12px;
  background: var(--ink);
  display: block;
}

.window-title {
  letter-spacing: 0.04em;
}

.window-body {
  display: block;
  padding: 0;
  background: var(--ink);
  line-height: 0;
}

.window-body img {
  width: 100%;
  height: auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 56px;
}

.card {
  background: var(--raised);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 18px 20px;
  transition: transform 140ms linear, box-shadow 140ms linear;
}

.card:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.card-index {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.card h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.card p:last-child {
  margin: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: var(--border);
  font-family: var(--mono);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

.attribution {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.attribution a {
  color: inherit;
}

@media (max-width: 860px) {
  .hero,
  .cards {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 14ch;
  }

  .window {
    max-width: 460px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav,
  .hero,
  .cards,
  .footer,
  .attribution {
    width: min(var(--max), calc(100% - 28px));
  }

  .fields {
    flex-direction: column;
  }

  button,
  input {
    width: 100%;
  }

  .brand span {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  button,
  .card {
    transition: none;
  }
}
