/*
 * PRIMA landing page.
 *
 * The look is the PRIMA design system's: its colour, type, spacing, radius and
 * shadow tokens, value for value, in a light theme and a dark one, and its
 * components (button, field, card, section header, feature item). The brand is
 * warm, plain-spoken and built from blocks: cream paper, espresso browns, one
 * orange, near-square shapes, hairlines before shadows.
 *
 * The structure and the motion are the CAPI and ARPI landing pages': the same
 * sections, the same behaviours (main.js) and the transitions.dev recipes,
 * each named where it is used.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:root {
  color-scheme: light;

  /* Brand: the same in both themes. */
  --brand-orange: #ec5b2a;
  --brand-clay: #c94d24;
  --brand-rust: #843213;
  --brand-cocoa: #4b1c07;
  --brand-espresso: #180c06;
  --brand-raspberry: #df3649;
  --brand-saffron: #efd15b;
  --brand-sand: #e3d4bf;
  --brand-cream: #f0ebe2;
  /* The light page's paper, by a name the dark theme does not change. */
  --paper: #f8f5f3;

  /* Light theme. */
  --surface: #f8f5f3;
  --surface-cream: #f0ebe2;
  --surface-raised: #ffffff;
  --surface-sand: #e3d4bf;
  --surface-inverse: #180c06;
  --line: #e3d9cc;
  --line-strong: #917a69;
  --ink: #0e0e10;
  --ink-display: var(--brand-cocoa);
  --ink-muted: #724d3a;
  --ink-inverse: #f3f1eb;
  --accent: var(--brand-orange);
  --accent-text: #b03f18;
  --accent-soft: #fbe4d9;
  --action: var(--brand-clay);
  --action-hover: #a83d1a;
  --on-action: #ffffff;
  --focus: var(--brand-clay);
  --danger: #b4213a;
  --danger-soft: #fbe0e4;
  --success: #0f6674;
  --success-soft: #d9eef0;
  --shadow-sm: 0 1px 2px rgba(75, 28, 7, 0.08), 0 1px 1px rgba(75, 28, 7, 0.04);
  --shadow-md: 0 8px 24px rgba(75, 28, 7, 0.12), 0 2px 6px rgba(75, 28, 7, 0.06);
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus);

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing: the 4 px scale. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  /* One step the page needs above the scale: twice space-7. */
  --space-9: 96px;

  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Motion: the timings and distances of the transitions.dev recipes. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* A press is answered at once, and what leaves goes faster than what
     arrives. */
  --dur-press: 160ms;
  --dur-exit: 150ms;
  --dur-quick: 200ms;
  --dur-fast: 250ms;
  --dur-hover: 300ms;
  --dur-medium: 350ms;
  --dur-slow: 500ms;
  --dur-reveal: 500ms;
  --stagger: 40ms;
  --blur-small: 2px;
  --blur-medium: 3px;

  --container: 1200px;
  --gutter: var(--space-5);
  --section-pad: var(--space-8);
  /* The mosaic's module: one tile. */
  --tile: 24px;
}

@media (min-width: 768px) {
  :root {
    --gutter: var(--space-7);
    --section-pad: var(--space-9);
  }
}

@media (min-width: 1280px) {
  :root {
    --gutter: var(--space-8);
  }
}

/* The dark theme: a section marked data-theme="dark" becomes espresso with
   cream type, like the brand's dark slides. The navigation takes the same
   values while it sits bare on the hero. */
[data-theme="dark"],
.nav[data-scrolled="false"] {
  color-scheme: dark;
  --surface: #180c06;
  --surface-cream: #140a05;
  --surface-raised: #25150d;
  --surface-sand: #3b2114;
  --surface-inverse: #f0ebe2;
  --line: #3b2114;
  --line-strong: #8d7362;
  --ink: #f3f1eb;
  --ink-display: #f3f1eb;
  --ink-muted: #c9b6a7;
  --ink-inverse: #180c06;
  --accent-text: #e58253;
  --accent-soft: #3d1a0c;
  --action: var(--brand-orange);
  --action-hover: #f27d52;
  --on-action: #180c06;
  --focus: #e58253;
  --danger: #f58a98;
  --danger-soft: #40121b;
  --success: #6fcfdc;
  --success-soft: #0c2c31;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] {
  background-color: var(--surface);
  color: var(--ink);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-9);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

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

/* The system's focus: a 2 px gap in the page colour, then a solid 2 px ring. */
:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-radius: var(--radius-xs);
  box-shadow: var(--focus-ring);
}

