/* ==========================================================================
   Balake.co — site.css
   Every page loads this one file. Rough map:
     fonts · tokens · base · layout · header/nav · buttons · heroes
     the rack (homepage hardware drawing) · content blocks · discord embed
     contact form · legal pages · footer · motion · print
   Flat colours on purpose: no glows, no gradient text. Depth comes from
   borders and hard offset shadows, like physical hardware.
   ========================================================================== */

/* ---------- fonts (self-hosted, SIL OFL — see assets/fonts/LICENSE-*) ---------- */
@font-face {
  font-family: "Syne";
  src: url("../fonts/syne-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("../fonts/syne-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 1000; font-style: italic; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #111216;
  --bg-raised: #18191f;
  --bg-sunken: #0c0d10;
  --line: #2a2c35;
  --line-strong: #3b3e4a;
  --text: #ecedf1;
  --text-muted: #a8acb8;
  --text-faint: #8d919e;

  --cyan: #60d7ff;
  --cyan-deep: #2b8db2;
  --pink: #f472b6;
  --amber: #fbbf24;
  --green: #4ade80;
  --discord: #5865f2;
  --discord-deep: #3a43a8;

  --font-display: "Syne", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);
  --step-2: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.4rem + 1vw, 2.15rem);
  --step-4: clamp(1.95rem, 1.6rem + 1.8vw, 3rem);
  --step-5: clamp(2rem, 1.4rem + 3.2vw, 4.1rem);

  --gutter: clamp(1rem, 0.55rem + 2.2vw, 2rem);
  --section: clamp(3.25rem, 2.4rem + 4.4vw, 6.5rem);
  --maxw: 70rem;
  --measure: 38rem;

  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; overflow-wrap: break-word; }
h2 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
.h3-size { font-size: var(--step-2); margin-bottom: 0.75rem; }
/* Syne is a very wide face: on the smallest phones, step headings down so single words fit. */
@media (max-width: 380px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.55rem; }
  .home-hero h1 { font-size: 2.3rem; }
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 650; color: var(--text); }
code, kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.1em 0.38em;
  border: 1px solid #2c3a44;
  border-radius: 4px;
  background: #142028;
  color: #a9e6fb;
  white-space: nowrap;
}
::selection { background: var(--pink); color: #160911; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  background: var(--cyan);
  color: #04121a;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: calc(10px + env(safe-area-inset-top)); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.section { padding-block: var(--section); }
.section--rule { padding-top: 0; }
.section--rule::before {
  /* a hairline aligned to the content column, not the viewport */
  content: "";
  display: block;
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--maxw);
  height: 1px;
  margin: 0 auto var(--section);
  background: var(--line);
}

/* Section heading: title left, note right on wide screens */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 3rem;
  margin-bottom: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
}
.section-head p { color: var(--text-muted); font-size: var(--step-1); max-width: var(--measure); }
@media (min-width: 860px) {
  .section-head:has(> p) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
}

.kicker { margin: 0; color: var(--text-muted); font-size: var(--step--1); font-weight: 600; }

.lede { font-size: var(--step-1); color: var(--text-muted); max-width: var(--measure); }
.muted { color: var(--text-muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1.5rem + 3vw, 4rem); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .split--wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .split--wide-right { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .split--center { align-items: center; }
}

/* ---------- header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand__mark { width: 28px; height: 28px; flex: none; transition: transform 0.25s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-6deg); }
.brand__name span { color: var(--cyan); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-raised);
  color: var(--text);
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s ease, top 0.25s var(--ease);
}
.nav-toggle__bars::before { top: 0; width: 100%; }
.nav-toggle__bars span { top: 5px; width: 70%; }
.nav-toggle__bars::after { top: 10px; width: 100%; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }

.site-nav__list { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-weight: 550;
  font-size: 0.97rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav__link:hover { color: var(--text); }
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 8px;
  height: 2px;
  background: var(--text-faint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"],
.site-nav__link.is-section { color: var(--text); }
.site-nav__link[aria-current="page"]::after,
.site-nav__link.is-section::after { background: var(--cyan); transform: scaleX(1); }
.site-nav__cta { margin-left: 0.6rem; }

@media (max-width: 919px) {
  /* With JS: a drop-down panel. Without JS (.no-js): links stay visible as a scrollable row. */
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top));
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    background: var(--bg);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.55);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.18s ease, transform 0.22s var(--ease), visibility 0s;
  }
  .js .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav__list > li { border-bottom: 1px solid var(--line); }
  .js .site-nav__list > li.site-nav__cta { border-bottom: 0; }
  .js .site-nav__link {
    width: 100%;
    min-height: 58px;
    padding: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
  }
  .js .site-nav__link::after { display: none; }
  .js .site-nav__link[aria-current="page"]::before,
  .js .site-nav__link.is-section::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 0.7rem;
    border-radius: 50%;
    background: var(--cyan);
  }
  .js .site-nav__cta { margin: 1.1rem 0 0; }
  .js .site-nav__cta .btn { width: 100%; }

  .no-js .site-header__inner { flex-wrap: wrap; padding-block: 0.5rem; }
  .no-js .site-nav { width: 100%; overflow-x: auto; }
  .no-js .site-nav__list { width: max-content; }

  body.nav-open { overflow: hidden; }
}

