/* Cerberus site — monochrome, single surface, no borders. Mobile first. */

:root {
  --bg: #111111;
  --surface: #222222;
  --surface-hi: #272727;
  --ink: #f4f4f4;
  --muted: #9a9a9a;
  --dim: #6a6a6a;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 18px;
  --gutter: clamp(18px, 5vw, 40px);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
}

::selection {
  background: transparent;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.shell {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 1120px) {
  .shell {
    padding-inline: 0;
  }
}

/* header — the same surface as the page, no separator */

.top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: contain;
}

.brand b {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3.5vw, 22px);
  font-size: 13.5px;
  color: var(--muted);
}

.nav a,
.nav button {
  transition: color 0.2s ease;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  background: var(--surface);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip .lamp {
  width: 7px;
  height: 7px;
}

@media (max-width: 429px) {
  .nav .vchip {
    display: none;
  }
}

@media (max-width: 370px) {
  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand b {
    font-size: 15px;
  }

  .nav {
    gap: 10px;
    font-size: 12.5px;
  }
}

.lamp {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  flex: none;
}

.lamp::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: lamp 2.4s ease-out infinite;
}

@keyframes lamp {
  0% {
    transform: scale(0.5);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* hero */

.hero {
  position: relative;
  padding-block: clamp(26px, 7vw, 70px) clamp(30px, 7vw, 58px);
}

.bloom {
  position: absolute;
  z-index: 0;
  top: -230px;
  left: 0;
  right: 0;
  height: 720px;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.05) 42%,
    transparent 72%
  );
  filter: blur(18px);
  pointer-events: none;
  animation: bloom 11s ease-in-out infinite alternate;
}

@keyframes bloom {
  from {
    opacity: 0.55;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(26px);
  }
}

.hero .shell {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px 8px 11px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
}

.eyebrow b {
  color: var(--ink);
  font-weight: 650;
}

h1 {
  margin: 20px 0 0;
  font-size: clamp(40px, 11.6vw, 84px);
  line-height: 0.97;
  font-weight: 800;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

h1 .soft {
  color: #5e5e5e;
}

.lead {
  max-width: 54ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(15.5px, 4.1vw, 18px);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 12px 48px -12px rgba(255, 255, 255, 0.55);
}

.btn:active {
  transform: scale(0.99);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--surface-hi);
  box-shadow: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--dim);
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3a3a3a;
}

/* terminal stage with layers */

.stage {
  position: relative;
  margin-top: clamp(36px, 9vw, 66px);
  padding-inline: 8px;
}

.stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 10%;
  right: 10%;
  top: 18%;
  bottom: -8%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent 75%);
  filter: blur(46px);
  pointer-events: none;
}

.layer {
  position: absolute;
  z-index: 1;
  border-radius: var(--r-lg);
  background: #1b1b1b;
  pointer-events: none;
}

.layer--a {
  inset: 16px 22px auto 22px;
  height: 100%;
  transform: rotate(1.4deg);
  opacity: 0.55;
}

.layer--b {
  inset: 9px 14px auto 14px;
  height: 100%;
  transform: rotate(-0.8deg);
  background: #1e1e1e;
  opacity: 0.8;
}

.term {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: #191919;
  border-radius: var(--r-lg);
  padding: clamp(16px, 4.4vw, 24px);
  box-shadow: 0 50px 110px -50px #000;
  font-family: var(--mono);
  font-size: clamp(11.5px, 3.2vw, 13.5px);
  line-height: 1.7;
}

.term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dots {
  display: flex;
  gap: 5px;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f2f2f;
}

.dots i:first-child {
  background: #ededed;
}

.term p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.term .p {
  color: #6d6d6d;
}

.term .c {
  color: #f4f4f4;
}

.term .m {
  color: #9b9b9b;
}

.term .ok {
  color: #fff;
  font-weight: 600;
}

.term .gap {
  height: 0.7em;
}

.caret::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 4px;
  translate: 0 2px;
  background: #fff;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* sections */

.section {
  padding-block: clamp(40px, 9vw, 82px);
}

.kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--dim);
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 7.4vw, 44px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.sub {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: clamp(24px, 5vw, 36px);
}

.grid > * {
  min-width: 0;
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(20px, 4.6vw, 28px);
  transition: background 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover {
  background: var(--surface-hi);
  transform: translateY(-2px);
}

.ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #2c2c2c;
}

.ico svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 16px 0 7px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.card code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink);
}

.card--invert {
  background: #fff;
  color: #111;
}

.card--invert p {
  color: #555;
}

.card--invert code {
  color: #111;
}

.card--invert .ico {
  background: #111;
}

.card--invert:hover {
  background: #fff;
}

.ctaCard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.ctaCard h2 {
  margin: 0;
  color: #111;
}

.ctaCard p {
  margin-top: 8px;
}

.btn--dark {
  background: #111;
  color: #fff;
}

.btn--dark:hover {
  box-shadow: 0 12px 48px -12px rgba(0, 0, 0, 0.55);
}

.pillTag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bdbdbd;
}

