:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --paper: #fffdf8;
  --ink: #18201d;
  --muted: #59655f;
  --line: #d9d0c0;
  --green: #0f6b58;
  --green-dark: #08483b;
  --clay: #a55236;
  --gold: #c6973e;
  --blue: #315d77;
  --terminal: #101613;
  --terminal-line: #27352f;
  --shadow: 0 26px 80px rgba(24, 32, 29, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(24, 32, 29, 0.12);
  background: rgba(246, 243, 236, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--green-dark);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--green);
  color: #fffdf8;
  font-size: 12px;
  font-weight: 900;
}

.nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  color: #47534d;
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--green-dark);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(620px, calc(100svh - 190px), 780px);
  overflow: hidden;
  border-bottom: 1px solid rgba(24, 32, 29, 0.16);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(13, 25, 20, 0.88), rgba(13, 25, 20, 0.58) 42%, rgba(13, 25, 20, 0.1)),
    linear-gradient(0deg, rgba(13, 25, 20, 0.26), rgba(13, 25, 20, 0.08)),
    url("assets/go-code-watercolor-hero.png");
  background-position: center;
  background-size: cover;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 22%;
  background: linear-gradient(0deg, rgba(246, 243, 236, 0.98), rgba(246, 243, 236, 0));
  content: "";
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1120px, calc(100% - 64px));
  min-height: clamp(620px, calc(100svh - 190px), 780px);
  margin: 0 auto;
  padding: 64px 0 70px;
  color: #fffdf8;
}

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

.hero .eyebrow,
.invert {
  color: #9ce4c6;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 10vw, 124px);
  line-height: 0.9;
}

h2 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 0.98;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.15;
}

.lede {
  max-width: 710px;
  margin: 24px 0 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: clamp(19px, 2.2vw, 25px);
}

.hero-actions,
.command-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 253, 248, 0.72);
  padding: 0 18px;
  font-weight: 850;
}

.button.primary {
  border-color: #fffdf8;
  background: #fffdf8;
  color: var(--green-dark);
}

.button.secondary {
  color: #fffdf8;
}

.command-strip {
  max-width: 760px;
  margin-top: 46px;
  color: rgba(255, 253, 248, 0.95);
}

.command-strip code {
  border: 1px solid rgba(255, 253, 248, 0.28);
  background: rgba(16, 22, 19, 0.62);
  padding: 10px 12px;
  font-size: 13px;
}

.install-panel,
.section,
.dark-band {
  padding: 78px 32px;
}

.install-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(360px, 1fr);
  gap: 44px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.install-copy p,
.section-heading p,
.api-copy p,
.feature p,
.runtime-list span {
  color: var(--muted);
  font-size: 17px;
}

.terminal,
.code-window {
  overflow: hidden;
  border: 1px solid var(--terminal-line);
  background: var(--terminal);
  color: #edf5ef;
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid var(--terminal-line);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d7654e;
}

.terminal-bar span:nth-child(2) {
  background: #d8a73f;
}

.terminal-bar span:nth-child(3) {
  background: #52b579;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 24px;
  font-size: 14px;
  line-height: 1.55;
}

.section-heading,
.workflow-grid,
.runtime-layout,
.api-grid,
.footer {
  max-width: 1120px;
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading.compact {
  margin-bottom: 24px;
}

.section-heading p {
  max-width: 740px;
}

.workflow-grid,
.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 22px;
}

.feature.accent {
  border-color: rgba(15, 107, 88, 0.35);
  background: #edf7f1;
}

.feature-number {
  display: block;
  margin-bottom: 26px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 900;
}

.step-list {
  max-width: 1120px;
  margin: 0 auto;
}

.feature p code,
.install-copy p code,
.api-copy p code {
  color: var(--green-dark);
  font-size: 0.95em;
  font-weight: 800;
}

.dark-band {
  background: #111814;
  color: #fffdf8;
}

.runtime-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
  gap: 48px;
  align-items: start;
}

.runtime-list {
  display: grid;
  gap: 1px;
  border: 1px solid #304139;
  background: #304139;
}

.runtime-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  background: #111814;
  padding: 18px;
}

.runtime-list strong {
  color: #f1c978;
}

.runtime-list span {
  color: #c3d1ca;
}

.api-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(390px, 1fr);
  gap: 36px;
  align-items: start;
}

.endpoint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.endpoint-list code {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 9px 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.code-window {
  box-shadow: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--green-dark);
  font-weight: 850;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 22px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero,
  .hero-inner {
    min-height: clamp(560px, calc(100svh - 220px), 700px);
  }

  .hero-inner {
    width: min(100% - 40px, 1120px);
  }

  .install-panel,
  .runtime-layout,
  .api-grid,
  .workflow-grid,
  .step-list {
    grid-template-columns: 1fr;
  }

  .install-panel,
  .section,
  .dark-band {
    padding: 60px 20px;
  }

  .runtime-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 40px 0 42px;
  }

  .hero-actions,
  .footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .command-strip code,
  .endpoint-list code {
    width: 100%;
  }

  .command-strip {
    display: none;
  }

  h1 {
    font-size: 50px;
  }

  pre {
    padding: 20px;
    font-size: 13px;
  }
}
