/* Ficon — company site
   Identity: the logo's three stepped pills. Black ink, cool stone surfaces, one cobalt accent.
   Middleman keeps its own purple, scoped to its product panel. */

:root {
  --ink: #000000;
  --ink-2: #3f444b;
  --muted: #646a72;
  --paper: #ffffff;
  --stone: #f1f2ef;
  --line: #dcded9;
  --cobalt: #1f3fd8;

  --mm: #6334d8;
  --mm-deep: #2a1466;
  --mm-tint: #f1ebfc;
  --mm-green: #17a34a;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --section: clamp(72px, 10vw, 128px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--paper);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.site {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

/* —— Shared type —— */
.section-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.section-lead {
  margin: 0;
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--solid {
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
}

.btn--solid:hover {
  background: var(--cobalt);
  border-color: var(--cobalt);
}

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

.btn--ghost:hover {
  background: var(--ink);
  color: #fff;
}

/* —— Header —— */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark {
  height: 28px;
  width: auto;
}

.brand__word {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
}

.nav a:hover {
  color: var(--ink);
}

.nav .nav__cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.nav .nav__cta:hover {
  background: var(--cobalt);
  color: #fff;
}

.nav-toggle {
  display: none;
}

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
    display: none;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav .nav__cta {
    margin-top: 16px;
    border-bottom: 0;
    text-align: center;
    padding: 14px 18px;
  }
}

/* —— Hero —— */
.hero {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 104px) var(--gutter) clamp(64px, 9vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero__title {
  margin: 0 0 28px;
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero__lead {
  margin: 0 0 36px;
  max-width: 32em;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The stages: geometry taken from the logo (widths 265/250/250, heights 100%/73%/49%) */
.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1.06fr 1fr 1fr;
  gap: 1.6%;
  align-items: start;
  aspect-ratio: 791 / 866;
  width: 100%;
  max-width: 460px;
  justify-self: end;
}

.stage {
  position: relative;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 0 6% 22%;
  transform-origin: top center;
}

.stage--1 {
  height: 100%;
}
.stage--2 {
  height: 73.2%;
}
.stage--3 {
  height: 48.8%;
}

.stage__name {
  font-size: clamp(1rem, 2.1vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stage__line {
  margin-top: 4px;
  font-size: clamp(0.72rem, 1.1vw, 0.88rem);
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.25;
}

/* —— Hero motion ——
   Load: headline words rise, then the three pills draw down like the logo.
   Then a live loop: a match streams (Stream turns cobalt, score ticks), the result is
   checked (Verify scans), and the payout is released (Settle). The signal passes left to right. */
.stage {
  overflow: hidden;
  transition: background-color 0.5s ease;
}

.stage.is-active {
  background: var(--cobalt);
}

.stage__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: clamp(0.72rem, 0.95vw, 0.8rem);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.stage__state.is-done {
  background: #fff;
  color: var(--ink);
}

.stage__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d4d;
  flex: none;
}

.stage__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 30%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28) 85%, rgba(255, 255, 255, 0.7));
  opacity: 0;
  pointer-events: none;
}

.stage.is-scanning .stage__scan {
  animation: scan 1.3s cubic-bezier(0.45, 0, 0.55, 1) both;
}

.stage__state.is-pop {
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scan {
  0% {
    top: -30%;
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 1;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.85);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
  }

  .js .hero__title .w > span {
    display: inline-block;
    animation: wordRise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.06s + var(--i) * 0.07s);
  }

  .js .hero__lead,
  .js .hero__actions {
    animation: fadeIn 0.7s ease both;
    animation-delay: 0.55s;
  }

  .js .stage {
    animation: stageDraw 0.9s cubic-bezier(0.65, 0, 0.25, 1) both;
    animation-delay: 0.35s;
  }
  .js .stage--2 {
    animation-delay: 0.49s;
  }
  .js .stage--3 {
    animation-delay: 0.63s;
  }
  .js .stage > :not(.stage__scan) {
    animation: fadeIn 0.4s ease both;
    animation-delay: 1.2s;
  }
  .js .stage--2 > :not(.stage__scan) {
    animation-delay: 1.34s;
  }
  .js .stage--3 > :not(.stage__scan) {
    animation-delay: 1.48s;
  }
}

