:root {
  --charcoal: #1c1917;
  --charcoal-2: #292524;
  --cream: #f6f3ee;
  --paper: #faf8f5;
  --line: #e7e5e4;
  --muted: #57534e;
  --muted-dark: #a8a29e;
  --orange: #c2410c;
  --orange-deep: #9a3412;
  --orange-light: #fdba74;
  --green: #3f6f22;
  --green-light: #8fca5c;
  --serif: "Iowan Old Style", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font: 17px/1.6 var(--sans);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.15;
  margin: 0;
}

a {
  color: var(--orange-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--orange);
}

:focus-visible {
  outline: 3px solid var(--orange-light);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.wrap {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--orange-light);
  color: var(--charcoal);
  font-weight: 600;
  border-radius: 8px;
}

.skip:focus {
  top: 16px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(60rem 36rem at 78% 70%, rgb(234 88 12 / 0.24), transparent 70%),
    linear-gradient(rgb(246 243 238 / 0.045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgb(246 243 238 / 0.045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, var(--charcoal-2), var(--charcoal));
}

.hero a {
  color: var(--cream);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1.15rem/1 var(--serif);
  text-decoration: none;
}

.top ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.top ul a {
  text-decoration: none;
  color: #e7e5e4;
}

.top ul a:hover {
  color: var(--orange-light);
  text-decoration: underline;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 48px;
  padding-block: 56px 88px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--orange-light);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  letter-spacing: -0.01em;
}

.lede {
  max-width: 36rem;
  margin: 22px 0 0;
  color: #d6d3d1;
  font-size: 1.1rem;
}

.hero .callout {
  max-width: 36rem;
  margin: 22px 0 0;
  padding: 12px 16px;
  border-left: 4px solid var(--green-light);
  border-radius: 0 10px 10px 0;
  background: rgb(246 243 238 / 0.08);
  color: #e7e5e4;
  font-size: 0.98rem;
}

.hero .callout strong {
  color: var(--green-light);
}

.hero .callout a {
  color: var(--orange-light);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
}

.button {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid rgb(246 243 238 / 0.45);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.hero .button:hover {
  border-color: var(--orange-light);
  color: var(--orange-light);
}

.hero .button.primary {
  background: var(--orange-light);
  border-color: var(--orange-light);
  color: var(--charcoal);
}

.hero .button.primary:hover {
  background: #fed7aa;
  border-color: #fed7aa;
  color: var(--charcoal);
}

.hero .button.quiet {
  border-color: transparent;
  text-decoration: underline;
}

.mark {
  width: 100%;
  max-width: 380px;
  justify-self: center;
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 0.45));
}

.mark .flare rect {
  opacity: 0;
  animation: furnace 3.6s ease-in-out infinite;
}

.mark .flare rect:nth-child(2) {
  animation-delay: 1.2s;
}

.mark .flare rect:nth-child(3) {
  animation-delay: 2.4s;
}

@keyframes furnace {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.55;
  }
}

/* Sections */

.band {
  padding-block: 72px;
}

.band.alt {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.band h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
}

.intro {
  max-width: 46rem;
  margin: 14px 0 0;
  color: var(--muted);
}

/* Built on Spring AI Agent */

.agent {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0 0;
}

.agent > div {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 14px;
}

.agent h3 {
  font-size: 1.2rem;
}

.agent ul {
  margin: 12px 0 0;
  padding-left: 1.1em;
  color: var(--muted);
  font-size: 0.95rem;
}

.agent li + li {
  margin-top: 8px;
}

.more {
  margin: 22px 0 0;
}

/* The pass, as a conveyor of stations */

.conveyor {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin: 40px 0 0;
  padding: 0 0 34px;
  list-style: none;
  counter-reset: station;
}

.conveyor::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 14px;
  border-radius: 7px;
  background: repeating-linear-gradient(90deg, #44403c 0 18px, #78716c 18px 22px) 0 0 / 22px 100%, #44403c;
  box-shadow: inset 0 2px 0 rgb(0 0 0 / 0.25);
  animation: belt 1.4s linear infinite;
}

@keyframes belt {
  to {
    background-position: 22px 0, 0 0;
  }
}

.conveyor li {
  display: flex;
}

.conveyor a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 16px 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  border-radius: 12px;
  color: var(--charcoal);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.conveyor a:hover {
  color: var(--charcoal);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgb(28 25 23 / 0.12);
}

.conveyor a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 2px;
  height: 20px;
  background: var(--line);
}

.conveyor .step {
  color: var(--orange-deep);
  font: 700 0.85rem/1 var(--mono);
}

.conveyor strong {
  font: 700 1.15rem/1.2 var(--serif);
}

.conveyor span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Feature cards */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cards h3 {
  font-size: 1.2rem;
}

.cards h3 a {
  color: var(--charcoal);
  text-decoration-color: var(--orange-light);
  text-decoration-thickness: 2px;
}

.cards h3 a:hover {
  color: var(--orange-deep);
}

.cards p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Backends */

.backends {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 34px 0 0;
}

.backends div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.backends dt {
  font: 700 1.05rem/1.3 var(--serif);
}

.backends dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.backends span {
  padding: 3px 10px;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #fff;
  color: var(--charcoal);
  font-size: 0.88rem;
}

.backends span:first-child {
  border-color: #b7d9a0;
  background: #f1f8eb;
  color: var(--green);
}

/* Quick start */

.start {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 40px;
}

.start p {
  color: var(--muted);
}

pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  background: var(--charcoal);
  color: var(--cream);
  border-radius: 14px;
  border-left: 4px solid var(--orange);
  font: 0.9rem/1.65 var(--mono);
}

pre code {
  font-size: inherit;
}

/* Footer */

.footer {
  padding-block: 40px 56px;
  background: var(--charcoal);
  color: #d6d3d1;
  font-size: 0.95rem;
}

.footer a {
  color: var(--orange-light);
}

.footer a:hover {
  color: #fed7aa;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.badges img {
  display: block;
}

#build {
  margin: 16px 0 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

/* Narrower screens */

@media (max-width: 1040px) {
  .conveyor {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-bottom: 0;
  }

  .conveyor::after,
  .conveyor a::after {
    display: none;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .hero-body {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-block: 28px 64px;
  }

  .mark {
    order: -1;
    max-width: 200px;
    justify-self: start;
  }

  .conveyor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backends,
  .start {
    grid-template-columns: 1fr;
  }

  .band {
    padding-block: 56px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .conveyor,
  .cards {
    grid-template-columns: 1fr;
  }

  pre {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .conveyor::after,
  .mark .flare rect {
    animation: none;
  }

  .conveyor a {
    transition: none;
  }
}
