/* Machmusoft – public site.
   Black and white only. One family (Jost, variable 100–900) used at contrasting weights.
   The one recurring motif is the heartbeat: the ECG trace in the hero drives the dot in the wordmark. */

@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/Jost.f87947de14.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

@property --spin {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #000000;
  --ink: #ffffff;          /* headings, primary actions */
  --text: #d6d6db;         /* body copy – 14.6:1 on black */
  --muted: #a1a1aa;        /* secondary copy – 8.0:1 on black */
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.26);
  --surface: rgba(255, 255, 255, 0.035);
  --danger: #ff8a80;

  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 76rem;
  --gutter: 1.5rem;
  --nav-h: 4.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
@media (max-width: 30rem) { :root { --gutter: 1rem; --nav-h: 4rem; } }

/* -------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 380;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; }
strong { font-weight: 560; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .75rem 1rem; border-radius: .5rem; text-decoration: none; font-weight: 500; }
.skip:focus { top: 1rem; }

.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon--sm { width: 1rem; height: 1rem; }

/* ------------------------------------------------------------ type */
.h2 {
  font-size: clamp(2.25rem, 1.35rem + 3.4vw, 4rem);
  font-weight: 320;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.h2--sub { font-size: clamp(1.875rem, 1.25rem + 2.4vw, 3rem); }
.h3 { font-size: 1.375rem; font-weight: 460; line-height: 1.25; letter-spacing: -0.012em; color: var(--ink); }
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.6; color: var(--text); max-width: 36rem; margin-top: 1.25rem; text-wrap: pretty; }

.link {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem;
  color: var(--ink); text-decoration: none; font-weight: 460;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(50% + .8em) / 100% 1px;
  transition: background-size .4s var(--ease-out);
}
.link:hover { background-size: 0 1px; background-position: 100% calc(50% + .8em); }