/* Icons are 24 px outlines with a 1.75 px stroke and round joins, never
   filled. Sized by the text they sit in unless a component says otherwise. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--action);
  color: var(--on-action);
  transform: translateY(-300%);
  transition: transform var(--dur-fast) var(--ease);
}

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

/* ---------- Text styles ----------
 * One class per style of the design system. The display sizes are the
 * system's on a desktop and step down on narrower screens, where 64 px would
 * break a Portuguese headline into too many lines. The steps down are not in
 * the design system, so they are taken from Tailwind's type scale, size and
 * line height together (36/40, 48/48, 30/36, 24/32).
 */

.display-lg,
.display-md,
.display-sm {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-display);
}

.display-lg {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.display-md {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.display-sm {
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: -0.01em;
}

.numeral {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .display-lg {
    font-size: 3rem;
    line-height: 3rem;
  }
  .display-md {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .display-sm {
    font-size: 2.25rem;
    line-height: 2.625rem;
  }
  .numeral {
    font-size: 3rem;
    line-height: 3rem;
  }
}

@media (min-width: 1024px) {
  .display-lg {
    font-size: 4rem;
    line-height: 4.25rem;
  }
  .display-md {
    font-size: 3rem;
    line-height: 3.375rem;
  }
}

.heading-lg {
  font-size: 1.75rem;
  line-height: 2.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.heading-md {
  font-size: 1.375rem;
  line-height: 1.75rem;
  font-weight: 600;
}

.heading-sm {
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 400;
}

.body {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
}

.label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.caption {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

/* One or two words in capitals above a heading. */
.eyebrow {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ---------- Layout ---------- */

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

.section {
  position: relative;
  padding-block: var(--section-pad);
  background-color: var(--surface);
}

/* Every other light band sits on the cover's cream, one step warmer. */
.section.is-cream {
  background-color: var(--surface-cream);
}

/* The system's section header: a two-digit number, an eyebrow, a title and
   one lead sentence, stacked and left-aligned. */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 640px;
  margin-bottom: var(--space-7);
}

.section-head .numeral {
  margin-bottom: var(--space-3);
}

.section-head .lede {
  max-width: 56ch;
  margin-top: var(--space-2);
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .section-head {
    margin-bottom: var(--space-8);
  }
}

/* Photography is cropped square-cornered. */
.photo {
  overflow: hidden;
  background: var(--surface-sand);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The system's card: a hairline, a raised surface, no shadow. */
.panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

/* ---------- Buttons ---------- */

/* The system's primary button: clay with white in light, orange with
   espresso in dark. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--action);
  color: var(--on-action);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color var(--dur-hover) var(--ease),
    transform var(--dur-press) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled) {
    background: var(--action-hover);
  }
}

.button:active {
  transform: scale(0.97);
}

/* The system's disabled control: 45% and its own shape. A form's button is
   like this until the script has taken its submit over. */
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button:focus-visible {
  border-radius: var(--radius-sm);
}

.button-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: 0.8125rem;
}

.button-lg {
  height: 48px;
  padding: 0 var(--space-5);
  font-size: 1rem;
  line-height: 1.5rem;
}

.button .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-quick) var(--ease);
}

/* "Learn more hover": the arrow leans out of the label on hover. Every hover
   rule in this file sits in this media query: on a touch screen a tap would
   otherwise leave the hover state stuck on. */
@media (hover: hover) and (pointer: fine) {
  .button:hover .icon {
    transform: translate(2px, -2px);
  }
}

/* The system's ghost button, for a link that reads as an action. */
.link {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur-hover) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .link:hover {
    color: var(--ink);
  }
}

/* The control that stops the films and the changing tiles: a quiet text
   button, underlined like the links beside it. */
.motion-toggle {
  color: var(--ink-muted);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur-hover) var(--ease);
}

.motion-toggle[aria-pressed="true"] {
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .motion-toggle:hover {
    color: var(--ink);
  }
}

/* ---------- Navigation ---------- */

/* At the top of the page there is no bar: the logo, the links and the button
   sit straight on the dark hero, as wide as the page's content. Once the page
   scrolls the row draws in to a compact light bar. The script sets
   data-scrolled. */
.nav {
  --nav-pad: var(--space-4);
  position: fixed;
  top: var(--space-4);
  /* The row is padded on the inside, so it starts that much outside the
     gutter and the logo lines up with the content below it. */
  right: calc(var(--gutter) - var(--nav-pad));
  left: calc(var(--gutter) - var(--nav-pad));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: calc(var(--container) + 2 * var(--nav-pad));
  margin-inline: auto;
  padding: var(--space-3) var(--nav-pad);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  animation: nav-drop var(--dur-reveal) var(--ease) both;
  transition:
    max-width var(--dur-fast) var(--ease),
    background-color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    box-shadow var(--dur-hover) var(--ease);
}

.nav[data-scrolled="true"] {
  max-width: 920px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.nav-logo {
  flex: none;
}

/* Two files, one slot: the reversed logo on the dark hero, the orange and
   charcoal one on the light bar. The mark is never recoloured in CSS. */
.nav-logo img {
  height: 32px;
  width: auto;
  transition: height var(--dur-fast) var(--ease);
}

@media (min-width: 1024px) {
  .nav-logo img {
    height: 36px;
  }
}

.nav[data-scrolled="true"] .nav-logo img {
  height: 26px;
}

.nav[data-scrolled="false"] .logo-on-light,
.nav[data-scrolled="true"] .logo-on-dark {
  display: none;
}

.nav-links {
  position: relative;
  display: none;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color var(--dur-hover) var(--ease);
}

.nav-links a[aria-current="true"] {
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--ink);
  }
}

