/* DevHub onboarding page. Palette: Assets/palette.png. No external resources. */

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ChakraPetch-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ChakraPetch-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --night: #120e24;
  --pidling: #b9a8ff;
  --signal: #3cf0e6;
  --spark: #ff4fa3;
  --pid: #e9f55a;
  --ghost: #f3f0ff;

  /* Derived tones; contrast ratios are listed in README.md. */
  --surface: #1a1534;
  --terminal: #0c091a;
  --muted: #b5afcb;
  --line: rgb(185 168 255 / 0.22);
  --line-strong: rgb(185 168 255 / 0.45);

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68rem;
  --radius: 0.75rem;
}

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

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ghost);
  background: var(--night);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Skip link: visible only when focused. */
.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--pidling);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
  z-index: 10;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 0.125rem;
}

a {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

p > code,
li > code,
td > code,
dd > code {
  padding: 0.05em 0.35em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: var(--ghost);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--measure));
  margin-inline: auto;
}

/* Small uppercase mono label used throughout. */
.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pidling);
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ghost);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand svg {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.top .label {
  display: none;
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero h1 {
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 6.5vw, 4.25rem);
  max-width: 20ch;
}

.hero .lede {
  margin-top: 1.5rem;
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.facts li {
  padding: 1rem 1.25rem;
  background: var(--night);
}

.facts strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

/* Steps */
.steps-head {
  padding: 1.5rem 0 0;
}

.steps-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.steps-head p {
  color: var(--muted);
  max-width: 60ch;
  margin-top: 0.75rem;
}

.steps {
  list-style: none;
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pidling);
}

.step-num::before {
  content: "0" counter(step) " · ";
}

.step h3 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

/* Grid items default to min-width:auto, which would let a wide <pre> stretch the column. */
.step-head,
.step-body {
  min-width: 0;
}

.step-body > :last-child {
  margin-bottom: 0;
}

.step-body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.step-body li + li {
  margin-top: 0.35rem;
}

/* Terminal blocks */
.term {
  margin: 1rem 0;
  padding: 0.875rem 1.125rem;
  background: var(--terminal);
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: 0.5rem;
  overflow-x: auto;
  line-height: 1.7;
  font-size: 0.9375rem;
  -webkit-overflow-scrolling: touch;
}

.term code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  white-space: pre;
}

.term .prompt {
  color: var(--signal);
  font-weight: 700;
  user-select: none;
}

.term .ph {
  color: var(--pid);
}

.term .cmt {
  color: var(--muted);
}

.term:focus-visible {
  outline-offset: 0;
}

/* Clients table */
.clients {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

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

.clients th {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pidling);
}

/* Definition pairs (GUI equivalent) */
.kv {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  font-size: 0.9375rem;
}

.kv dt {
  color: var(--pidling);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Ground rules */
.rules {
  margin: 1rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--spark);
  border-radius: 0.5rem;
}

.rules .label {
  color: var(--spark);
}

.rules ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.rules li + li {
  margin-top: 0.5rem;
}

.callout {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--pid);
}

/* Support */
.contact {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* Footer */
.foot {
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.foot p {
  margin: 0.35rem 0;
}

/* Wider layouts */
@media (min-width: 40rem) {
  .top .label {
    display: inline;
  }

  .step {
    grid-template-columns: 11rem 1fr;
  }

  .step-head {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }

  .step h3 {
    margin-top: 0.5rem;
  }
}

@media (min-width: 60rem) {
  .step {
    grid-template-columns: 14rem 1fr;
    padding: 2.5rem 0;
  }
}

/* Narrow phones */
@media (max-width: 24rem) {
  body {
    font-size: 1rem;
  }

  .wrap {
    width: min(100% - 1.75rem, var(--measure));
  }

  .term {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .kv dd + dt {
    margin-top: 0.75rem;
  }
}

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

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

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .term {
    border-color: #000;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
  }
}