/* ----------------------------------------------------------- buttons */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .625rem;
  min-height: 3.25rem; padding: 0 1.625rem; border-radius: 999px;
  font-size: 1rem; font-weight: 500; letter-spacing: .005em; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(0, 0, 0, .12) 50%, transparent 65%);
  transform: translateX(-110%);
}
.btn--primary:hover::after { transform: translateX(110%); transition: transform .9s var(--ease-out); }
.btn--ghost { color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, .06); }
.btn--small { min-height: 2.75rem; padding: 0 1.125rem; font-size: .9375rem; }
.btn--wide { min-width: min(100%, 17rem); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn__arrow { width: 1.125rem; height: 1.125rem; transition: transform .35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------------------------------------------------------- wordmark */
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); text-decoration: none; }
.brand__logo { height: 1.75rem; width: auto; }
/* the <M> mark: code brackets, a heart-monitor line between them drawing the M */
.brand { gap: .6rem; }
.lm { display: block; flex: none; height: 1.4rem; width: auto; aspect-ratio: 58.5 / 32.5; overflow: visible; color: var(--ink); }
.lm path { fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.lm__ghost { opacity: 0; }
.brand--footer .lm { height: 1.15rem; }
@media (prefers-reduced-motion: no-preference) {
  .lm--live .lm__ghost { opacity: .22; }
  /* the line is drawn slowly, held, faded and drawn again; the mark pulses when the M is complete */
  .lm--live .lm__beat {
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: lm-loop 3.6s cubic-bezier(.45, 0, .2, 1) .9s infinite;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, .6));
  }
  .lm--live { transform-origin: 50% 55%; animation: lm-pulse 3.6s ease-out .9s infinite; }
  .nav .lm__br { animation: fade-in .6s .1s both; }
}
@keyframes lm-loop { 0% { stroke-dashoffset: 100; opacity: 1; } 50%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
/* a double heartbeat ("lub-dub") just as the M is complete (50 % of the loop) */
@keyframes lm-pulse {
  0%, 50% { transform: scale(1); filter: none; }
  53% { transform: scale(1.12); filter: drop-shadow(0 0 5px rgba(255, 255, 255, .55)); }
  57% { transform: scale(.98); filter: none; }
  61% { transform: scale(1.05); filter: drop-shadow(0 0 3px rgba(255, 255, 255, .35)); }
  70%, 100% { transform: scale(1); filter: none; }
}
.wm { display: inline-flex; align-items: baseline; font-size: 1.5rem; line-height: 1; letter-spacing: -0.025em; white-space: nowrap; }
.wm__word { display: inline-flex; }
.wm__l { --w: 640; display: inline-block; font-weight: var(--w); }
.wm__l--light { --w: 240; }
.wm__dot {
  width: .2em; height: .2em; margin-left: .14em; border-radius: 50%;
  background: var(--ink); align-self: baseline; transform-origin: center;
}
.wm__l:nth-child(1) { --i: 0; }  .wm__l:nth-child(2) { --i: 1; }  .wm__l:nth-child(3) { --i: 2; }
.wm__l:nth-child(4) { --i: 3; }  .wm__l:nth-child(5) { --i: 4; }  .wm__l:nth-child(6) { --i: 5; }
.wm__l:nth-child(7) { --i: 6; }  .wm__l:nth-child(8) { --i: 7; }  .wm__l:nth-child(9) { --i: 8; }
.wm__l:nth-child(10) { --i: 9; } .wm__l:nth-child(11) { --i: 10; } .wm__l:nth-child(12) { --i: 11; }
.wm__l:nth-child(13) { --i: 12; } .wm__l:nth-child(14) { --i: 13; } .wm__l:nth-child(15) { --i: 14; }
.wm__l:nth-child(n+16) { --i: 15; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .35s, border-color .35s, transform .45s var(--ease-out), backdrop-filter .35s;
}
.nav.is-scrolled { background: rgba(0, 0, 0, .72); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.nav.is-hidden:not(.is-open):not(:focus-within) { transform: translateY(-100%); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav__links a {
  position: relative; display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--muted); text-decoration: none; font-size: .9875rem; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .55rem; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav__actions { display: flex; align-items: center; gap: .75rem; }

.lang {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: .3125rem;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .8125rem; font-weight: 500; letter-spacing: .04em;
  transition: border-color .2s;
}
.lang:hover { border-color: var(--line-strong); }
.lang__item { display: inline-flex; align-items: center; justify-content: center; min-width: 2.125rem; height: 2rem; border-radius: 999px; color: var(--muted); }
.lang__item.is-on { background: var(--ink); color: var(--bg); }

.nav__toggle { display: none; }

@media (min-width: 56.01rem) {
  .nav__menu { display: flex; align-items: center; gap: 2.5rem; }
  .nav__links { display: flex; gap: 2rem; }
}
@media (max-width: 56rem) {
  .nav .brand { position: relative; z-index: 2; }
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
    background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; position: relative; z-index: 2;
  }
  .nav__bars { position: relative; width: 1.125rem; height: .5rem; }
  .nav__bars i { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .4s var(--ease-out), top .4s var(--ease-out); }
  .nav__bars i:first-child { top: 0; }
  .nav__bars i:last-child { top: calc(100% - 1.5px); }
  .nav.is-open .nav__bars i:first-child { top: calc(50% - .75px); transform: rotate(45deg); }
  .nav.is-open .nav__bars i:last-child { top: calc(50% - .75px); transform: rotate(-45deg); }

  .js .nav__menu {
    position: fixed; inset: 0; z-index: 1; padding: calc(var(--nav-h) + 2rem) var(--gutter) 2rem;
    background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
    visibility: hidden; opacity: 0; transition: opacity .35s, visibility 0s .35s;
    overflow-y: auto;
  }
  .js .nav.is-open .nav__menu { visibility: visible; opacity: 1; transition: opacity .35s; }
  .js .nav.is-open { background: var(--bg); }
  .nav__links { display: flex; flex-direction: column; }
  .js .nav__links a { font-size: clamp(2rem, 9vw, 2.75rem); font-weight: 300; letter-spacing: -0.03em; color: var(--ink); min-height: 3.75rem; }
  .js .nav__links a::after { bottom: .5rem; }
  .js .nav__links li, .js .nav__actions { opacity: 0; transform: translateY(1rem); transition: opacity .5s, transform .6s var(--ease-out); }
  .js .nav.is-open .nav__links li, .js .nav.is-open .nav__actions { opacity: 1; transform: none; }
  .js .nav.is-open .nav__links li:nth-child(2) { transition-delay: .05s; }
  .js .nav.is-open .nav__links li:nth-child(3) { transition-delay: .1s; }
  .js .nav.is-open .nav__actions { transition-delay: .15s; }
  .nav__actions { justify-content: space-between; }
  /* without JavaScript the menu simply sits under the bar */
  html:not(.js) .nav { position: absolute; height: auto; }
  html:not(.js) .nav__inner { flex-wrap: wrap; padding-block: .75rem; }
  html:not(.js) .nav__menu { width: 100%; display: flex; flex-direction: column; gap: 1rem; }
  html:not(.js) .nav__toggle { display: none; }
}
@media (max-width: 56rem) and (prefers-reduced-motion: reduce) {
  .js .nav__links li, .js .nav__actions { transform: none !important; }
}

/* --------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + clamp(1.5rem, 5vh, 5rem)) 0 clamp(1rem, 2.5vh, 2rem);
}
.hero::before { /* faint light from above, so the black has depth */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(70% 55% at 72% -10%, rgba(255, 255, 255, .09), transparent 70%);
}
.hero__grid, .hero__spot {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.4px);
  background-size: 2rem 2rem; background-position: center top;
}
.hero__grid { opacity: .22; -webkit-mask-image: radial-gradient(90% 70% at 70% 10%, #000, transparent 75%); mask-image: radial-gradient(90% 70% at 70% 10%, #000, transparent 75%); }
.hero__spot {
  background-image: radial-gradient(rgba(255, 255, 255, .95) 1px, transparent 1.4px);
  opacity: 0; transition: opacity .6s;
  -webkit-mask-image: radial-gradient(16rem circle at var(--mx, 70%) var(--my, 30%), rgba(0, 0, 0, .7), transparent 70%);
  mask-image: radial-gradient(16rem circle at var(--mx, 70%) var(--my, 30%), rgba(0, 0, 0, .7), transparent 70%);
}
.hero.is-lit .hero__spot { opacity: 1; }

.hero__kicker { color: var(--muted); font-size: clamp(.9375rem, .9rem + .2vw, 1.0625rem); margin-bottom: clamp(1rem, 2.5vh, 1.75rem); max-width: 34rem; }
.hero__title {
  font-size: clamp(2.5rem, min(1rem + 5.1vw, 9.4vh), 6rem);
  font-weight: 290; line-height: 1; letter-spacing: -0.045em;
  color: var(--ink); max-width: 62rem; text-wrap: balance;
}
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .1em 0; margin: 0 -.04em -.1em 0; }
.w__i { display: inline-block; }
.hero__text { margin-top: clamp(1.25rem, 3vh, 2rem); max-width: 38rem; font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.6; color: var(--text); text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.5rem, 3.5vh, 2.5rem); }