.card--invert .pillTag {
  background: #111;
  color: #fff;
}

/* three steps, no boxes */

.steps {
  display: grid;
  gap: clamp(26px, 6vw, 40px);
  margin-top: clamp(26px, 6vw, 40px);
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step .n {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.step h3 {
  margin: 10px 0 6px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* update panel */

.panel {
  display: grid;
  gap: clamp(22px, 5vw, 40px);
  margin-top: clamp(24px, 5vw, 34px);
  padding: clamp(24px, 5.5vw, 40px);
  border-radius: var(--r-xl);
  background: #fff;
  color: #111;
}

@media (min-width: 780px) {
  .panel {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
  }
}

.panel .big {
  font-size: clamp(64px, 18vw, 108px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.065em;
}

.panel .big small {
  font-size: 0.34em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel p {
  margin: 12px 0 0;
  color: #565656;
  font-size: 14.5px;
}

.bar {
  height: 10px;
  margin-top: 20px;
  border-radius: 999px;
  background: #e7e7e7;
  overflow: hidden;
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #111;
  transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}

.in .bar i {
  width: 20%;
}

.panel .note {
  margin: 10px 0 0;
  color: #8a8a8a;
  font-size: 12.5px;
}

/* code */

.code {
  position: relative;
  max-width: 100%;
  background: #181818;
  border-radius: var(--r-md);
  padding: 15px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #d7d7d7;
  overflow-x: auto;
  scrollbar-width: none;
}

.code::-webkit-scrollbar {
  display: none;
}

.code .cmt {
  color: #666;
}

.codeHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.codeHead span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy {
  padding: 6px 10px;
  border-radius: 999px;
  background: #2c2c2c;
  color: #bdbdbd;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.copy:hover {
  background: #363636;
  color: #fff;
}

/* docs */

.docs {
  display: grid;
  gap: 26px;
  padding-top: 8px;
}

.docs > * {
  min-width: 0;
}

@media (min-width: 940px) {
  .docs {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 52px;
    align-items: start;
  }
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-block: 2px;
}

.toc a {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: #a8a8a8;
  font-size: 12.5px;
  transition: color 0.2s ease, background 0.2s ease;
}

.toc a:hover {
  color: #fff;
  background: var(--surface-hi);
}

@media (min-width: 940px) {
  .toc {
    position: sticky;
    top: 26px;
    display: grid;
    gap: 2px;
    overflow: visible;
  }

  .toc a {
    padding: 6px 0;
    border-radius: 0;
    background: none;
    font-size: 13px;
  }

  .toc a:hover {
    background: none;
  }
}

.doc {
  padding-block: 22px 26px;
  scroll-margin-top: 22px;
}

.doc:first-child {
  padding-top: 6px;
}

.doc h2 {
  font-size: clamp(24px, 5.6vw, 32px);
  letter-spacing: -0.035em;
}

.doc h3 {
  margin: 26px 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.doc p,
.doc ul {
  max-width: 70ch;
}

.doc p,
.doc li {
  color: var(--muted);
  font-size: 14.8px;
}

.doc p {
  margin: 10px 0 0;
}

.doc ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.doc li {
  margin: 5px 0;
}

.doc li::marker {
  color: #4a4a4a;
}

.doc code {
  padding: 2px 6px;
  border-radius: 7px;
  background: #262626;
  color: #ededed;
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.doc .code code,
.doc .code {
  padding: 0;
  background: none;
}

.doc .code {
  padding: 15px 16px;
  background: #181818;
  margin-top: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.doc .code code {
  font-size: inherit;
}

.cmdlist {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.cmdrow {
  display: grid;
  gap: 1px;
  padding: 10px 0;
}

.cmdrow code {
  justify-self: start;
}

.cmdrow span {
  color: var(--dim);
  font-size: 13px;
}

@media (min-width: 720px) {
  .cmdrow {
    grid-template-columns: minmax(200px, 0.9fr) 1.4fr;
    align-items: baseline;
    gap: 16px;
  }
}

.note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: #1b1b1b;
  color: var(--muted);
  font-size: 13.5px;
}

.note b {
  color: var(--ink);
  font-weight: 650;
}

details {
  margin-top: 10px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
}

details summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 650;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  float: right;
  color: var(--dim);
  font-family: var(--mono);
  font-weight: 400;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

details p:last-child {
  margin-bottom: 0;
}

/* footer */

.foot {
  padding-block: clamp(34px, 7vw, 54px) 40px;
  color: var(--dim);
  font-size: 12.5px;
}

.footTop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.foot .brand b {
  font-size: 15px;
}

.foot .brand img {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.footLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footLinks a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footLinks a:hover {
  color: var(--ink);
}

.footBottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: #555;
}

.footBottom .lamp {
  width: 6px;
  height: 6px;
  background: #7a7a7a;
}

.footBottom .lamp::after {
  display: none;
}

.footBottom span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* reveal: scroll-linked when supported, plain content otherwise */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    @keyframes rise {
      from {
        opacity: 0;
        transform: translateY(18px);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .bar i {
    width: 20%;
  }
}