/* "Tabs sliding", in the system's tab vocabulary: one underline in the action
   colour that travels to the section being read. */
.nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  /* A fixed length that the script moves and stretches by transform alone,
     so sliding it lays nothing out again. */
  width: 100px;
  height: 2px;
  background: var(--action);
  opacity: 0;
  transform-origin: left center;
  transition:
    transform var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-inline-start: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 1.25rem;
  transition:
    background-color var(--dur-hover) var(--ease),
    transform var(--dur-press) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .nav-toggle:hover {
    background: var(--surface-sand);
  }
}

.nav-toggle:active {
  transform: scale(0.97);
}

/* "Icon swap": the two icons share a slot and trade places. */
.swap {
  display: grid;
  place-items: center;
}

.swap > * {
  grid-area: 1 / 1;
  transition:
    opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease),
    filter var(--dur-fast) var(--ease);
}

.swap > :last-child,
[aria-expanded="true"] > .swap > :first-child,
[aria-pressed="true"] > .swap > :first-child {
  opacity: 0;
  transform: scale(0.5);
  filter: blur(var(--blur-small));
}

[aria-expanded="true"] > .swap > :last-child,
[aria-pressed="true"] > .swap > :last-child {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (min-width: 1024px) {
  .nav-links,
  .nav-cta {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-9) var(--gutter) var(--space-6);
  /* The theme's ground at high opacity over a strong blur. */
  background-color: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  /* Closing: faster than it opened. */
  transition:
    opacity var(--dur-exit) var(--ease),
    visibility 0s linear var(--dur-exit);
}

.menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--dur-fast) var(--ease),
    visibility 0s;
}

.menu-links {
  display: grid;
  gap: var(--space-1);
}

.menu-links a {
  display: block;
  padding-block: var(--space-3);
}

/* Links arrive one after another, 40 ms apart, each in under a third of a
   second. */
.menu-item {
  opacity: 0;
  transform: translateY(var(--space-5));
  transition:
    opacity var(--dur-hover) var(--ease),
    transform var(--dur-hover) var(--ease);
}

.menu[data-open="true"] .menu-item {
  opacity: 1;
  transform: none;
  transition-delay: min(calc(var(--i) * 40ms), 400ms);
}

@media (min-width: 1024px) {
  .menu {
    display: none;
  }
}

/* ---------- Hero ----------
 * The brand's dark slide: a headline, one sentence and one action on the
 * left, and the film across the whole hero behind them.
 */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  overflow: hidden;
}

.hero-media,
.hero-media video,
.hero-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The orange dike sits a little right of the middle of the frame. On a tall
     narrow screen the frame is cut at the sides, and the cut leans right so
     the dike stays in what is left. */
  object-position: 62% 50%;
}

.hero-still {
  display: none;
}

/* A veil in the ground's own colour: solid behind the copy, gone by the
   model. It is the one gradient on a background in the page, and it is there
   because the film runs under the copy. On a narrow screen the copy sits at
   the bottom and the veil rises from there. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--brand-espresso) 0%,
    color-mix(in srgb, var(--brand-espresso) 88%, transparent) 42%,
    color-mix(in srgb, var(--brand-espresso) 20%, transparent) 78%,
    color-mix(in srgb, var(--brand-espresso) 45%, transparent) 100%
  );
}

.hero-inner {
  position: relative;
  padding-block: var(--space-9) calc(var(--space-8) + 3 * var(--tile));
}

.hero-copy {
  max-width: 560px;
}

.hero h1 {
  margin-top: var(--space-4);
}

.hero-sub {
  max-width: 44ch;
  margin-top: var(--space-5);
  color: var(--ink-muted);
}

.hero-actions {
  margin-top: var(--space-6);
}

/* What the film is, said on the film itself, where the copy leaves room. */
.hero-note {
  position: absolute;
  right: var(--gutter);
  bottom: calc(3 * var(--tile) + var(--space-4));
  z-index: 1;
  display: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--ink);
}