.ecg { position: relative; height: clamp(4.5rem, 11vh, 8rem); margin-top: clamp(.75rem, 3vh, 2.5rem); background: url("/assets/img/ecg.0b1e479437.svg") repeat-x 0 50% / auto 100%; opacity: .55; }
.js .ecg { background: none; opacity: 1; }
.ecg__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__facts { margin-top: clamp(.25rem, 1.5vh, 1.5rem); }
.facts { display: grid; gap: 1rem 2rem; border-top: 1px solid var(--line); padding-top: clamp(1rem, 2vh, 1.25rem); }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { display: flex; flex-direction: column; font-size: .9875rem; line-height: 1.45; }
.fact strong { font-weight: 500; }
.fact span { color: var(--muted); }
.tech { margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--muted); font-size: .9375rem; }
.tech__title { margin-right: .5rem; }
.tech__item { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .75rem; color: var(--text); }

/* ----------------------------------------------------------- sections */
.section { padding-block: clamp(4.5rem, 3.5rem + 4.5vw, 7.5rem); position: relative; }
.section + .section::before { content: ""; position: absolute; top: 0; left: 50%; width: min(calc(100% - 2 * var(--gutter)), var(--wrap)); transform: translateX(-50%); height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* the soft light that follows the pointer on service and project rows */
[data-glow] { position: relative; isolation: isolate; }
[data-glow]::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: 1.25rem; opacity: 0;
  background: radial-gradient(26rem circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .07), transparent 65%);
  transition: opacity .4s;
}
[data-glow]:hover::before { opacity: 1; }

