:root {
  color-scheme: light;
  --ink: #171a18;
  --muted: #69706b;
  --paper: #f3f5f1;
  --surface: #ffffff;
  --line: #d7ddd7;
  --green: #328f5b;
  --green-dark: #216b42;
  --green-soft: #dceee3;
  --yellow: #d9a526;
  --dark: #202522;
  --dark-line: #3a423d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header,
.intro,
.section-heading,
.service-list,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.header-link:hover {
  color: var(--green-dark);
}

.intro {
  min-height: calc(100svh - 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  padding-block: 76px 112px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--green-dark);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

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

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(48px, 7.4vw, 92px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 580px;
  margin: 30px 0 36px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.primary-action {
  width: fit-content;
  min-height: 54px;
  display: inline-grid;
  grid-template-columns: 24px auto 22px;
  align-items: center;
  gap: 13px;
  padding: 0 18px;
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 9px 24px rgb(23 26 24 / 14%);
  transition: background 160ms ease, transform 160ms ease;
}

.primary-action:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.primary-action:focus-visible,
.service-row:focus-visible,
.brand:focus-visible,
.header-link:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.primary-action img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.action-arrow {
  font-size: 20px;
  text-align: right;
}

.repo-visual {
  position: relative;
  min-height: 382px;
  overflow: hidden;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  color: #e9eee9;
  background: var(--dark);
  box-shadow: 0 28px 70px rgb(23 26 24 / 18%);
}

.visual-heading {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--dark-line);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.visual-path {
  color: #dce4dd;
}

.visual-branch {
  padding: 5px 9px;
  border: 1px solid #556159;
  border-radius: 4px;
  color: #b9c2bb;
}

.commit-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--dark-line);
}

.commit-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.commit-copy {
  display: grid;
  gap: 4px;
}

.commit-copy strong {
  font-size: 14px;
}

.commit-copy small,
.commit-hash {
  color: #9ea9a1;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.code-lines {
  display: grid;
  gap: 15px;
  padding: 10px 22px;
}

.code-lines span {
  width: var(--line-width);
  height: 8px;
  border-radius: 2px;
  background: #5e6961;
}

.code-lines span:nth-child(2n) {
  margin-left: 30px;
  background: #397d59;
}

.gitea-watermark {
  position: absolute;
  right: -32px;
  bottom: -34px;
  width: 150px;
  height: 150px;
  opacity: 0.12;
  filter: grayscale(1) brightness(2.4);
}

.services {
  padding-block: 84px 96px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 38px;
}

.section-heading .eyebrow {
  margin-bottom: 9px;
}

h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.section-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: right;
}

.service-list {
  border-top: 1px solid var(--line);
}

.service-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: 50px 1.1fr 1.5fr 94px 24px;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.service-row.is-live {
  transition: padding 160ms ease, background 160ms ease;
}

.service-row.is-live:hover {
  padding-inline: 14px;
  background: #f5faf6;
}

.service-number {
  color: #9aa19b;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.service-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
}

.service-name img {
  width: 28px;
  height: 28px;
}

.service-description {
  color: var(--muted);
  font-size: 14px;
}

.service-state {
  color: #818982;
  font-size: 13px;
  text-align: right;
}

.is-live .service-state {
  color: var(--green-dark);
  font-weight: 700;
}

.is-live .service-state span {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
}

.service-arrow {
  color: var(--green-dark);
  font-size: 18px;
  text-align: right;
}

.is-planned {
  color: #737a75;
}

.site-footer {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.footer-records {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 860px) {
  .intro {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 62px;
    padding-block: 78px;
  }

  .repo-visual {
    min-height: 340px;
  }

  .service-row {
    grid-template-columns: 38px 1fr auto;
    gap: 14px;
    padding-block: 22px;
  }

  .service-description {
    grid-column: 2 / 3;
  }

  .service-state,
  .service-arrow {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    align-self: center;
  }

  .is-planned .service-state {
    grid-row: 1 / 3;
  }
}

@media (max-width: 600px) {
  .site-header,
  .intro,
  .section-heading,
  .service-list,
  .site-footer {
    width: min(calc(100% - 32px), 1180px);
  }

  .site-header {
    height: 64px;
  }

  .brand {
    font-size: 14px;
  }

  .header-link {
    font-size: 13px;
  }

  .intro {
    gap: 48px;
    padding-block: 58px 74px;
  }

  h1 {
    font-size: 48px;
  }

  .lead {
    margin-block: 24px 30px;
    font-size: 16px;
  }

  .primary-action {
    width: 100%;
  }

  .repo-visual {
    min-height: 310px;
  }

  .commit-row {
    grid-template-columns: 38px 1fr;
  }

  .commit-hash {
    display: none;
  }

  .services {
    padding-block: 64px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 16px;
    text-align: left;
  }

  .service-row {
    grid-template-columns: 30px 1fr;
  }

  .service-description {
    grid-column: 2;
  }

  .service-state {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .service-arrow {
    grid-column: 2;
    grid-row: 1 / 3;
    justify-self: end;
  }

  .is-planned .service-state {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .site-footer {
    min-height: 124px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .footer-records {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