/* The hero ends in steps: tiles of the next section's paper climb into the
   film, on the mosaic's grid. */
.hero-steps {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: calc(3 * var(--tile));
  background: url("assets/brand/degraus.svg") repeat-x left bottom / auto 100%;
  color: var(--paper);
}

@media (min-width: 768px) {
  .hero {
    align-items: center;
  }
  .hero-inner {
    padding-block: var(--space-9) calc(var(--space-9) + 3 * var(--tile));
  }
  .hero-media video,
  .hero-media > img {
    object-position: 50% 50%;
  }
  /* Beside the copy instead of under it. */
  .hero-media::after {
    background: linear-gradient(
      to right,
      var(--brand-espresso) 0%,
      color-mix(in srgb, var(--brand-espresso) 90%, transparent) 34%,
      color-mix(in srgb, var(--brand-espresso) 35%, transparent) 60%,
      transparent 82%
    );
  }
  .hero-note {
    display: block;
  }
}

/* ---------- Problem ----------
 * The brand's content slide: text on the left, a photograph cropped
 * square-cornered beside it on the right, running off the page's edge.
 */

#problema {
  padding-block: 0;
}

.problem-grid {
  display: grid;
}

.problem-grid > :first-child {
  padding-block: var(--section-pad);
}

.problem-photo {
  aspect-ratio: 4 / 3;
  margin-block: 0 var(--space-8);
}

.features {
  display: grid;
  gap: var(--space-6) var(--space-7);
}

/* The system's feature item: an outline icon in the accent, a title, a line. */
.feature {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  align-items: start;
  align-content: start;
}

.feature .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.feature p {
  grid-column: 2;
  color: var(--ink-muted);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .problem-grid {
    grid-template-columns: minmax(0, 1fr) 40%;
    gap: var(--space-8);
    max-width: none;
    /* Text starts where every other section's does; the photograph runs to
       the right edge of the window. */
    padding-right: 0;
    padding-left: max(var(--gutter), calc((100% - var(--container)) / 2));
  }
  /* Paper above it and below it: the hero's stepped edge meets paper all the
     way across, never the photograph. */
  .problem-photo {
    position: relative;
    aspect-ratio: auto;
    margin-block: var(--space-8);
    margin-inline: 0;
  }
  .problem-photo img {
    position: absolute;
    inset: 0;
  }
}

/* ---------- Tagline: the full-bleed brand panel ---------- */

.tagline {
  padding-block: var(--space-9);
  background: var(--brand-clay);
  color: #ffffff;
}

.tagline .eyebrow {
  margin-bottom: var(--space-4);
  color: #ffffff;
}

.tagline .display-md {
  max-width: 22ch;
  color: #ffffff;
}

/* Each word waits at about a third of the type's strength and lights up as
   the page scrolls past. */
.tagline .word {
  color: rgba(255, 255, 255, 0.35);
  transition: color var(--dur-fast) var(--ease);
}

.tagline .word.is-lit {
  color: #ffffff;
}

@media (min-width: 1024px) {
  .tagline .display-md {
    max-width: 26ch;
  }
}

/* ---------- Services ---------- */

.pillars {
  display: grid;
  gap: var(--space-5);
}