/* ----------------------------------------------------------- services */
.section__head--row { display: grid; gap: 1rem 4rem; }
@media (min-width: 56rem) { .section__head--row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } .section__head--row .lead { margin-top: 0; justify-self: end; } }
.services { display: grid; border-top: 1px solid var(--line); }
@media (min-width: 60rem) { .services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 2rem .25rem 2.25rem; border-bottom: 1px solid var(--line);
}
@media (min-width: 60rem) {
  .service { padding: 2.5rem 2.25rem 2.75rem; }
  .service:first-child { padding-left: 1.25rem; }
  .service + .service { border-left: 1px solid var(--line); }
}
.service__icon {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--ink);
  transition: background-color .35s, color .35s, transform .5s var(--ease-out);
}
.service:hover .service__icon { background: var(--ink); color: var(--bg); transform: rotate(-8deg); }
.service__body { display: flex; flex-direction: column; gap: .625rem; min-width: 0; }
.service__body p { max-width: 34rem; }

/* --------------------------------------------------------------- work */
.projects { border-top: 1px solid var(--line); }
.project { display: grid; gap: 1.25rem 3rem; padding: 2.5rem .25rem; border-bottom: 1px solid var(--line); }
@media (min-width: 60rem) { .project { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding: 3rem 1.25rem; } }
.project__title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem); font-weight: 340; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); margin-bottom: .75rem; }
.project__meta { color: var(--muted); font-size: .9875rem; line-height: 1.5; }
.project__body { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; min-width: 0; }
.project__body > p { max-width: 40rem; }
/* a project that is just a name and a link */
.project--compact { gap: .5rem 2rem; padding-block: 1.25rem; }
.project--compact .project__title { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); font-weight: 400; letter-spacing: -0.015em; margin-bottom: .25rem; }
.project--compact .project__meta { font-size: .9375rem; }
.project--compact .url { font-size: 1.0625rem; gap: .5rem; }
.project--compact .url__icon { width: 1rem; height: 1rem; }
@media (min-width: 60rem) {
  .project--compact { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding-block: 1.5rem; }
  .project--compact .project__body { align-items: flex-end; }
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .875rem; font-size: .875rem; color: var(--text); }
.url {
  display: inline-flex; align-items: center; gap: .625rem; max-width: 100%; min-height: 2.75rem;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem); font-weight: 400; letter-spacing: -0.015em;
  color: var(--ink); text-decoration: none;
}
.url__text {
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  padding-bottom: .15em; transition: background-size .5s var(--ease-out);
}
.url:hover .url__text { background-size: 0 1px; background-position: 100% 100%; }
.url__icon { width: 1.25rem; height: 1.25rem; transition: transform .45s var(--ease-out); }
.url:hover .url__icon { transform: translate(3px, -3px); }

/* ----------------------------------------------------------- partners */
.section--band { padding-block: clamp(3rem, 2.5rem + 2.5vw, 5rem); }
.section:has(+ .section--band) { padding-bottom: clamp(3rem, 2.5rem + 2.5vw, 5rem); }
.partners__inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.partners__title {
  font-size: .8125rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.partners__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 4rem; }
.partner {
  position: relative; display: inline-flex; align-items: center; gap: .75rem; min-height: 2.75rem;
  padding: .75rem 1rem; color: var(--ink); text-decoration: none; border-radius: .75rem;
}
.partner__logo {
  display: block; height: clamp(2.5rem, 2rem + 1.6vw, 3.5rem); width: auto;
  filter: brightness(0) invert(1); opacity: .82;
  transition: filter .5s var(--ease-out), opacity .5s, transform .6s var(--ease-out);
}
a.partner:hover .partner__logo, a.partner:focus-visible .partner__logo { filter: none; opacity: 1; transform: scale(1.04); }
.partner__name { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 400; letter-spacing: -0.02em; }
.partner__icon { width: 1.125rem; height: 1.125rem; color: var(--muted); transition: transform .45s var(--ease-out), color .3s; }
a.partner:hover .partner__icon { transform: translate(3px, -3px); color: var(--ink); }

