/* ==========================================================================
   UT-Systems — Portfolio
   Tokens · Base · Layout · Components · Sections · Vignettes · Motion
   ========================================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

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

  --bg: #050914;
  --bg-raise: #0a1226;
  --bg-card: #0c1630;
  --line: rgba(148, 178, 255, 0.12);
  --line-strong: rgba(148, 178, 255, 0.26);

  --text: #eaf0ff;
  --text-soft: #aab6d6;
  --text-mute: #7584a8;

  --blue: #2f6bff;
  --blue-deep: #0b3fc2;
  --blue-bright: #5b8cff;
  --cyan: #5cc8ff;
  --ice: #cfe0ff;
  --live: #4ade9b;
  --wip: #ffb547;

  --accent-grad: linear-gradient(100deg, #b7d6ff 0%, #5b8cff 40%, #7ee0ff 70%, #b7d6ff 100%);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --col-gap: clamp(16px, 2vw, 32px);
  --header-h: 72px;
  --max: 1440px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--blue);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
}
.skip-link:focus {
  top: 12px;
}

.nobr {
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Film grain over everything */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(3) infinite;
}
@keyframes grain {
  0% {
    background-position: 0 0;
  }
  33% {
    background-position: -37px 23px;
  }
  66% {
    background-position: 29px -41px;
  }
  100% {
    background-position: -13px 11px;
  }
}

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.label b {
  font-weight: 500;
  color: var(--cyan);
}

.it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  /* The gradient is only painted inside the box, but italic overhangs and descenders
     (g, j) reach past it. Pad the box out and cancel the padding with margins. */
  padding: 0.12em 0.16em 0.3em 0.1em;
  margin: -0.12em -0.1em -0.3em -0.1em;
  background: var(--accent-grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite alternate;
}
@keyframes shimmer {
  to {
    background-position: 100% 0;
  }
}

/* ---------- Buttons & links ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out), transform 0.5s var(--ease-out);
}
.btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.35s var(--ease-out);
}
.btn:hover svg {
  transform: translate(2px, -2px);
}
.btn--primary {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue) 45%, var(--blue-deep));
  color: #fff;
  box-shadow: 0 14px 40px -14px rgba(47, 107, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--primary:hover {
  box-shadow: 0 18px 50px -12px rgba(92, 140, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn--glass:hover {
  background: var(--text);
  color: var(--bg);
}
.btn--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}
.btn svg.store {
  width: 12px;
  height: 12px;
}
.btn:hover svg.store {
  transform: none;
}
.btn[aria-disabled="true"] {
  background: transparent;
  color: var(--text-mute);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: default;
}

.link-arrow {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  background-image: linear-gradient(90deg, var(--cyan), var(--blue-bright));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease-out);
}
.link-arrow:hover {
  background-size: 0% 1px;
  background-position: 100% 100%;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}
.status::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: ping 2.4s var(--ease-out) infinite;
}
.status--wip::before {
  background: var(--wip);
  animation-name: ping-wip;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 155, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(74, 222, 155, 0);
  }
}
@keyframes ping-wip {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 181, 71, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(255, 181, 71, 0);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.9s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(5, 9, 20, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--line);
}
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.015em;
}
.brand svg {
  height: 17px;
  width: auto;
  fill: currentColor;
  transition: transform 0.6s var(--ease-out);
}
.brand:hover svg {
  transform: rotate(-8deg) scale(1.08);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 14px;
}
.nav a:not(.btn) {
  color: var(--text-soft);
  position: relative;
  transition: color 0.2s ease;
}
.nav a:not(.btn):hover,
.nav a:not(.btn)[aria-current="true"] {
  color: var(--text);
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--blue-bright));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav a:not(.btn):hover::after,
.nav a:not(.btn)[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Language switch: a small pill in the nav, the mobile menu and the footer */
.lang {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.lang:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}
.nav a.lang::after {
  content: none;
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 61;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.menu-toggle__bars {
  position: relative;
  width: 16px;
  height: 8px;
}
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.menu-toggle__bars::before {
  top: 0;
}
.menu-toggle__bars::after {
  top: 6.5px;
}
.menu-open .menu-toggle__bars::before {
  top: 3.25px;
  transform: rotate(45deg);
}
.menu-open .menu-toggle__bars::after {
  top: 3.25px;
  transform: rotate(-45deg);
}
.menu-open .site-header {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 55;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(80% 50% at 80% 0%, rgba(47, 107, 255, 0.35), transparent 70%),
    radial-gradient(60% 40% at 0% 100%, rgba(92, 200, 255, 0.18), transparent 70%),
    var(--bg);
  clip-path: circle(0% at calc(100% - 56px) 32px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s linear 0.7s;
}
.menu-open .mobile-nav {
  clip-path: circle(150% at calc(100% - 56px) 32px);
  visibility: visible;
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s;
}
.mobile-nav ol {
  border-top: 1px solid var(--line);
}
.mobile-nav li {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}
.menu-open .mobile-nav li {
  opacity: 1;
  transform: none;
}
.menu-open .mobile-nav li:nth-child(1) {
  transition-delay: 0.2s;
}
.menu-open .mobile-nav li:nth-child(2) {
  transition-delay: 0.26s;
}
.menu-open .mobile-nav li:nth-child(3) {
  transition-delay: 0.32s;
}
.menu-open .mobile-nav li:nth-child(4) {
  transition-delay: 0.38s;
}
.menu-open .mobile-nav li:nth-child(5) {
  transition-delay: 0.44s;
}
.mobile-nav li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  font-size: clamp(30px, 8.5vw, 46px);
  font-weight: 520;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.mobile-nav li a span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.mobile-nav__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Animated gradient mesh ---------- */
.mesh {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, transparent 100%);
  animation: drift-a var(--t, 18s) ease-in-out infinite alternate;
  translate: var(--px, 0px) var(--py, 0px);
  will-change: transform;
}
.b1 {
  --c: rgba(47, 107, 255, 0.7);
  --t: 17s;
  width: 70vw;
  height: 70vw;
  left: -18vw;
  top: -26vw;
}
.b2 {
  --c: rgba(11, 63, 194, 0.85);
  --t: 21s;
  width: 58vw;
  height: 58vw;
  right: -16vw;
  top: 4vh;
  animation-name: drift-b;
}
.b3 {
  --c: rgba(92, 200, 255, 0.38);
  --t: 13s;
  width: 36vw;
  height: 36vw;
  left: 34vw;
  bottom: -14vw;
}
.b4 {
  --c: rgba(99, 102, 241, 0.4);
  --t: 24s;
  width: 46vw;
  height: 46vw;
  left: 4vw;
  bottom: -26vw;
  animation-name: drift-b;
}
.b5 {
  --c: rgba(37, 99, 235, 0.6);
  --t: 15s;
  width: 30vw;
  height: 30vw;
  right: 16vw;
  top: -10vw;
  animation-name: drift-c;
}
@keyframes drift-a {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(9vw, 6vh, 0) scale(1.14);
  }
  100% {
    transform: translate3d(-5vw, 12vh, 0) scale(0.9);
  }
}
@keyframes drift-b {
  0% {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  50% {
    transform: translate3d(-10vw, 10vh, 0) scale(0.92);
  }
  100% {
    transform: translate3d(4vw, -6vh, 0) scale(1.18);
  }
}
@keyframes drift-c {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9);
  }
  50% {
    transform: translate3d(-14vw, 14vh, 0) scale(1.25);
  }
  100% {
    transform: translate3d(8vw, 4vh, 0) scale(1);
  }
}
.mesh--soft {
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  isolation: isolate;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(5, 9, 20, 0.75) 100%),
    linear-gradient(180deg, transparent 70%, var(--bg) 100%);
}
.js .hero .mesh {
  opacity: 0;
  transform: scale(1.12);
}
.js .is-ready .hero .mesh {
  opacity: 1;
  transform: none;
  transition: opacity 2.2s ease, transform 3s var(--ease-out);
}

