:root {
  color-scheme: dark;
  --bg: #010b14;
  --bg-alt: #03152a;
  --panel: rgba(10, 22, 38, 0.9);
  --panel-strong: rgba(6, 14, 28, 0.95);
  --panel-soft: rgba(11, 24, 46, 0.9);
  --text: #f5f7ff;
  --muted: rgba(255, 255, 255, 0.74);
  --muted-strong: rgba(255, 255, 255, 0.9);
  --accent: #5ce1e6;
  --accent-strong: #a9fff6;
  --accent-soft: rgba(92, 225, 230, 0.18);
  --danger: #ff7a6b;
  --surface-border: rgba(92, 225, 230, 0.18);
  --shadow: 0 28px 64px rgba(2, 8, 23, 0.56);
  --gradient: radial-gradient(circle at 15% -10%, rgba(92, 225, 230, 0.22), transparent 40%),
    linear-gradient(130deg, #021025 0%, #031b36 45%, #020a16 100%);
  --hero-gradient: linear-gradient(150deg, rgba(89, 235, 238, 0.12), rgba(4, 20, 36, 0.7));
  font-family: 'Inter', 'Space Grotesk', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gradient);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.55;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(92, 225, 230, 0.22), transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(92, 225, 230, 0.14), transparent 35%);
  pointer-events: none;
  z-index: -1;
  filter: blur(24px);
}

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

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

body > header.site-hero,
main,
footer.site-footer,
nav.page-nav {
  width: min(1200px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

body > header.site-hero {
  margin-top: 1.5rem;
}

main {
  padding: 2rem 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

main > header:not(.site-hero) {
  background: rgba(7, 17, 34, 0.74);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

main > header:not(.site-hero) p:first-child {
  color: var(--accent-strong);
  margin-bottom: 0.5rem;
}

main > header:not(.site-hero) h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.15;
}

main > header:not(.site-hero) > p:last-child {
  color: var(--muted);
  max-width: 72ch;
}

header.site-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  background: var(--panel);
  border-radius: 32px;
  border: 1px solid rgba(92, 225, 230, 0.25);
  box-shadow: 0 35px 80px rgba(2, 8, 23, 0.7);
  position: relative;
  overflow: hidden;
}

header.site-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  mix-blend-mode: screen;
  opacity: 0.8;
  pointer-events: none;
}

header.site-hero > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

header.site-hero > div:first-child > p:first-child {
  color: var(--accent-strong);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

header.site-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  margin: 0 0 0.9rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 11ch;
}

header.site-hero p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 62ch;
}

header.site-hero img {
  width: min(100%, 360px);
  aspect-ratio: 14 / 11;
  object-fit: contain;
  margin-inline: auto;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  font-weight: 650;
  border: 1px solid rgba(92, 225, 230, 0.6);
  background: linear-gradient(135deg, rgba(5, 86, 110, 0.34), rgba(92, 225, 230, 0.12));
  box-shadow: 0 10px 25px rgba(5, 32, 58, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(2, 8, 23, 0.6);
  background: linear-gradient(135deg, rgba(92, 225, 230, 0.32), rgba(72, 213, 223, 0.36));
  border-color: rgba(169, 255, 246, 0.76);
}

section {
  margin-top: 0;
}

section h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  letter-spacing: 0.01em;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 60px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(92, 225, 230, 0.8), rgba(92, 225, 230, 0));
}

.card-grid,
.runbook-gallery,
.walkthroughs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card,
.runbook-card,
.walkthrough-card,
.runbook-columns .column,
.arch-diagram,
main > header:not(.site-hero) {
  backdrop-filter: blur(10px);
}

.card,
.runbook-card {
  background: var(--panel-soft);
  border-radius: 20px;
  padding: 1.2rem;
  border: 1px solid rgba(92, 225, 230, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.42);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  overflow: hidden;
  min-height: 250px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card::after,
.runbook-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(92, 225, 230, 0.08), transparent 68%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover,
.runbook-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 225, 230, 0.4);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.card:hover::after,
.runbook-card:hover::after {
  opacity: 1;
}