.pillar-tabs {
  position: relative;
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.pillar-tabs::-webkit-scrollbar {
  display: none;
}

.pillar-tab {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  text-align: start;
  transition:
    color var(--dur-fast) var(--ease),
    transform var(--dur-press) var(--ease);
}

.pillar-tab:active {
  transform: scale(0.98);
}

.pillar-tab[aria-selected="true"] {
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .pillar-tab:hover {
    color: var(--ink);
  }
}

.pillar-tab .moment {
  color: var(--ink-muted);
}

.pillar-tab[aria-selected="true"] .moment {
  color: var(--accent-text);
}

/* "Tabs sliding": the raised tile, with its bar in the action colour, slides
   to the tab that was picked. The bar runs under the tile while the tabs sit
   side by side and down its left edge once they stack. */
.pillar-marker {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  box-shadow: inset 0 -2px 0 var(--action);
  /* It slides by transform. Its size follows the tab at once: stretching a
     bordered, rounded tile by transform would bend its corners. */
  transition: transform var(--dur-fast) var(--ease);
}

/* Panels share one grid cell, so the block keeps the height of the tallest
   and the page below does not jump when the panel changes. */
.pillar-panels {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

/* "Page side by side": the old panel slips out one way while the new one
   slips in from the other, both through a short blur. */
.pillar-panel {
  grid-area: 1 / 1;
  display: grid;
  align-content: start;
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(var(--from, 1) * 8px));
  filter: blur(var(--blur-medium));
  /* Leaving: quick, so the new panel is not kept waiting. */
  transition:
    opacity var(--dur-exit) var(--ease),
    transform var(--dur-exit) var(--ease),
    filter var(--dur-exit) var(--ease),
    visibility 0s linear var(--dur-exit);
}

.pillar-panel[data-active="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  /* Arriving: as the old one is half gone. */
  transition:
    opacity var(--dur-quick) var(--ease) 80ms,
    transform var(--dur-quick) var(--ease) 80ms,
    filter var(--dur-quick) var(--ease) 80ms,
    visibility 0s;
}

.pillar-copy {
  padding: var(--space-5);
}

.pillar-copy h3 {
  margin-top: var(--space-3);
}

.pillar-copy .summary {
  max-width: 44ch;
  margin-top: var(--space-4);
  color: var(--ink-muted);
}

.pillar-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.pillar-list li,
.assurances li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.pillar-list .icon,
.assurances .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.pillar-note {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

.pillar-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-sand);
}

.pillar-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stacked in one cell, every panel is as tall as the tallest. On a narrow
   screen that leaves a blank block under the short ones, so there only the
   picked panel is laid out. It arrives by the same transition, from the
   state named below: a transition, not a keyframe animation, so a second tap
   turns it around where it is. */
@media (max-width: 899px) {
  .pillar-panel {
    display: none;
  }
  .pillar-panel[data-active="true"] {
    display: grid;
  }
  @starting-style {
    .pillar-panel[data-active="true"] {
      opacity: 0;
      transform: translateX(calc(var(--from, 1) * 8px));
      filter: blur(var(--blur-medium));
    }
  }
}

@media (min-width: 900px) {
  .pillars {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-7);
    align-items: start;
  }
  .pillar-tabs {
    flex-direction: column;
    overflow: visible;
  }
  .pillar-marker {
    box-shadow: inset 2px 0 0 var(--action);
  }
  .pillar-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: stretch;
  }
  .pillar-copy {
    padding: var(--space-6);
  }
  .pillar-figure {
    aspect-ratio: auto;
    min-height: 440px;
  }
}

/* ---------- Services: pinned while the page scrolls through its items ----------
 * The script turns this on (data-pinned) where the block fits the window, and
 * sets the three lengths: how tall the pinned block is, how much scroll its
 * items take, and how far from the top it sticks. Without the script, or on a
 * narrow screen, the track is as tall as the block and nothing sticks.
 */

.pin {
  /* What the script measures the tabs' block against. */
  position: relative;
}

[data-pin-track][data-pinned="true"] {
  min-height: calc(var(--pin-height) + var(--pin-scroll));
}

[data-pin-track][data-pinned="true"] > .pin {
  position: sticky;
  top: var(--pin-top);
}

/* On a window too short for the heading and the block together, only the
   block is held, and the heading stops just above it: its last line would
   show cut off behind the floating bar. It fades out as the block sticks and
   comes back when the page scrolls up out of the section. */
[data-pin-track][data-pinned="true"][data-heading="passes"][data-stuck="true"] .section-head {
  opacity: 0;
}

/* ---------- How it works: a dark slide ---------- */

.how {
  overflow: hidden;
}

/* The brand's spiral, cropped: it bleeds off the top and the right edge and
   fades into the ground before it reaches the copy. */
.how-art {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 1100px);
  height: 100%;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%);
  mask-image: linear-gradient(to right, transparent 0%, #000 55%);
}

.how-art img,
.how-art video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 0%;
}

/* The still is what shows first; the film fades in over it once it plays. */
.how-art video {
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.how-art video[data-playing="true"] {
  opacity: 1;
}

.how .container {
  position: relative;
}

@media (min-width: 900px) {
  .how-art {
    opacity: 0.5;
  }
}

.steps {
  display: grid;
  gap: var(--space-6);
}

.step {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-strong);
}

