@font-face {
  font-family: "Geist";
  src: url("./assets/geist.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./assets/geist-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bergschrift";
  src: url("./assets/bergschrift.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Kamikaze";
  src: url("./assets/kamikaze.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Clash Display";
  src: url("./assets/clash-display-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #0d0d0e;
  --ink-soft: #1a1a1c;
  --paper: #f2f0ea;
  --paper-deep: #e6e3da;
  --bone: #efede8;
  --muted-on-paper: #57544f;
  --muted-on-ink: #a9a59e;
  --red: #e5294f;
  --cyan: #00a9c0;
  --line-paper: rgba(13, 13, 14, 0.16);
  --line-ink: rgba(239, 237, 232, 0.16);
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --side: clamp(1.25rem, 4.2vw, 4.5rem);
  --bar-h: 3.5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-padding-top: var(--bar-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

img,
video,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

[data-lang-copy] {
  display: none;
}

html[data-language="en"] [data-lang-copy="en"],
html[data-language="de"] [data-lang-copy="de"] {
  display: inline;
}

html[data-language="en"] p[data-lang-copy="en"],
html[data-language="de"] p[data-lang-copy="de"] {
  display: block;
}

.skip {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-decoration: none;
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

/* ---------- Labels ---------- */

.label,
.label-row,
.project-hud,
.bar,
.hud,
.index-n,
.index-kind,
.pill,
.screen-toggle,
.hero-cue,
.foot-nav,
.foot-end,
.loader,
.box-label,
.detail-kicker,
.facts dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.n {
  display: inline-block;
  min-width: 2.2em;
  opacity: 0.75;
}

.tag {
  padding: 0.15rem 0.5rem;
  border: 1px solid currentColor;
}

.hatch {
  flex: 0 1 9rem;
  min-width: 2rem;
  height: 0.7rem;
  background: repeating-linear-gradient(115deg, currentColor 0 1px, transparent 1px 5px);
  opacity: 0.5;
}

.label-end {
  margin-left: auto;
}

/* ---------- Loader ---------- */

.loader {
  display: none;
}

.motion:not(.intro-seen) .loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(1.25rem + env(safe-area-inset-top)) var(--side) calc(1.5rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--bone);
  transition: transform 0.9s var(--ease-out) 0.05s;
}

.loader.is-done {
  transform: translateY(-101%);
}

.loader-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted-on-ink);
}

.loader-count {
  display: flex;
  align-items: flex-start;
  font-size: clamp(6rem, 26vw, 22rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.loader-count small {
  margin: 0.4rem 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted-on-ink);
}

.loader-line {
  height: 1px;
  background: var(--line-ink);
}

.loader-line i {
  display: block;
  height: 100%;
  background: var(--bone);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--side) 0;
  color: var(--bone);
  border-bottom: 1px solid var(--line-ink);
  background: rgba(13, 13, 14, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: color 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.bar[data-theme="light"] {
  color: var(--ink);
  border-bottom-color: var(--line-paper);
  background: rgba(242, 240, 234, 0.6);
}

.bar-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.flo-logo {
  display: block;
  width: auto;
  height: 1.3rem;
  overflow: visible;
}

.mark-sep {
  margin: 0 -0.15rem;
  opacity: 0.45;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 300;
}

.mark-word {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-transform: none;
}

.bar-index {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.75rem);
}

.bar-index a,
.bar-hub {
  position: relative;
  padding: 0.75rem 0;
  text-decoration: none;
  opacity: 0.86;
  transition: opacity 0.2s;
}

.bar-index a:hover,
.bar-hub:hover,
.bar-index a[aria-current="true"] {
  opacity: 1;
}

.bar-index a::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--red);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}

.bar-index a[aria-current="true"]::before {
  transform: scale(1);
}

.bar-tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.bar-readout {
  min-width: 9.5em;
  text-align: right;
  opacity: 0.75;
}

.lang {
  display: inline-flex;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px;
}

.lang button {
  min-width: 2.4rem;
  min-height: 1.9rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.bar[data-theme="dark"] .lang button[aria-pressed="true"],
.menu .lang button[aria-pressed="true"] {
  background: var(--bone);
  color: var(--ink);
}

.bar[data-theme="light"] .lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.5rem;
  padding: 0 0 0 0.75rem;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-icon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid currentColor;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.65rem;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease);
}

.menu-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.menu-button[aria-expanded="true"] .menu-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-icon::after {
  transform: translate(-50%, -50%) rotate(135deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: calc(var(--bar-h) + env(safe-area-inset-top) + 2rem) var(--side) 2rem;
  background: var(--ink);
  color: var(--bone);
  overflow-y: auto;
}

.menu nav {
  display: grid;
}

.menu .label {
  margin: 0 0 1rem;
  color: var(--muted-on-ink);
}

.menu a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line-ink);
  font-size: clamp(2rem, 9vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-decoration: none;
}

.menu a .n {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.menu a:last-child {
  border-bottom: 1px solid var(--line-ink);
}

.motion .menu:not([hidden]) a {
  animation: menu-in 0.6s var(--ease-out) both;
}

.motion .menu a:nth-child(3) { animation-delay: 0.05s; }
.motion .menu a:nth-child(4) { animation-delay: 0.1s; }
.motion .menu a:nth-child(5) { animation-delay: 0.15s; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(1.5rem); }
}

.menu-hub {
  color: var(--muted-on-ink);
}

.menu-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
}

.menu-lang .label {
  margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--bone);
}

