/* =========================================================================
   Carlo Ruggiero — shared design system.

   Ground rules:
   - Two typefaces. Archivo (variable width axis: headlines are set expanded,
     body is set normal) and IBM Plex Mono, which appears ONLY where the text
     is literally machine text — an image tag, an env var, a path, a command.
   - The page sits on "concrete": a mid-tone ground. Content sits on glass.
     Saturated colour belongs to the four product marks and nothing else.
   - Each project page sets --accent in a small inline <style>, light and dark.
   ========================================================================= */

/* Registered as <color> so the accent can TRANSITION between products as you
   scroll the home page, instead of snapping. */
@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #2f6fd0;
}

:root {
  color-scheme: light dark;

  --ground: #bfc3bb;
  --plate: #f3f2ee;
  --ink: #161a18;
  --ink-2: #40453f;
  --rule: #94998f;
  --rule-soft: #d5d4ce;
  --accent: #2f6fd0;
  --on-accent: #fff;
  --lift: 0 1px 2px rgb(20 24 20 / 0.06), 0 8px 24px -8px rgb(20 24 20 / 0.18);
  --lift-hi: 0 2px 4px rgb(20 24 20 / 0.08), 0 18px 40px -12px rgb(20 24 20 / 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Glass. A thin wash plus a small blur, with the edge drawn as an inset
     hairline and a 1px top highlight — that reading of an edge, rather than a
     border, is what stops a translucent panel looking like frosted plastic. */
  --glass: rgb(255 255 255 / 0.5);
  --glass-hover: rgb(255 255 255 / 0.66);
  --glass-ring: rgb(255 255 255 / 0.5);
  --glass-hi: rgb(255 255 255 / 0.75);
  --glass-blur: blur(7px) saturate(1.3);
  --aura: 0.5;
  --grain: 0.055;
  --shot-shadow: 0 10px 26px rgb(20 24 20 / 0.22);
  transition: --accent 700ms var(--ease);

  --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Perfect fourth, 18px body */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.125rem;
  --t-md: 1.5rem;
  --t-lg: 2rem;
  --t-xl: 2.75rem;

  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 40rem;
  --column: 68rem;
  /* Full-bleed rules, but text aligned to the same column as .wrap */
  --edge: max(var(--gutter), calc((100% - var(--column)) / 2 + var(--gutter)));
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1a1d1b;
    --plate: #232624;
    --ink: #eaebe6;
    --ink-2: #a2a79f;
    --rule: #3a3e3b;
    --rule-soft: #32352f;
    --accent: #6fa6f2;
    --on-accent: #10120f;
    --lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.5);
    --lift-hi: 0 2px 4px rgb(0 0 0 / 0.36), 0 18px 40px -12px rgb(0 0 0 / 0.6);
    --glass: rgb(255 255 255 / 0.05);
    --glass-hover: rgb(255 255 255 / 0.08);
    --glass-ring: rgb(255 255 255 / 0.09);
    --glass-hi: rgb(255 255 255 / 0.1);
    --aura: 0.85;
    --grain: 0.07;
    --shot-shadow: 0 10px 26px rgb(0 0 0 / 0.5);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--t-base);
  font-variation-settings: "wdth" 100;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---- Headline treatment: Archivo's width axis is the expressive move ---- */
.display {
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

h1.display {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
}

/* ---- Site frame ---- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.4rem var(--edge);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  transition:
    padding 0.3s var(--ease),
    border-color 0.3s linear;
}

/* Condensed once you have scrolled past the top, with the rule picking up the
   colour of whatever you are reading. */
.bar.scrolled {
  padding-block: 0.8rem;
  border-bottom-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
}

.bar .wordmark {
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.bar nav {
  display: flex;
  gap: 1.5rem;
  font-size: var(--t-sm);
}

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

.bar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease);
}

.bar nav a:hover::after,
.bar nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.bar nav a:hover,
.bar nav a[aria-current="page"] {
  color: var(--ink);
}

main {
  flex: 1;
}

:target,
[id] {
  scroll-margin-top: 6rem;
}

.wrap {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter) 5rem;
}

.crumb {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 2rem 0 0;
}

.crumb a {
  color: inherit;
}

/* ---- Product masthead ---- */
.masthead {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.masthead .mark {
  width: 64px;
  height: 64px;
  display: block;
  margin-bottom: 1.4rem;
}

.masthead .state {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.masthead .state::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--accent);
  flex: none;
}