.hero__wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + clamp(24px, 6vh, 80px));
  padding-bottom: clamp(24px, 5vh, 48px);
}

.hero__title {
  margin-block: auto;
  padding-top: clamp(16px, 4vh, 48px);
  font-weight: 520;
  font-size: clamp(3.9rem, 13.4vw, 13.6rem);
  line-height: 0.86;
  letter-spacing: -0.065em;
}
.hero__title .line {
  display: flex;
  align-items: flex-end;
}
.hero__title .l1 .it {
  position: relative;
  top: 0.36em;
  margin-left: auto;
  font-size: 0.72em;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero__title .l2 {
  padding-left: 1.9em;
}
.hero__title .w {
  display: inline-block;
}

.hero__foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: clamp(28px, 5vh, 56px);
}
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px clamp(28px, 6vw, 96px);
}
.hero__facts dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero__facts dd {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
}
.hero__facts time {
  font-variant-numeric: tabular-nums;
}

.scroll-badge {
  position: relative;
  flex: none;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
}
.scroll-badge > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 16s linear infinite;
}
.scroll-badge:hover > svg {
  animation-duration: 5s;
}
.scroll-badge text {
  font-family: var(--mono);
  font-size: 9.6px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  fill: var(--text-soft);
}
.scroll-badge > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, transform 0.5s var(--ease-out);
}
.scroll-badge > span svg {
  width: 14px;
  height: 14px;
  animation: nudge 2s var(--ease-in-out) infinite;
}
.scroll-badge:hover > span {
  background: var(--blue);
  transform: scale(1.08);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes nudge {
  50% {
    transform: translateY(4px);
  }
}

/* ---------- Work overview: project list + card deck ---------- */
.work {
  overflow-x: clip;
}
.work__overview {
  margin-top: clamp(48px, 7vh, 80px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 48px;
  align-items: center;
}
.work__overview > .index {
  grid-column: 1 / span 7;
  margin-top: 0;
}
.index {
  margin-top: clamp(40px, 6vh, 64px);
  border-top: 1px solid var(--line);
}
.index li {
  border-bottom: 1px solid var(--line);
}
.index a {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 2.6em 1fr auto 7.5em;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  transition: padding 0.5s var(--ease-out);
}
.index a::before {
  content: "";
  position: absolute;
  inset: 0 -12px;
  z-index: -1;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.2), rgba(47, 107, 255, 0));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.index a:hover {
  padding-left: 12px;
}
.index a:hover::before {
  opacity: 1;
}
.index a > span:first-child {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mute);
}
.index b {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 560;
  letter-spacing: -0.02em;
}
.index .plogo {
  --s: 30px;
  border-radius: 8px;
}
.index .plogo--mark {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.index .plogo--full img {
  filter: none;
}
.index i {
  font-style: normal;
  font-size: 14px;
  color: var(--text-mute);
}
.index .status {
  justify-self: end;
}

.deck {
  grid-column: 8 / span 5;
  position: relative;
  height: clamp(420px, 40vw, 540px);
  perspective: 1400px;
}
.dcard {
  --p: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(350px, 86%);
  aspect-ratio: 3 / 4;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%)
    translate3d(calc(var(--p) * var(--dx, 20px)), calc(var(--p) * var(--dy, -20px)), calc(var(--p) * -70px))
    rotate(calc(var(--p) * var(--dr, 2.5deg)));
  opacity: calc(1 - var(--p) * 0.17);
  filter: brightness(calc(1 - var(--p) * 0.1));
  transition: transform 1s var(--ease-out), opacity 0.8s ease, filter 0.8s ease;
}
.dcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 30%);
  pointer-events: none;
}
.dcard.is-leaving {
  transform: translate(-50%, -50%) translate3d(-70%, 30px, 60px) rotate(-12deg);
  opacity: 0;
  transition: transform 0.75s var(--ease-in-out), opacity 0.6s ease 0.1s;
}
.dcard--wb {
  background: radial-gradient(120% 90% at 15% 0%, #3d7bff 0%, #0b3fc2 40%, #071233 100%);
}
.dcard--ds {
  background: radial-gradient(120% 90% at 85% 0%, #4f8bff 0%, #1e3a8a 45%, #0a1433 100%);
}
.dcard--to {
  background: radial-gradient(120% 90% at 20% 10%, #22b5f5 0%, #0c4a6e 50%, #06162b 100%);
}
.dcard--pg {
  background: radial-gradient(120% 90% at 75% 0%, #6d70ff 0%, #312e81 50%, #0b0f2e 100%);
}
.dcard--tf {
  background: radial-gradient(120% 90% at 80% 0%, #4d6b2a 0%, #16243a 48%, #070d1f 100%);
}
.dcard--sd {
  background: radial-gradient(120% 90% at 25% 0%, #5d7a99 0%, #1b2d4f 48%, #070d1f 100%);
}
.dcard--sd .plogo {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 18px 36px -12px rgba(0, 0, 0, 0.6);
}
.dcard--cu {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 12px),
    linear-gradient(160deg, #123049, #081524);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(92, 200, 255, 0.35);
}
.dcard__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.dcard__top .status {
  color: #fff;
  font-size: 10.5px;
}
.dcard__art {
  flex: 1;
  width: 72%;
  margin: 18px auto;
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}
.dcard__art .fill {
  fill: rgba(255, 255, 255, 0.92);
  stroke: none;
}
.dcard__art .dot {
  fill: var(--cyan);
  stroke: none;
}
.dcard__logo {
  flex: 1;
  display: grid;
  place-items: center;
}
.dcard__logo .plogo {
  --s: clamp(96px, 9vw, 124px);
}
.dcard__logo .plogo--full img {
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5));
}
.dcard__name {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.dcard__tag {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Generic section ---------- */
.section {
  position: relative;
  isolation: isolate;
  padding-block: clamp(110px, 16vh, 200px);
}
.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 22px;
}
.section-head .label {
  grid-column: 1 / span 3;
  padding-top: 1.1em;
}
.section-title {
  grid-column: 4 / span 9;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  font-weight: 520;
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.section-intro {
  grid-column: 4 / span 6;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: clamp(17px, 0.4vw + 15px, 19px);
  max-width: 38em;
}

/* ---------- Work ---------- */
.group-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(80px, 11vh, 130px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.group-label b {
  color: var(--text);
  font-weight: 500;
}

.project {
  margin-top: clamp(40px, 6vh, 64px);
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}
.project + .project {
  margin-top: clamp(96px, 14vh, 170px);
}
.project__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.project__body {
  margin-top: clamp(28px, 4vh, 44px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 40px;
  align-items: start;
}
.project__text {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
/* Product logos: full tiles (Watchbird, PLMGraph) or marks on a dark tile */
.plogo {
  --s: clamp(52px, 5vw, 72px);
  flex: none;
  display: block;
  width: var(--s);
  height: var(--s);
  border-radius: 23%;
}
.plogo img,
.plogo svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.plogo--full img {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}
.plogo--mark {
  padding: calc(var(--s) * 0.18);
  background: linear-gradient(180deg, #0f1a33, #070d1f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}
.plogo--wip {
  padding: calc(var(--s) * 0.26);
  color: var(--wip);
  border: 1.5px dashed rgba(255, 181, 71, 0.55);
}
.project__title {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
}
.project__name {
  font-size: clamp(2.8rem, 5.6vw, 5.4rem);
  font-weight: 560;
  line-height: 0.92;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, #fff 30%, #9dbbff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.project__tag {
  font-size: clamp(20px, 1.5vw, 24px);
  font-weight: 480;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.project__desc {
  color: var(--text-soft);
  max-width: 36em;
}
.facts {
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.facts dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding-top: 3px;
}
.facts b {
  color: var(--cyan);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.rating__stars {
  --r: 0;
  display: inline-block;
  width: 5.6em;
  height: 1em;
  background: linear-gradient(90deg, var(--wip) calc(var(--r) * 20%), rgba(255, 255, 255, 0.16) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 20.9l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") left center / 1.12em 1em repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 20.9l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") left center / 1.12em 1em repeat-x;
}
.rating b {
  color: var(--text);
}
.rating span:last-child {
  color: var(--text-mute);
}
.project__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 6px;
}
.project__figure {
  grid-column: 6 / span 7;
  position: sticky;
  top: calc(var(--header-h) + 28px);
}
.project__figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.plate {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  container-type: inline-size;
  isolation: isolate;
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ease-out), clip-path 1.4s var(--ease-out);
}
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 50%), rgba(120, 170, 255, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.plate:hover::after {
  opacity: 1;
}

/* ---------- In Arbeit: compact cards ---------- */
.lab {
  margin-top: clamp(40px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--col-gap);
}
/* Four cards read better as two rows of two than as three plus one */
.lab:has(> :nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lab__card {
  --c: var(--blue-bright);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(22px, 2.2vw, 30px);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  background:
    radial-gradient(90% 55% at 0% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.4s ease;
}
.lab__card:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.lab__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.lab__title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}
.lab__title .plogo {
  --s: 56px;
}
.plogo--ring {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}
.lab__name {
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 560;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.lab__type {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.lab__tag {
  font-size: clamp(18px, 1.3vw, 20px);
  font-weight: 480;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.lab__desc {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}
.facts--compact div {
  grid-template-columns: 5.6em 1fr;
  padding: 10px 0;
  font-size: 14px;
}
.lab__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: auto;
  padding-top: 4px;
}

/* ---------- Principles (inside Über mich) ---------- */
.tenets {
  margin-top: clamp(64px, 10vh, 120px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--col-gap);
}

[data-spot] {
  position: relative;
  isolation: isolate;
}
[data-spot]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%), rgba(47, 107, 255, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
[data-spot]:hover::before {
  opacity: 1;
}

.tenet {
  padding: clamp(24px, 2.4vw, 34px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.tenet__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
}
.tenet h3 {
  margin-top: 40px;
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 540;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.tenet p:last-child {
  margin-top: 12px;
  color: var(--text-soft);
}
.tenet strong {
  color: var(--text);
  font-weight: 550;
}

/* ---------- Services ---------- */
.services {
  margin-top: clamp(56px, 8vh, 96px);
  border-top: 1px solid var(--line-strong);
}
.service {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 14px;
  align-items: baseline;
  padding: clamp(26px, 3.6vh, 38px) clamp(0px, 1.2vw, 18px);
  border-bottom: 1px solid var(--line);
}
.service::before {
  border-radius: 18px;
}
.service__num {
  grid-column: 1 / span 1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
}
.service__title {
  grid-column: 2 / span 4;
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 540;
  line-height: 1.08;
  letter-spacing: -0.035em;
  transition: transform 0.5s var(--ease-out);
}
.service:hover .service__title {
  transform: translateX(10px);
}
.service__desc {
  grid-column: 6 / span 5;
  color: var(--text-soft);
}
.service__refs {
  grid-column: 11 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.service__refs span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.service__refs a {
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.service__refs a:hover {
  color: var(--cyan);
  border-color: currentColor;
}

.stack {
  margin-top: clamp(72px, 10vh, 120px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 24px;
}
.stack > .label {
  grid-column: 1 / span 3;
  padding-top: 6px;
}
.stack__groups {
  grid-column: 4 / span 9;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--col-gap);
}
.stack__group h3 {
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.01em;
}
.stack__group ul {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack__group li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.4s var(--ease-out);
}
.stack__group li:hover {
  color: var(--text);
  background: rgba(47, 107, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(92, 140, 255, 0.5);
  transform: translateY(-2px);
}

.process {
  position: relative;
  margin-top: clamp(80px, 11vh, 130px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 28px;
}
.process > .label {
  grid-column: 1 / span 3;
  padding-top: 30px;
}
.process__line {
  grid-column: 4 / span 9;
  grid-row: 1;
  align-self: start;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.process__line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue-bright), var(--cyan));
  transform: scaleX(var(--pp, 0));
  transform-origin: left;
  box-shadow: 0 0 14px rgba(92, 200, 255, 0.7);
}
.process ol {
  grid-column: 4 / span 9;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--col-gap);
  padding-top: 26px;
}
.process__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.process h3 {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -0.02em;
}
.process li p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-soft);
}
.cta-band {
  margin-top: clamp(64px, 9vh, 104px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 3vw, 44px);
  border-radius: 26px;
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(47, 107, 255, 0.35), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-band p {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 22em;
}

/* ---------- About ---------- */
.about {
  overflow: hidden;
}
.about__principles {
  grid-column: 1 / -1;
  margin-top: clamp(96px, 14vh, 160px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 20px;
}
.about__principles-head {
  display: contents;
}
.about__principles-head .label {
  grid-column: 1 / span 3;
  padding-top: 0.7em;
}
.about__lead {
  grid-column: 4 / span 9;
  font-size: clamp(1.8rem, 3.3vw, 3.1rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.about__principles .tenets {
  grid-column: 1 / -1;
  margin-top: clamp(32px, 5vh, 56px);
}
.about__cta {
  grid-column: 1 / -1;
  margin-top: clamp(56px, 8vh, 88px);
}
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 48px;
  align-items: start;
}
.about__photo {
  grid-column: 1 / span 5;
}
.about__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 50px 100px -50px rgba(0, 0, 0, 0.9);
  background: var(--bg-card);
}
.about__frame picture,
.about__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.about__frame picture {
  transform: translate3d(0, var(--py, 0px), 0) scale(1.14);
  will-change: transform;
}
.about__photo figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.about__text {
  grid-column: 7 / span 6;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.about__text h2 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 520;
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.about__text p {
  color: var(--text-soft);
  max-width: 34em;
}
.about__text p.label {
  color: var(--text-mute);
}
.about__text p.big {
  font-size: clamp(20px, 1.6vw, 25px);
  line-height: 1.35;
  font-weight: 480;
  letter-spacing: -0.02em;
  color: var(--text);
}
.about__text .facts {
  margin-top: 10px;
}

/* ---------- Contact ---------- */
.contact {
  overflow: hidden;
  background: #04102e;
}
.mesh--contact .b1 {
  --c: rgba(47, 107, 255, 0.85);
}
.mesh--contact .b2 {
  --c: rgba(11, 63, 194, 1);
}
.mesh--contact .b3 {
  --c: rgba(92, 200, 255, 0.5);
}
.contact .label {
  color: rgba(234, 240, 255, 0.7);
}
.contact__title {
  margin-top: clamp(24px, 4vh, 44px);
  font-size: clamp(3.2rem, 10vw, 10rem);
  font-weight: 540;
  line-height: 0.88;
  letter-spacing: -0.065em;
  text-wrap: balance;
}
.contact__mail {
  margin-top: clamp(44px, 7vh, 84px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 24px 0;
  border-block: 1px solid rgba(234, 240, 255, 0.2);
}
.contact__mail a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  transition: color 0.4s ease;
}
.contact__mail a:hover {
  color: var(--ice);
}
.contact__mail a svg {
  width: 0.45em;
  height: 0.45em;
  flex: none;
  transition: transform 0.4s var(--ease-out), color 0.4s ease;
}
.contact__mail a:hover svg {
  transform: translate(5px, -5px);
  color: var(--cyan);
}
.copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.5s var(--ease-out);
}
.copy:hover {
  background: #fff;
  color: var(--bg);
}
.contact__meta {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px var(--col-gap);
}
.contact__meta dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 240, 255, 0.6);
}
.contact__meta dd {
  margin-top: 8px;
  font-size: 16px;
  color: var(--text);
}
.contact__meta dd a {
  border-bottom: 1px solid rgba(234, 240, 255, 0.35);
  transition: border-color 0.2s ease;
}
.contact__meta dd a:hover {
  border-color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: #03060e;
  padding-top: clamp(64px, 10vh, 112px);
  overflow: hidden;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 36px;
  padding-bottom: clamp(56px, 9vh, 96px);
}
.footer__col {
  grid-column: span 3;
}
.footer__col--wide {
  grid-column: span 6;
}
.footer__col ul {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.footer__col ul a {
  color: var(--text-soft);
  transition: color 0.2s ease;
}
.footer__col ul a:hover {
  color: var(--text);
}
.footer__col--wide p {
  margin-top: 16px;
  max-width: 26em;
  color: var(--text-mute);
  font-size: 15px;
}
.footer__base {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  background: #03060e;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer__base a:hover {
  color: var(--text);
}

/* ==========================================================================
   Vignettes — product illustrations drawn in HTML/CSS/SVG
   Sizes use cqw (relative to the .plate width).
   ========================================================================== */

/* ---- Watchbird: the notch ---- */
.v-wb {
  background: radial-gradient(120% 90% at 50% 0%, #1d3f9e 0%, #0b1633 55%, #070d1f 100%);
}
.v-wb__win {
  position: absolute;
  border-radius: 1.2cqw;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.v-wb__win--editor {
  left: 5%;
  top: 22%;
  width: 56%;
  height: 70%;
}
.v-wb__win--term {
  left: 58%;
  top: 34%;
  width: 37%;
  height: 58%;
  background: #050a17;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 1.2cqw 3cqw rgba(0, 0, 0, 0.4);
}
.v-wb__win i {
  display: block;
  height: 0.9cqw;
  margin: 1.6cqw 2cqw 0;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.08);
}
.v-wb__win i:nth-child(3n) {
  width: 60%;
}
.v-wb__win i:nth-child(4n) {
  width: 78%;
}
.v-wb__win i:nth-child(5n) {
  width: 42%;
  background: rgba(92, 140, 255, 0.35);
}
.v-wb__win--term i:first-of-type {
  width: 30%;
  background: rgba(74, 222, 155, 0.5);
}
.v-wb__bar {
  height: 3.2cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 0.7cqw;
  padding-inline: 1.6cqw;
}
.v-wb__bar b {
  width: 0.9cqw;
  height: 0.9cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.v-wb__notch {
  position: absolute;
  left: 50%;
  top: 0;
  width: 30cqw;
  height: 5.4cqw;
  transform: translateX(-50%);
  background: #000;
  color: #eaf0ff;
  border-radius: 0 0 2.4cqw 2.4cqw;
  box-shadow: 0 1.5cqw 5cqw rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: width 0.9s var(--ease-out) 0.5s, height 0.9s var(--ease-out) 0.5s,
    border-radius 0.9s var(--ease-out) 0.5s;
}
.is-in .v-wb__notch {
  width: 70cqw;
  height: 41cqw;
  border-radius: 0 0 3.4cqw 3.4cqw;
}
.v-wb__pill {
  position: absolute;
  inset: 0 0 auto;
  height: 5.4cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2cqw;
  font-size: 1.7cqw;
  color: #b9c4e0;
  transition: opacity 0.3s ease 0.45s;
}
.is-in .v-wb__pill {
  opacity: 0;
}
.v-wb__dot {
  width: 1.1cqw;
  height: 1.1cqw;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0.5cqw rgba(92, 200, 255, 0.22);
}
.v-wb__card {
  position: absolute;
  inset: 0;
  padding: 3cqw 3.4cqw;
  display: flex;
  flex-direction: column;
  gap: 1.9cqw;
  opacity: 0;
  transform: translateY(-1.2cqw);
  transition: opacity 0.5s ease 1.1s, transform 0.7s var(--ease-out) 1.1s;
}
.is-in .v-wb__card {
  opacity: 1;
  transform: none;
}
.v-wb__head {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  font-size: 1.75cqw;
  color: #98a6c8;
}
.v-wb__badge {
  display: grid;
  place-items: center;
  width: 3.6cqw;
  height: 3.6cqw;
  border-radius: 0.9cqw;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  color: #fff;
  font-family: var(--mono);
  font-size: 1.5cqw;
  font-weight: 600;
}
.v-wb__head span:last-child {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1.45cqw;
  letter-spacing: 0.04em;
  padding: 0.5cqw 1cqw;
  border-radius: 0.6cqw;
  background: rgba(255, 255, 255, 0.08);
}
.v-wb__title {
  font-size: 2.55cqw;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: #fff;
}
.v-wb__title span {
  color: #98a6c8;
  font-weight: 400;
}
.v-wb__diff {
  font-family: var(--mono);
  font-size: 1.6cqw;
  line-height: 1.75;
  padding: 1.4cqw 1.8cqw;
  border-radius: 1.2cqw;
  background: #0b0f1a;
  color: #aab6d6;
}
.v-wb__diff span {
  display: block;
}
.v-wb__diff .del {
  color: #ff8f9e;
  background: rgba(255, 90, 110, 0.1);
}
.v-wb__diff .add {
  color: #7ff0b9;
  background: rgba(74, 222, 155, 0.1);
}
.v-wb__diff .hunk {
  color: #5f6d90;
}
.v-wb__actions {
  display: flex;
  gap: 1.2cqw;
  margin-top: auto;
  font-size: 1.65cqw;
}
.v-wb__actions span {
  display: inline-flex;
  align-items: center;
  gap: 1cqw;
  padding: 1.1cqw 1.7cqw;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.08);
  color: #d5ddf2;
}
.v-wb__actions span:first-child {
  background: #fff;
  color: #050914;
  font-weight: 550;
}
.v-wb__actions kbd {
  font-family: var(--mono);
  font-size: 1.3cqw;
  opacity: 0.6;
}

/* ---- DeskScene: windows snapping into a layout ---- */
.v-ds {
  background: radial-gradient(110% 90% at 50% 10%, #16307a 0%, #0a1430 60%, #060b1b 100%);
  display: grid;
  place-items: center;
}
.v-ds__monitor {
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.v-ds__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 1.2cqw;
  background:
    radial-gradient(70% 90% at 20% 10%, rgba(47, 107, 255, 0.55), transparent 60%),
    radial-gradient(60% 80% at 90% 90%, rgba(92, 200, 255, 0.35), transparent 60%),
    #0a1640;
  box-shadow: 0 0 0 0.9cqw #010309, 0 3cqw 6cqw rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.v-ds__neck {
  width: 9%;
  height: 4.6cqw;
  margin-top: 0.9cqw;
  background: linear-gradient(90deg, #111a2e, #03060e 60%);
}
.v-ds__foot {
  width: 28%;
  height: 1.3cqw;
  border-radius: 0.7cqw 0.7cqw 0.3cqw 0.3cqw;
  background: #03060e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.v-ds__task {
  position: absolute;
  inset: auto 0 0;
  height: 3.6cqw;
  background: rgba(5, 9, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1cqw;
}
.v-ds__task i {
  width: 2cqw;
  height: 2cqw;
  border-radius: 0.5cqw;
  background: rgba(255, 255, 255, 0.22);
}
.v-ds__task i:first-child {
  background: var(--blue-bright);
}
.v-ds__win {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  padding: 0.35cqw;
  transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(0.78);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(0.6s + var(--i) * 0.09s);
}
.is-in .v-ds__win {
  transform: none;
}
.v-ds__win > div {
  height: 100%;
  border-radius: 0.8cqw;
  background: rgba(16, 28, 58, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0.8cqw 2cqw rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #dfe7fb;
}
.v-ds__win header {
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  height: 3cqw;
  padding-inline: 1.2cqw;
  font-size: 1.45cqw;
  font-weight: 550;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.v-ds__win header b {
  width: 1.6cqw;
  height: 1.6cqw;
  border-radius: 0.4cqw;
  background: var(--c);
}
.v-ds__win p {
  flex: 1;
  margin: 1.2cqw;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0 0.8cqw, transparent 0.8cqw 2cqw);
  -webkit-mask: linear-gradient(90deg, #000 70%, transparent);
  mask: linear-gradient(90deg, #000 70%, transparent);
}
.v-ds__win--dark > div {
  background: rgba(3, 7, 18, 0.95);
}
.v-ds__toast {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translate(-50%, 2cqw);
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.3cqw 2cqw;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #050914;
  font-size: 1.8cqw;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 1.5cqw 4cqw rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.5s ease 1.8s, transform 0.8s var(--ease-out) 1.8s;
  z-index: 2;
}
.is-in .v-ds__toast {
  opacity: 1;
  transform: translate(-50%, 0);
}
.v-ds__toast kbd {
  font-family: var(--mono);
  font-size: 1.45cqw;
  padding: 0.3cqw 0.8cqw;
  border-radius: 0.5cqw;
  background: rgba(5, 9, 20, 0.08);
}
.v-ds__toast svg {
  width: 2cqw;
  height: 2cqw;
  color: #16a36a;
}

/* ---- Toolorio: browser with tool categories ---- */
.v-to {
  background: radial-gradient(110% 90% at 20% 0%, #0b5f8f 0%, #0a1a3a 55%, #060b1b 100%);
  padding: 5cqw 5cqw 0;
}
.v-to__browser {
  height: 100%;
  border-radius: 1.4cqw 1.4cqw 0 0;
  background: rgba(8, 15, 34, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 2cqw 5cqw rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.v-to__chrome {
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  height: 4.6cqw;
  padding-inline: 1.8cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.v-to__chrome b {
  width: 1.1cqw;
  height: 1.1cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.v-to__chrome span {
  margin-left: 2cqw;
  flex: 0 1 44%;
  padding: 0.7cqw 1.6cqw;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 1.45cqw;
  color: #aab6d6;
}
.v-to__body {
  padding: 3.4cqw 3.6cqw;
}
.v-to__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3cqw;
}
.v-to__count {
  display: flex;
  align-items: flex-end;
  font-size: 9cqw;
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: #fff;
}
.v-to__count small {
  font-family: var(--mono);
  font-size: 1.5cqw;
  font-weight: 450;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7584a8;
  margin-left: 1.4cqw;
}
.v-to__search {
  flex: 0 1 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1cqw;
  padding: 1.3cqw 1.8cqw;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(148, 178, 255, 0.3);
  font-size: 1.7cqw;
  color: #7584a8;
}
.v-to__search kbd {
  font-family: var(--mono);
  font-size: 1.3cqw;
  padding: 0.3cqw 0.7cqw;
  border-radius: 0.5cqw;
  background: rgba(255, 255, 255, 0.08);
}
.v-to__grid {
  margin-top: 3cqw;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2cqw;
}
.v-to__grid div {
  padding: 1.5cqw 1.5cqw 1.3cqw;
  border-radius: 1.2cqw;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2.6cqw;
  opacity: 0;
  transform: translateY(1.6cqw) scale(0.96);
  transition: opacity 0.5s ease, transform 0.7s var(--ease-out);
  transition-delay: calc(0.5s + var(--i) * 0.06s);
}
.is-in .v-to__grid div {
  opacity: 1;
  transform: none;
}
.v-to__grid b {
  font-size: 1.6cqw;
  font-weight: 550;
  line-height: 1.15;
  color: #dfe7fb;
}
.v-to__grid span {
  font-family: var(--mono);
  font-size: 1.35cqw;
  color: #7584a8;
}
.v-to__grid div:nth-child(7) {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  box-shadow: 0 1cqw 3cqw rgba(47, 107, 255, 0.5);
}
.v-to__grid div:nth-child(7) b {
  color: #fff;
}
.v-to__grid div:nth-child(7) span {
  color: rgba(255, 255, 255, 0.75);
}
.v-to__list {
  margin-top: 3cqw;
  opacity: 0;
  transition: opacity 0.6s ease 1.2s;
}
.is-in .v-to__list {
  opacity: 1;
}
.v-to__list p {
  font-family: var(--mono);
  font-size: 1.3cqw;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7584a8;
  padding-bottom: 1cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.v-to__list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.65cqw;
  color: #dfe7fb;
}
.v-to__list div span {
  font-family: var(--mono);
  font-size: 1.3cqw;
  color: #7584a8;
}

/* ---- Tern Files: a real screenshot, framed like a window ---- */
.v-tf {
  display: grid;
  place-items: center;
  padding: 0 6%;
  background:
    radial-gradient(70% 60% at 85% 0%, rgba(200, 241, 105, 0.14), transparent 70%),
    radial-gradient(80% 70% at 0% 100%, rgba(47, 107, 255, 0.22), transparent 70%),
    var(--bg-card);
}
.v-tf img {
  width: 100%;
  height: auto;
  border-radius: 1.4cqw;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4cqw 8cqw -3cqw rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Motion
   ========================================================================== */

/* Hero: words arrive with a motion-blur smear */
.js .hero__title .w {
  opacity: 0;
  filter: blur(22px);
  transform: translate3d(-0.35em, 0, 0) scaleX(1.25);
  transform-origin: left center;
}
.js .is-ready .hero__title .w {
  animation: smear-in 1.4s var(--ease-out) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.16s);
}
@keyframes smear-in {
  60% {
    filter: blur(2px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}
.js .hero [data-fade] {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
}
.js .is-ready .hero [data-fade] {
  transition: opacity 1s ease, transform 1.1s var(--ease-out), filter 1s ease;
  transition-delay: calc(1.1s + var(--d, 0) * 0.1s);
  opacity: 1;
  transform: none;
  filter: none;
}
.js .site-header {
  transform: translateY(-100%);
}
.js .is-ready .site-header {
  transform: none;
  transition-delay: 0s, 0s, 0.6s;
}

/* Section content reveals on scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity 1s ease, transform 1.2s var(--ease-out), filter 1s ease;
  transition-delay: calc(var(--d, 0) * 0.1s);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Plates open like a shutter */
.js [data-plate] {
  clip-path: inset(10% 10% 10% 10% round 22px);
}
.js [data-plate].is-in {
  clip-path: inset(0 0 0 0 round 22px);
}

/* Headings: words smear in */
.js [data-words] .w {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(-0.3em, 0.08em, 0) scaleX(1.18);
  transform-origin: left center;
  transition: opacity 0.9s ease, filter 0.9s ease, transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 0.05s);
}
.js [data-words].is-in .w {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav a:not(.btn):not(.lang) {
    display: none;
  }
  .work__overview > .index {
    grid-column: 1 / -1;
  }
  .deck {
    grid-column: 1 / -1;
    height: clamp(420px, 70vw, 560px);
  }
  .project__text,
  .project__figure {
    grid-column: 1 / -1;
  }
  .lab {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .project__figure {
    position: relative;
    top: auto;
  }
  .service__title {
    grid-column: 2 / span 5;
  }
  .service__desc {
    grid-column: 7 / span 6;
  }
  .service__refs {
    grid-column: 7 / span 6;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
  }
  .tenets {
    grid-template-columns: 1fr;
  }
  .tenet h3 {
    margin-top: 20px;
  }
  .process__line {
    display: none;
  }
  .stack > .label,
  .stack__groups {
    grid-column: 1 / -1;
  }
  .stack__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }
  .process ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
    padding-top: 0;
  }
  .process > .label,
  .process ol {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .process > .label {
    padding-top: 0;
  }
  .contact__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }
  .lab,
  .lab:has(> :nth-child(4)) {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .hero__title {
    font-size: clamp(3.4rem, 17vw, 7rem);
  }
  .hero__title .l1 .it {
    font-size: 0.62em;
  }
  /* "without" is much longer than "ohne": give it a line of its own */
  .hero__title:lang(en) .l1 {
    flex-wrap: wrap;
  }
  .hero__title:lang(en) .l1 .it {
    flex-basis: 100%;
    top: 0;
    text-align: right;
  }
  .hero__title .l2 {
    padding-left: 0.55em;
  }
  .hero__foot {
    align-items: flex-end;
  }
  .hero__facts {
    gap: 18px 28px;
  }
  .scroll-badge {
    width: 92px;
    height: 92px;
  }
  .section-head .label,
  .section-title,
  .section-intro {
    grid-column: 1 / -1;
  }
  .section-head .label {
    padding-top: 0;
  }
  .index a {
    grid-template-columns: 2.2em 1fr auto;
  }
  .index i {
    display: none;
  }
  .project__bar span:nth-child(2) {
    display: none;
  }
  .facts div {
    grid-template-columns: 7.2em 1fr;
  }
  .service__num,
  .service__title,
  .service__desc,
  .service__refs {
    grid-column: 1 / -1;
  }
  .about__photo,
  .about__text,
  .about__principles-head .label,
  .about__lead {
    grid-column: 1 / -1;
  }
  .about__principles-head .label {
    padding-top: 0;
  }
  .about__photo {
    max-width: 440px;
  }
  .copy {
    margin-left: 0;
  }
  .footer__col,
  .footer__col--wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .stack__groups {
    grid-template-columns: 1fr;
  }
  .hero__facts {
    flex-direction: column;
  }
  .hero__facts > div:nth-child(3) {
    display: none;
  }
  .process ol {
    grid-template-columns: 1fr;
  }
  .contact__meta {
    grid-template-columns: 1fr;
  }
  .footer__base {
    flex-direction: column;
    gap: 6px;
  }
  .project__figure figcaption span:last-child {
    display: none;
  }
  .dcard {
    --dx: 12px;
    --dy: -14px;
    --dr: 2deg;
    width: min(290px, 74%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .grain {
    display: none;
  }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
}
.back-link:hover {
  color: var(--text);
}
.back-link svg {
  width: 12px;
  height: 12px;
  transform: rotate(-135deg);
}
.legal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(48px, 10vh, 120px));
  padding-bottom: clamp(80px, 12vh, 140px);
}
.legal .mesh {
  opacity: 0.45;
}
.legal__inner {
  max-width: 760px;
}
.legal h1 {
  margin-top: 16px;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 540;
  line-height: 0.95;
  letter-spacing: -0.06em;
}
.legal h2 {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.legal p,
.legal ul {
  margin-top: 14px;
  color: var(--text-soft);
}
.legal ul {
  list-style: disc;
  padding-left: 1.2em;
}
.legal p a:not(.btn),
.legal li a {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
}
.legal p a:not(.btn):hover {
  border-color: var(--text);
}
.legal .todo {
  background: rgba(255, 181, 71, 0.14);
  color: var(--wip);
  padding: 0 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85em;
}
.legal + .site-footer {
  padding-top: 0;
}