.card h3,
.runbook-card strong {
  color: var(--text);
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.28;
}

.card p,
.card small,
.runbook-card p,
.runbook-card small,
.arch-diagram p,
.runbook-columns p,
.runbook-columns li,
.quick-reference-table td,
.quick-reference-table th {
  font-size: 0.95rem;
}

.card p,
.card small,
.runbook-card p,
.runbook-card small {
  color: var(--muted);
  line-height: 1.55;
}

.card a,
.runbook-card a {
  margin-top: auto;
  font-weight: 650;
  color: var(--accent-strong);
}

.pill,
.small-tag {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  align-self: flex-start;
  background: rgba(92, 225, 230, 0.12);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(92, 225, 230, 0.18);
}

.arch-diagram {
  background: rgba(7, 17, 34, 0.88);
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid rgba(92, 225, 230, 0.2);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.arch-diagram > p,
.arch-diagram > div:not(.arch-cell):not(.arch-connectors) {
  grid-column: 1 / -1;
}

.arch-cell {
  background: rgba(5, 13, 26, 0.8);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  min-height: 128px;
}

.arch-cell strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.arch-connectors {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 0.15rem;
}

.arch-connectors svg {
  width: min(100%, 420px);
  height: 32px;
  opacity: 0.9;
}

.walkthrough-card {
  position: relative;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(92, 225, 230, 0.2);
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.34), rgba(6, 20, 35, 0.95));
  box-shadow: inset 0 0 0 1px rgba(92, 225, 230, 0.08), 0 20px 40px rgba(0, 0, 0, 0.42);
  min-height: 210px;
  overflow: hidden;
}

.walkthrough-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 1px dashed rgba(92, 225, 230, 0.18);
  opacity: 0.7;
  pointer-events: none;
}

.walkthrough-anim {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.walkthrough-card h3 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.walkthrough-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pulse {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(92, 225, 230, 0.2);
  animation: pulse 1.8s ease-in-out infinite;
}

.pulse.delay-1 {
  animation-delay: 0.4s;
}

.pulse.delay-2 {
  animation-delay: 0.8s;
}

@keyframes pulse {
  0% {
    width: 60%;
    opacity: 0.12;
  }
  50% {
    width: 100%;
    opacity: 0.48;
  }
  100% {
    width: 42%;
    opacity: 0.18;
  }
}

.quick-reference-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(7, 17, 34, 0.78);
  border: 1px solid rgba(92, 225, 230, 0.16);
}

.quick-reference-table th,
.quick-reference-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.quick-reference-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.quick-reference-table tbody tr:hover {
  background: rgba(92, 225, 230, 0.05);
}

.runbook-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.runbook-columns .column {
  background: rgba(7, 15, 26, 0.9);
  border-radius: 20px;
  padding: 1.25rem;
  border: 1px solid rgba(92, 225, 230, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

.runbook-columns .column h3,
.runbook-columns .column h4 {
  margin: 0 0 0.65rem;
}

.runbook-columns .column ul {
  margin: 0;
  padding-left: 1.1rem;
}

.warning-banner {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 122, 107, 0.15);
  border: 1px solid rgba(255, 122, 107, 0.45);
  color: var(--danger);
  font-weight: 600;
}

footer.site-footer {
  padding: 0 0 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

nav.page-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 1rem;
}

nav.page-nav a {
  font-size: 0.9rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  color: var(--accent-strong);
}

@media (max-width: 980px) {
  .arch-diagram {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  header.site-hero {
    grid-template-columns: 1fr;
  }

  header.site-hero h1 {
    max-width: 14ch;
  }
}

@media (max-width: 720px) {
  body > header.site-hero,
  main,
  footer.site-footer,
  nav.page-nav {
    width: min(1200px, calc(100% - 1rem));
  }

  body {
    font-size: 15px;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  .arch-diagram,
  .card-grid,
  .runbook-gallery,
  .walkthroughs,
  .runbook-columns {
    grid-template-columns: 1fr;
  }

  .quick-reference-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}