/* node.systems – landing page. Tokens from design.md. Everything local, no external resources. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #f4f4f4;
  --surface: #ffffff;
  --surface-strong: #242424;

  --text-primary: #242424;
  --text-secondary: #707070;
  --text-inverse: #ffffff;
  --text-inverse-muted: #a8a8a8;

  --border: #e2e2e2;
  --grid-line: rgba(36, 36, 36, 0.10);
  --focus: #242424;

  --success: #16a34a;

  --radius-xs: 6px;

  --page-max: 1200px;
  --nav-height: 88px;

  --duration-fast: 160ms;

  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Hairline figure on the canvas */
  --hairline-plate: var(--canvas);
  --hairline-hi: #242424;
  --hairline-edge: #8a8a8a;
  --hairline-mid: #b4b4b4;
  --hairline-lo: #d9d9d9;
  --hairline-stroke: 1;

  color-scheme: light;
}

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

html, body { margin: 0; }

body {
  color: var(--text-primary);
  background: var(--surface-strong); /* visible behind the footer */
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.rail {
  position: relative;
  width: min(calc(100% - 32px), var(--page-max));
  margin-inline: auto;
  border-inline: 1px solid var(--grid-line);
}

/* ---------- Header: full-screen graphic ---------- */
.stage-wrap {
  position: relative;
  z-index: 1;
  background: var(--canvas);
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
}

/* Hairline draws at 5:4. Landscape: covers the screen (capped on ultrawide). Portrait: slightly cropped. */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(max(100vw, 125svh), 150svh);
  aspect-ratio: 5 / 4;
}
@media (max-aspect-ratio: 5/4) {
  .stage { width: 135vw; }
}

.hero .rail {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
  border-inline: 0;
}
.hero .tick { display: none; }

.tick {
  position: absolute;
  top: var(--nav-height);
  width: 9px;
  height: 9px;
  margin-top: -5px;
  background:
    linear-gradient(var(--grid-line), var(--grid-line)) center / 1px 9px no-repeat,
    linear-gradient(90deg, var(--grid-line), var(--grid-line)) center / 9px 1px no-repeat;
}
.tick--tl { left: -5px; }
.tick--tr { right: -5px; }

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero .logo {
  position: absolute;
  top: calc(var(--nav-height) / 2);
  left: 32px;
  transform: translateY(-50%);
  pointer-events: auto;
}

/* ---------- Text pages (imprint) ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: 120px;
}

.rail.page { border-inline: 0; }

.page__nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding-inline: 32px;
}

.legal {
  max-width: 640px;
  padding: 96px 32px 0;
}

.legal h1 {
  margin: 0 0 56px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.legal section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.legal h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.legal p { margin: 0; color: var(--text-secondary); }

.legal dl {
  margin: 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
  color: var(--text-secondary);
}
.legal dt { font-size: 14px; }
.legal dd { margin: 0; }


/* ---------- Revealing Footer ---------- */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  background: var(--surface-strong);
  color: var(--text-inverse);
}

.footer__rail {
  border-inline: 0;
  padding: 96px 64px 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 9fr 3fr;
  gap: 24px;
}

.footer__brand p {
  margin: 16px 0 0;
  max-width: 30ch;
  font-size: 14px;
  color: var(--text-inverse-muted);
}

.footer h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.footer ul { list-style: none; margin: 0; padding: 0; }

.footer ul a {
  font-size: 14px;
  color: var(--text-inverse-muted);
  transition: color var(--duration-fast);
}
.footer ul a:hover { color: var(--text-inverse); }

.footer a:focus-visible { outline-color: #fff; }

.footer__base {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-inverse-muted);
}
.footer__base p { margin: 0; }
.footer__status { display: inline-flex; align-items: center; gap: 8px; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .footer__rail { padding: 80px 32px 32px; }
}

@media (max-width: 639px) {
  :root { --nav-height: 68px; }
  .hero .logo { left: 20px; }
  .page__nav { padding-inline: 20px; }
  .legal { padding: 56px 20px 0; }
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
  .footer__rail { padding: 64px 20px 24px; }
  .footer__grid { grid-template-columns: 1fr; row-gap: 40px; }
  .footer__base { flex-direction: column; margin-top: 56px; }
}

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