/* ==========================================================================
   Firntech: site styles
   --------------------------------------------------------------------------
   Motion rule for this site:
   1. Scroll-driven motion carries the story (hero line figure, masked
      titles, drawn rules, product screens, text fill).
   2. Interaction-driven motion answers the pointer (150 to 300 ms).
   3. Ambient motion: exactly one element, the hero lines breathing.
   Nothing else moves on its own.
   ========================================================================== */

/* Tokens
   ========================================================================== */
:root {
  --bg: #0b0d0e;
  --bg-glass: rgba(11, 13, 14, 0.74);
  --ink: #eceff0;
  --ink-2: #a3abb0;
  --ink-3: #7d868c;
  --line: #1d2225;
  --line-2: #2c3337;
  --accent: #8fc0d8;
  --danger: #f09a88;

  --font-sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-hero: clamp(3rem, 0.9rem + 8.3vw, 9.5rem);
  --fs-xl: clamp(2.75rem, 0.9rem + 6.4vw, 7.5rem);
  --fs-h2: clamp(2.25rem, 1.2rem + 3.4vw, 4.5rem);
  --fs-h3: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --fs-lead: clamp(1.125rem, 1rem + 0.5vw, 1.4375rem);
  --fs-label: 0.8125rem;

  --maxw: 90rem;
  --gutter: clamp(1.25rem, 4.2vw, 4rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --space: clamp(7rem, 13vw, 12rem);
  --header-h: 76px;
  --col: calc((100% + var(--gap)) / 12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 0.22s;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--bg);
}

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

h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: 0.75rem;
  z-index: 300;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* Primitives
   ========================================================================== */
.eyebrow {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.icon { width: 16px; height: 16px; flex: none; }

.lead {
  color: var(--ink);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.section-title {
  max-width: 16ch;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

/* Section rule, drawn by scrolling */
.rule {
  height: 1px;
  background: var(--line-2);
  transform-origin: left;
}

/* Text link: quiet underline at rest, ink underline grows on hover */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.2rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(var(--line-2), var(--line-2)), linear-gradient(currentColor, currentColor);
  background-size: 100% 1px, 0 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.text-link:hover,
.text-link:focus-visible { background-size: 100% 1px, 100% 1px; }

.text-link .icon { transition: transform var(--fast) var(--ease); }
.text-link--arrow:hover .icon { transform: translateX(4px); }
.text-link--arrow:hover .icon--ne { transform: translate(3px, -3px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  height: 3.25rem;
  padding: 0 1.4rem 0 1.5rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
}

.btn--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.btn--primary:hover {
  background: transparent;
  color: var(--ink);
}

.btn--ghost {
  border-color: var(--line-2);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.btn--small {
  height: 2.375rem;
  padding: 0 1.05rem;
  font-size: 0.875rem;
}

.btn[disabled] { opacity: 0.5; cursor: progress; }

.btn__arrow { transition: transform var(--fast) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Header & mobile menu
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: transform 0.5s var(--ease), border-color 0.4s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header:focus-within { transform: none; }
.menu-open .site-header { border-bottom-color: transparent; }
.menu-open .site-header::before { opacity: 0; }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

/* Official mark and wordmark, bottoms aligned as in the logo file */
.brand {
  align-items: flex-end;
  gap: 0.45rem;
}

.brand__icon {
  width: 34px;
  height: 24.6px;
  fill: currentColor;
}

.brand__word {
  width: 107px;
  height: 14.2px;
  fill: currentColor;
}

.nav { margin-left: auto; }

.nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.2vw, 2.25rem);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--fast) ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.25rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover,
.nav__link.is-active { color: var(--ink); }

.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.8rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0 0.5rem 0 0.75rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 0.9375rem;
  cursor: pointer;
}

.menu-toggle__icon {
  position: relative;
  width: 22px;
  height: 9px;
}

.menu-toggle__icon i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}

.menu-toggle__icon i:first-child { top: 0; }
.menu-toggle__icon i:last-child { top: calc(100% - 1.5px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i { top: calc(50% - 0.75px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i:last-child { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-y: auto;
  background: var(--bg);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease), display 0.6s allow-discrete;
}

.mobile-menu.is-open {
  display: flex;
  clip-path: inset(0 0 0 0);
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding-block: 1.5rem 2.5rem;
}

.mobile-menu__list li {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
}

.mobile-menu.is-open .mobile-menu__list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.15s + var(--i, 0) * 0.04s);
}

/* Where the opening transition starts, coming from display: none. Older browsers skip it and open instantly. */
@starting-style {
  .mobile-menu.is-open { clip-path: inset(0 0 100% 0); }
  .mobile-menu.is-open .mobile-menu__list li { opacity: 0; transform: translateY(12px); }
}

.mobile-menu__list a {
  display: block;
  padding: 0.55rem 0;
  color: var(--ink);
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.mobile-menu__mail {
  color: var(--ink-2);
  text-decoration: none;
}

.menu-open,
.menu-open body { overflow: hidden; }

@media (max-width: 1079px) {
  .nav, .site-header__cta { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
}

@media (min-width: 1080px) {
  .mobile-menu,
  .mobile-menu.is-open { display: none; }
}

/* 1 Hero
   ==========================================================================
   Without the scroll scene (no JS, reduced motion, small screens) the hero is
   a normal section. With .scene-on it becomes a tall track with a sticky stage. */
.hero { position: relative; }

.hero__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: max(40rem, 100svh);
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding-top: calc(var(--header-h) + clamp(3rem, 11vh, 8rem));
  padding-bottom: clamp(2.5rem, 9vh, 5.5rem);
  will-change: transform, opacity;
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 0.94;
  letter-spacing: -0.058em;
  text-wrap: initial;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-block: 0.03em 0.1em;
  margin-block: -0.03em -0.1em;
}

.hero__title .line > span {
  display: inline-block;
  animation: line-up 1.3s var(--ease) both;
  animation-delay: calc(0.15s + var(--l, 0) * 0.12s);
}

.hero__foot {
  max-width: 30rem;
  animation: rise 1.1s var(--ease) 0.55s both;
}

.hero__lead {
  color: var(--ink-2);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2rem;
}

.hero__caption {
  position: relative;
  z-index: 1;
  padding-bottom: 4rem;
}

.hero__caption-word {
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero__caption-text {
  max-width: 24ch;
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: var(--fs-lead);
  line-height: 1.45;
}

.scene-on .hero { height: 360vh; }

.scene-on .hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  pointer-events: none;
}

.scene-on .hero__content { pointer-events: auto; }

/* The products section slides over the last part of the hero track, so its
   top rule lands exactly where the hero line comes to rest (72 % of the
   viewport height, see firnline.js). */
.scene-on .products {
  position: relative;
  z-index: 1;
  margin-top: -28vh;
}

.scene-on .hero__caption {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  padding-bottom: 0;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

.scene-on .hero__caption > * { max-width: min(26ch, 36%); }

@media (max-width: 899px) {
  .hero__stage { min-height: 0; }

  .hero__content {
    order: 1;
    flex: none;
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .hero__canvas {
    position: relative;
    inset: auto;
    order: 2;
    height: auto;
    aspect-ratio: 1 / 0.92;
    margin-top: 2rem;
  }

  .hero__caption {
    order: 3;
    padding-top: 1rem;
    padding-bottom: 0;
  }
}

/* 2 Products
   ========================================================================== */
.products {
  padding-bottom: var(--space);
  overflow-x: clip;
}

.products__rule {
  height: 1px;
  background: var(--line-2);
}

.corefit {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  margin-top: clamp(4rem, 9vw, 7rem);
}

.corefit__info {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: max(6rem, calc(50vh - 17rem));
  padding-bottom: 2rem;
}

.corefit__name {
  margin: 1.5rem 0 1.25rem;
  font-size: clamp(3.5rem, 1.5rem + 6.4vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.corefit__claim {
  max-width: 21ch;
  color: var(--ink-2);
  font-size: var(--fs-lead);
  line-height: 1.45;
}

.corefit__steps {
  display: grid;
  gap: 1.25rem;
  margin: 3rem 0;
}

.corefit__steps li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
  transition: color 0.4s ease;
}

.corefit__steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.75rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.corefit__steps li.is-active { color: var(--ink-2); }
.corefit__steps li.is-active::before { transform: none; }

.corefit__step-name {
  display: block;
  color: var(--ink-3);
  font-size: 1.125rem;
  font-weight: 500;
  transition: color 0.4s ease;
}

.corefit__steps li.is-active .corefit__step-name { color: var(--ink); }

.corefit__shots { grid-column: 6 / -1; }

.shot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88vh;
}

.shot__caption { display: none; }

.shot__frame {
  width: 124%;
  container-type: inline-size;
  will-change: transform;
}

.shot--phone .shot__frame {
  width: min(42%, 21rem);
  margin-left: 16%;
}

@media (max-width: 899px) {
  .corefit__info,
  .corefit__shots { grid-column: 1 / -1; }

  .corefit__info { position: static; padding-bottom: 0; }
  .corefit__steps { display: none; }
  .corefit__info .text-link { margin-top: 2rem; }

  .shot {
    min-height: 0;
    margin-top: clamp(3.5rem, 10vw, 5rem);
  }

  .shot__caption {
    display: block;
    margin-bottom: 1.25rem;
    color: var(--ink-2);
    font-size: 0.9375rem;
  }

  .shot__caption span {
    display: block;
    color: var(--ink);
    font-size: 1.125rem;
    font-weight: 500;
  }

  .shot__frame { width: 118%; }
  .shot--phone .shot__frame { width: min(68%, 18rem); margin-left: 0; }
}

/* CoreFit interface mock-ups (placeholders for real screenshots).
   Everything is sized in em so it scales with its frame. */
.ui {
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10.4;
  overflow: hidden;
  border: 1px solid #262c30;
  border-radius: 0.7em;
  background: #121517;
  box-shadow: 0 2.5em 6em -2em rgba(0, 0, 0, 0.7);
  color: #dfe4e6;
  font-size: calc(100cqw / 62);
  line-height: 1.35;
}

.ui p, .phone p { margin: 0; }

.ui__chrome {
  display: flex;
  align-items: center;
  gap: 0.45em;
  height: 2.3em;
  padding: 0 1em;
  border-bottom: 1px solid #1f2427;
}

.ui__chrome i {
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: #2a3134;
}

.ui__chrome span {
  margin-left: 1.2em;
  padding: 0.25em 1.6em;
  border-radius: 0.4em;
  background: #181c1f;
  color: #6f787e;
  font-size: 0.78em;
}

.ui__body {
  display: grid;
  flex: 1;
  grid-template-columns: 11em minmax(0, 1fr);
  min-height: 0;
}

.ui__side {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 1.4em 0.9em;
  border-right: 1px solid #1f2427;
}

.ui .ui__logo {
  margin: 0 0 1.3em 0.6em;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ui__nav {
  padding: 0.45em 0.6em;
  border-radius: 0.35em;
  color: #8b949a;
  font-size: 0.88em;
}

.ui__nav.is-active { background: #1b2023; color: #eef1f2; }

.ui__main {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  min-width: 0;
  padding: 1.5em 1.8em;
}

.ui__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.ui__muted { color: #7d868c; font-size: 0.78em; }

.ui .ui__title,
.phone .ui__title {
  margin-top: 0.15em;
  font-size: 1.45em;
  letter-spacing: -0.025em;
}

.ui__button {
  padding: 0.55em 1em;
  border-radius: 0.35em;
  background: #e6eaec;
  color: #0f1214;
  font-size: 0.8em;
  font-weight: 500;
}

.ui__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8em;
}

.ui__card {
  padding: 1em 1.1em;
  border: 1px solid #20262a;
  border-radius: 0.5em;
  background: #161a1d;
}

.ui .ui__big {
  margin-top: 0.2em;
  font-size: 2em;
  letter-spacing: -0.035em;
}

.ui__split {
  display: grid;
  flex: 1;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.8em;
  min-height: 0;
}

.ui__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4em;
  height: 7.5em;
  margin-top: 1em;
}

.ui__bars i {
  flex: 1;
  height: var(--h);
  border-radius: 0.2em 0.2em 0 0;
  background: #2a3236;
}

.ui__bars i.is-now { background: var(--accent); }

.ui__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5em;
  color: #5f686e;
  font-family: var(--font-mono);
  font-size: 0.7em;
}

.ui__rows { margin-top: 0.5em; }

.ui .ui__rows p {
  display: grid;
  grid-template-columns: 3.6em minmax(0, 1fr) auto;
  padding: 0.6em 0;
  border-bottom: 1px solid #1f2427;
  font-size: 0.85em;
}

.ui__rows span { color: #7d868c; font-family: var(--font-mono); }
.ui__rows em { color: #7d868c; font-style: normal; }

.ui__week {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: 1.8em repeat(12, minmax(0, 1fr));
  gap: 0.3em;
  min-height: 0;
}

.ui__day { grid-row: 1; color: #7d868c; font-size: 0.78em; }

.ui__week b {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  grid-column: var(--c);
  grid-row: calc(var(--r) + 1) / span var(--s);
  overflow: hidden;
  padding: 0.4em 0.6em;
  border: 1px solid #242a2e;
  border-radius: 0.35em;
  background: #1a1f22;
  font-size: 0.78em;
  font-weight: 500;
}

.ui__week b small {
  color: #7d868c;
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 400;
}

.ui__week b.is-accent {
  border-color: var(--accent);
  background: rgba(143, 192, 216, 0.12);
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  aspect-ratio: 9 / 18.5;
  padding: 3em 1.3em 1.2em;
  border: 1px solid #2a3034;
  border-radius: 2.4em;
  background: #121517;
  box-shadow: 0 2.5em 6em -2em rgba(0, 0, 0, 0.7);
  color: #dfe4e6;
  font-size: calc(100cqw / 19);
  line-height: 1.35;
}

.phone > .ui__title { margin-bottom: 0.4em; }

.phone__notch {
  position: absolute;
  top: 0.8em;
  left: 50%;
  width: 5.5em;
  height: 1.4em;
  margin-left: -2.75em;
  border-radius: 1em;
  background: #0b0d0e;
}

.phone__card {
  padding: 1em;
  border: 1px solid #22282b;
  border-radius: 1em;
  background: #171b1e;
}

.phone__card.is-booked { border-color: var(--accent); }

.phone .phone__class {
  margin: 0.15em 0 0.6em;
  font-size: 1.2em;
  letter-spacing: -0.02em;
}

.phone__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8b949a;
  font-size: 0.8em;
}

.phone__book {
  padding: 0.3em 0.9em;
  border-radius: 1em;
  background: #e6eaec;
  color: #0f1214;
}

.phone__tabs {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding-top: 0.9em;
  border-top: 1px solid #22282b;
  color: #6f787e;
  font-size: 0.75em;
}

.phone__tabs .is-active { color: #eef1f2; }

/* 3 Approach
   ========================================================================== */
.approach { padding-bottom: var(--space); }

.approach__title {
  margin-top: clamp(4rem, 9vw, 7.5rem);
  font-size: var(--fs-xl);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.mask { display: block; }

.approach__title-2 {
  padding-left: calc(var(--col) * 3);
  color: var(--ink-3);
}

.approach__text {
  max-width: 34ch;
  margin: clamp(3.5rem, 7vw, 6rem) 0 0 calc(var(--col) * 3);
  font-size: clamp(1.5rem, 0.95rem + 1.9vw, 2.625rem);
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.approach__text .word { transition: opacity 0.2s linear; }

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3rem var(--gap);
  margin-top: clamp(5rem, 11vw, 10rem);
}

.principle__no {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.principle__title {
  margin: 1.25rem 0 0.75rem;
  font-size: var(--fs-h3);
  letter-spacing: -0.03em;
}

.principle p {
  max-width: 28ch;
  color: var(--ink-2);
}

@media (max-width: 1079px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .approach__title-2 { padding-left: 0; }
  .approach__text { margin-left: 0; }
  .principles { grid-template-columns: 1fr; }
}

/* 4 Company & team
   ========================================================================== */
.company { padding-bottom: var(--space); }

.company__split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.5rem var(--gap);
  margin-top: clamp(4rem, 9vw, 7.5rem);
}

.company__title { grid-column: 1 / span 6; }

.company__copy {
  grid-column: 8 / -1;
  padding-top: 0.75rem;
}

.company__copy p + p {
  margin-top: 1.5rem;
  color: var(--ink-2);
}

.team { margin-top: clamp(6rem, 13vw, 11rem); }

.team__label { margin-bottom: 2rem; }

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

.person__portrait {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: #15191b;
}

.person__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.person:hover .person__portrait img { transform: scale(1.02); }

.person__name {
  margin-top: 1.5rem;
  font-size: 1.375rem;
  letter-spacing: -0.025em;
}

.person__role {
  margin-top: 0.2rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.person__bio {
  max-width: 34ch;
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.person__link {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

@media (max-width: 899px) {
  .company__title,
  .company__copy { grid-column: 1 / -1; }
  .company__copy { padding-top: 0; }
}

/* Phones: each profile becomes a compact row with a small portrait,
   so the whole team is visible without swiping */
@media (max-width: 719px) {
  .team__list {
    grid-template-columns: none;
    gap: 2.5rem;
  }

  .person {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
  }

  .person > * { grid-column: 2; }

  .person__portrait {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .person__name { margin-top: 0; font-size: 1.25rem; }
  .person__bio { margin-top: 0.6rem; }
  .person__link { justify-self: start; margin-top: 0.6rem; }
}

/* 5 Careers
   ========================================================================== */
.careers { padding-bottom: var(--space); }

.careers__intro { margin-top: clamp(4rem, 9vw, 7.5rem); }
.careers__intro .section-title { max-width: 19ch; }

.careers__copy {
  max-width: 40rem;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0 calc(var(--col) * 6);
}

.careers__style {
  margin-top: 1.5rem;
  color: var(--ink-2);
}

.roles {
  margin-top: clamp(4rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line-2);
}

.role {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr) auto;
  align-items: baseline;
  gap: 0.35rem var(--gap);
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.role__title {
  justify-self: start;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 0 1px;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.role:hover .role__title { background-size: 100% 1px; }
.role__place { color: var(--ink-2); }

.role__load {
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.role__arrow {
  align-self: center;
  transition: transform var(--fast) var(--ease);
}

.role:hover .role__arrow { transform: translateX(6px); }

@media (max-width: 899px) {
  .careers__copy { margin-left: 0; }
}

@media (max-width: 719px) {
  .role { grid-template-columns: minmax(0, 1fr) auto; }
  .role__title { grid-column: 1; }
  .role__place, .role__load { grid-column: 1; font-size: 0.9375rem; }
  .role__arrow { grid-column: 2; grid-row: 1 / span 3; }
}

/* 6 Journal
   ========================================================================== */
.journal { padding-bottom: var(--space); }

.journal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(4rem, 9vw, 7.5rem);
}

.journal__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3rem var(--gap);
  margin-top: clamp(3rem, 6vw, 5rem);
}

.feature { grid-column: 1 / span 7; }

.feature__link {
  display: block;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-2);
  color: inherit;
  text-decoration: none;
}

.feature__meta,
.entry time {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.feature__meta { display: flex; gap: 1.5rem; }

.feature__title {
  max-width: 16ch;
  overflow-wrap: break-word;
  margin-top: clamp(2rem, 5vw, 4rem);
  font-size: clamp(2.25rem, 1.2rem + 3.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.feature__excerpt {
  max-width: 42ch;
  margin-top: 1.5rem;
  color: var(--ink-2);
}

.feature__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 500;
}

.feature__more .icon { transition: transform var(--fast) var(--ease); }
.feature__link:hover .feature__more .icon { transform: translateX(4px); }

.entries { grid-column: 9 / -1; }

.entry {
  display: block;
  padding: 1.5rem 0 1.75rem;
  border-top: 1px solid var(--line-2);
  color: inherit;
  text-decoration: none;
}

.entry time {
  display: block;
  margin-bottom: 0.6rem;
}

.entry__title {
  font-size: 1.3125rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 0 1px;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.entry:hover .entry__title { background-size: 100% 1px; }

@media (max-width: 899px) {
  .feature, .entries { grid-column: 1 / -1; }
}

.journal__empty {
  margin-top: clamp(3rem, 6vw, 5rem);
  color: var(--ink-2);
}

/* Journal pages: overview and article, generated from blog/*.md
   ========================================================================== */
.journal-page,
.post {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem));
  padding-bottom: var(--space);
}

/* 404
   ==========================================================================
   The page is a map: the number is terrain drawn by topo404.js, the way back
   is a Swiss mountain trail sign. Its yellow appears nowhere else on the site. */
.lost {
  --lost-foot: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(11rem, 38vh, 30rem));
  overflow: hidden;
}

.lost__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, rgba(0, 0, 0, 0.22) 82%);
  mask-image: linear-gradient(to bottom, #000 58%, rgba(0, 0, 0, 0.22) 82%);
}

.lost__fallback { display: none; }

html:not(.js) .lost__fallback {
  position: absolute;
  top: var(--header-h);
  left: var(--gutter);
  display: block;
  color: var(--line-2);
  font-size: clamp(9rem, 30vw, 26rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.lost__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
  align-items: end;
  gap: clamp(2.5rem, 6vw, 6rem);
  margin-top: auto;
  padding-bottom: var(--lost-foot);
}

.lost__title {
  max-width: 13ch;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.lost__text {
  max-width: 38ch;
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.signpost {
  position: relative;
  padding-left: 0.875rem;
  font-size: 1.0625rem;
  line-height: 1.2;
}

/* The pole stands on the lower edge of the section */
.signpost::before {
  content: "";
  position: absolute;
  top: -1rem;
  bottom: calc(-1 * var(--lost-foot));
  left: 0;
  width: 0.5rem;
  background: linear-gradient(90deg, var(--ink-3), var(--line-2));
}

.signpost__plate {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-right: 1.75rem;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 600;
}

.signpost__altitude {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.signpost__signs { display: grid; gap: 0.25rem; }

.sign {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-right: 1.75rem;
  padding: 0.8rem 0.75rem;
  background: #ffcc00;
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--fast) var(--ease);
}

/* White, red, white: the tip of a sign on a mountain trail */
.sign::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - 1px);
  width: 1.75rem;
  background: linear-gradient(#fff 33%, #d52b1e 33% 67%, #fff 67%);
  -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.sign:hover { transform: translateX(0.375rem); }
.sign:focus-visible { z-index: 1; }

.sign__time {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .lost { padding-top: calc(var(--header-h) + clamp(9rem, 48vw, 24rem)); }
  .lost__inner { grid-template-columns: minmax(0, 1fr); }
  .signpost { max-width: 25rem; }
}

.post-list {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-2);
}

.post-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem var(--gap);
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.post-row__meta {
  grid-column: 1 / span 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding-top: 0.45rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.post-row__body { grid-column: 4 / span 8; }

.post-row__title {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 0 1px;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.post-row:hover .post-row__title { background-size: 100% 1px; }

.post-row__excerpt {
  display: block;
  max-width: 60ch;
  margin-top: 0.75rem;
  color: var(--ink-2);
}

.post-row__arrow {
  grid-column: 12;
  justify-self: end;
  margin-top: 0.6rem;
  transition: transform var(--fast) var(--ease);
}

.post-row:hover .post-row__arrow { transform: translateX(6px); }

.post__back .icon { transform: rotate(180deg); }
.post__back:hover .icon { transform: rotate(180deg) translateX(4px); }

.post__head { margin-top: clamp(2.5rem, 6vw, 5rem); }

.post__title {
  max-width: 20ch;
  margin-top: 1.5rem;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
}

.post__lead {
  max-width: 42rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.post .rule { margin-top: clamp(2.5rem, 6vw, 4.5rem); }

/* Running text from Markdown */
.prose {
  max-width: 42rem;
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0 calc(var(--col) * 3);
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.prose > * + * { margin-top: 1.25em; }

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose strong { color: var(--ink); }

.prose strong { font-weight: 500; }

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-weight: 400;
  text-wrap: balance;
}

.prose h1,
.prose h2 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.prose h3,
.prose h4 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.prose > * + h1,
.prose > * + h2 { margin-top: 2.5em; }
.prose > * + h3,
.prose > * + h4 { margin-top: 2em; }
.prose > h1 + *,
.prose > h2 + *,
.prose > h3 + *,
.prose > h4 + * { margin-top: 0.75em; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--fast) ease;
}

.prose a:hover { text-decoration-color: currentColor; }

.prose ul,
.prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose ul ul { list-style: circle; }
.prose li + li,
.prose li > ul,
.prose li > ol { margin-top: 0.4em; }
.prose li::marker { color: var(--ink-3); }

.prose blockquote {
  margin-inline: 0;
  margin-bottom: 0;
  padding-left: 1.25em;
  border-left: 1px solid var(--line-2);
  color: var(--ink);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.prose blockquote > * + * { margin-top: 0.75em; }

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 2px;
  background: var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.prose pre {
  overflow-x: auto;
  margin-bottom: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.prose hr {
  height: 1px;
  margin: 3em 0;
  border: 0;
  background: var(--line-2);
}

.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 0.6rem 1.5rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th {
  border-bottom-color: var(--line-2);
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 1079px) {
  .prose { margin-left: 0; }
}

@media (max-width: 719px) {
  .post-row { grid-template-columns: minmax(0, 1fr) auto; }
  .post-row__meta { grid-column: 1 / -1; padding-top: 0; }
  .post-row__body { grid-column: 1; }
  .post-row__arrow { grid-column: 2; }
}

/* 7 Contact
   ========================================================================== */
.contact {
  padding-bottom: clamp(5rem, 10vw, 8rem);
  overflow-x: clip;
}

.contact__title {
  max-width: 11ch;
  margin-top: clamp(4rem, 9vw, 7.5rem);
  font-size: clamp(3.25rem, 0.8rem + 8vw, 10rem);
  line-height: 0.93;
  letter-spacing: -0.06em;
  will-change: transform;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4rem var(--gap);
  margin-top: clamp(4rem, 8vw, 6.5rem);
}

.contact__mail { grid-column: 1 / span 6; }

.contact__hint {
  max-width: 34ch;
  color: var(--ink-2);
}

.contact__address-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
}

.contact__address {
  color: var(--ink);
  font-size: clamp(1.875rem, 1.1rem + 2.4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 0 1px;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.contact__address:hover { background-size: 100% 1px; }

.copy-btn {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color var(--fast) ease, border-color var(--fast) ease;
}

.copy-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.copy-btn.is-done { border-color: var(--accent); color: var(--accent); }

.form {
  grid-column: 8 / -1;
  display: grid;
  gap: 2rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  color: var(--ink-3);
  font-size: 0.875rem;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.4rem 0 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--fast) ease;
}

.field input:focus,
.field textarea:focus { border-bottom-color: var(--ink); }

.field textarea {
  min-height: 6rem;
  line-height: 1.5;
  resize: vertical;
}

.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}

.field.is-invalid input,
.field.is-invalid textarea { border-bottom-color: var(--danger); }

.field__error { color: var(--danger); font-size: 0.875rem; }
.field__error:empty { display: none; }

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

/* Spam trap: out of sight for people, but still a normal field for bots */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  flex: 1 1 16rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.form__status[data-state="success"] { color: var(--accent); }
.form__status[data-state="error"] { color: var(--danger); }

@media (max-width: 899px) {
  .contact__mail, .form { grid-column: 1 / -1; }
}

@media (max-width: 599px) {
  .form__row { grid-template-columns: 1fr; }
}

/* 8 Footer
   ========================================================================== */
.site-footer {
  padding-top: 2.5rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.footer__nav,
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
}

.footer__nav a,
.footer__legal a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--fast) ease;
}

.footer__nav a:hover,
.footer__legal a:hover { color: var(--ink); }

.footer__row--small {
  margin-top: 2.5rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.footer__row--small a { color: var(--ink-3); }

/* Motion
   ========================================================================== */
@keyframes line-up {
  from { transform: translateY(105%); }
  to { transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Masked titles slide up once when they enter the viewport */
[data-mask] {
  overflow: hidden;
  padding-bottom: 0.16em;
}
[data-mask] > span { display: block; }

.js [data-mask] > span {
  transform: translateY(105%);
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.12s);
}

.js [data-mask].is-in > span,
.reveal-all [data-mask] > span { transform: none; }

/* Blocks fade up once */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-reveal].is-in,
.reveal-all [data-reveal] {
  opacity: 1;
  transform: none;
}

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

  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-mask] > span { transform: none; }
}