@keyframes wordRise {
  from {
    transform: translateY(105%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes stageDraw {
  from {
    -webkit-clip-path: inset(0 0 100% 0 round 999px);
    clip-path: inset(0 0 100% 0 round 999px);
  }
  to {
    -webkit-clip-path: inset(0 0 0 0 round 999px);
    clip-path: inset(0 0 0 0 round 999px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* —— Audit trail band: an endless ledger of one match moving through the layer —— */
.ledger {
  border-block: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: stretch;
}

.ledger__label {
  flex: none;
  margin: 0;
  display: flex;
  align-items: center;
  padding: 0 20px 0 max(20px, env(safe-area-inset-left, 0px));
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  border-right: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  z-index: 1;
}

.ledger__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 60px), transparent);
}

.ledger__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: max-content;
}

.ledger__track li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 28px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  font-size: 0.9rem;
}

.ledger__track time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ledger__track b {
  font-weight: 600;
}

.ledger__track span {
  color: var(--ink-2);
}

.ledger.is-running .ledger__track {
  animation: ledgerMove var(--ledger-dur, 40s) linear infinite;
}

@media (hover: hover) {
  .ledger.is-running:hover .ledger__track {
    animation-play-state: paused;
  }
}

.ledger.is-running:focus-within .ledger__track {
  animation-play-state: paused;
}

@keyframes ledgerMove {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .ledger {
    flex-direction: column;
  }
  .ledger__label {
    padding: 12px 20px 0;
    border-right: 0;
  }
  .ledger__track li {
    padding: 10px 20px 14px;
  }
}

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

  .stages {
    justify-self: start;
    max-width: 300px;
  }
}

@media (max-width: 420px) {
  .stages {
    max-width: 260px;
  }

  .stage__line {
    display: none;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* —— Problem —— */
.problem {
  background: var(--ink);
  color: #fff;
  padding-block: var(--section);
}

.problem__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}

.problem__title {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.problem__body {
  margin: 0;
  max-width: 32em;
  font-size: clamp(1.02rem, 1.4vw, 1.12rem);
  color: rgba(255, 255, 255, 0.72);
}

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

/* —— Technology —— */
.tech {
  padding-block: var(--section);
}

.tech__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.tech__head {
  position: sticky;
  top: 110px;
}

.tech__list {
  margin: 0;
  border-top: 2px solid var(--ink);
}

.tech__item {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px 32px;
  padding: 26px 0 28px;
  border-bottom: 1px solid var(--line);
}

.tech__item dt {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tech__item dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
}

@media (max-width: 860px) {
  .tech__inner {
    grid-template-columns: 1fr;
  }
  .tech__head {
    position: static;
  }
}

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

/* —— Products —— */
.products {
  padding-block: var(--section);
  background: var(--stone);
}

.products__head {
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* Middleman panel — the only place Middleman's purple and green appear.
   Colors sampled from the app: purple #6334D8, lilac tile #E8DEF8, payout green #17A34A. */
.mm {
  position: relative;
  padding: clamp(28px, 5vw, 64px) clamp(28px, 5vw, 64px) 0;
  border-radius: 32px;
  background: var(--mm-tint);
  overflow: hidden;
}

.mm__top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 6vw, 88px);
  align-items: end;
}

.mm__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mm-deep);
}

.mm__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mm-green);
  box-shadow: 0 0 0 4px rgba(23, 163, 74, 0.18);
}

.mm__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.mm__logo {
  flex: none;
  width: clamp(44px, 6vw, 68px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(99, 52, 216, 0.12);
}

.mm__title {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.75rem, 8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--mm-deep);
}

.mm__lead {
  margin: 0;
  max-width: 30em;
  font-size: 1.08rem;
  color: #3a3352;
}

.mm__points {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mm__points li {
  position: relative;
  padding-left: 22px;
  color: #3a3352;
}

.mm__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 4px;
  border-radius: 4px;
  background: var(--mm);
}

.mm__site {
  font-weight: 600;
  color: var(--mm-deep);
  text-underline-offset: 4px;
}