/* ---------- buttons ---------- */
/* Key-cap buttons: a solid edge underneath that the button presses into. */
.btn {
  --btn-bg: var(--cyan);
  --btn-fg: #06141b;
  --btn-edge: var(--cyan-deep);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  margin-bottom: 3px; /* room for the edge */
  padding: 0 1.25rem;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 3px 0 var(--btn-edge);
  font: 650 1rem/1.1 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-bg: #86e2ff; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-edge); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--ghost {
  --btn-bg: var(--bg-raised);
  --btn-fg: var(--text);
  --btn-edge: #07080a;
  --btn-border: var(--line-strong);
}
.btn--ghost:hover { --btn-bg: #20222a; --btn-border: #50535f; }

.btn--discord { --btn-bg: var(--discord); --btn-fg: #fff; --btn-edge: var(--discord-deep); }
.btn--discord:hover { --btn-bg: #6873f6; }

.btn--sm { min-height: 42px; padding: 0 0.95rem; font-size: 0.95rem; }

.btn:disabled,
.btn[aria-disabled="true"] {
  --btn-bg: transparent;
  --btn-fg: var(--text-faint);
  --btn-border: var(--line-strong);
  --btn-edge: transparent;
  border-style: dashed;
  cursor: not-allowed;
}
.btn:disabled:active,
.btn[aria-disabled="true"]:active { transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 479px) {
  .btn-row--stack-sm { flex-direction: column; align-items: stretch; align-self: stretch; }
  .btn-row--stack-sm .btn { width: 100%; }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  font-weight: 650;
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(96, 215, 255, 0.35);
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link svg { width: 16px; height: 16px; transition: transform 0.15s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- heroes ---------- */
.page-hero { padding-block: clamp(2.25rem, 1.6rem + 4vw, 5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.page-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; justify-items: start; }
.page-hero__inner > * { max-width: 48rem; }
.page-hero .btn-row { margin-top: 0.5rem; }
@media (max-width: 479px) { .page-hero .btn-row--stack-sm { justify-self: stretch; } }
.page-hero__title-row { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }

.breadcrumb { font-size: var(--step--1); color: var(--text-faint); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line-strong); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* Product monogram: two letters on a small faceplate with a coloured hard shadow */
.monogram {
  --mono-c: var(--cyan);
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-raised);
  box-shadow: 4px 4px 0 var(--mono-c);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.monogram--pink { --mono-c: var(--pink); }
.monogram--amber { --mono-c: var(--amber); }
.monogram--green { --mono-c: var(--green); }

.home-hero { padding-block: clamp(2.25rem, 1.4rem + 4.5vw, 5.5rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
.home-hero__grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4rem); align-items: center; }
@media (min-width: 980px) { .home-hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); } }
.home-hero__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.35rem; justify-items: start; }
.home-hero__hello { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; color: var(--text-muted); font-weight: 550; }
.home-hero h1 { font-size: clamp(2.6rem, 1.5rem + 4.6vw, 4.75rem); line-height: 0.98; }
.home-hero h1 .line { display: block; }
@media (max-width: 479px) { .home-hero .btn-row--stack-sm { justify-self: stretch; } }

/* ---------- the rack ---------- */
/* A 6U equipment rack drawn in CSS: rails with screw holes, numbered units,
   status LEDs and vent slots. Each unit links to a project. */
.rack {
  --rail: 26px;
  position: relative;
  padding: 12px var(--rail) 14px;
  border: 1px solid #3a3c46;
  border-radius: 6px;
  background: #1c1d23;
  box-shadow: 8px 8px 0 #07080a;
}
.rack::before,
.rack::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: calc(var(--rail) - 8px);
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 22px, #0b0c0f 0 3.5px, transparent 4.5px) 0 0 / 100% 54px repeat-y,
    #26272e;
  box-shadow: inset 0 0 0 1px #30323a;
}
.rack::before { left: 4px; }
.rack::after { right: 4px; }
.rack__plate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid #2f313a;
  border-radius: 3px;
  background: #15161b;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.rack__plate strong { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; color: var(--text); }
.rack__units { list-style: none; display: grid; gap: 6px; counter-reset: unit; }
.rack__units > li { counter-increment: unit; }
.rack-unit {
  position: relative;
  display: grid;
  grid-template-columns: 1.6rem auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 60px;
  padding: 0.55rem 0.8rem 0.55rem 0.6rem;
  border: 1px solid #2d2f37;
  border-radius: 3px;
  background: linear-gradient(#22232a, #1b1c21);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 #0b0c0f;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}
.rack-unit::before {
  content: "U" counter(unit);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7a7e8b;
}
a.rack-unit:hover { border-color: #4a4d58; background: linear-gradient(#272830, #1f2026); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a.rack-unit:hover { transform: translateX(3px); }
}
.rack-unit__name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.rack-unit__desc { display: block; color: var(--text-muted); font-size: 0.86rem; line-height: 1.35; }
.rack-unit__vent {
  width: 34px;
  height: 18px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #101114 0 2px, transparent 2px 5px);
}
@media (max-width: 400px) {
  .rack { --rail: 18px; padding-inline: 22px; }
  .rack-unit { grid-template-columns: 1.4rem auto minmax(0, 1fr); gap: 0.6rem; }
  .rack-unit__vent { display: none; }
}

.led {
  --led: var(--green);
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 2px #0b0c0f, 0 0 8px var(--led);
}
.led--service { --led: var(--cyan); }
.led--community { --led: var(--pink); }
.led--retired { --led: #6f7380; box-shadow: 0 0 0 2px #0b0c0f; }
@media (prefers-reduced-motion: no-preference) {
  .rack .led--live { animation: blink 4s steps(1, end) infinite; }
  .rack li:nth-child(3) .led--live { animation-delay: -1.6s; }
}
@keyframes blink { 0%, 94% { opacity: 1; } 95%, 100% { opacity: 0.3; } }

.rack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 1.1rem;
  color: var(--text-faint);
  font-size: 0.85rem;
  list-style: none;
}
.rack-legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.rack-legend .led { width: 7px; height: 7px; box-shadow: none; }

/* Status line used on cards and product heroes */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.3;
}
.status .led { width: 8px; height: 8px; }

/* ---------- content blocks ---------- */

/* "Currently building" strip */
.now {
  display: grid;
  gap: 1rem 2.5rem;
  padding-block: 1.75rem;
  border-block: 1px solid var(--line);
}
@media (min-width: 860px) { .now { grid-template-columns: 12rem minmax(0, 1fr); } }
.now h2 { font-size: var(--step-1); font-weight: 700; }
.now ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.45rem 2rem;
  list-style: none;
}
.now li { position: relative; padding-left: 1.1rem; color: var(--text-muted); }
.now li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--pink);
}