.lede {
  font-size: var(--t-md);
  line-height: 1.35;
  max-width: 34rem;
  margin: 1.4rem 0 0;
  text-wrap: balance;
}

/* ---- Actions ---- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.action {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-block;
  padding: 0.6rem 1.1rem;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background: var(--plate);
  border: 1px solid var(--rule);
  cursor: pointer;
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0);
  transition:
    transform 0.35s var(--ease),
    border-color 0.2s linear,
    color 0.2s linear;
}

.action::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.action:hover {
  border-color: var(--accent);
  color: var(--on-accent);
}

.action:hover::after {
  transform: scaleX(1);
}

.action.key {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.action.key::after {
  background: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

/* ---- Sections and prose ---- */
.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.section:last-of-type {
  border-bottom: 0;
}

.section > h2 {
  font-variation-settings: "wdth" 112;
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}

.section p {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

.section p.quiet {
  color: var(--ink-2);
  font-size: var(--t-sm);
}

/* ---- Definition rows: a name and what it does, on hairlines ---- */
.defs {
  margin: 0;
  padding: 0.25rem 1.5rem;
}

.defs > div {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

.defs > div:last-child {
  border-bottom: 0;
}

.defs dt {
  font-weight: 600;
  font-size: var(--t-base);
}

.defs dd {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  max-width: 46ch;
}

@media (max-width: 42rem) {
  .defs > div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* ---- Spec table: values here are machine text, so they are set in mono ---- */
.spec {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  border-top: 1px solid var(--rule-soft);
}

.spec th,
.spec td {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: baseline;
  font-size: var(--t-sm);
}

.spec th {
  width: 11rem;
  font-weight: 600;
  padding-right: 1.5rem;
}

.spec td {
  font-family: var(--mono);
  font-size: var(--t-xs);
  line-height: 1.7;
  color: var(--ink-2);
}

@media (max-width: 34rem) {
  .spec th,
  .spec td {
    display: block;
    width: auto;
    border-bottom: 0;
    padding: 0.2rem 0;
  }

  .spec td {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule-soft);
  }
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.code {
  font-family: var(--mono);
  font-size: var(--t-xs);
  line-height: 1.7;
  border-left: 3px solid var(--accent);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  border-radius: 0 14px 14px 0;
  margin: 1.5rem 0 0;
}


/* ---- Credentials for a public demo: machine text, so it is set in mono ---- */
.creds {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.6rem;
  align-items: center;
  max-width: 30rem;
  margin: 1.5rem 0 0;
  padding: 1.3rem 1.5rem;
}

.creds dt {
  font-size: var(--t-sm);
  color: var(--ink-2);
}

.creds dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.creds code {
  font-size: var(--t-sm);
  font-weight: 500;
  user-select: all;
}

.copy {
  font: inherit;
  font-size: var(--t-xs);
  color: var(--ink-2);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  transition:
    color 0.2s linear,
    border-color 0.2s linear;
}

.copy:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* ---- Note: a caveat the reader needs before acting ---- */
.note {
  max-width: var(--measure);
  padding: 1.2rem 1.4rem;
  margin-top: 1.5rem;
  border-radius: 14px;
  font-size: var(--t-sm);
  border-left: 3px solid var(--rule);
}

.note p {
  margin: 0;
  font-size: inherit;
}

/* ---- Screenshots ---- */
figure {
  margin: 2rem 0 0;
}

figure img {
  display: block;
  width: 100%;
  background: var(--plate);
  border: 1px solid var(--glass-ring);
  border-radius: 14px;
  box-shadow: var(--lift);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

figure:hover img {
  transform: translateY(-4px);
  box-shadow: var(--lift-hi);
}

figcaption {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin-top: 0.7rem;
  max-width: 36rem;
}

/* =========================================================================
   Reel: a set of screenshots for one product.

   The markup is a plain list of <figure>s and stays readable as one — a page
   without JavaScript shows every screenshot stacked. site.js adds .is-live,
   which stacks them into a frame and brings the controls in. Adding a shot is
   one more <figure>; nothing else needs to know how many there are.
   ========================================================================= */
.reel {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.reel.is-live {
  gap: 0;
  grid-template-rows: auto auto;
}

.reel.is-live > figure {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(14px);
  transition:
    opacity 0.62s var(--ease),
    transform 0.62s var(--ease);
}

.reel.is-live > figure.leaving {
  transform: translateX(-10px);
}

.reel.is-live > figure.current {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.reel.is-live figcaption {
  min-height: 2.8em;
}

/* One frame for every shot, so the page does not jump as they change. The
   frame is always a little wider than a given screenshot, so the image is
   drawn transparent and shadowed rather than boxed — otherwise the leftover
   space reads as a pale panel with a small picture adrift in it. */
.reel.is-live img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center center;
  background: none;
  border-color: transparent;
  border-radius: 4px;
  box-shadow: none;
  filter: drop-shadow(var(--shot-shadow));
}

.reel.is-live figure:hover img {
  box-shadow: none;
}

.reel-bar {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.9rem;
}

.reel-track {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  overflow: hidden;
}

.reel-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.reel.playing .reel-track i {
  animation: dwell var(--dwell, 5200ms) linear forwards;
}

@keyframes dwell {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.reel-dots {
  display: flex;
  gap: 0.4rem;
}

.reel-dot {
  width: 26px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}

.reel-dot::before {
  content: "";
  position: absolute;
  inset: 8px 2px;
  background: color-mix(in srgb, var(--ink) 28%, transparent);
  transition:
    background 0.25s linear,
    inset 0.25s var(--ease);
}

.reel-dot:hover::before {
  background: color-mix(in srgb, var(--ink) 50%, transparent);
}

.reel-dot[aria-current="true"]::before {
  inset: 7px 2px;
  background: var(--accent);
}

.reel-play {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition:
    color 0.2s linear,
    background 0.2s linear;
}

.reel-play:hover {
  color: var(--ink);
  background: var(--glass-hover);
}

.reel-play svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .reel.is-live > figure {
    transform: none;
    transition: opacity 0.001ms;
  }
}


/* ---- Enlarging a screenshot ---- */
.zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  position: relative;
}

.zoom::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) center / 13px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 13px no-repeat,
    var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-ring);
  backdrop-filter: var(--glass-blur);
  transition: opacity 0.25s var(--ease);
}

.pointer-fine .zoom:hover::after,
.zoom:focus-visible::after {
  opacity: 1;
}

.lightbox {
  width: min(96vw, 84rem);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
  color: var(--ink);
}

.lightbox::backdrop {
  background: rgb(10 12 10 / 0.82);
  backdrop-filter: blur(6px);
}

.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: none;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 50px rgb(0 0 0 / 0.55));
}

