/* StackNine
 *
 * Styled after the Veilio settings window, so the site and the product look
 * like they come from the same people: dark tonal surfaces, a navigation
 * rail with pill-shaped links, content in rounded cards made of rows, and
 * small uppercase labels over each group. The accent is the Veilio teal
 * rather than the settings window's blue.
 *
 * No framework, no build step, no requests to anyone else. The only font
 * file is the wordmark's, served from this site (fonts/, SIL Open Font
 * Licence). Everything else uses the fonts the reader's machine already has.
 */

@font-face {
  font-family: "Wordmark";
  src: url("/fonts/plus-jakarta-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --surface: #111416;
  --surface-low: #181c1e;
  --surface-container: #1d2224;
  --surface-high: #272c2e;
  --on-surface: #e2e4e3;
  --on-surface-variant: #c2c8c6;
  --muted: #8d9593;
  --outline: #434a48;
  --outline-variant: #2a3031;
  --primary: #7fd0c6;
  --on-primary: #00382f;
  --secondary-container: #1f4a45;
  --on-secondary-container: #c9ece6;
  --amber: #e2a24a;
  /* The StackNine teal: the mark's corner square and "Nine". */
  --brand-teal: #2fd6c3;
  --radius: 16px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font: 16px/1.6 var(--font);
}

a { color: var(--primary); }

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- layout: a rail on the left, content on the right ------------------ */

.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

nav.rail {
  background: var(--surface-low);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 24px;
  color: var(--on-surface);
  text-decoration: none;
}

.brand .mark { width: 30px; height: 30px; flex: none; }

.brand .name {
  font: 600 22px/1 "Wordmark", var(--font);
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand .nine { color: var(--brand-teal); }

nav.rail a.item {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--on-surface-variant);
  text-decoration: none;
}

nav.rail a.item:hover { background: var(--surface-container); }

nav.rail a.item[aria-current="page"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-weight: 600;
}

nav.rail .spacer { flex: 1; }

nav.rail .foot {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--muted);
}

nav.rail .foot a { color: var(--on-surface-variant); }

main {
  padding: 40px 44px 64px;
  max-width: 860px;
}

/* On a phone the rail becomes a bar across the top. */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  nav.rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 12px;
    gap: 4px;
  }
  .brand { padding: 4px 8px 8px 6px; width: 100%; }
  nav.rail a.item { padding: 7px 14px; font-size: 15px; }
  nav.rail .spacer, nav.rail .foot { display: none; }
  main { padding: 26px 16px 48px; }
}

/* --- type ------------------------------------------------------------- */

h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 12px;
}

.lead {
  font-size: 18.5px;
  color: var(--on-surface-variant);
  margin: 0 0 34px;
  max-width: 40rem;
}

p { margin: 0 0 14px; max-width: 40rem; }

section { margin-bottom: 30px; }

section > h2 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 10px 4px;
}

/* --- cards and rows, as in the settings window ------------------------- */

.card {
  background: var(--surface-container);
  border-radius: var(--radius);
  padding: 6px 22px;
}

.card.text { padding: 18px 22px 6px; }

.row {
  padding: 15px 0;
  border-bottom: 1px solid var(--outline-variant);
}

.row:last-child { border-bottom: 0; }

.row .k { font-size: 16.5px; font-weight: 600; }

.row .d {
  color: var(--muted);
  font-size: 15px;
  margin-top: 3px;
  max-width: 40rem;
}

.row.link { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn:hover { filter: brightness(1.08); }

.email {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  background: var(--surface-high);
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  margin: 4px 0 14px;
}

/* --- the Veilio lockup ------------------------------------------------ */

.lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 14px;
}

.lockup .mark { width: 60px; height: 60px; flex: none; }

.wordmark {
  font: 600 46px/1 "Wordmark", var(--font);
  letter-spacing: -.02em;
  color: var(--on-surface);
  white-space: nowrap;
}

.dotless { position: relative; display: inline-block; }

.dotless svg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -.02em;
  width: .3em;
  height: .3em;
}

/* --- the StackNine name as a heading ---------------------------------- */

h1.wordname {
  font: 600 44px/1.1 "Wordmark", var(--font);
  letter-spacing: -.02em;
}

h1.wordname .nine { color: var(--brand-teal); }
