/* hyperbutler.dev: one stylesheet, no inline styles (the CSP has no 'unsafe-inline'). */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #060a12;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #edf2fa;
  --muted: #9aa8bf;
  --faint: #7d8aa1;
  --blue: #1a8cff;
  --blue-2: #4a86e0;
  --blue-text: #6cb2ff;
  --btn: #1668d6;
  --btn-hover: #1a78f0;
  --amber: #f5b83d;
  --green: #5ad19a;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: var(--blue-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #9dcbff; }

:focus-visible {
  outline: 2px solid var(--blue-text);
  outline-offset: 3px;
  border-radius: 6px;
}

code,
pre { font-family: var(--mono); font-size: 0.9em; }

:not(pre) > code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.84em;
  white-space: nowrap;
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 560;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-ico { flex: none; width: 16px; height: 16px; }

.btn-primary {
  background: var(--btn);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(108, 178, 255, 0.35) inset, 0 8px 30px -8px rgba(26, 140, 255, 0.6);
}
.btn-primary:hover { background: var(--btn-hover); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--line-2);
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); background: var(--surface-2); color: var(--text); }

.btn-sm { min-height: 34px; padding: 0 14px; font-size: 0.875rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; }

.nav-links ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a:not(.btn) {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.nav-links a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.nav-links li:last-child { margin-left: 8px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 88px;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -60px 0 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(26, 140, 255, 0.16), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 40px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.7);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
}
.pill:hover { border-color: rgba(245, 184, 61, 0.5); color: var(--text); }
.pill-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(245, 184, 61, 0.14);
  color: var(--amber);
  font-family: var(--sans);
  font-weight: 600;
}
.pill-arrow { transition: transform 0.15s; }
.pill:hover .pill-arrow { transform: translateX(2px); }

.hero-title {
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(100deg, #8cc4ff 0%, var(--blue) 45%, var(--blue-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 34rem;
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.18rem);
  line-height: 1.6;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  margin-top: 20px;
  color: var(--faint);
  font-size: 0.85rem;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-art img {
  position: relative;
  width: min(100%, 400px);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5));
}
.glow {
  position: absolute;
  inset: -10% -20%;
  background:
    radial-gradient(circle at 50% 45%, rgba(26, 140, 255, 0.38), transparent 55%),
    radial-gradient(circle at 60% 60%, rgba(74, 134, 224, 0.22), transparent 60%);
  filter: blur(20px);
}

/* ---------- Terminal ---------- */

.term {
  max-width: 880px;
  margin: 72px auto 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.92), rgba(8, 12, 22, 0.96));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 120px -30px rgba(26, 140, 255, 0.35);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: #2a3346; }
.term-title {
  flex: 1;
  margin-right: 51px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-align: center;
}