.step-number {
  color: var(--accent-text);
}

.step p {
  max-width: 34ch;
  color: var(--ink-muted);
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.specs div {
  display: grid;
  gap: var(--space-2);
}

.specs dt {
  color: var(--ink-muted);
}

.specs dd {
  white-space: nowrap;
}

/* "Number pop-in": each character of a figure rises into place in turn. */
.js [data-pop] .ch {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(var(--space-4));
  filter: blur(var(--blur-small));
  transition:
    opacity var(--dur-medium) var(--ease),
    transform var(--dur-medium) var(--ease),
    filter var(--dur-medium) var(--ease);
  transition-delay: calc(var(--i) * 30ms);
}

.js [data-pop].is-in .ch {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .steps,
  .specs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Principles ---------- */

.principles {
  overflow: hidden;
}

/* The mosaic bleeds off the right edge, beside the heading. */
.mosaic {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  width: auto;
  /* Fourteen tiles: it ends above the cards. */
  height: calc(14 * var(--tile));
}

.principles .container {
  position: relative;
}

.cards {
  display: grid;
  gap: var(--space-5);
}

.card {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-5);
}

.card .icon {
  width: 24px;
  height: 24px;
  margin-bottom: var(--space-3);
  color: var(--accent);
}

.card p {
  color: var(--ink-muted);
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mosaic {
    display: block;
  }
}

/* ---------- Comparison ---------- */

.compare {
  overflow: hidden;
}

.compare-head {
  display: none;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare-row {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border-top: 1px solid var(--line);
}

.compare-head + .compare-row {
  border-top: 0;
}

.compare-row .cell {
  color: var(--ink-muted);
}

.compare-row .cell-label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* PRIMA's own row sits on the accent's tint. */
.compare-row.is-own {
  background: var(--accent-soft);
}

.compare-row.is-own .name {
  color: var(--accent-text);
}

.compare-row.is-own .cell {
  color: var(--ink);
}

@media (min-width: 900px) {
  .compare-head,
  .compare-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr);
    gap: var(--space-6);
    padding: var(--space-4) var(--space-5);
  }
  .compare-head {
    border-bottom: 1px solid var(--line);
  }
  .compare-head + .compare-row {
    border-top: 0;
  }
  .compare-row {
    padding-block: var(--space-5);
  }
  .compare-row .cell-label {
    display: none;
  }
}

/* ---------- FAQ ---------- */

.faq {
  padding-bottom: calc(var(--section-pad) + var(--space-8));
}

.faq-grid {
  display: grid;
  gap: var(--space-6);
}

.faq-intro {
  margin-bottom: 0;
}

.faq-item + .faq-item {
  border-top: 1px solid var(--line);
}

.faq-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
  padding: var(--space-5);
  text-align: start;
  transition: background-color var(--dur-hover) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .faq-button:hover {
    background: var(--surface-cream);
  }
}

.faq-button:active {
  background: var(--surface-sand);
}

.faq-item:first-child .faq-button {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.faq-item:last-child .faq-button[aria-expanded="false"] {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* A near-square tile whose plus becomes a minus. */
.expand {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--ink-muted);
  font-size: 1rem;
}

.faq-button[aria-expanded="true"] .expand {
  border-color: var(--action);
  color: var(--accent-text);
}

/* "Accordion expand": the answer's row grows from nothing to its own height,
   and the answer fades in with it, so its lines are not seen cut by the row. */
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows var(--dur-fast) var(--ease),
    visibility 0s linear var(--dur-fast);
}

.faq-panel[data-open="true"] {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}

.faq-panel > div {
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}

.faq-panel[data-open="true"] > div {
  opacity: 1;
}

.faq-panel p {
  max-width: 60ch;
  padding: 0 var(--space-5) var(--space-5);
  color: var(--ink-muted);
}

/* Confetti: a loose strip of small orange squares along the bottom edge. */
.confetti {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 60px;
  background: url("assets/brand/confete.svg") repeat-x left bottom / auto 100%;
  color: var(--brand-orange);
}

@media (min-width: 900px) {
  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-8);
    align-items: start;
  }
  .faq-intro {
    position: sticky;
    top: var(--space-9);
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  gap: var(--space-7);
}

.contact-copy {
  margin-bottom: 0;
}

