/* Formula — formula.cx
   One stylesheet. No JavaScript anywhere on this site, so every animation
   below is pure CSS and every one of them is gated behind
   prefers-reduced-motion: content is fully visible without any of them. */

:root {
  --ink:       #0d0f10;
  --muted:     #55585c;
  --faint:     #797d82;
  --accent:    #0b6178;   /* links / UI — 7.01:1 on white */
  --accent-d:  #084b5d;
  --brand:     #00b8d4;   /* logo mark only */
  --page:      #ffffff;
  --band:      #f4f6f7;
  --rule:      #e3e6e8;
  --rule-soft: #eef1f2;
  --shell:     43rem;

  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--page);
  color: var(--accent-d);
  padding: 0.6rem 1rem;
  border: 2px solid var(--accent);
  z-index: 20;
}

.skip:focus { left: 1rem; top: 1rem; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-top: 1.4rem;
  background: var(--page);
}

.masthead__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.9rem;
}

/* ---------- wordmark + logo ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.005em;
  line-height: 1;
}

.wordmark__mark {
  display: block;
  width: 1.2em;
  height: 1.2em;
  flex: none;
  overflow: visible;
}

/* the cyan arm reaches out a little on hover — 1 property, 1 transition */
.wordmark__arm {
  transition: transform 260ms var(--ease-out);
  transform-origin: 8.5px 4.75px;
}

@media (hover: hover) and (pointer: fine) {
  .wordmark:hover .wordmark__arm { transform: scaleX(1.14); }
}

.wordmark:active { transform: scale(0.98); }
.wordmark { transition: transform 140ms var(--ease-out); }

/* ---------- navigation ---------- */

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  position: relative;
  display: inline-block;
  padding: 0.3rem 0 0.95rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 160ms var(--ease-out);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease-out);
}

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

@media (hover: hover) and (pointer: fine) {
  .nav a:hover::after { transform: scaleX(1); }
}

.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--brand);
}

/* ---------- language switcher ---------- */

.langs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.langs a {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.24rem 0.44rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.langs a:hover { color: var(--ink); background: var(--band); }
.langs a:active { transform: scale(0.96); }
.langs a { transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 120ms var(--ease-out); }

.langs [aria-current="true"] {
  color: var(--ink);
  background: var(--band);
}

.flag {
  display: block;
  width: 18px;
  height: 13px;
  flex: none;
  border-radius: 1.5px;
  box-shadow: inset 0 0 0 1px rgb(13 15 16 / 0.14);
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.95rem, 1.4rem + 2.1vw, 2.7rem);
  max-width: 20ch;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 0.9rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.62;
  margin-top: 1.35rem;
  color: var(--ink);
}

.note { font-size: 0.9375rem; color: var(--muted); }

/* small caps section label with a cyan tick */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 3px;
  background: var(--brand);
  flex: none;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}

a:hover { color: var(--accent-d); text-decoration-thickness: 2px; }

a:focus-visible,
.skip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- layout blocks ---------- */

.intro { padding-top: 4rem; padding-bottom: 2.75rem; }
.section { padding-bottom: 3.5rem; }

.band {
  background: var(--band);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 3rem 0;
  margin: 3.25rem 0;
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule-soft);
  margin: 2.75rem 0;
}

/* ---------- numbered process ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 1.1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  flex: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.06em;
  padding-top: 0.28rem;
  font-variant-numeric: tabular-nums;
}

.steps p { margin: 0; font-size: 0.9375rem; color: var(--muted); line-height: 1.65; }

/* ---------- fact list ---------- */

.facts { margin: 1.5rem 0 0; border-top: 1px solid var(--rule); }

.facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}

.facts dt { flex: 0 0 13rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.facts dd { flex: 1 1 15rem; margin: 0; line-height: 1.6; }

/* ---------- contact list ---------- */

.contacts { margin: 1.75rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }

.contacts li { padding: 1.3rem 0; border-bottom: 1px solid var(--rule); }

.contacts .addr { font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
.contacts .what { display: block; margin-top: 0.2rem; font-size: 0.9375rem; color: var(--muted); }

address { font-style: normal; }

/* ---------- tag row (technologies) ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }

.tags li {
  font-size: 0.8125rem;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.16rem 0.66rem;
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .tags li:hover { border-color: var(--brand); color: var(--ink); }
}

/* ---------- footer ---------- */

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 3.5rem;
  padding: 2rem 0 3rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}

.colophon p { margin: 0; }
.colophon .legal { margin-top: 0.35rem; color: var(--faint); font-size: 0.8125rem; }

/* ================================================================
   MOTION
   Everything below is opt-in: without it the page is complete and
   readable. Nothing here is required to see any content.
   ================================================================ */

@media (prefers-reduced-motion: no-preference) {

  /* entry on load, gently staggered */
  .rise { animation: rise 560ms var(--ease-out) both; }
  .rise-1 { animation-delay: 60ms; }
  .rise-2 { animation-delay: 120ms; }
  .rise-3 { animation-delay: 180ms; }

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

  /* scroll-linked reveal, only where the browser supports it natively */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }

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

    /* rows come in one after another inside a list */
    .steps li, .facts > div, .contacts li {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 18%;
    }
  }
}

/* ---------- narrow screens ---------- */

@media (max-width: 34rem) {
  body { font-size: 1rem; }
  .lede { font-size: 1.0625rem; }

  /* compact masthead: the five nav items still wrap, but tidily */
  .masthead { padding-top: 1rem; }
  .masthead__top { padding-bottom: 0.7rem; }
  .nav ul { gap: 0.1rem 1.05rem; }
  .nav a { font-size: 0.875rem; padding: 0.2rem 0 0.65rem; }
  .langs a { font-size: 0.6875rem; padding: 0.2rem 0.34rem; gap: 0.28rem; }
  .flag { width: 16px; height: 11.5px; }

  h1 { max-width: none; }
  .intro { padding-top: 2.5rem; padding-bottom: 2rem; }
  .band { margin: 2.5rem 0; padding: 2.25rem 0; }
  .facts dt { flex-basis: 100%; }
  .facts > div { gap: 0; }
  .steps li { gap: 0.85rem; }
  .colophon { margin-top: 2.75rem; }
}