/* Feature list: plain columns separated by rules */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0 clamp(1.5rem, 1rem + 2vw, 2.75rem);
  list-style: none;
}
.features > li { padding: 1.35rem 0 1.6rem; border-top: 1px solid var(--line); }
.features h3 { font-size: var(--step-1); margin-bottom: 0.45rem; }
.features p { color: var(--text-muted); }
.features .text-link { margin-top: 0.4rem; }
.features--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.features--marked > li { border-top: 2px solid var(--line-strong); }
.features--marked h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.55rem;
  background: var(--mark, var(--cyan));
  vertical-align: 0.05em;
}

/* Linked cards with a hard offset shadow on hover */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 1.1rem;
  list-style: none;
}
.card {
  --card-c: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  padding: 1.4rem 1.35rem 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--text);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s ease;
}
.card h3 { font-size: var(--step-2); }
.card p { color: var(--text-muted); }
.card__foot { margin-top: auto; padding-top: 0.35rem; }
.card__link { color: var(--text); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:hover), .card:has(.card__link:focus-visible) {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--card-c);
  border-color: #50535f;
}
.card:has(.card__link:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }
.card__cta { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--cyan); font-weight: 650; }
.card__cta svg { width: 16px; height: 16px; }
.card--pink { --card-c: var(--pink); }
.card--amber { --card-c: var(--amber); }
.card--green { --card-c: var(--green); }