.assurances {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* The form floats on the closing film: the system's raised card. */
.form {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* The system's text field. */
.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  transition: border-color var(--dur-hover) var(--ease);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

@media (hover: hover) and (pointer: fine) {
  .field input:hover,
  .field textarea:hover {
    border-color: var(--ink-muted);
  }
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--focus);
  border-radius: var(--radius-sm);
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field-error {
  display: none;
  color: var(--danger);
}

.field [aria-invalid="true"] ~ .field-error {
  display: block;
}

.field-hint {
  color: var(--ink-muted);
}

/* "Error state shake": a wrong field shakes once. */
.is-shaking {
  animation: shake var(--dur-medium) var(--ease);
}

@keyframes shake {
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.form .button {
  justify-self: start;
}

/* "Text states swap": the button label changes through a short blur. */
.swap-text {
  display: inline-block;
  transition:
    opacity var(--dur-quick) var(--ease),
    transform var(--dur-quick) var(--ease),
    filter var(--dur-quick) var(--ease);
}

.swap-text.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(var(--blur-small));
}

/* The system's alert: a tinted fill, an icon and words. */
.form-status {
  display: none;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: var(--ink);
}

.form-status[data-state] {
  display: grid;
  animation: rise-in var(--dur-slow) var(--ease) both;
}

.form-status .icon {
  width: 20px;
  height: 20px;
  color: var(--success);
}

.form-status[data-state="error"] {
  background: var(--danger-soft);
}

.form-status[data-state="error"] .icon {
  color: var(--danger);
}

.form-status .icon-error,
.form-status[data-state="error"] .icon-ready {
  display: none;
}

.form-status[data-state="error"] .icon-error {
  display: block;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(var(--blur-medium));
  }
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-9);
    align-items: start;
  }
  .form {
    padding: var(--space-6);
  }
}

/* ---------- Closing: the contact section and the footer over one film ----------
 * The block is at least a window tall, the film covers it from behind, and the
 * footer is a panel floating at its foot, with the film showing around it.
 */

.closing {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-bottom: var(--space-5);
}

.closing-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.closing-backdrop img,
.closing-backdrop video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The orb is cropped by the right and the bottom edge of the frame. The
     block is taller than the frame is for its width, so the frame is cut at
     the sides: all of the cut comes off the left, and the orb stays. */
  object-position: 100% 100%;
}

/* The still is what shows first; the video fades in over it once it plays. */
.closing-backdrop video {
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.closing-backdrop video[data-playing="true"] {
  opacity: 1;
}

/* A veil in the ground's colour, so the copy and the panels read on the orb. */
.closing-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--brand-espresso) 45%, transparent);
}

.section.closing-scene {
  flex: 1;
  background: none;
}

/* ---------- Footer: a panel floating on the closing film ---------- */

.footer {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

@media (min-width: 768px) {
  .footer {
    padding: var(--space-7) var(--space-7) var(--space-5);
  }
}

.footer-grid {
  display: grid;
  gap: var(--space-7);
}

.footer-brand img {
  height: 40px;
  width: auto;
}

.footer-brand p {
  max-width: 40ch;
  margin-top: var(--space-5);
  color: var(--ink-muted);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.footer-cols h2 {
  margin-bottom: var(--space-4);
}

.footer-cols ul {
  display: grid;
  gap: var(--space-3);
}

.footer-cols a {
  color: var(--ink-muted);
  transition: color var(--dur-hover) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .footer-cols a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: var(--space-9);
  }
}

/* ---------- Simple pages: legal texts and the 404 ---------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--surface-cream);
}

.page-head {
  padding: var(--space-5) var(--gutter);
}

.page-head img {
  height: 32px;
  width: auto;
}

.page-body {
  flex: 1;
  width: 100%;
  max-width: calc(720px + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--space-7) var(--gutter) var(--space-9);
}

.page-body h1 {
  margin-top: var(--space-3);
}

.page-body .numeral {
  margin-top: 0;
  color: var(--accent-text);
}

.page-body h2 {
  margin-top: var(--space-7);
}

.page-body p,
.page-body li {
  max-width: 60ch;
  margin-top: var(--space-4);
  color: var(--ink-muted);
}

.page-body ul {
  padding-left: var(--space-5);
  list-style: disc;
}

.page-body .button {
  margin-top: var(--space-6);
}

/* A marked gap in a text that is not written yet. */
.placeholder {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-sand);
  color: var(--ink);
}

