:root {
  --bg: #12100d;
  --bg-2: #1a1713;
  --surface: rgba(31, 28, 23, 0.86);
  --surface-strong: rgba(38, 34, 28, 0.96);
  --border: rgba(255, 171, 88, 0.22);
  --text: #fff7eb;
  --muted: #c9bca9;
  --muted-2: #9d9487;
  --accent: #ff8a24;
  --accent-2: #5bc8ff;
  --cream: #ffe0ac;
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.34);
  --content: min(1160px, calc(100vw - 32px));
  --font-body: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-head: "Avenir Next Condensed", "Franklin Gothic Medium", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, #12100d 0%, #1a1713 42%, #0f1010 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 138, 36, 0.13), transparent 38%),
    linear-gradient(235deg, rgba(91, 200, 255, 0.09), transparent 34%);
}

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

img {
  display: block;
  max-width: 100%;
}

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

code:not(pre code) {
  padding: 0.16rem 0.36rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #ffcf95;
  background: rgba(255, 255, 255, 0.055);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: var(--content);
  margin: 0 auto;
  padding: 0.7rem 0;
}

.site-header::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: -1;
  background: rgba(18, 16, 13, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: max-content;
  font-weight: 800;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  object-position: left center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.brand span {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.87rem;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 138, 36, 0.13);
}

.nav-link-github {
  color: #fdfdfd;
  background: rgba(255, 255, 255, 0.075);
}

.nav-toggle {
  display: none;
  min-height: 38px;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: min(740px, 74vh);
  margin-top: -66px;
  padding: 9rem max(16px, calc((100vw - 1160px) / 2)) 3.5rem;
  overflow: hidden;
  background: #12100d;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 11, 9, 0.96) 0%, rgba(12, 11, 9, 0.78) 36%, rgba(12, 11, 9, 0.3) 72%),
    linear-gradient(0deg, rgba(18, 16, 13, 1) 0%, rgba(18, 16, 13, 0.18) 28%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  width: min(650px, 100%);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0;
  line-height: 1;
}

h1 {
  max-width: 12ch;
  font-size: clamp(4rem, 13vw, 8.5rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy p {
  max-width: 660px;
  margin: 1rem 0 0;
  color: #f5dfc5;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 8px;
  color: #1b130a;
  font-weight: 800;
  background: linear-gradient(180deg, #ffb65c, #ff8422);
  box-shadow: 0 14px 30px rgba(255, 133, 34, 0.24);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.hero-facts span,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  color: #ffe3be;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.8rem;
  font-weight: 700;
}

.section,
.sub-hero {
  width: var(--content);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section + .section {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.section-head {
  display: grid;
  gap: 0.65rem;
  max-width: 760px;
  margin-bottom: 1.6rem;
}

.section-head p {
  margin: 0;
  font-size: 1.03rem;
}

.sub-hero {
  padding: 7rem 0 3.2rem;
}

.sub-hero h1 {
  max-width: 780px;
  font-size: clamp(3rem, 10vw, 6.6rem);
}

.sub-hero p {
  max-width: 760px;
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.info-card,
.step-block,
.route-example,
.image-panel,
.callout {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 1.25rem;
}

.info-card p {
  margin: 0.75rem 0 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.flow-section {
  padding-top: 1rem;
}

.flow-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0.7rem;
}

.flow-strip div {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(91, 200, 255, 0.2);
  border-radius: 8px;
  background: rgba(12, 23, 29, 0.72);
}

.flow-strip b {
  align-self: center;
  color: var(--accent);
}

.flow-strip strong,
.flow-strip span {
  display: block;
}

.flow-strip span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  align-items: center;
  gap: 1.4rem;
}

.split-section-reverse {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1fr);
}

.split-copy {
  min-width: 0;
}

.image-panel {
  overflow: hidden;
  margin: 0;
}

.image-panel img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.image-panel figcaption {
  padding: 0.8rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.command-box {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid rgba(91, 200, 255, 0.22);
  border-radius: 8px;
  background: #090b0d;
  box-shadow: var(--shadow);
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
}

.command-head button {
  min-height: 30px;
  padding: 0.35rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  color: #f7d5ad;
  line-height: 1.55;
}

.callout {
  margin-top: 1rem;
  padding: 1rem;
}

.callout strong,
.callout code {
  display: block;
}

.callout code {
  width: fit-content;
  margin-top: 0.55rem;
}

.step-list {
  display: grid;
  gap: 1rem;
}

.step-block {
  padding: 1.25rem;
}

.step-block > span {
  display: inline-flex;
  margin-bottom: 0.6rem;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.check-grid,
.port-table {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

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

.check-grid div,
.port-table div {
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.check-grid strong,
.port-table strong,
.port-table span {
  display: block;
}

.check-grid code {
  display: block;
  width: fit-content;
  margin-top: 0.45rem;
}

.port-table {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.port-table span {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.45;
}

.route-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 1.1rem;
}

.route-example p {
  margin-bottom: 0;
}

.check-list,
.number-list {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--muted);
  line-height: 1.75;
}

.doc-content {
  max-width: 880px;
}

.doc-content h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}

.doc-content h2 {
  margin-top: 2.2rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.doc-content h3 {
  margin-top: 1.6rem;
}

.doc-content a {
  color: #89d9ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: var(--content);
  margin: 1rem auto 0;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
}

.site-footer p {
  margin: 0;
}

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

@media (max-width: 900px) {
  .site-header {
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(18, 16, 13, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero {
    min-height: 690px;
    padding-top: 8rem;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(12, 11, 9, 0.4) 0%, rgba(12, 11, 9, 0.92) 52%, rgba(18, 16, 13, 1) 100%);
  }

  .hero-bg {
    height: 58%;
    object-fit: cover;
    object-position: 58% top;
  }

  h1 {
    font-size: clamp(3.4rem, 16vw, 6rem);
  }

  .grid-2,
  .grid-3,
  .split-section,
  .split-section-reverse,
  .flow-strip,
  .check-grid,
  .port-table,
  .route-example {
    grid-template-columns: 1fr;
  }

  .flow-strip b {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --content: min(100vw - 22px, 1160px);
  }

  .brand span {
    font-size: 0.95rem;
  }

  .site-header::before {
    height: 66px;
  }

  .hero {
    min-height: 655px;
    padding-bottom: 2.4rem;
  }

  .hero-copy p,
  .sub-hero p {
    font-size: 1rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .sub-hero {
    padding-top: 5.8rem;
  }

  .site-footer {
    display: grid;
  }
}
