* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #667069;
  --line: #dfe6df;
  --surface: #f7f8f3;
  --surface-strong: #ffffff;
  --accent: #1f8a70;
  --accent-dark: #14624f;
  --warm: #f1c45b;
  --rose: #d96a5b;
}

html {
  scroll-behavior: smooth;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  background: rgba(247, 248, 243, 0.88);
  border-bottom: 1px solid rgba(23, 33, 28, 0.09);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand img,
.workflow-icon,
.hero-visual img {
  border-radius: 12px;
}

.site-header nav {
  gap: 22px;
}

.site-header a {
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--accent-dark);
}

.github-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.75);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.github-btn:hover {
  border-color: var(--accent) !important;
  background: #fff !important;
  transform: translateY(-1px);
  color: var(--accent-dark) !important;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 40px;
  min-height: calc(100svh - 68px);
  padding: 88px 8vw 72px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(31, 138, 112, 0.12), rgba(241, 196, 91, 0.15) 46%, rgba(217, 106, 91, 0.10)),
    var(--surface);
}

.hero-copy {
  align-self: center;
  max-width: 720px;
  animation: rise 620ms ease-out both;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(52px, 8vw, 108px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lede {
  max-width: 560px;
  color: #39443d;
  font-size: 21px;
  line-height: 1.5;
}

.hero-actions,
.workflow-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.workflow-actions a,
.workflow-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-action {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.secondary-action,
.workflow-actions a,
.workflow-actions button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.primary-action:hover,
.secondary-action:hover,
.workflow-actions a:hover,
.workflow-actions button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.hero-visual {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(420px, 72vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.hero-visual img {
  position: relative;
  z-index: 2;
  width: 42%;
  height: auto;
  box-shadow: 0 24px 80px rgba(23, 33, 28, 0.18);
  animation: float 4.8s ease-in-out infinite;
}

.signal {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(31, 138, 112, 0.35);
  animation: pulse 4.5s ease-in-out infinite;
}

.signal-a { inset: 10%; }
.signal-b { inset: 22%; animation-delay: 420ms; border-color: rgba(241, 196, 91, 0.55); }
.signal-c { inset: 34%; animation-delay: 820ms; border-color: rgba(217, 106, 91, 0.38); }

.catalog-section,
.publish-section {
  padding: 76px 8vw;
}

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

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.search-label {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-label input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

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

.workflow-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  animation: rise 360ms ease-out both;
}

.workflow-icon {
  width: 58px;
  height: 58px;
}

.workflow-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow-title-line h3 {
  margin-bottom: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.workflow-type {
  padding: 5px 8px;
  border: 1px solid rgba(31, 138, 112, 0.24);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-main p {
  max-width: 720px;
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tags span {
  color: #445049;
  font-size: 13px;
}

.tags span::before {
  content: "#";
  color: var(--accent);
}

.empty-state {
  padding: 28px 0;
  color: var(--muted);
}

.contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.contract-grid h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.contract-grid p {
  color: var(--muted);
  line-height: 1.5;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 8vw;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.58; }
  50% { transform: scale(1.04); opacity: 1; }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
  }

  .site-header nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 58px 24px 54px;
  }

  h1 {
    font-size: 54px;
  }

  .lede {
    font-size: 18px;
  }

  .section-heading,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-section,
  .publish-section {
    padding: 54px 24px;
  }

  .workflow-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .workflow-icon {
    width: 48px;
    height: 48px;
  }

  .workflow-actions {
    grid-column: 2;
  }

  .contract-grid {
    grid-template-columns: 1fr;
  }
}