.page-foot {
  padding: var(--space-5) var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

/* The 404: the cover, with the mosaic bleeding off the right edge. */
.lost {
  position: relative;
  overflow: hidden;
}

.lost .mosaic {
  display: block;
  top: auto;
  bottom: 0;
  height: min(70svh, 720px);
  opacity: 1;
}

.lost .page-body {
  position: relative;
  max-width: calc(var(--container) + 2 * var(--gutter));
  display: grid;
  align-content: center;
}

.lost .page-body > * {
  max-width: 520px;
}

@media (max-width: 767px) {
  .lost .mosaic {
    height: 38svh;
    opacity: 0.9;
  }
  .lost .page-body {
    align-content: start;
  }
}

/* ---------- Sign-in ----------
 * Outside the page's frame: no navigation and no footer. Two halves, the form
 * in a centred column on paper and a picture beside it, as on CAPI's sign-in
 * screens. Below the breakpoint the picture goes and the column has the
 * screen.
 */

.auth {
  display: grid;
  min-height: 100svh;
  background: var(--surface-cream);
}

.auth-column {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--space-5) var(--gutter);
}

.auth-logo img {
  height: 32px;
  width: auto;
}

.auth-main {
  display: grid;
  flex: 1;
  align-content: center;
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
  padding-block: var(--space-7);
}

.auth-main h1 {
  margin-top: var(--space-3);
}

.auth-main .lede {
  margin-top: var(--space-3);
  color: var(--ink-muted);
}

.auth-form {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.auth-form .button {
  width: 100%;
}

.auth-alt {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  color: var(--ink-muted);
}

@media (hover: hover) and (pointer: fine) {
  .auth-foot a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/* The picture: a photograph cropped square-cornered at the full height of the
   screen, the line the company is known by set on it. */
.auth-side {
  position: relative;
  display: none;
  overflow: hidden;
}

.auth-side img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A flat veil in the ground's colour: the photograph is bright where the
   type sits. */
.auth-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--brand-espresso) 28%, transparent);
}

.auth-side-copy {
  position: absolute;
  top: var(--space-7);
  right: var(--space-7);
  left: var(--space-7);
  z-index: 1;
  display: grid;
  gap: var(--space-3);
  background: none;
}

.auth-side-copy .display-sm {
  max-width: 14ch;
}

.auth-side-copy .body {
  max-width: 36ch;
  color: var(--ink-muted);
}

.auth-side-note {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 1;
  background: none;
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .auth-side {
    display: block;
  }
}

/* ---------- Tiles that change ----------
 * The stepped edges, the confetti and the mosaic are still pictures in the
 * stylesheet and in the page. Where the script runs it draws the same tiles
 * itself (an svg.tiles), drops the still, and from then on changes a few
 * tiles about ten times a second: one comes, one goes, one takes another
 * colour. Each change is one quick fade on the page's curve.
 */

[data-tiles].is-live {
  background-image: none;
}

/* A stepped edge or the confetti is drawn inside its host and fills it. The
   mosaic is drawn in place of its picture and keeps the picture's own rules. */
[data-tiles] > .tiles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tiles rect,
.tiles circle {
  transition:
    opacity var(--dur-quick) var(--ease),
    fill var(--dur-quick) var(--ease);
}

.tiles [data-on="false"] {
  opacity: 0;
}

/* ---------- Scroll reveals ----------
 * "Texts reveal": a block rises 16 px out of a 3 px blur in half a second,
 * once. Children marked with --i follow 40 ms apart. Hidden states apply only when the
 * script is running (html.js), so the page reads without it.
 */

.js .reveal {
  opacity: 0;
  transform: translateY(var(--space-4));
  filter: blur(var(--blur-medium));
  transition:
    opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease),
    filter var(--dur-reveal) var(--ease);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* The hero copy comes sooner: 12 px, 400 ms, 50 ms apart and no wait before
   the first line, so the button is there within about half a second. */
.js .hero .reveal {
  transform: translateY(12px);
  transition-duration: 400ms;
  transition-delay: calc(var(--i, 0) * 50ms);
}

.js .hero .reveal.is-in {
  transform: none;
}

/* ---------- Reduced motion ----------
 * Movement and blur go; a plain fade stays. The films show a still frame.
 */

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-property: opacity, color, background-color, border-color, visibility !important;
  }

  .js .reveal,
  .js .hero .reveal,
  .js [data-pop] .ch,
  .menu-item,
  .pillar-panel,
  .swap > *,
  .swap-text.is-leaving {
    transform: none !important;
    filter: none !important;
  }

  .tagline .word {
    color: #ffffff;
  }

  .hero-media video {
    display: none;
  }

  .hero-still {
    display: block;
  }

  .closing-backdrop video,
  .how-art video {
    display: none;
  }

  /* Nothing moves, so there is nothing to stop. */
  [data-motion-toggle] {
    display: none;
  }
}
