/* catalyst website: shared foundation (tokens, type, layout, shared components).
   Page-specific rules live in landing.css (index.html) and install.css (install.html). */

:root{
  color-scheme:dark;

  /* colour */
  --ground:#000000;     /* pure black page ground */
  --band:#000000;       /* black section bands and footer */
  --surface:#000000;    /* black demo panels and notes */
  --inset:#000000;      /* black command blocks and log entries */
  --text:#EDF1F7;       /* text */
  --text-2:#A7B3CF;     /* secondary text */
  --rule:#6373A6;       /* structural rules and borders */
  --rule-soft:#2C3A66;  /* row separators */
  --a:#7391FF;          /* laptop A / Tiam; also link and focus colour */
  --b:#FFC71F;          /* laptop B / Namit */
  --code-bg:#000000;    /* black inline code */
  --on-light:#0B1330;   /* text on light or yellow fills */

  /* type */
  --display:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --text-font:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --fs-small:.9375rem;                                   /* 15px floor; nothing smaller */
  --fs-body:clamp(1.0625rem,1rem + .25vw,1.1875rem);     /* 17 to 19px */
  --fs-lede:clamp(1.3rem,1.1rem + .9vw,1.7rem);
  --fs-h3:clamp(1.35rem,1.15rem + .8vw,1.8rem);
  --fs-h2:clamp(2.1rem,1.2rem + 3.8vw,4.25rem);
  --fs-h1:clamp(2.6rem,1.4rem + 5.6vw,6rem);

  /* layout */
  --max:1200px;
  --gutter:clamp(20px,4vw,48px);
  --radius:6px;
  --band-pad:clamp(72px,10vw,144px);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:24px}
body{margin:0;background:var(--ground);color:var(--text);font:400 var(--fs-body)/1.6 var(--text-font);overflow-x:hidden}

/* headings: the monospace face, so they read like the command line the product lives in */
h1,h2,h3{font-family:var(--display);color:var(--text);margin:0;text-wrap:balance}
h1{font-size:var(--fs-h1);font-weight:800;line-height:1;letter-spacing:-.045em}
h2{font-size:var(--fs-h2);font-weight:800;line-height:1.08;letter-spacing:-.04em;max-width:22ch}
h3{font-size:var(--fs-h3);font-weight:700;line-height:1.2;letter-spacing:-.025em}

p{margin:0 0 1em;max-width:66ch}
ul,ol{margin:0 0 1em;padding-left:1.3em;max-width:66ch}
li{margin-bottom:.4em}
strong{font-weight:600}
img{max-width:100%}

a{color:var(--text);text-decoration:underline;text-decoration-color:var(--a);text-decoration-thickness:2px;text-underline-offset:.18em}
a:hover{color:var(--a)}
a:focus-visible,button:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--b);outline-offset:3px;border-radius:2px}

code,pre{font-family:var(--mono)}
code{background:var(--code-bg);color:var(--text);padding:.08em .35em;border-radius:4px;font-size:.9em}

.skip{position:absolute;left:-999px;top:0;background:var(--text);color:var(--on-light);padding:.6rem 1rem;z-index:100}
.skip:focus{left:8px;top:8px}

.wrap{max-width:calc(var(--max) + 2*var(--gutter));margin:0 auto;padding:0 var(--gutter)}

/* text sizes */
.lede{font-size:var(--fs-lede);line-height:1.4;max-width:34em;color:var(--text)}
.small{font-size:var(--fs-small);color:var(--text-2)}

/* nav: plain, not fixed, no blur */
.nav{padding:20px 0}
.nav .wrap{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 24px}
.brand{font:800 1.5rem/1 var(--display);letter-spacing:-.04em;text-decoration:none;color:var(--text)}
.nav ul{display:flex;flex-wrap:wrap;align-items:center;gap:6px 28px;list-style:none;margin:0;padding:0;max-width:none}
.nav li{margin:0}
.nav ul a{font-size:1.0625rem;font-weight:500;text-decoration:none;padding:6px 0}
.nav ul a:hover,.nav ul a[aria-current]{text-decoration:underline;text-decoration-color:var(--a);text-decoration-thickness:2px}
/* narrow screens: the page is one scroll, so keep only the brand and the Install button */
@media(max-width:700px){.nav li:not(:last-child){display:none}}

