/* RootNode Technologies
   One dark screen: a tree drawn on a canvas (tree.js) grows from the root node
   between the headline and the intro, and each project hangs off a branch. */

/* Fonts are self-hosted (fonts/): no visitor request leaves this domain.
   Both are variable fonts, so one file per subset serves every weight. */
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/familjen-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/familjen-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #070B0A;
  --ink: #E8F0EC;
  --soft: #C5D1CA;
  --mute: #9FB0A7;
  --accent: #6EF0A8;
  --gutter: clamp(20px, 4vw, 56px);

  --display: "Familjen Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --text: "Familjen Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#rn-tree {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* a finger swiping up scrolls the page; a sideways drag moves a node */
  touch-action: pan-y pinch-zoom;
}

/* Without JavaScript there is no tree: drop its space and the labels. */
html:not(.js) .page-home { min-height: 0; }
html:not(.js) .page-home .tree-space,
html:not(.js) .node { display: none; }
html:not(.js) .page-home .hero-copy { padding-top: 56px; }

/* ---------- Header ---------- */

header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
}

.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name {
  font: 700 19px/1 var(--display);
  letter-spacing: -0.02em;
}
.brand-sub {
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}

nav { display: flex; align-items: center; gap: 8px; }
.nav-link,
.nav-pill {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
}
.nav-link { padding: 0 14px; }
/* On phones the brand and three links can't share a row; the sections sit
   right below the hero, so keep only Contact and hold the header to one line. */
@media (max-width: 520px) {
  header { flex-wrap: nowrap; }
  .nav-link:not(.nav-home) { display: none; }
}
.nav-pill {
  padding: 0 18px;
  border: 1px solid #2A3A33;
  border-radius: 999px;
  background: #0C1311;
}

/* ---------- Project nodes (tree.js moves them onto their branch) ---------- */

.node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 9px 14px;
  border: 1px solid;
  border-radius: 12px;
}
/* Labels link to their product; a press that moves drags the node instead.
   Vertical swipes still scroll the page on touch screens. */