/* -------------------------------------------------------------- about */
.about { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .about { grid-template-columns: auto minmax(0, 1fr); gap: 5rem; } }
.about__photo { position: relative; width: clamp(9rem, 22vw, 13rem); aspect-ratio: 1; display: grid; place-items: center; }
.about__photo img, .monogram { width: calc(100% - 1.25rem); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.monogram {
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); font-weight: 250; letter-spacing: -0.04em; color: var(--ink);
}
.about__ring {
  position: absolute; inset: 0; border-radius: 50%; padding: 1px;
  background: conic-gradient(from var(--spin), transparent 0 62%, rgba(255, 255, 255, .85) 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.about__text { display: flex; flex-direction: column; gap: 1.125rem; max-width: 42rem; }
.about__text .h2 { margin-bottom: .25rem; }
.about__role { display: flex; flex-direction: column; line-height: 1.45; }
.about__role span { color: var(--muted); }
.about__text p strong { font-weight: 500; }
.about__links { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }

.medtech--after { margin-top: clamp(4.5rem, 3rem + 6vw, 8rem); }
.medtech__head { margin-bottom: clamp(2.25rem, 4vw, 3.25rem); max-width: 48rem; }
.principles { display: grid; gap: 0 2.5rem; }
@media (min-width: 40rem) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principle { display: flex; flex-direction: column; gap: .75rem; padding: 1.75rem 0 2rem; border-top: 1px solid var(--line); position: relative; }
.principle::before { /* a line that draws across the top as the item appears */
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out) .2s;
}
.principle.is-in::before { transform: scaleX(1); }
.principle__icon { color: var(--ink); }
.principle .h3 { font-size: 1.25rem; }
.principle p { color: var(--muted); font-size: 1rem; }

/* ------------------------------------------------------------ contact */
.contact__inner { max-width: calc(46rem + 2 * var(--gutter)); text-align: center; }
.contact__head { display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.contact__title { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5rem); }
.contact__head .lead { margin-inline: auto; }

.form {
  position: relative; isolation: isolate; text-align: left;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2.5rem); border-radius: 1.5rem;
  background: var(--surface); border: 1px solid var(--line);
}
.form::before { /* light that runs around the edge while someone is typing */
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin), transparent 0 70%, rgba(255, 255, 255, .9) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .5s;
}
.form:focus-within::before { opacity: 1; }
.form__row { display: grid; gap: 1.25rem; }
@media (min-width: 40rem) { .form__row { grid-template-columns: 1fr 1fr; } }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.field label { font-weight: 460; font-size: .9375rem; color: var(--ink); }
.field__opt { color: var(--muted); font-weight: 380; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-height: 3.125rem; padding: .75rem 1rem;
  background: rgba(0, 0, 0, .55); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: .875rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.55; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - .875rem) 55%;
  background-size: .375rem .375rem; background-repeat: no-repeat;
}
.field select option { background: #000; color: #fff; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .16); background-color: #000; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .875rem; }
.field__error:empty { display: none; }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .875rem; align-items: start; }
.field--check input { width: 1.375rem; height: 1.375rem; margin: .125rem 0 0; accent-color: var(--ink); cursor: pointer; }
.field--check label { font-weight: 380; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.field--check label a { color: var(--ink); }
.field--check .field__error { grid-column: 2; }
.form__foot { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: .5rem; text-align: center; }
@media (max-width: 30rem) { .form__foot .btn { width: 100%; } }
.form-status { font-size: .9375rem; color: var(--danger); }
.form__captcha { min-height: 65px; display: flex; justify-content: center; } /* Cloudflare Turnstile anti-spam check */
html:not(.js) .form__captcha { display: none; }
.form noscript .form-status { text-align: center; }
.form-status--ok { color: var(--ink); font-weight: 500; }

.contact__direct { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; color: var(--muted); }
.contact__or { font-size: .9375rem; }
.contact__place { display: flex; align-items: center; gap: .5rem; font-size: .9375rem; }
.card {
  display: flex; flex-direction: column; align-items: center; gap: .875rem; width: 100%; max-width: 36rem;
  padding: 1.5rem clamp(.75rem, 4vw, 1.5rem); font-style: normal;
  border: 1px solid var(--line); border-radius: 1.25rem; background: rgba(255, 255, 255, .025);
}
.card__name { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.card__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.75rem; }
.card__links .link { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-size: clamp(1rem, .9rem + .5vw, 1.125rem); }
.card__links .icon { flex: none; color: var(--muted); }
.card__meta { font-size: .875rem; }

/* ---------------------------------------------------------- privacy, 404 */
.doc { max-width: calc(44rem + 2 * var(--gutter)); padding-block: calc(var(--nav-h) + 3rem) 6rem; }
.link-back { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; }
.link-back:hover { color: var(--ink); }
.doc .h2 { margin-top: 1rem; }
.doc__updated { color: var(--muted); margin-top: 1rem; font-size: .9375rem; }
.doc__body { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.doc__body h2 { font-size: 1.375rem; font-weight: 460; color: var(--ink); margin-top: 1.5rem; }
.doc__body ul { list-style: disc; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }

.notfound { min-height: 80svh; padding-block: calc(var(--nav-h) + 3rem) 5rem; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; align-items: flex-start; }
.notfound__code { font-size: clamp(5rem, 3rem + 10vw, 11rem); font-weight: 200; line-height: .9; letter-spacing: -0.06em; color: var(--ink); }
.notfound p { color: var(--muted); }

/* ------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 calc(2rem + env(safe-area-inset-bottom)); color: var(--muted); font-size: .9375rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.brand--footer .wm { font-size: 1.25rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer__links a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; transition: color .2s; }
.footer__links a:hover { color: var(--ink); }
.footer__legal { flex-basis: 100%; font-size: .875rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }

/* ------------------------------------------------------------ motion */
@media (prefers-reduced-motion: no-preference) {
  /* page load: wordmark letters, then the headline word by word, then the rest */
  .nav .wm__l { animation: wm-in 1s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 100ms); }
  /* the dot fades in, then beats together with the <M> mark: a slow "lub-dub" every 3.6 s */
  .nav .wm__dot { animation: fade-in .6s .7s both, dot-beat 3.6s ease-out .9s infinite; }
  .wm.is-ready .wm__l, .brand--footer .wm__dot { animation: none; }
  .wm.is-ready.is-wave .wm__l { animation: wm-wave .8s var(--ease-out) both; animation-delay: calc(var(--i) * 35ms); }

  .hero__kicker { animation: rise .9s var(--ease-out) .15s both; }
  .w__i { animation: word-up 1.1s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 55ms + 250ms); }
  .w:nth-child(1) { --i: 0; }  .w:nth-child(2) { --i: 1; }  .w:nth-child(3) { --i: 2; }  .w:nth-child(4) { --i: 3; }
  .w:nth-child(5) { --i: 4; }  .w:nth-child(6) { --i: 5; }  .w:nth-child(7) { --i: 6; }  .w:nth-child(8) { --i: 7; }
  .w:nth-child(9) { --i: 8; }  .w:nth-child(10) { --i: 9; } .w:nth-child(11) { --i: 10; } .w:nth-child(n+12) { --i: 11; }
  .hero__text { animation: rise 1s var(--ease-out) .75s both; }
  .hero__ctas { animation: rise 1s var(--ease-out) .85s both; }
  .ecg { animation: fade-in 1.2s 1s both; }
  .hero__facts { animation: rise 1s var(--ease-out) 1.1s both; }

  /* scroll reveals: soft, short, staggered within lists */
  .js .reveal { opacity: 0; transform: translateY(1.5rem); filter: blur(6px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; filter: none; }
  .js :is(.services, .projects, .principles) > .reveal:nth-child(2) { transition-delay: .08s; }
  .js :is(.services, .projects, .principles) > .reveal:nth-child(3) { transition-delay: .16s; }
  .js :is(.services, .projects, .principles) > .reveal:nth-child(4) { transition-delay: .24s; }

  .about__ring { animation: spin 9s linear infinite; }
  .form:focus-within::before { animation: spin 3.5s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .principle::before { transition: none; }
  .about__ring { --spin: 200deg; }
}

@keyframes wm-in { from { opacity: 0; transform: translateY(.45em); font-weight: 100; filter: blur(3px); } }
@keyframes wm-wave { 45% { font-weight: 900; transform: translateY(-.1em); } }
/* same moment as lm-pulse: the M is complete at 50 % of the loop */
@keyframes dot-beat {
  0%, 50% { transform: scale(1); box-shadow: none; }
  53% { transform: scale(1.6); box-shadow: 0 0 .25em rgba(255, 255, 255, .55); }
  57% { transform: scale(.95); box-shadow: none; }
  61% { transform: scale(1.25); box-shadow: 0 0 .15em rgba(255, 255, 255, .35); }
  70%, 100% { transform: scale(1); box-shadow: none; }
}
@keyframes word-up { from { transform: translateY(105%) rotate(4deg); opacity: 0; } 40% { opacity: 1; } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes spin { to { --spin: 360deg; } }