/* buttons: light fill on the dark ground */
.btn{display:inline-block;background:var(--text);color:var(--on-light);font:600 1.0625rem/1.2 var(--text-font);padding:.85em 1.4em;border:2px solid var(--text);border-radius:var(--radius);text-decoration:none;cursor:pointer}
.btn:hover{background:var(--b);border-color:var(--b);color:var(--on-light)}
.nav ul a.btn{padding:.6em 1.1em;color:var(--on-light);text-decoration:none}

/* bands: every top-level section of <main> */
.band{padding:var(--band-pad) 0}
.band + .band{border-top:2px solid var(--rule-soft)}
.band-head{margin-bottom:clamp(32px,5vw,64px)}
.band-head .lede{margin:clamp(20px,2.5vw,32px) 0 0}

/* black bands and footer, with yellow link underlines */
.band-ink,footer{background:var(--band)}
.band-ink,.band-ink + .band{border-top-color:transparent}
.band-ink a,footer a{text-decoration-color:var(--b)}
.band-ink a:hover,footer a:hover{color:var(--b)}
.band-ink code{background:var(--code-bg)}
footer{padding:48px 0}
footer p{margin:0 0 .4em;max-width:none}

/* command blocks */
pre.cmd{background:var(--inset);color:var(--text);border:1px solid var(--rule-soft);border-radius:var(--radius);padding:18px 20px;margin:0;overflow-x:auto;font-size:clamp(.9375rem,.85rem + .3vw,1.0625rem);line-height:1.6}
pre.cmd .c{color:var(--text-2)}

/* numbered steps: only for real sequences */
.steps{list-style:none;margin:0;padding:0;max-width:none;counter-reset:step}
.steps > li{counter-increment:step;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:clamp(24px,3vw,36px) 0;margin:0;border-top:1px solid var(--rule-soft)}
.steps > li:first-child{border-top:2px solid var(--rule)}
.steps ul{list-style:disc}
.steps h3::before{content:counter(step) ". ";font-weight:800;color:var(--b)}
@media(min-width:860px){
  .steps > li{grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:40px}
}

/* rows: a term on the left, its explanation on the right */
.rows{margin:0;padding:0;max-width:none}
.rows > div{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:clamp(22px,2.6vw,32px) 0;border-top:1px solid var(--rule-soft)}
.rows > div:first-child{border-top:2px solid var(--rule)}
.rows dt{font:700 var(--fs-h3)/1.2 var(--display);letter-spacing:-.025em}
.rows dd{margin:0}
.rows dd p:last-child{margin-bottom:0}
@media(min-width:860px){
  .rows > div{grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:40px}
}
.band-ink .rows > div{border-top-color:rgba(255,255,255,.2)}
.band-ink .rows > div:first-child{border-top-color:var(--rule)}

/* two equal columns */
.cols-2{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(28px,4vw,56px)}
@media(min-width:860px){.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cols-2 h3{margin-bottom:.5em}

/* note: one fact the reader must not miss */
.note{background:var(--surface);border-left:8px solid var(--b);border-radius:0 var(--radius) var(--radius) 0;padding:18px 22px;max-width:66ch;margin:0 0 1em}
.note p:last-child{margin-bottom:0}

/* framed screenshot */
.shot{margin:0;border:2px solid var(--rule);border-radius:var(--radius);overflow:hidden;background:var(--inset)}
.shot-scroll{max-height:560px;overflow:auto}
.shot img{display:block;width:100%;height:auto}
.shot figcaption{background:var(--surface);padding:12px 18px;font-size:var(--fs-small);color:var(--text-2);border-top:2px solid var(--rule)}

/* spacing helpers */
.mt-1{margin-top:clamp(16px,2vw,24px)}
.mt-2{margin-top:clamp(32px,4vw,56px)}
.mt-3{margin-top:clamp(56px,7vw,96px)}

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