/* Screen strip: four phones stepping down like the Ficon mark, cropped by the panel's bottom edge */
.mm__strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  margin-top: clamp(40px, 6vw, 72px);
  height: clamp(340px, 42vw, 560px);
  overflow: hidden;
  outline-offset: -4px;
}

.phone {
  margin: 0;
  align-self: start;
  border-radius: clamp(22px, 2.6vw, 36px);
  overflow: hidden;
  background: #fff;
  border: 5px solid #120a2e;
  box-shadow: 0 24px 48px -24px rgba(42, 20, 102, 0.5);
}

.phone:nth-child(2) {
  margin-top: 7%;
}
.phone:nth-child(3) {
  margin-top: 14%;
}
.phone:nth-child(4) {
  margin-top: 21%;
}

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

  .mm__strip {
    display: flex;
    gap: 14px;
    height: auto;
    margin-inline: calc(-1 * clamp(28px, 5vw, 64px));
    padding: 0 clamp(28px, 5vw, 64px) 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: clamp(28px, 5vw, 64px);
    scrollbar-width: none;
  }

  .mm__strip::-webkit-scrollbar {
    display: none;
  }

  .phone {
    flex: 0 0 min(58%, 240px);
    scroll-snap-align: start;
  }

  .phone:nth-child(n) {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  .mm__actions .btn {
    flex: 1 1 100%;
  }
}

/* Next product row */
.next {
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px 36px;
  align-items: center;
  padding: 28px clamp(24px, 4vw, 40px);
  border: 2px dashed #b9bcb5;
  border-radius: 24px;
}