.node {
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
  transition: border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.node-name { font: 600 16px/1 var(--display); }
.node-note { font: 400 11px/1.2 var(--mono); letter-spacing: 0.04em; }

.node-vereview { left: 22%; top: 32%; border-color: #3A4A8F; background: #0C1122; }
.node-vereview .node-name { color: #C2CCFF; }
.node-vereview .node-note { color: #A9B4D9; }

.node-pixel { left: 60%; top: 26%; border-color: #6B4E1E; background: #17110A; }
.node-pixel .node-name { color: #FFCB85; }
.node-pixel .node-note { color: #D2B48A; }

.node-vereview:hover { border-color: #6272C4; background: #10172E; }
.node-pixel:hover { border-color: #9A7230; background: #1F170C; }

/* ---------- Tree space, headline and intro ---------- */

.tree-space { flex: 1 1 auto; min-height: 400px; }

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  padding: 0 var(--gutter) 48px;
  /* The root node sits in the gap between the two text blocks: let presses
     there reach the tree canvas underneath, while the text stays selectable. */
  pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }

#rn-left { flex: 0 1 500px; }
#rn-right { flex: 0 1 340px; }

h1 {
  margin: 0;
  font: 600 clamp(32px, 4.2vw, 54px)/1.04 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--soft);
  text-wrap: pretty;
}

footer {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) 20px;
  font: 400 11px var(--mono);
  letter-spacing: 0.04em;
  color: #8FA097;
}

.footer-links { display: inline-flex; flex-wrap: wrap; gap: 0 18px; margin-left: 18px; }
@media (max-width: 560px) {
  .footer-links { display: flex; margin: 6px 0 0; }
}
.footer-links a { color: #8FA097; display: inline-block; padding: 6px 0; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Company sections below the tree ---------- */

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

.sections {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 16px 48px;
  padding: 72px 0;
  border-top: 1px solid #1B2622;
  scroll-margin-top: 24px;
}
@media (max-width: 720px) {
  .section { grid-template-columns: minmax(0, 1fr); padding: 56px 0; }
}

.eyebrow {
  margin: 6px 0 0;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
/* The section name is a left-hand rail on wide screens. Stacked on a phone it
   would only repeat the heading under it, so it goes. */
@media (max-width: 720px) {
  .eyebrow { display: none; }
}

.section-body { max-width: 760px; }

.section h2 {
  margin: 0 0 20px;
  font: 600 clamp(26px, 3.2vw, 38px)/1.1 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-body > p {
  max-width: 62ch;
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--soft);
  text-wrap: pretty;
}

.products { display: grid; gap: 16px; }

.product {
  scroll-margin-top: 24px;
  padding: 26px 28px;
  border: 1px solid;
  border-radius: 18px;
}
.product-vereview { border-color: #3A4A8F; background: #0C1122; }
.product-pixel { border-color: #6B4E1E; background: #17110A; }

.product-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.product h3 { margin: 0; font: 600 24px/1.1 var(--display); letter-spacing: -0.02em; }
.product-vereview h3 { color: #C2CCFF; }
.product-pixel h3 { color: #FFCB85; }
.status { font: 400 12px/1.4 var(--mono); letter-spacing: 0.04em; }
.product-vereview .status { color: #A9B4D9; }
.product-pixel .status { color: #D2B48A; }

.product p,
.product li {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--soft);
  text-wrap: pretty;
}
.product p { margin: 0; }
.product p + p { margin-top: 8px; }
.product .product-lede {
  font: 500 19px/1.35 var(--display);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.product ul { margin: 16px 0 0; padding-left: 20px; }
.product li { margin: 0 0 8px; }
.product-vereview li::marker { color: #8C9BF0; }

.product-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #C2CCFF;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.product-link:hover { color: var(--ink); }

/* Three values side by side on wide screens, stacked on narrow ones. */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 32px;
  margin: 32px 0 0;
}
.principles > div { padding: 18px 0; border-top: 1px solid #1B2622; }
.principles dt { font: 600 18px/1.3 var(--display); }
.principles dd { margin: 6px 0 0; font-size: 15.5px; line-height: 1.65; color: var(--soft); text-wrap: pretty; }

.contact-card {
  margin-top: 8px;
  padding: 22px 24px;
  border: 1px solid #2A3A33;
  border-radius: 16px;
  background: #0C1311;
}
.contact-card p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.contact-card .contact-name { margin-bottom: 8px; font-weight: 600; }
.contact-card a {
  display: inline-block;
  padding: 6px 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.contact-card a:hover { color: var(--ink); }

/* Same width as the section rules above it: the rule spans the content, not the gutters. */
.site-footer {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(1160px - 2 * var(--gutter));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid #1B2622;
}

/* ---------- Text pages (privacy, support) ---------- */

.page-doc { overflow: visible; }

.doc {
  display: block;
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--gutter) 72px;
}

.doc h1 { font-size: clamp(32px, 5vw, 46px); }

.doc .lede {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--soft);
}

.doc .meta {
  margin: 14px 0 0;
  font: 400 12px/1.5 var(--mono);
  color: var(--mute);
}

.doc h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid #1B2622;
  font: 600 21px/1.25 var(--display);
  letter-spacing: -0.015em;
}

.doc h3 {
  margin: 26px 0 8px;
  font: 600 16px/1.35 var(--display);
}

.doc p,
.doc li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--soft);
  text-wrap: pretty;
}
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--ink); font-weight: 600; }

.doc a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.doc a:not(.btn):hover { color: var(--ink); }

.doc .contact-card {
  margin: 32px 0 0;
  padding: 22px 24px;
  border: 1px solid #2A3A33;
  border-radius: 16px;
  background: #0C1311;
}
.doc .contact-card p { margin: 0 0 6px; }
.doc .contact-card p:last-child { margin: 0; }

.doc .btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ground);
  font-size: 15px;
  font-weight: 600;
}
.doc .btn:hover { background: #9CF5C4; color: var(--ground); }

.doc details {
  border-bottom: 1px solid #1B2622;
}
.doc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  cursor: pointer;
  list-style: none;
  font: 600 16px/1.35 var(--display);
  color: var(--ink);
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: "+";
  flex: none;
  font: 400 20px/1 var(--mono);
  color: var(--accent);
}
.doc details[open] summary::after { content: "−"; }
.doc details > p { margin: 0 0 18px; }

.page-doc footer { padding-top: 24px; border-top: 1px solid #1B2622; }