/* Slash-command reference */
.commands {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-sunken);
}
.commands__row {
  display: grid;
  gap: 0.3rem 1.5rem;
  padding: 0.95rem 1.2rem;
  border-top: 1px solid var(--line);
}
.commands__row:first-child { border-top: 0; }
@media (min-width: 640px) { .commands__row { grid-template-columns: 15rem minmax(0, 1fr); align-items: baseline; } }
.commands dt { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.commands dd { margin: 0; color: var(--text-muted); }

/* Ordered process (real sequences only) */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 1.5rem clamp(1.5rem, 1rem + 2vw, 2.5rem);
  list-style: none;
  counter-reset: step;
}
.steps > li { counter-increment: step; position: relative; padding-top: 1.1rem; border-top: 2px solid var(--line-strong); }
.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-raised);
  box-shadow: 3px 3px 0 var(--cyan);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}
.steps h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.steps p { color: var(--text-muted); }

/* Notices */
.notice {
  --notice: var(--amber);
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--notice);
  border-radius: 4px 8px 8px 4px;
  background: var(--bg-raised);
}
.notice__title { font-weight: 700; margin: 0; }
.notice p { color: var(--text-muted); margin: 0; }
.notice p + p { margin-top: 0.6rem; }
.notice .text-link { min-height: 0; margin-top: 0.6rem; }
.notice--info { --notice: var(--cyan); }
.notice--care { --notice: var(--green); }
.notice--retired { --notice: #6f7380; }

.panel {
  padding: clamp(1.4rem, 1rem + 1.8vw, 2rem);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-raised);
}
.panel--shadow { box-shadow: 6px 6px 0 #07080a; }
.panel h3 { margin-bottom: 0.65rem; }

.checklist { display: grid; gap: 0.6rem; list-style: none; }
.checklist li { position: relative; padding-left: 1.7rem; color: var(--text-muted); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.42em;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
.tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* Website portfolio */
.work { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); list-style: none; }
@media (min-width: 700px) { .work { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-raised);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.work-card:has(.card__link:hover), .work-card:has(.card__link:focus-visible) {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--tint);
}
.work-card:has(.card__link:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }
/* A little browser window with the site's address */
.work-card__browser {
  margin: 0.9rem 0.9rem 0;
  border: 1px solid var(--line);
  border-top: 2px solid var(--tint);
  border-radius: 6px;
  background: var(--bg-sunken);
  overflow: hidden;
}
.work-card__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  background: #15161b;
}
.work-card__bar i { width: 7px; height: 7px; border-radius: 50%; background: #34363f; }
.work-card__bar span {
  flex: 1;
  min-width: 0;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #0f1013;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-card__body { display: flex; flex-direction: column; gap: 0.65rem; flex: 1; padding: 1.2rem 1.3rem 1.35rem; }
.work-card__body h3 { font-size: var(--step-2); }
.work-card__body p { color: var(--text-muted); }
.work-card .tags { margin-top: auto; padding-top: 0.4rem; }
.tint-cyan { --tint: var(--cyan); }
.tint-pink { --tint: var(--pink); }
.tint-amber { --tint: var(--amber); }

/* Q&A */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.85rem 0;
  font-weight: 650;
  font-size: var(--step-1);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font: 600 1.1rem/1 var(--font-mono);
  color: var(--text-muted);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 1.2rem; color: var(--text-muted); max-width: var(--measure); }

/* Closing call to action */
.cta-band {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.6rem, 1rem + 3vw, 2.75rem);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-raised);
  box-shadow: 8px 8px 0 #07080a;
}
@media (min-width: 860px) { .cta-band { grid-template-columns: minmax(0, 1.5fr) auto; align-items: center; column-gap: 3rem; } }
.cta-band h2 { font-size: var(--step-3); margin-bottom: 0.6rem; }
.cta-band p { color: var(--text-muted); max-width: var(--measure); }