.next__status {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.next__title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.next__text {
  margin: 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (max-width: 860px) {
  .next {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

/* —— About —— */
.about {
  padding-block: var(--section);
}

.about__inner > * {
  max-width: 980px;
}

.about .section-title {
  margin-bottom: clamp(24px, 3vw, 36px);
}

.about__statement {
  margin: 0 0 clamp(40px, 6vw, 64px);
  font-size: clamp(1.6rem, 3.2vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.18;
  text-wrap: pretty;
}

.about__facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.about__facts > div {
  padding: 18px 24px 0 0;
}

.about__facts dt {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.about__facts dd {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .about__facts {
    grid-template-columns: 1fr;
  }
  .about__facts > div {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
}

/* —— Team —— */
.team {
  padding-block: var(--section);
  background: var(--stone);
}

.team__head {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  padding: clamp(24px, 3vw, 36px);
  background: #fff;
  border-radius: 24px;
}

/* Avatar echoes a single logo pill */
.person__avatar {
  width: 56px;
  height: 84px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.person__name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.person__role {
  margin: 2px 0 14px;
  font-weight: 500;
  color: var(--muted);
}

.person__summary {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.person__more {
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.person__more summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.person__more summary::-webkit-details-marker {
  display: none;
}

.person__more summary::after {
  content: "+";
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.person__more[open] summary::after {
  transform: rotate(45deg);
}

.person__more p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.person__links {
  display: flex;
  gap: 18px;
  margin: 0;
}

.person__link {
  font-weight: 600;
  font-size: 0.95rem;
  text-underline-offset: 4px;
}

.person__link:hover,
.mm__site:hover,
.contact__item a:hover {
  color: var(--cobalt);
}

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

@media (max-width: 460px) {
  .person {
    grid-template-columns: 1fr;
  }
  .person__avatar {
    width: 44px;
    height: 66px;
    padding-bottom: 10px;
    font-size: 0.85rem;
  }
}

/* —— Contact —— */
.contact {
  padding-block: var(--section);
}

.contact__title {
  margin: 0 0 clamp(32px, 5vw, 48px);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.contact__item {
  padding: 24px 28px 8px 0;
}

.contact__item + .contact__item {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.contact__item h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact__item p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.98rem;
}

.contact__item a {
  font-weight: 600;
  text-underline-offset: 4px;
}

@media (max-width: 760px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
  .contact__item,
  .contact__item + .contact__item {
    padding: 22px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* —— Footer —— */
.footer {
  margin-top: auto;
  background: var(--ink);
  color: #fff;
  padding: clamp(48px, 7vw, 80px) 0 max(32px, calc(20px + env(safe-area-inset-bottom, 0px)));
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  padding-bottom: 40px;
}

.brand--footer .brand__mark {
  filter: invert(1);
}

.footer__tag {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.6);
  max-width: 22em;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__cols h2 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.footer__cols a {
  display: block;
  padding: 5px 0;
  text-decoration: none;
  color: #fff;
}

.footer__cols a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer__base::before {
  content: "";
  display: block;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 24px;
}

.footer__base {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__base p {
  margin: 0;
}

.footer__base a {
  margin-left: 6px;
  color: #fff;
  text-underline-offset: 3px;
}

.footer__disclaimer {
  margin-top: 14px !important;
  max-width: 64em;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.42);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Legal pages —— */
main.legal {
  flex: 1;
  width: 100%;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 7vw, 96px);
}

.legal__article {
  max-width: 42rem;
  margin: 0 auto;
  overflow-wrap: break-word;
}

.legal__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.legal__updated {
  margin: 0 0 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  font-size: 0.95rem;
  color: var(--muted);
}

.legal__section {
  margin-bottom: 32px;
}

.legal__section:last-of-type {
  margin-bottom: 0;
}

.legal__h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal__h3 {
  margin: 20px 0 10px;
  font-size: 1rem;
  font-weight: 600;
}

.legal__section > p {
  margin: 0 0 12px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.legal__section > p:last-child {
  margin-bottom: 0;
}

.legal__list {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.legal__list li {
  margin-bottom: 6px;
}

.legal__section a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__section a:hover {
  color: var(--cobalt);
}

/* —— Scroll-linked motion (driven by app.js; everything rests in its final state without JS) —— */

/* Problem: the sentence reads itself as you scroll */
.problem__title .pw {
  transition: opacity 0.15s linear;
}

.motion .problem__title .pw {
  opacity: var(--o, 0.18);
}

/* Trust layer: a rail fills as you read; each piece is stamped as it passes */
.tech__list {
  position: relative;
}

.motion .tech__list::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 0;
  width: 2px;
  height: calc(var(--rail, 0) * 100%);
  background: var(--cobalt);
  border-radius: 2px;
}

.tech__item dt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tech__check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.tech__check svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 2.4;
  fill: none;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 0.35s ease 0.1s;
}

.tech__item.is-stamped .tech__check {
  background: var(--cobalt);
  border-color: var(--cobalt);
}

.tech__item.is-stamped .tech__check svg {
  stroke-dashoffset: 0;
}

.motion .tech__item {
  transition: opacity 0.4s ease;
}

.motion .tech__item:not(.is-stamped) {
  opacity: 0.38;
}

@media (max-width: 860px) {
  .motion .tech__list::before {
    left: -12px;
  }
}

/* Middleman strip: phones rise at different speeds, sharpening the stair-step as you scroll */
.motion .mm__strip .phone {
  transform: translateY(var(--py, 0px));
  will-change: transform;
}

@media (max-width: 860px) {
  .motion .mm__strip .phone {
    transform: none;
  }
}

/* —— Mobile browser support —— */

/* iOS 14 has no aspect-ratio: give the stage pills explicit heights instead */
@supports not (aspect-ratio: 1 / 1) {
  .stages {
    height: 504px;
  }
  @media (max-width: 860px) {
    .stages {
      height: 328px;
    }
  }
  @media (max-width: 420px) {
    .stages {
      height: 285px;
    }
  }
}

/* Touch screens: every link and button gets a 44px tap target, and a pressed state */
a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

@media (pointer: coarse) {
  .nav a,
  .mm__site,
  .person__link,
  .person__more summary,
  .contact__item a,
  .footer__cols a,
  .footer__base a,
  .brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer__cols a {
    display: flex;
    padding: 0;
  }

  .person__more {
    padding-top: 4px;
  }

  .person__more summary {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .mm {
    padding: 22px 20px 0;
  }
  .mm__brand {
    gap: 12px;
  }
  .mm__strip {
    margin-inline: -20px;
    padding-inline: 20px;
    scroll-padding-inline: 20px;
  }
}

@media (pointer: coarse) {
  .nav .nav__cta {
    justify-content: center;
  }
}
