/* metabyte landing page for Gitea. Uses Gitea theme variables, so light and dark themes both work. */
.mb-home {
  --mb-accent: #4553F5;
  --mb-bit: #FFC83D;
  --mb-line: var(--color-secondary, rgba(128, 128, 128, .3));
  color: var(--color-text);
}
.mb-home .mb-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 88px) clamp(20px, 4vw, 40px) clamp(48px, 8vw, 112px);
}

/* ---------- hero ---------- */
.mb-home .mb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.mb-home .mb-name {
  display: flex;
  align-items: center;
  gap: .18em;
  margin: 0;
  font-size: clamp(3.25rem, 9.5vw, 7rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.055em;
  text-transform: lowercase;
}
.mb-home .mb-logo { width: .8em; height: .8em; flex: none; }
.mb-home .mb-tagline {
  margin: 28px 0 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.mb-home .mb-lead {
  max-width: 46ch;
  margin: 14px 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--color-text-light);
}
.mb-home .mb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 32px;
}
.mb-home a.mb-btn {
  display: inline-block;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}
.mb-home a.mb-btn-primary { background: var(--mb-accent); color: #fff; }
.mb-home a.mb-btn-primary:hover { background: #3A47DB; color: #fff; }
.mb-home a.mb-btn-secondary { border-color: var(--color-text-light-3, currentColor); color: var(--color-text); }
.mb-home a.mb-btn-secondary:hover { background: var(--color-hover, rgba(128, 128, 128, .12)); }
.mb-home a.mb-link { padding: 12px 4px; color: var(--color-text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.mb-home a.mb-link:hover { color: var(--mb-accent); }
.mb-home a:focus-visible,
.mb-home button:focus-visible { outline: 3px solid var(--mb-accent); outline-offset: 3px; }

/* ---------- the byte ---------- */
.mb-home .mb-byte {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: var(--color-box-body, transparent);
}
.mb-home .mb-byte-title { margin: 0 0 18px; font-weight: 650; line-height: 1.3; }
.mb-home .mb-bits {
  display: grid;
  grid-template-columns: repeat(4, 1fr) clamp(8px, 2vw, 16px) repeat(4, 1fr);
  gap: clamp(5px, 1.2vw, 9px);
}
.mb-home .mb-bit:nth-child(5) { grid-column: 6; }
.mb-home .mb-bit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 2px solid var(--color-text-light-3, currentColor);
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-light);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s;
}
.mb-home .mb-bit .mb-d { font-size: clamp(1.1rem, 3.4vw, 1.75rem); font-weight: 700; line-height: 1; }
.mb-home .mb-bit .mb-w { font-size: .68rem; line-height: 1; opacity: .75; }
.mb-home .mb-bit[aria-pressed="true"] { border-color: var(--mb-accent); background: var(--mb-accent); color: #fff; }
.mb-home .mb-bit:hover { border-color: var(--mb-accent); }

.mb-home .mb-read {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "char num" "reset reset";
  align-items: center;
  gap: 4px 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--mb-line);
}
.mb-home .mb-char {
  grid-area: char;
  min-width: 1.4ch;
  font-size: 4.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--mb-accent);
}
.mb-home .mb-num {
  grid-area: num;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 600;
}
.mb-home .mb-dec { color: var(--color-text-light); font-weight: 500; }
.mb-home .mb-reset {
  grid-area: reset;
  justify-self: start;
  margin-top: 10px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--color-text-light);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.mb-home .mb-reset:hover { color: var(--mb-accent); }

/* ---------- features ---------- */
.mb-home .mb-features { margin-top: clamp(64px, 10vw, 128px); }
.mb-home .mb-features h2 {
  max-width: 20ch;
  margin: 0 0 28px;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.mb-home .mb-features dl { margin: 0; }
.mb-home .mb-row {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 26px 0;
  border-top: 1px solid var(--mb-line);
}
.mb-home .mb-row:last-child { border-bottom: 1px solid var(--mb-line); }
.mb-home .mb-row dt {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.mb-home .mb-row dt svg { flex: none; color: var(--mb-accent); }
.mb-home .mb-row dd {
  max-width: 60ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-text-light);
}

/* ---------- close ---------- */
.mb-home .mb-close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: clamp(48px, 8vw, 96px);
}
.mb-home .mb-close p {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.02em;
  text-wrap: balance;
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .mb-home .mb-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mb-home .mb-row { grid-template-columns: minmax(0, 1fr); padding: 20px 0; }
  .mb-home .mb-char { font-size: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mb-home .mb-bit { transition: none; }
}