.lightbox .caption {
  color: #e6e7e2;
  margin: 1rem auto 0;
  text-align: center;
  max-width: 48rem;
}

.lightbox .close {
  position: absolute;
  top: -2.6rem;
  right: 0;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  font: inherit;
  font-size: var(--t-base);
  color: #e6e7e2;
  background: none;
  border: 1px solid rgb(230 231 226 / 0.4);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox .close:hover {
  border-color: #e6e7e2;
}

/* ---- Flow: used only where the content really is a sequence ---- */
.flow {
  display: flex;
  flex-wrap: wrap;
  margin: 1.5rem 0 0;
  overflow: hidden;
  width: fit-content;
}

.flow span {
  padding: 0.6rem 1rem;
  font-size: var(--t-sm);
  border-right: 1px solid var(--rule-soft);
}

.flow span:last-child {
  border-right: 0;
  font-weight: 600;
}

/* ---- Foot ---- */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.6rem var(--edge) 2.5rem;
  font-size: var(--t-sm);
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

footer a {
  color: inherit;
}

/* =========================================================================
   The depth layer: two accent-tinted auras that drift, a grain that stops the
   gradients banding, and a soft glow that follows the pointer. All decorative,
   all inert to a screen reader, all still when motion is reduced.
   ========================================================================= */
.depth {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.depth span {
  position: absolute;
  display: block;
}

.depth .aura {
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  opacity: var(--aura);
  filter: blur(60px);
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--accent) 34%, transparent) 0%,
    color-mix(in srgb, var(--accent) 12%, transparent) 42%,
    transparent 68%
  );
  transition: background 700ms var(--ease);
}

.depth .aura.one {
  top: -32vmax;
  left: -18vmax;
}

.depth .aura.two {
  bottom: -38vmax;
  right: -22vmax;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--accent) 22%, transparent) 0%,
    color-mix(in srgb, var(--accent) 8%, transparent) 45%,
    transparent 70%
  );
}

@media (prefers-reduced-motion: no-preference) {
  .depth .aura.one {
    animation: drift-a 46s ease-in-out infinite alternate;
  }

  .depth .aura.two {
    animation: drift-b 61s ease-in-out infinite alternate;
  }
}

