/* Colours are VaultUI's own theme (internal/ui/styles/theme.go). */
:root {
  --bg: #101118;
  --fg: #f8f8f2;
  --muted: #8b93b8;
  --line: #262838;
  --surface: #181a24;
  --accent: #7b61ff;
  --accent-ink: #fff;
  --gold: #ffb86c;
  --green: #50fa7b;
  --red: #ff5555;
  --dim: #6272a4;
  --term: #22232e;
  --term-head: #1e1f29;
  --ok: #50fa7b;
  --sans: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pixel: "Departure Mono", "JetBrains Mono", monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
body {
  font-size: 15px;
  background:
    radial-gradient(60% 40% at 50% -5%, #7b61ff2e, transparent 70%),
    linear-gradient(transparent 0 0),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  /* faint scanline grid */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(#ffffff05 1px, transparent 1px), linear-gradient(90deg, #ffffff05 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(#000, transparent 70%);
}
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; }
code { color: var(--gold); font-size: .95em; }
kbd {
  display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .4em;
  border-radius: 4px; border: 1px solid #3a3d55; border-bottom-width: 2px; background: #1b1d29;
  color: var(--gold); font: 600 .8em/1 var(--mono);
}
.nav__brand span { font-family: var(--pixel); font-size: 18px; font-weight: 400; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 0; }
.hero__copy { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.badge { display: inline-flex; gap: .6ch; padding: 5px 12px; border: 1px solid #3a3d55; border-radius: 99px; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.badge span:first-child { color: var(--gold); }
.badge span:last-child { color: var(--accent); filter: brightness(1.3); }
.hero h1 { font-size: clamp(38px, 6.6vw, 80px); line-height: 1.05; text-wrap: balance; }
.caret { color: var(--accent); animation: blink 1.1s steps(1) infinite; margin-left: .05em; }
@keyframes blink { 50% { opacity: 0; } }
.lede { max-width: 680px; margin-top: 26px; color: var(--muted); font-size: clamp(15px, 1.6vw, 17px); line-height: 1.7; }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s, filter .2s; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 0 0 1px #9d8bff inset, 0 8px 30px -8px #7b61ffaa; }
.btn--primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.hero__meta { font-size: 13px; color: var(--muted); }

/* ---------- the terminal ---------- */
.tui {
  margin-top: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--term);
  box-shadow: 0 0 0 1px #34374d, 0 30px 90px -20px #000, 0 0 120px -40px #7b61ff66;
  container-type: inline-size;
}
.tui__bar { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #191a23; border-bottom: 1px solid #2b2d3d; }
.tui__bar > i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.tui__bar > i:nth-child(2) { background: #febc2e; } .tui__bar > i:nth-child(3) { background: #28c840; }
.tui__title { margin-left: 12px; font-size: 12px; color: var(--muted); }
.tui__live { margin-left: auto; font-size: 11.5px; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.tui__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.tui.focused .tui__live { color: var(--green); }
.tui.focused .tui__live::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.tui__screen { position: relative; outline: none; cursor: text; }
.tui__screen:focus-visible { outline: none; }
/* 120 columns always fit the frame: a JetBrains Mono cell is 0.6em wide */
.tui__pre {
  margin: 0; padding: 0;
  font: 400 calc((100cqw - 2px) / 120 / .6) / 1.22 "JetBrains Mono Term", var(--mono);
  color: var(--fg);
  white-space: pre;
  overflow: hidden;
  font-variant-ligatures: none;
}
.tui__pre .ln { display: block; height: 1.22em; }
.tui__pre .ln.hb { background: var(--term-head); }
.tui__pre .c1 { display: inline-block; width: 1ch; font-style: normal; text-align: center; }
.tui__pre .wd { display: inline-block; width: 1.2em; font-style: normal; text-align: left; font-size: .9em; line-height: 1; }
.tui__pre .t { color: #f8f8f2; } .tui__pre .p { color: #7b61ff; } .tui__pre .s { color: #ffb86c; }
.tui__pre .a { color: #50fa7b; } .tui__pre .e { color: #ff5555; } .tui__pre .d { color: #6272a4; } .tui__pre .w { color: #fff; }
.tui__pre .bp { background: #7b61ff; } .tui__pre .bh { background: var(--term-head); }
.tui__pre .B { font-weight: 700; } .tui__pre .U { text-decoration: underline; text-underline-offset: .15em; }
.tui__pre .cur { background: #f8f8f2; color: var(--term); }
.tui__pre .flash { color: var(--gold); }
.tui__screen.bump { animation: bump .25s; }
@keyframes bump { 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }

.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.keys button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12.5px; transition: border-color .2s, color .2s, transform .1s; }
.keys button:hover { border-color: #3a3d55; color: var(--fg); }
.keys button.hit { transform: translateY(1px); border-color: var(--accent); color: var(--fg); }
.tui__note { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--dim); }

/* ---------- sections ---------- */
.sec { padding-top: 130px; }
.sec__head { margin-bottom: 44px; }
.kicker { color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.sec h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; max-width: 22ch; }
.body { margin-top: 18px; color: var(--muted); line-height: 1.75; max-width: 54ch; }

.views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.views li { background: var(--bg); }
.views button {
  width: 100%; height: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  padding: 22px 22px 24px;
  transition: background .2s;
}
.views button:hover, .views button:focus-visible { background: #7b61ff14; }
.views button:hover b { color: var(--gold); }
.views kbd { grid-row: span 2; align-self: start; }
.views b { font-weight: 600; transition: color .2s; }
.views span { grid-column: 2; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.views li:nth-child(3n+2) { transition-delay: .04s; } .views li:nth-child(3n) { transition-delay: .08s; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.split--flip > :first-child { order: 2; }
.code { border-radius: 12px; overflow: hidden; background: var(--term); box-shadow: 0 0 0 1px #34374d, 0 24px 60px -24px #000; }
.code__bar { height: 34px; display: flex; align-items: center; padding: 0 16px; background: #191a23; border-bottom: 1px solid #2b2d3d; font-size: 12px; color: var(--dim); }
.code pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 13px; line-height: 1.7; }
.code .pr { color: var(--accent); user-select: none; }
.code .o { color: var(--muted); }
.code .k { color: var(--accent); filter: brightness(1.35); }
.code .s { color: var(--gold); }
.facts { margin-top: 26px; display: grid; gap: 12px; }
.facts li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.facts li::before { content: "▸"; position: absolute; left: 0; color: var(--gold); }
.facts b { color: var(--fg); font-weight: 600; }

/* ---------- install ---------- */
.install { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 8px 8px 28px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg); width: max-content; max-width: 100%; margin: 0 0 22px; }
.tabs button { padding: 7px 16px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.panel, .then { padding: 0 20px; }
.panel > p, .then > p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.block { position: relative; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.block pre { margin: 0; padding: 16px 56px 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.75; color: var(--fg); }
.block .copy { position: absolute; top: 8px; right: 8px; }
.then { margin-top: 26px; }
.then .fine { margin-top: 12px; font-size: 13px; }
.then a { color: var(--fg); text-underline-offset: 3px; }

@media (max-width: 900px) {
  .views { grid-template-columns: minmax(0, 1fr); }
  .split, .split--flip { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split--flip > :first-child { order: 0; }
}
@media (max-width: 560px) {
  .hero { padding-top: 44px; }
  .tui { margin-top: 40px; border-radius: 10px; }
  .tui__title { display: none; }
  .panel, .then { padding: 0 8px; }
}
