:root {
  --bg: #f6f1e8;
  --bg-strong: #efe5d7;
  --surface: rgba(255, 252, 247, 0.86);
  --surface-strong: #fffaf3;
  --ink: #182430;
  --muted: #51606e;
  --line: rgba(24, 36, 48, 0.12);
  --accent: #bd5b33;
  --accent-dark: #923f20;
  --accent-soft: rgba(189, 91, 51, 0.12);
  --teal: #1d726a;
  --teal-soft: rgba(29, 114, 106, 0.14);
  --shadow: 0 20px 60px rgba(24, 36, 48, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(29, 114, 106, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(189, 91, 51, 0.16), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, #faf7f1 100%);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  line-height: 1.1;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

p {
  margin: 0 0 1rem;
}

.site-width {
  width: min(var(--content-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(246, 241, 232, 0.8);
  border-bottom: 1px solid var(--line);
}

.header-row,
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.top-nav a,
.card-link {
  text-decoration: none;
}

.top-nav a:hover,
.card-link:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.hero-shell {
  padding: 4rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.feature-card,
.stack-card,
.deployment-banner,
.reference-hero,
.endpoint-card,
.sidebar-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
}

.hero-panel {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(29, 114, 106, 0.12), transparent 70%),
    var(--surface-strong);
}

.eyebrow,
.section-kicker,
.card-kicker,
.panel-title {
  margin-bottom: 0.75rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-copy h1,
.reference-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.7rem);
}

.hero-text,
.reference-hero p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff6ef;
  background: linear-gradient(135deg, var(--accent), #d67a4b);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.feature-list,
.compact-list {
  margin: 0;
  padding-left: 1.1rem;
}

.card-grid,
.stack-layout {
  display: grid;
  gap: 1.25rem;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.75rem;
}

.feature-card,
.stack-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

.code-panel {
  overflow-x: auto;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #17222d 0%, #0e171f 100%);
  color: #edf3f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-panel pre {
  margin: 0;
  white-space: pre-wrap;
}

.stack-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.75rem;
}

.deployment-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.8rem;
  margin-bottom: 3rem;
  border-radius: var(--radius-lg);
}

.api-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 2.5rem 0 3rem;
}

.api-sidebar {
  position: relative;
}

.sidebar-card {
  position: sticky;
  top: 5.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.side-nav a {
  text-decoration: none;
  color: var(--muted);
}

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

.api-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reference-hero {
  padding: 1.8rem;
  border-radius: var(--radius-lg);
}

.endpoint-card {
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-lg);
}

.endpoint-card h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

.endpoint-card p {
  margin-bottom: 0.6rem;
}

.endpoint-card .code-panel {
  margin-bottom: 0.5rem;
}

.endpoint-card table {
  margin: 0.6rem 0;
}

.endpoint-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.endpoint-group {
  margin-top: 0.5rem;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.method-get {
  background: var(--teal-soft);
  color: #14554f;
}

.method-post {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.method-delete {
  background: rgba(120, 39, 39, 0.12);
  color: #7a2020;
}

.endpoint-note {
  margin-top: 1rem;
  color: var(--muted);
}

.example-block {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(29, 114, 106, 0.3);
  background: var(--teal-soft);
}

.example-block .example-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.example-block p {
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.example-block .code-panel {
  margin-bottom: 0.6rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--teal);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-grid,
  .card-grid,
  .section-grid,
  .stack-layout,
  .api-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }

  .deployment-banner,
  .header-row,
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-shell {
    padding-top: 2.5rem;
  }

  .hero-copy,
  .hero-panel,
  .feature-card,
  .stack-card,
  .deployment-banner,
  .reference-hero,
  .endpoint-card,
  .sidebar-card {
    padding: 1.25rem;
  }

  .hero-copy h1,
  .reference-hero h1 {
    font-size: 2.3rem;
  }

  .top-nav {
    gap: 0.75rem;
  }
}