.motion .hero {
  height: 160vh;
}

.hero-stage {
  --brain: min(74svh, 56vw, 820px);
  --word-h: calc((100cqw - var(--side)) * 0.372);
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  container-type: inline-size;
  background: radial-gradient(110% 80% at 62% 32%, #1f1f23 0%, var(--ink) 62%);
}

.motion .hero-stage {
  position: sticky;
  top: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.brain-anchor {
  position: absolute;
  z-index: 4;
  left: calc(60% - var(--brain) / 2);
  top: calc(var(--bar-h) + env(safe-area-inset-top) + 2vh);
  width: var(--brain);
  aspect-ratio: 1;
  border-radius: 50%;
  touch-action: pan-y;
  cursor: grab;
}

.brain-anchor:active {
  cursor: grabbing;
}

.hero-line {
  position: absolute;
  z-index: 3;
  left: var(--side);
  top: calc(var(--bar-h) + env(safe-area-inset-top) + 14vh);
  max-width: 24rem;
  margin: 0;
  font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.hero-rule {
  display: block;
  width: min(14rem, 70%);
  height: 1px;
  margin-top: 1.4rem;
  background: linear-gradient(90deg, var(--bone), transparent);
  opacity: 0.6;
  transform-origin: left;
}

.hud {
  position: absolute;
  z-index: 3;
  right: var(--side);
  top: calc(var(--bar-h) + env(safe-area-inset-top) + 14vh);
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted-on-ink);
}

.hud div {
  display: grid;
  grid-template-columns: 4.5em 6.5em;
  border-top: 1px solid var(--line-ink);
  padding-top: 0.35rem;
}

.hud dt {
  opacity: 0.8;
}

.hud dd {
  margin: 0;
  color: var(--bone);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hero-marks {
  position: absolute;
  z-index: 2;
  inset: calc(var(--bar-h) + 6vh) calc(var(--side) * 0.4) auto;
  display: flex;
  justify-content: space-between;
  color: var(--muted-on-ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  opacity: 0.5;
}

.hero-marks i {
  font-style: normal;
}

.wordmark {
  position: absolute;
  z-index: 3;
  left: calc(var(--side) * 0.5);
  right: calc(var(--side) * 0.5);
  bottom: calc(var(--side) * 0.3 + env(safe-area-inset-bottom));
  margin: 0;
  font-family: var(--sans);
  font-size: calc((100cqw - var(--side)) / 2.6);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
  pointer-events: none;
}

.wm-line {
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  padding-bottom: 0.03em;
}

.wm-line.is-free {
  overflow: visible;
}

.wm-line > span {
  display: inline-block;
  will-change: transform;
}

.motion .wm-line > span {
  transform: translateY(105%);
  transition: transform 1.3s var(--ease-out);
}

.motion .is-live .wm-line > span {
  transform: none;
}

.motion .is-live .wm-line > span:nth-child(2) { transition-delay: 0.06s; }
.motion .is-live .wm-line > span:nth-child(3) { transition-delay: 0.12s; }
.motion .is-live .wm-line > span:nth-child(4) { transition-delay: 0.18s; }
.motion .is-live .wm-line > span:nth-child(5) { transition-delay: 0.24s; }
.motion .is-live .wm-line > span:nth-child(6) { transition-delay: 0.3s; }

.motion .hero-line,
.motion .hud,
.motion .hero-marks {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s var(--ease-out) 0.5s, transform 1s var(--ease-out) 0.5s;
}

.motion .is-live .hero-line,
.motion .is-live .hud,
.motion .is-live .hero-marks {
  opacity: 1;
  transform: none;
}

.motion .is-live .hero-marks {
  opacity: 0.5;
}

.hero-cue {
  position: absolute;
  z-index: 3;
  right: var(--side);
  top: 50%;
  display: none;
  text-decoration: none;
  writing-mode: vertical-rl;
  color: var(--muted-on-ink);
}

.hero-cue i {
  display: block;
  width: 1px;
  height: 3rem;
  margin: 0.75rem auto 0;
  background: currentColor;
  transform-origin: top;
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Index ---------- */

.index {
  padding: calc(var(--bar-h) + clamp(3rem, 7vw, 6rem)) var(--side) clamp(4rem, 9vw, 8rem);
  background: var(--paper);
}

.label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0 0 1rem;
  margin-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-paper);
  color: var(--muted-on-paper);
}

.label-row .tag {
  color: var(--ink);
}


.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.index-list a {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1.4fr) minmax(0, 1fr) 2rem;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(1.1rem, 2.4vw, 2.2rem) 0;
  border-bottom: 1px solid var(--line-paper);
  text-decoration: none;
  transition: padding 0.45s var(--ease-out), color 0.3s;
  isolation: isolate;
}

.index-list a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
}

.index-n,
.index-kind {
  color: var(--muted-on-paper);
  transition: color 0.3s;
}

.index-name {
  font-size: clamp(2.2rem, 6vw, 6rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.index-arrow {
  justify-self: end;
  font-family: var(--mono);
  transition: transform 0.35s var(--ease);
}

.index-list a:hover,
.index-list a:focus-visible {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  color: var(--bone);
}

.index-list a:hover::before,
.index-list a:focus-visible::before {
  transform: scaleY(1);
  transform-origin: top;
}

.index-list a:hover .index-n,
.index-list a:hover .index-kind,
.index-list a:focus-visible .index-n,
.index-list a:focus-visible .index-kind {
  color: var(--muted-on-ink);
}

.index-list a:hover .index-arrow {
  transform: translateY(4px);
}

/* ---------- Projects ---------- */

.project {
  --field: #0e2618;
  --field-2: #1f6b45;
  --fg: var(--bone);
  --fg-muted: rgba(239, 237, 232, 0.72);
  --line: rgba(239, 237, 232, 0.2);
  position: relative;
  color: var(--fg);
  background: var(--field);
}

.project-bergwork {
  --field: #1c0f17;
  --field-2: #c4502a;
}

.project-fernwork {
  --field: #0b2116;
  --field-2: #1d6a43;
}

.project-himmelcad {
  --field: #0f2a55;
  --field-2: #4b8ee0;
}

.project-suprabench {
  --field: #e5fe40;
  --field-2: #f4ffa8;
  --fg: var(--ink);
  --fg-muted: rgba(13, 13, 14, 0.72);
  --line: rgba(13, 13, 14, 0.2);
  --accent: var(--ink);
}

.project-suprabench .project-stage::before {
  color: var(--ink);
  opacity: 0.14;
}

.motion .project-pin {
  height: 230vh;
}

.project-stage {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  padding: calc(var(--bar-h) + 2rem) var(--side) clamp(3rem, 6vw, 5rem);
  background: radial-gradient(130% 95% at 50% 115%, var(--field-2) 0%, var(--field) 62%);
}

.project-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(currentColor 1.1px, transparent 1.6px);
  background-size: 11px 11px;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 55%);
  mask-image: linear-gradient(to top, #000 0%, transparent 55%);
}

.motion .project-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: 0;
}

.project-hud {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
}

.project-hud .tag {
  color: var(--fg);
}

.hud-of {
  margin-left: -0.5rem;
}

.motion .project-hud {
  position: absolute;
  left: var(--side);
  right: var(--side);
  top: calc(var(--bar-h) + env(safe-area-inset-top) + 1.25rem);
}

.project-title {
  position: relative;
  z-index: 1;
  margin: clamp(1.5rem, 4vw, 3rem) 0;
  font-size: clamp(3.2rem, 15.5cqw, 19rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.motion .project-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0;
  text-align: center;
  transform: translateY(-50%);
  will-change: transform, opacity;
}

.screen {
  position: relative;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  background: #070708;
}

.screen video {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
}

.motion .screen {
  position: absolute;
  inset: 0;
  will-change: transform, border-radius;
  transform: scale(0.34);
  border-radius: 24px;
}

.motion .screen video {
  height: 100%;
  aspect-ratio: auto;
}

.project-card {
  position: relative;
  z-index: 5;
  width: min(32rem, 100%);
  margin-top: 1.5rem;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
}

.motion .project-card {
  position: absolute;
  left: var(--side);
  bottom: calc(var(--side) * 0.7 + env(safe-area-inset-bottom));
  margin: 0;
  transform: translateY(calc(100% + 6rem));
  will-change: transform;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-n {
  font-family: var(--mono);
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.screen-toggle {
  min-height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-paper);
  border-radius: 999px;
  background: transparent;
  font-size: 0.6875rem;
  cursor: pointer;
}

.screen-toggle:hover {
  border-color: var(--ink);
}

.lede {
  margin: 0 0 1.5rem;
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 3.25rem;
  padding: 0 0.45rem 0 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}

.pill-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  transition: transform 0.35s var(--ease);
}

.pill:hover {
  background: var(--ink);
  color: var(--paper);
}

.pill:hover .pill-icon {
  background: var(--paper);
  color: var(--ink);
  transform: rotate(45deg);
}

.project-meter {
  display: none;
}

.motion .project-meter {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  height: 3px;
  background: var(--line);
}

.project-meter i {
  display: block;
  height: 100%;
  background: var(--fg);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Wordmarks (each project's own) ---------- */

.wm {
  display: inline-block;
  white-space: nowrap;
}

.wm-bergwork {
  font-family: "Bergschrift", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  color: #f3f0e6;
  text-shadow: 0.06em 0.06em 0 #0a0a0a;
}

.wm-himmelcad {
  font-family: "Kamikaze", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  color: #f3f0e6;
  text-shadow: 0.035em 0.035em 0 #2e86ff;
}

.wm-suprabench {
  font-family: "Clash Display", var(--sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.wm-suprabench span {
  color: #e5fe40;
}

.wm-fernwork {
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.wm-fernwork img {
  width: 0.82em;
  height: 0.82em;
}

/* measured widths: berg:work 9.35em, Himmel:CAD 5.92em, SupraBench. 6.45em, Fernwork 5em → ~86cqw */
.project-title .wm-bergwork {
  font-size: 9.2cqw;
}

.project-title .wm-himmelcad {
  font-size: 14cqw;
}

.project-title .wm-suprabench {
  font-size: 11.8cqw;
  padding: 0.04em 0.2em 0.1em;
  border-radius: 0.06em;
  background: #050505;
  box-shadow: 0.05em 0.05em 0 rgba(13, 13, 14, 0.25);
}

/* index rows: logo + wordmark on paper */
.index-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.index-logo {
  width: 0.8em;
  height: 0.8em;
  object-fit: contain;
}

.index-wm .wm-fernwork img {
  display: none;
}

.index-wm .wm-bergwork,
.index-wm .wm-himmelcad {
  color: var(--ink);
}

.index-wm .wm-bergwork {
  font-size: 0.55em;
  text-shadow: 0.05em 0.05em 0 rgba(13, 13, 14, 0.18);
}

.index-wm .wm-himmelcad {
  font-size: 0.7em;
  text-shadow: 0.035em 0.035em 0 #2e86ff;
}

.index-wm .wm-suprabench {
  font-size: 0.85em;
  color: var(--ink);
}

.index-wm .wm-suprabench span {
  color: var(--ink);
  background: #e5fe40;
  padding: 0 0.04em;
}

.index-list a:hover .index-wm .wm,
.index-list a:focus-visible .index-wm .wm {
  color: var(--bone);
}

.index-list a:hover .index-wm .wm-suprabench span,
.index-list a:focus-visible .index-wm .wm-suprabench span {
  color: var(--ink);
}

.card-id {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.card-logo {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: contain;
}

/* ---------- Project detail ---------- */

.project-detail {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) var(--side) clamp(4rem, 9vw, 8rem);
  background: var(--field);
  color: var(--fg);
}

.detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 1.5rem var(--side);
  align-items: start;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--fg-muted);
}

.detail-kicker img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.detail-group + .detail-group {
  margin-top: clamp(3.5rem, 8vw, 6.5rem);
}

.group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.group-head:not(:has(.group-logo)) {
  grid-template-columns: minmax(0, 1fr);
}

.group-logo {
  width: clamp(3.5rem, 7vw, 5.5rem);
  height: clamp(3.5rem, 7vw, 5.5rem);
  object-fit: contain;
}

.group-title {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.group-claim {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 5.2vw, 4.8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.group-intro {
  max-width: 44rem;
  margin: 0;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.45;
  opacity: 0.9;
}

.group-public .group-title,
.group-planned .group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--ink);
}

.group-public .group-title {
  background: #8ef0a8;
}

.group-planned .group-title {
  background: rgba(239, 237, 232, 0.85);
}

.detail-group-planned .box {
  border-style: dashed;
  background: transparent;
}

.box-logo {
  width: 2rem;
  height: 2rem;
  margin-right: 0.6rem;
  vertical-align: middle;
  object-fit: contain;
}

.detail-group-planned .box-label {
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--fg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge-public {
  color: #8ef0a8;
}

.badge-progress {
  color: #ffd27a;
}

.badge-internal {
  color: #ffb08a;
}

.badge-planned {
  color: rgba(239, 237, 232, 0.7);
}

.badge-planned i {
  background: transparent;
  border: 1px solid currentColor;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  border-top: 1px solid var(--line);
}

.stat {
  padding: 1.25rem 1.25rem 0 0;
}

.stat + .stat {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.stat dt {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.stat dd {
  margin: 0.6rem 0 0;
  max-width: 18rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.project-suprabench .stat dt,
.project-suprabench .group-claim {
  color: var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.fact {
  padding: 0 1.25rem 0 1rem;
  border-left: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 0.5rem;
  color: var(--fg-muted);
}

.facts dd {
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.1875rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--fg) 5%, transparent);
}

.box-narrow {
  grid-column: span 2;
}

.box-half {
  grid-column: span 3;
}

.box-wide {
  grid-column: span 4;
}

.box-body {
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.box-label {
  margin: 0 0 0.9rem;
  color: var(--fg-muted);
}

.box-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.box-text {
  margin: 0;
  max-width: 40rem;
  color: var(--fg);
  opacity: 0.88;
  font-size: 1rem;
  line-height: 1.5;
}

.box-media {
  position: relative;
  margin-top: auto;
  background: #070708;
  border-top: 1px solid var(--line);
}

.box-media img,
.box-media video {
  width: 100%;
  height: auto;
}

.box-wide.has-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
}

.box-wide.has-media .box-media {
  border-top: 0;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.box-video video {
  max-height: 34rem;
  object-fit: cover;
}

.box-toggle {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  background: rgba(13, 13, 14, 0.72);
  color: var(--bone);
  border-color: rgba(239, 237, 232, 0.3);
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.pill-on-field {
  border-color: var(--fg);
  color: var(--fg);
}

.pill-on-field .pill-icon {
  background: var(--fg);
  color: var(--field);
}

.pill-on-field:hover {
  background: var(--fg);
  color: var(--field);
}

.pill-on-field:hover .pill-icon {
  background: var(--field);
  color: var(--fg);
}

/* two actions on a project card (download + preview) */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-ghost {
  border-color: rgba(13, 13, 14, 0.32);
}

.pill-ghost .pill-icon {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(13, 13, 14, 0.32);
}

.pill-ghost:hover .pill-icon {
  box-shadow: none;
}

/* primary action on the coloured field */
.pill-solid {
  background: var(--fg);
  color: var(--field);
}

.pill-solid .pill-icon {
  background: var(--field);
  color: var(--fg);
}

.pill-solid:hover {
  background: transparent;
  color: var(--fg);
}

.pill-solid:hover .pill-icon {
  background: var(--fg);
  color: var(--field);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.badges .badge {
  margin: 0;
}

.box-label:has(.box-logo) {
  display: flex;
  align-items: center;
}

/* a tall dialog screenshot: show its top in a calm 16:10 frame */
.box-media-shot img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

/* an honest note next to the download (unsigned Windows installer) */
.notice {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem clamp(1rem, 3vw, 2rem);
  max-width: 62rem;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid #ffd27a;
  border-radius: 4px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.notice p {
  margin: 0;
}

.notice .notice-label {
  padding-top: 0.15rem;
  color: #ffd27a;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice strong {
  color: var(--fg);
  font-weight: 500;
}

.detail-group-family .group-claim {
  font-size: clamp(2rem, 4.2vw, 3.8rem);
}

/* ---------- Footer ---------- */

.foot {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  padding: clamp(5rem, 10vw, 8rem) var(--side) 0;
  background: var(--ink);
  color: var(--bone);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem var(--side);
}

.foot-hub {
  text-decoration: none;
}

.foot-hub .label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted-on-ink);
}

.foot-big {
  display: block;
  font-size: clamp(4rem, 14vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.foot-big span {
  display: inline-block;
  transition: transform 0.45s var(--ease-out);
}

.foot-hub:hover .foot-big span {
  transform: translate(0.12em, -0.12em);
}

.foot-nav {
  display: grid;
  align-content: end;
}

.foot-nav a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-ink);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.875rem;
}

.foot-nav a:hover {
  color: #fff;
}

.foot-nav img {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.6rem;
  vertical-align: -0.3rem;
  object-fit: contain;
}

.foot-end {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-ink);
  color: var(--muted-on-ink);
}

.foot-end a {
  text-decoration: none;
}

.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.foot-mark .flo-logo {
  height: 1.1rem;
  color: var(--bone);
}

.foot-end a:hover {
  color: var(--bone);
}

.foot-grid {
  position: relative;
  z-index: 1;
}

.foot-word {
  pointer-events: none;
  margin: clamp(2rem, 5vw, 4rem) calc(var(--side) * -0.5) 0;
  font-size: calc((100cqw) / 2.6);
  line-height: 0.74;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
  color: var(--bone);
  transform-origin: bottom;
}

.motion .foot-word.reveal {
  transform: translateY(30%);
  opacity: 1;
  transition: transform 1.4s var(--ease-out);
}

.motion .foot-word.reveal.is-in {
  transform: none;
}

/* ---------- Reveal ---------- */

.motion .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (min-width: 1100px) {
  .hero-cue {
    display: block;
  }
}

@media (max-width: 1080px) {
  .bar-index,
  .bar-readout {
    display: none;
  }

  .bar {
    grid-template-columns: auto 1fr;
  }

  .bar-tools {
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .hero-stage {
    --brain: min(94vw, 50svh, 560px);
  }

  .hero-marks {
    display: none;
  }

  .hero-line {
    top: calc(var(--bar-h) + env(safe-area-inset-top) + 1.75rem);
  }

  .hud {
    top: auto;
    bottom: calc(var(--word-h) * 0.95 + 1rem);
    left: var(--side);
    right: auto;
    grid-template-columns: repeat(2, auto);
    gap: 0.25rem 1.25rem;
    font-size: 0.6875rem;
  }

  .hud div {
    grid-template-columns: 3.6em 5.6em;
  }

  .hud div:nth-child(4) {
    display: none;
  }

  .brain-anchor {
    left: calc(50% - var(--brain) / 2);
    top: auto;
    bottom: calc(var(--word-h) * 0.62 + 2vh);
  }

  .index-list a {
    grid-template-columns: 3rem minmax(0, 1fr) 1.5rem;
  }

  .index-kind {
    grid-column: 2;
    grid-row: 2;
    margin-top: -0.25rem;
  }

  .index-arrow {
    grid-column: 3;
    grid-row: 1;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 0;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .box-narrow,
  .box-half {
    grid-column: span 1;
  }

  .box-wide {
    grid-column: 1 / -1;
  }

  .box-wide.has-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .box-wide.has-media .box-media {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  /* portrait: the screen keeps its aspect ratio and scales from a centred band */
  .motion .screen {
    inset: auto 0;
    top: 50%;
    height: calc(100cqw / 1.6);
    margin-top: calc(100cqw / -3.2);
    transform: scale(0.6) rotate(-4deg);
  }

  .motion .project-title {
    top: calc(var(--bar-h) + env(safe-area-inset-top) + 5.5rem);
    transform: none;
    text-align: left;
    padding: 0 var(--side);
    font-size: clamp(3rem, 17cqw, 9rem);
  }

  .motion .project-card {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    padding: 1.2rem var(--side) calc(1.4rem + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }

  .card-head {
    margin-bottom: 0.6rem;
  }

  .card-n {
    font-size: 2.75rem;
  }
}

@media (max-width: 640px) {
  :root {
    --bar-h: 3.25rem;
  }

  .bar-hub,
  .bar .lang {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .label-end {
    display: none;
  }

  .hatch {
    flex-basis: 3rem;
  }

  .lede {
    font-size: 1.0625rem;
    margin-bottom: 1.1rem;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat,
  .stat + .stat {
    padding: 1rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .group-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .box-narrow,
  .box-half,
  .box-wide {
    grid-column: 1 / -1;
  }

  .pill {
    min-height: 3rem;
  }

  .card-actions .pill {
    gap: 0.75rem;
    min-height: 2.75rem;
    padding-left: 1.1rem;
  }

  .card-actions .pill-icon {
    width: 2rem;
    height: 2rem;
  }

  .notice {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 641px) {
  .menu {
    display: none !important;
  }
}

@media (max-height: 700px) and (max-width: 900px) {
  .motion .project-card .lede {
    font-size: 1rem;
    line-height: 1.4;
  }

  .motion .card-head {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cue i {
    animation: none;
  }
}