@keyframes drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(9vw, 6vh, 0) scale(1.12);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.08);
  }

  to {
    transform: translate3d(-8vw, -5vh, 0) scale(1);
  }
}

.depth .grain {
  inset: 0;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Follows the cursor, a long way behind the content. */
.depth .spot {
  top: 0;
  left: 0;
  width: 46vmax;
  height: 46vmax;
  margin: -23vmax 0 0 -23vmax;
  border-radius: 50%;
  opacity: 0;
  filter: blur(40px);
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--accent) 26%, transparent) 0%,
    transparent 62%
  );
  transform: translate3d(var(--mx, 50vw), var(--my, 40vh), 0);
  transition: opacity 600ms var(--ease);
}

.pointer-fine .depth .spot {
  opacity: 0.75;
}

/* =========================================================================
   Panes: the glass idiom, used for grouped content.
   ========================================================================= */
.pane,
.defs,
.note,
.code,
.flow,
dialog {
  position: relative;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-ring),
    inset 0 1px 0 var(--glass-hi),
    var(--lift);
  transition:
    background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

/* The pointer lights the pane it is over. */
.pane::before,
.defs::before,
.note::before,
.flow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    22rem circle at var(--px, 50%) var(--py, 50%),
    color-mix(in srgb, var(--accent) 15%, transparent) 0%,
    transparent 70%
  );
  transition: opacity 0.4s var(--ease);
}

.pointer-fine .pane:hover::before,
.pointer-fine .defs:hover::before,
.pointer-fine .note:hover::before,
.pointer-fine .flow:hover::before {
  opacity: 1;
}

.pane > *,
.defs > *,
.note > *,
.flow > * {
  position: relative;
  z-index: 1;
}

.pointer-fine .pane:hover,
.pointer-fine .defs:hover,
.pointer-fine .note:hover,
.pointer-fine .code:hover,
.pointer-fine .flow:hover {
  background: var(--glass-hover);
}

/* The marks breathe, a few seconds apart from one another. */
@media (prefers-reduced-motion: no-preference) {
  .mark,
  .entry img {
    animation: float 7s ease-in-out infinite;
  }

  .entry:nth-child(2) img {
    animation-duration: 8.5s;
    animation-delay: -1.2s;
  }

  .entry:nth-child(3) img {
    animation-duration: 6.4s;
    animation-delay: -2.6s;
  }

  .entry:nth-child(4) img {
    animation-duration: 9.2s;
    animation-delay: -0.6s;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* Screenshots tip toward the pointer. */
.pointer-fine figure {
  perspective: 900px;
}

.pointer-fine figure img {
  transform: rotate3d(var(--ty, 0), var(--tx, 0), 0, var(--tilt, 0deg))
    translateY(var(--rise, 0));
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.45s var(--ease);
}

.pointer-fine figure:hover img {
  --rise: -4px;
  box-shadow: var(--lift-hi);
}

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

   Two rules hold everywhere:
   1. The resting state is the visible one. Anything that animates in is only
      hidden while `html.js-motion` is set, which site.js adds *and* clears on a
      failsafe timer — so a page whose script never runs shows all its content.
   2. Everything below is off under prefers-reduced-motion.
   ========================================================================= */

.js-motion .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js-motion .reveal.shown {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease);
}

/* Children of a revealed block arrive just behind it, in reading order. */
.js-motion .reveal.stagger > * {
  opacity: 0;
  transform: translateY(12px);
}

.js-motion .reveal.stagger.shown > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * 65ms);
}

/* The headline unfurls: Archivo's width axis opens from condensed to expanded.
   The type performs, so nothing else on the page has to. */
.unfurl > span {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .unfurl > span {
    animation: unfurl 0.9s var(--ease) backwards;
  }

  .unfurl > span:nth-child(2) {
    animation-delay: 0.12s;
  }

  .unfurl > span:nth-child(3) {
    animation-delay: 0.24s;
  }
}

@keyframes unfurl {
  from {
    font-variation-settings: "wdth" 74;
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    font-variation-settings: "wdth" 125;
    opacity: 1;
    transform: none;
  }
}

/* A slow ring on the one product that is actually live. */
@media (prefers-reduced-motion: no-preference) {
  .state.live::before {
    animation: breathe 3.2s ease-in-out infinite;
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  }

  55% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-motion .reveal,
  .js-motion .reveal.stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  :root {
    transition: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