.policy-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; margin-top: 1.75rem; list-style: none; font-size: 0.95rem; }
.policy-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); }
.policy-links a:hover { color: var(--text); }

/* Timeline (about) */
.timeline { list-style: none; }
.timeline > li {
  display: grid;
  gap: 0.5rem 2.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .timeline > li { grid-template-columns: 15rem minmax(0, 1fr); } }
.timeline h3 { font-size: var(--step-2); }
.timeline p { color: var(--text-muted); max-width: var(--measure); }

/* ---------- discord message + embed (illustration) ---------- */
/* Mirrors a real DropTrackr release post: title, artist, platform links,
   type/date line and storefront footer, with cover art on the right. */
.discord {
  padding: 1rem 1rem 1.1rem 0.9rem;
  border-radius: 8px;
  background: #313338;
  box-shadow: 8px 8px 0 #07080a;
  font-family: "gg sans", "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.375;
  color: #dbdee1;
}
.discord__msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 0.85rem; }
.discord__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5b5fd6;
  color: #fff;
}
.discord__avatar svg { width: 20px; height: 20px; }
.discord__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.4rem; }
.discord__name { font-weight: 600; color: #f2f3f5; }
.discord__app {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0 0.3rem;
  border-radius: 3px;
  background: var(--discord);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.4;
}
.discord__app svg { width: 10px; height: 10px; }
.discord__time { color: #a3a9b2; font-size: 0.75rem; }

.embed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  max-width: 28rem;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem 0.9rem 0.9rem;
  border-left: 4px solid #43b581;
  border-radius: 4px 8px 8px 4px;
  background: #2b2d31;
}
.embed > * { grid-column: 1; }
.embed__title { font-weight: 600; font-size: 1rem; color: #f2f3f5; }
.embed__desc { margin-top: 0.35rem; font-size: 0.9rem; }
.embed__desc b { color: #f2f3f5; font-weight: 700; }
.embed__links { display: grid; margin-top: 0.8rem; font-size: 0.9rem; }
.embed__links b { color: #f2f3f5; font-weight: 700; margin-bottom: 0.1rem; }
.embed__links span { color: #7fa6f2; }
.embed__type { margin-top: 0.8rem; font-size: 0.86rem; font-style: italic; }
.embed__footer { margin-top: 0.5rem; font-size: 0.76rem; font-weight: 500; color: #dbdee1; }
.embed .embed__art {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 50%, #0b0b0d 0 5%, var(--pink) 6% 18%, #141418 19% 22%, #1d1d23 23% 26%, #141418 27% 30%, #1d1d23 31% 34%, #141418 35% 40%, transparent 41%),
    linear-gradient(135deg, #5b5fd6, #2a2c6e);
}
.figure-caption { margin-top: 1rem; color: var(--text-faint); font-size: 0.85rem; }
@media (max-width: 400px) { .embed .embed__art { width: 56px; height: 56px; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.contact-options { display: grid; gap: 0.7rem; list-style: none; margin-top: 1.5rem; }
.contact-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  min-height: 64px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.contact-option:hover { border-color: #50535f; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--cyan); }
.contact-option svg { width: 22px; height: 22px; color: var(--cyan); }
.contact-option strong { display: block; line-height: 1.3; }
.contact-option span { display: block; color: var(--text-muted); font-size: 0.92rem; line-height: 1.35; }

.form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.25rem, 0.9rem + 1.8vw, 2rem);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-raised);
  box-shadow: 8px 8px 0 #07080a;
}
.form__row { display: grid; gap: 1.15rem; }
@media (min-width: 600px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; }
.field .hint { color: var(--text-faint); font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-size: max(16px, 1rem); /* stops iOS zooming on focus */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a8acb8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.input:hover, .select:hover, .textarea:hover { border-color: #50535f; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 3px 3px 0 var(--cyan); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #ff7a8a; }
.field__error { margin: 0; color: #ff9aa6; font-size: 0.9rem; font-weight: 500; }
.field__error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin: 0; padding: 0.85rem 1rem; border-radius: 7px; border: 1px solid var(--line); font-weight: 500; }
.form__status:empty { display: none; }
.form__status.is-success { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.08); color: #b9f5cf; }
.form__status.is-error { border-color: rgba(255, 122, 138, 0.5); background: rgba(255, 122, 138, 0.08); color: #ffc2ca; }
.form .btn[type="submit"] { width: 100%; }
@media (min-width: 600px) { .form .btn[type="submit"] { width: auto; justify-self: start; min-width: 11rem; } }
.form__note { margin: 0; color: var(--text-faint); font-size: 0.88rem; }

/* ---------- legal pages ---------- */
.legal-hero { padding-block: clamp(2.25rem, 1.8rem + 3vw, 4rem) 1.75rem; }
.legal-hero h1 { font-size: var(--step-4); margin-top: 1rem; }
.legal-meta { margin-top: 0.85rem; color: var(--text-muted); font-size: var(--step--1); }
.legal-switch { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; list-style: none; }
.legal-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.legal-switch a:hover { color: var(--text); border-color: #50535f; }
.legal-switch a[aria-current="page"] { color: var(--text); border-color: var(--cyan); box-shadow: 3px 3px 0 var(--cyan); }

.prose { max-width: 44rem; padding-bottom: var(--section); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: var(--step-2); font-weight: 700; margin-top: 2.4rem; padding-top: 1.9rem; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6rem; }
.prose p, .prose li { color: #c9ccd6; }
.prose ul { padding-left: 1.25rem; display: grid; gap: 0.35rem; }
.prose li::marker { color: var(--text-faint); }
.prose .notice { margin-top: 1.5rem; }
.prose .btn-row { margin-top: 2rem; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: auto;
  padding: clamp(2.75rem, 2rem + 3vw, 4rem) 0 calc(1.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  font-size: 0.95rem;
}
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .site-footer__grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } }
.site-footer__about { grid-column: 1 / -1; display: grid; gap: 0.9rem; align-content: start; justify-items: start; max-width: 23rem; }
@media (min-width: 860px) { .site-footer__about { grid-column: auto; } }
.site-footer__about p { color: var(--text-muted); }
.site-footer h2 { margin-bottom: 0.5rem; font-family: var(--font-body); font-size: 0.92rem; font-weight: 700; letter-spacing: 0; }
.site-footer ul { list-style: none; display: grid; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text-muted); text-decoration: none; }
.site-footer li a:hover { color: var(--text); text-decoration: underline; }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* ---------- 404 ---------- */
.error-page { padding-block: clamp(3.5rem, 2.5rem + 6vw, 7rem); }
.error-page__code {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-raised);
  box-shadow: 4px 4px 0 var(--amber);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- motion ---------- */
/* One orchestrated moment: the rack powers on, unit by unit. Everything else stays put. */
@media (prefers-reduced-motion: no-preference) {
  .js .rack .rack-unit { animation: unit-in 0.45s var(--ease) both; }
  .js .rack li:nth-child(1) .rack-unit { animation-delay: 0.15s; }
  .js .rack li:nth-child(2) .rack-unit { animation-delay: 0.23s; }
  .js .rack li:nth-child(3) .rack-unit { animation-delay: 0.31s; }
  .js .rack li:nth-child(4) .rack-unit { animation-delay: 0.39s; }
  .js .rack li:nth-child(5) .rack-unit { animation-delay: 0.47s; }
  .js .rack li:nth-child(6) .rack-unit { animation-delay: 0.55s; }
}
@keyframes unit-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- utilities ---------- */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

@media print {
  .site-header, .site-footer, .nav-toggle, .skip-link, .btn-row { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p, .prose li, .muted, .lede { color: #000; }
  a { color: #000; }
}
.mt-3 { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.m-0 { margin: 0; }
.features--marked > li:nth-child(4n + 2) { --mark: var(--pink); }
.features--marked > li:nth-child(4n + 3) { --mark: var(--amber); }
.features--marked > li:nth-child(4n + 4) { --mark: var(--green); }

/* Dim the page behind the open mobile menu */
@media (max-width: 919px) {
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(5, 6, 8, 0.7);
  }
}
.tint-green { --tint: var(--green); }