.term-body {
  margin: 0;
  padding: 20px 22px 24px;
  overflow-x: auto;
  color: #c9d3e3;
  font-size: 0.86rem;
  line-height: 1.75;
}
.term-body code { font-size: inherit; }
.ps { color: var(--blue-text); }
.cmd { display: inline-block; color: #fff; vertical-align: top; }
.ok { color: var(--green); }
.dim { color: var(--faint); }
.hi { color: #fff; font-weight: 600; }

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: -0.2em;
  background: var(--blue-text);
}

/* CSS-only playback: lines appear in turn, commands are "typed". */
@media (prefers-reduced-motion: no-preference) {
  .ln { animation: line-in 0.25s ease-out both; }
  .l1 { animation-delay: 0.3s; }
  .l1 .cmd { animation: type 0.9s steps(17, end) 0.5s both; }
  .l2 { animation-delay: 1.9s; }
  .l3 { animation-delay: 2.5s; }
  .l3 .cmd { animation: type 1.2s steps(27, end) 2.7s both; }
  .l4 { animation-delay: 4.2s; }
  .l5 { animation-delay: 4.5s; }
  .l6 { animation-delay: 5s; }
  .l7, .l8 { animation-delay: 5.5s; }
  .l9 { animation-delay: 5.65s; }
  .l10 { animation-delay: 6s; }
  .cursor { animation: blink 1.1s steps(1, end) 6s infinite; }
}

@keyframes line-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */

.section { padding: 96px 0; border-top: 1px solid var(--line); }

.eyebrow {
  margin-bottom: 14px;
  color: var(--blue-text);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-amber { color: var(--amber); }

.h2 {
  max-width: 20ch;
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.3rem);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}
.h2-sm { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
.mono-inline { font-family: var(--mono); font-weight: 560; letter-spacing: -0.06em; color: var(--blue-text); }

.lead {
  max-width: 40rem;
  margin: 18px 0 48px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Benchmarks ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.875rem;
}
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.key-hb::before { background: linear-gradient(90deg, var(--blue-2), var(--blue)); }
.key-dd::before { background: #3a4458; }

.bench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bench {
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.bench-wide { grid-column: 1 / -1; }
.bench h3 {
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bars { margin: 0; }
.bar-row + .bar-row { margin-top: 12px; }
.bar-row dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}
.bar-row dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  align-items: center;
  gap: 14px;
  margin: 0;
}

.bar {
  position: relative;
  display: block;
  height: 14px;
  min-width: 6px;
  border-radius: 4px;
  overflow: hidden;
}
.bar-hb {
  background: linear-gradient(90deg, var(--blue-2), var(--blue));
  box-shadow: 0 0 18px -2px rgba(26, 140, 255, 0.55);
}
.bar-dd { background: #3a4458; }
.bar-range {
  background: repeating-linear-gradient(-45deg, #2a3242 0 5px, #222937 5px 10px);
}
.seg { display: block; height: 100%; background: #3a4458; }

.val {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  line-height: 1.3;
}
.val-hb { color: #fff; font-weight: 600; }
.val-extra { display: block; color: var(--faint); font-size: 0.75rem; }

.bench-note { margin: 14px 0 0; color: var(--faint); font-size: 0.8rem; }

/* Bar lengths, each relative to the longest bar in its chart. */
.w-full { width: 100%; }
.w-start-hb { width: 44.6%; }    /* 2.5 s of 5.6 s */
.w-mem-hb { width: 12.1%; }      /* 322 MiB of 2660 MiB (the top of Docker Desktop's range) */
.w-mem-dd-lo { width: 63.5%; }   /* 1690 MiB of 2660 MiB */
.w-disk-hb { width: 22.1%; }     /* 1.5 GiB of 6.8 GiB */
.w-dl-hb { width: 12.3%; }       /* 116 MB of 943 MB (592 + 351) */
.w-dl-dd { width: 62.8%; }       /* 592 MB of 943 MB */
.w-bind-hb { width: 11.8%; }     /* 0.4 s of 3.4 s */

.footnote {
  max-width: 52rem;
  margin-top: 28px;
  color: var(--faint);
  font-size: 0.875rem;
}

/* ---------- Bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  grid-column: span 2;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 178, 255, 0.35), transparent);
}
.tile-hero { grid-column: span 4; }
.tile-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(26, 140, 255, 0.2), transparent 65%);
  pointer-events: none;
}
.tile-half { grid-column: span 3; }

.tile h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}
.tile-hero h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); letter-spacing: -0.035em; }
.tile p { color: var(--muted); font-size: 0.95rem; }
.tile-hero p { max-width: 36rem; font-size: 1.02rem; }

.tile-ico {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  border: 1px solid rgba(108, 178, 255, 0.25);
  border-radius: 10px;
  background: rgba(26, 140, 255, 0.1);
  color: var(--blue-text);
}
.tile-ico-amber {
  border-color: rgba(245, 184, 61, 0.3);
  background: rgba(245, 184, 61, 0.1);
  color: var(--amber);
}

.tile-stat {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}
.tile-stat .num {
  margin-right: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

/* ---------- Install ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step h3 { margin-bottom: 10px; font-size: 1.15rem; font-weight: 620; letter-spacing: -0.02em; }
.step p { color: var(--muted); font-size: 0.95rem; }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  border: 1px solid rgba(108, 178, 255, 0.35);
  border-radius: 50%;
  background: rgba(26, 140, 255, 0.12);
  color: var(--blue-text);
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}
.ticks li { position: relative; padding-left: 22px; }
.ticks li + li { margin-top: 6px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--blue-text);
  border-bottom: 2px solid var(--blue-text);
  transform: rotate(-45deg);
}
.ticks strong, .step strong, .callout strong { color: var(--text); font-weight: 600; }

.code {
  margin: 4px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #04070d;
  color: #dbe4f2;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}
.code code { font-size: inherit; }

.callouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.callout {
  min-width: 0;
  padding: 22px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}
.callout h3 { margin-bottom: 8px; font-size: 0.98rem; font-weight: 600; }
.callout p { color: var(--muted); font-size: 0.9rem; }
.callout .code { margin-top: 12px; font-size: 0.8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.callout-warn { border-color: rgba(245, 184, 61, 0.35); }
.callout-warn h3 { color: var(--amber); }

/* ---------- Preview ---------- */

.preview-card {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(245, 184, 61, 0.22);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(245, 184, 61, 0.07), transparent 60%),
    var(--surface);
}
.preview-card > p { color: var(--muted); }
.preview-card .h2 { margin-bottom: 16px; }

.gaps {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.gaps li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-top: 1px solid var(--line);
}
.gaps li:last-child { border-bottom: 1px solid var(--line); }
.gaps li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.15em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}
.gaps code { white-space: normal; }

/* ---------- Footer ---------- */

.footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.875rem;
}
.footer-row { display: grid; gap: 10px; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.footer-brand img { width: 24px; height: 24px; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.fine { font-size: 0.8rem; }

/* ---------- 404 ---------- */

.notfound {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 61px);
  padding: 48px 0;
  text-align: center;
  isolation: isolate;
}
.notfound-code {
  margin-bottom: 12px;
  color: var(--blue-text);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.notfound h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}
.notfound p { color: var(--muted); }
.notfound .cta { justify-content: center; margin-top: 28px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-art { order: -1; justify-self: start; }
  .hero-art img { width: 160px; }
  .glow { inset: -30% -40%; }
  .steps { grid-template-columns: 1fr; }
  .tile, .tile-half { grid-column: span 3; }
  .tile-hero { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-sec { display: none; }
  .hero { padding: 32px 0 64px; }
  .term { margin-top: 48px; }
  .section { padding: 72px 0; }
  .bench-grid, .callouts { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile-hero, .tile-half { grid-column: 1 / -1; }
  .lead { margin-bottom: 36px; }
  .term-body, .code { white-space: pre-wrap; overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .btn { padding: 0 16px; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
  .bench, .tile, .step { padding: 20px; }
  .bar-row dd { grid-template-columns: minmax(0, 1fr) 6.2rem; gap: 10px; }
  .term-body { padding: 16px; font-size: 0.72rem; }
  .term-title { margin-right: 0; }
  .nav-links li:last-child { margin-left: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
