/* Client palette: #0F172A, #FFFFFF, #C5A059. Gold is 2.46:1 on white, so it never
   carries text there: rules and button fills only. */
:root {
  --navy: #0f172a;
  --white: #ffffff;
  --gold: #c5a059;
  --gold-deep: #b08d4a;
  --slate: #475569;
  --mist: #cbd5e1;
  --paper: #edf0f3;
  --line: #e2e8f0;
  --line-strong: #64748b;
  --line-dark: rgba(255, 255, 255, 0.16);
  --error: #b42318;

  --sans: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.625, 0.05, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(1rem, 2.4vw, 2rem);
  --section: clamp(5rem, 11vw, 10rem);
  --header-h: 110px;
  --logo-w: 144px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  font-weight: 400;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

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

.title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.lead {
  max-width: 34em;
  margin-top: 1rem;
  color: var(--slate);
}

/* Signature: the double rule an accountant draws under a final total. */
.total {
  position: relative;
  display: inline-block;
  padding-bottom: 0.16em;
}

.total::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  border-block: 1.5px solid var(--gold);
  transform-origin: left;
}

/* Logo: the dark and light files sit on top of each other and cross-fade with the header. */
.brand {
  display: inline-grid;
  justify-self: center;
}

.brand__art {
  grid-area: 1 / 1;
  transition: opacity 0.5s var(--ease);
}

.brand__art img {
  display: block;
  width: var(--logo-w);
  max-width: none;
  height: auto;
}

.brand__art--light,
.site-header.is-solid .brand__art--dark {
  opacity: 0;
}

.site-header.is-solid .brand__art--light {
  opacity: 1;
}

/* Logo 3 is taller, so it runs narrower to carry the same visual weight as the others. */
:root[data-logo="3"] {
  --logo-w: 104px;
  --footer-logo: 124px;
}

/* Logos 2 and 3 have no monogram, so the full wordmark takes its small spots. */
:root[data-logo="2"] .letter__sign img,
:root[data-logo="2"] .form__head img {
  width: 112px;
  height: auto;
}

:root[data-logo="3"] .letter__sign img,
:root[data-logo="3"] .form__head img {
  width: 76px;
  height: auto;
}

/* Pills: the arrow leaves right and a new one enters from the left. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 48px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.btn__dot {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  overflow: hidden;
  border-radius: 50%;
  transition: transform 0.5s var(--ease);
}

.btn__dot svg {
  grid-area: 1 / 1;
  transition: transform 0.55s var(--ease);
}

.btn__dot svg + svg {
  transform: translateX(-200%);
}

.btn:hover .btn__dot svg:first-child {
  transform: translateX(200%);
}

.btn:hover .btn__dot svg + svg {
  transform: translateX(0);
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
}

.btn--gold:hover {
  background: var(--gold-deep);
}

.btn--gold .btn__dot {
  background: var(--navy);
  color: var(--white);
}

.btn--ghost {
  border-color: var(--line-dark);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--gold);
}

.btn--ghost .btn__dot {
  background: var(--white);
  color: var(--navy);
}

.btn--small {
  gap: 0.625rem;
  padding: 0.25rem 0.25rem 0.25rem 0.875rem;
  font-size: 0.9375rem;
}

.btn--small .btn__dot {
  width: 1.625rem;
  height: 1.625rem;
}

.btn--block {
  width: 100%;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  color: var(--white);
}

.announce {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 34px;
  padding-inline: 1rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}

.announce svg {
  color: var(--gold);
  transition: transform 0.5s var(--ease);
}

.announce:hover svg {
  transform: translateX(4px);
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  padding-inline: var(--gutter);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.site-header.is-solid {
  color: var(--navy);
}

.site-header.is-solid .bar {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px);
}

.bar__links {
  display: flex;
  gap: clamp(0.875rem, 0.5rem + 1vw, 1.5rem);
}

.bar__links a,
.bar__link {
  position: relative;
  font-size: clamp(0.875rem, 0.7rem + 0.25vw, 0.9375rem);
  text-decoration: none;
  white-space: nowrap;
}

.bar__links a::after,
.bar__link::after {
  content: "";
  position: absolute;
  inset: auto 0 -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.bar__links a:hover::after,
.bar__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.bar__end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.menu-btn {
  position: relative;
  display: none;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.5s var(--ease);
}

.site-header.is-solid .menu-btn {
  border-color: var(--line);
}

.menu-btn span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.125rem;
  height: 1.5px;
  margin: -0.75px 0 0 -0.5625rem;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}

.menu-btn span:first-child {
  transform: translateY(-3.5px);
}

.menu-btn span:last-child {
  transform: translateY(3.5px);
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

.site-menu {
  display: none;
}

.menu-open body {
  overflow: hidden;
}

/* Hero */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  background: var(--white);
}

.hero__frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  clip-path: inset(0% 0% 0% 0% round 0px 0px 0px 0px);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.62) 26%, rgba(15, 23, 42, 0) 58%);
}

.hero__body {
  position: absolute;
  inset: auto var(--gutter) clamp(2.5rem, 7vh, 4.5rem);
  display: grid;
  justify-items: center;
  text-align: center;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

/* Like the logo: neutral letters and one brass note. */
.hero__accent {
  color: var(--gold);
}

.hero__lead {
  margin-top: 0.875rem;
  color: var(--mist);
}

.hero__body .btn {
  margin-top: 1.25rem;
}

/* Scrolling strip: terms instead of client logos a new firm does not have yet. */
.strip {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 0 1.75rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.strip__label {
  flex: none;
  color: var(--slate);
  font-size: 0.875rem;
}

.strip__viewport {
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.strip__track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 1.125rem;
  white-space: nowrap;
}

.strip__track li {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.strip__track li::after {
  content: "";
  width: 1.25px;
  height: 1.125em;
  background: var(--gold);
  transform: rotate(24deg);
}

.motion .strip__track {
  flex-wrap: nowrap;
  width: max-content;
  animation: strip 46s linear infinite;
}

.strip:hover .strip__track {
  animation-play-state: paused;
}

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

/* Intro */
.intro {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: var(--section) var(--gutter) clamp(3.5rem, 7vw, 6rem);
  text-align: center;
}

.intro__title {
  max-width: 18em;
  font-family: var(--display);
  font-size: clamp(2.125rem, 3.8vw, 3.25rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.intro__lead {
  max-width: 36em;
  color: var(--slate);
}

/* Layer stack. The base rules are the static version; .stack-live pins it to the scroll. */
.stack {
  background: radial-gradient(90% 80% at 58% 42%, #ffffff 0%, #f1f4f7 52%, #e3e8ee 100%);
}

.stack__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  align-items: center;
  gap: 2rem;
  padding: 4rem var(--gutter);
}

.scene {
  --plate: clamp(220px, min(32vw, 58svh), 620px);
  --gap: calc(var(--plate) * 0.1);
  --type: 1;
  position: relative;
  height: calc(var(--plate) * 1.4);
}

.plate {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--plate);
  height: var(--plate);
  margin: calc(var(--plate) / -2) 0 0 calc(var(--plate) / -2);
  transform: translateY(calc((2.5 - var(--i)) * var(--gap)));
  will-change: transform, opacity;
}

.plate__face {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 46%, #dde3ea 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    1px 1px 0 #94a3b8,
    2px 2px 0 #64748b,
    3px 3px 0 #475569,
    4px 4px 0 #334155,
    5px 5px 0 #1e293b,
    6px 6px 0 #0f172a,
    7px 7px 0 #0f172a,
    28px 28px 54px rgba(15, 23, 42, 0.2);
  transform: perspective(1800px) rotateX(calc(56deg + var(--tilt-x, 0deg))) rotateZ(calc(45deg + var(--tilt-z, 0deg)));
}

.plate__title {
  position: absolute;
  inset: 7% 8% auto;
  font-size: calc(var(--plate) * 0.048 * var(--type));
  font-weight: 500;
  white-space: nowrap;
}

/* Names the layers beside the pile, like the callouts on a technical drawing. */
.plate__tag {
  display: none;
}

.plate__tiles {
  position: absolute;
  inset: 20% 8% 8%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--plate) * 0.03);
}

.plate__tiles--2 {
  grid-template-columns: repeat(2, 1fr);
}

.plate__tiles--1 {
  grid-template-columns: 1fr;
}

.plate__tiles b {
  display: grid;
  place-items: center;
  padding: 0.25rem;
  border-radius: 8px;
  background: var(--white);
  box-shadow:
    inset 0 0 0 1px var(--line),
    1px 1px 0 #cbd5e1,
    2px 2px 0 #94a3b8,
    3px 3px 0 #64748b;
  font-size: calc(var(--plate) * 0.032 * var(--type));
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.plate--total .plate__face {
  background: linear-gradient(135deg, #24324a 0%, #0f172a 62%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    1px 1px 0 #d9bb80,
    2px 2px 0 #c5a059,
    3px 3px 0 #c5a059,
    4px 4px 0 #b08d4a,
    5px 5px 0 #b08d4a,
    6px 6px 0 #8f7238,
    7px 7px 0 #8f7238,
    32px 32px 60px rgba(15, 23, 42, 0.32);
  color: var(--white);
}

.plate--total .plate__tiles {
  inset: 20% 8% 8%;
}

.plate--total .plate__tiles b {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: var(--white);
}

/* The stack ends on the board's signature: one brass tile, lit as the last plate locks in. */
.plate--total .plate__tiles .plate__sign {
  background: var(--gold);
  box-shadow:
    1px 1px 0 #d9bb80,
    2px 2px 0 #b08d4a,
    3px 3px 0 #8f7238;
  color: var(--navy);
  font-weight: 500;
  transition: background-color 0.7s var(--ease), color 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.stack-live .plate--total .plate__tiles .plate__sign:not(.is-signed) {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.layers {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}

.layer {
  max-width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy);
  color: var(--white);
}

.layer__pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 0.9375rem;
  border: 0;
  background: none;
  font-size: clamp(0.9375rem, 0.75rem + 0.35vw, 1.0625rem);
  text-align: left;
  cursor: pointer;
}

.layer__plus {
  position: relative;
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.layer__plus::before,
.layer__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1px;
  margin: -0.5px 0 0 -4.5px;
  background: currentColor;
  transition: transform 0.6s var(--ease);
}

.layer__plus::after {
  transform: rotate(90deg);
}

[aria-expanded="true"] > .layer__plus::after {
  transform: rotate(0deg);
}

.layer__body {
  display: grid;
  grid-template-rows: 1fr;
}

.layer__body > div {
  overflow: hidden;
}

.layer__body p {
  width: min(330px, 78vw);
  padding: 0 0.9375rem 0.875rem;
  color: var(--mist);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.stack__count,
.stack__progress {
  display: none;
}

.stack-live .stack {
  height: 480svh;
}

.stack-live .stack__stage {
  position: sticky;
  top: 0;
  display: block;
  height: 100svh;
  padding: 0;
  overflow: hidden;
}

/* Both columns are centred in the space below the header, so the list and pile line up. */
.stack-live .stack__rail {
  position: absolute;
  top: var(--header-h);
  bottom: 0;
  left: var(--gutter);
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 0.875rem;
  width: min(360px, 40vw);
}

.stack-live .scene {
  position: absolute;
  inset: var(--header-h) 0 0 calc(var(--gutter) + min(360px, 40vw));
  height: auto;
}

.stack-live .plate {
  transform: none;
}

.stack-live .stack__count {
  display: block;
  color: var(--slate);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.stack__count b {
  color: var(--navy);
  font-weight: 500;
}

.stack-live .layer {
  transition: border-radius 0.6s var(--ease), background-color 0.4s var(--ease);
}

.stack-live .layer:not(.is-active):hover {
  background: var(--navy);
}

.stack-live .layer__body {
  grid-template-rows: 0fr;
  max-width: 0;
  transition: grid-template-rows 0.7s var(--ease), max-width 0.7s var(--ease);
}

.stack-live .layer.is-active .layer__body {
  grid-template-rows: 1fr;
  max-width: 330px;
}

.stack-live .layer:not(.is-active) {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

/* One segment per layer. The mask cuts the gaps, so the fill can stay a single bar. */
.stack-live .stack__progress {
  --segment: calc((100% + 4px) / 6);
  display: block;
  width: min(100%, 15rem);
  height: 4px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.14);
  -webkit-mask-image: repeating-linear-gradient(to right, #000 0 calc(var(--segment) - 4px), transparent 0 var(--segment));
  mask-image: repeating-linear-gradient(to right, #000 0 calc(var(--segment) - 4px), transparent 0 var(--segment));
}

.stack__progress span {
  display: block;
  height: 100%;
  background: var(--navy);
  transform: scaleX(0.167);
  transform-origin: left;
}

@media (min-width: 1200px) and (min-height: 561px) {
  /* Leaves room on the right for the callouts on narrower desktops. */
  .stack-live .scene {
    right: max(0px, 688px - 43vw);
  }

  .stack-live .plate__tag {
    position: absolute;
    top: 50%;
    left: calc(50% + var(--plate) * 0.71);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--slate);
    font-size: 0.8125rem;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-0.5rem, -50%);
    transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out), color 0.4s var(--ease);
  }

  .stack-live .plate__tag::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background: var(--line-strong);
  }

  .stack-live .plate.is-landed .plate__tag {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .stack-live .plate.is-current .plate__tag {
    color: var(--navy);
    font-weight: 500;
  }
}

/* Statutory dates */
.dates {
  padding-block: var(--section);
}

.dates__grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 3rem;
  align-items: start;
}

.dates__head {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.date {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px);
  gap: 2rem;
  align-items: end;
  padding-block: 1.5rem 3.5rem;
}

.date::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--navy);
  transform-origin: left;
}

.date__big {
  font-family: var(--display);
  font-size: clamp(4rem, 9.5vw, 8.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.date__text h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.25;
}

.date__text p {
  margin-top: 0.375rem;
  color: var(--slate);
  font-size: 0.9375rem;
}

/* Evening loop: a dark pause in the long white middle of the page. */
.evening {
  margin-bottom: var(--section);
}

.evening__frame {
  position: relative;
  display: grid;
  align-items: end;
  height: clamp(520px, 86svh, 56.25vw);
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  clip-path: inset(0% 0% 0% 0% round 0px);
}

.evening__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 60%;
}

/* In CSS rather than the footage, so a real clip can replace it without touching the text. */
.evening__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.68) 34%, rgba(15, 23, 42, 0) 68%);
}

.evening__quote {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.evening__quote blockquote {
  max-width: 12em;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
}

.evening__quote figcaption {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: clamp(1.5rem, 2.5vw, 2.25rem);
}

.evening__quote img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.evening__quote figcaption b {
  display: block;
  font-weight: 500;
  line-height: 1.25;
}

.evening__quote figcaption span {
  color: var(--mist);
  font-size: 0.9375rem;
}

.evening__toggle {
  position: absolute;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.5);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.evening__toggle[hidden] {
  display: none;
}

.evening__toggle:hover {
  background: var(--white);
  color: var(--navy);
}

/* Situations carousel: the centred card grows, its neighbours step back. */
.cases {
  --w-s: clamp(150px, 17vw, 250px);
  --w-b: clamp(270px, 31vw, 450px);
  --h-s: clamp(190px, 22vw, 320px);
  --h-b: clamp(360px, 41vw, 600px);
  --case-gap: clamp(0.75rem, 1.6vw, 1.5rem);
  overflow: hidden;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.cases__head {
  display: grid;
  justify-items: center;
  padding-inline: var(--gutter);
  text-align: center;
}

.cases__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 2rem auto 1.5rem;
  padding-inline: var(--gutter);
}

.round-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.round-btn:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.round-btn--prev svg {
  transform: rotate(180deg);
}

.cases__dots {
  display: flex;
  gap: 6px;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  background: var(--paper);
}

.cases__dots i {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: var(--line-strong);
  opacity: 0.4;
  transition: width 0.6s var(--ease), opacity 0.6s var(--ease);
}

.cases__dots i.is-on {
  width: 22px;
  background: var(--navy);
  opacity: 1;
}

.cases__track {
  display: flex;
  align-items: flex-start;
  gap: var(--case-gap);
  width: max-content;
  transition: transform 0.9s var(--ease);
  touch-action: pan-y;
}

.case {
  flex: 0 0 var(--w-s);
  min-width: 0;
  transition: flex-basis 0.9s var(--ease);
}

.case.is-active {
  flex-basis: var(--w-b);
}

.case__hit {
  position: relative;
  display: block;
  width: 100%;
  height: var(--h-s);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--navy);
  cursor: pointer;
  transition: height 0.9s var(--ease);
}

.case.is-active .case__hit {
  height: var(--h-b);
  cursor: default;
}

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

.case:not(.is-active) .case__hit:hover img {
  transform: scale(1.05);
}

.case__hit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0) 34%);
}

.case__label {
  position: absolute;
  inset: 0.875rem 0.5rem auto;
  z-index: 1;
  color: var(--white);
  font-size: 0.9375rem;
  text-align: center;
}

.case__text {
  width: var(--w-b);
  min-height: 9rem;
  padding-top: 1.125rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.case.is-active .case__text {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s var(--ease) 0.35s, visibility 0s;
}

.case__text h3 {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.2;
}

.case__text p {
  margin-top: 0.5rem;
  color: var(--slate);
}

/* Company profile: spells out what the form checks, set out as an accountant's T-account.
   The frame straddles the white and paper sections on either side of it. */
.fit {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  background: linear-gradient(to bottom, var(--white) 50%, var(--paper) 50%);
}

.fit__frame {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-radius: 24px;
  background: var(--navy);
  color: var(--white);
}

.fit__title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.account {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto repeat(4, auto);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

/* The two strokes of the T. */
.account::before,
.account::after {
  content: "";
  position: absolute;
  background: var(--gold);
}

.account::before {
  inset: 0 0 auto;
  height: 2px;
}

.account::after {
  inset: 0 auto 0 50%;
  width: 1px;
  transform-origin: top;
}

/* Subgrid keeps the rows level across the two sides of the account. */
.account__side {
  display: grid;
  grid-row: 1 / -1;
  grid-template-rows: subgrid;
}

.account__side + .account__side {
  padding-left: clamp(1.5rem, 3vw, 3rem);
}

.account__side:first-child {
  padding-right: clamp(1.5rem, 3vw, 3rem);
}

.account__side h3 {
  padding-block: clamp(1.25rem, 2vw, 1.75rem);
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.account__side:last-child h3 {
  color: var(--mist);
}

.account__side ul {
  display: grid;
  grid-row: 2 / -1;
  grid-template-rows: subgrid;
}

.account__side li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.25rem 0.5rem;
  align-content: start;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line-dark);
}

.account__side li::before {
  content: "+";
  grid-row: span 2;
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.3;
}

.account__side:last-child li::before {
  content: "−";
  color: var(--mist);
}

.account__side b {
  font-family: var(--display);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.account__side span {
  grid-column: 2;
  color: var(--mist);
  line-height: 1.4;
}

.account__side:last-child b {
  color: var(--mist);
}

.account__side:last-child span {
  color: rgba(203, 213, 225, 0.72);
}

/* An account closes on the same double rule that sits under the prices. */
.fit__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding-top: clamp(1.5rem, 2.4vw, 2rem);
  border-top: 3px double var(--gold);
}

.fit__foot p {
  max-width: 40em;
  color: var(--mist);
  line-height: 1.4;
}

/* Letter and team */
.letter {
  padding-block: var(--section);
  background: var(--paper);
}

.letter__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.letter__label {
  color: var(--slate);
  font-size: 0.9375rem;
}

/* One line carries the section; the note beneath it stays small. */
.letter__quote {
  margin: 1rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.125rem, 3.5vw, 3.125rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.letter__text {
  max-width: 34em;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.5;
}

.letter__text p + p {
  margin-top: 1em;
}

.letter__sign {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
}

.letter__sign img {
  width: 44px;
  height: 44px;
}

.letter__sign b {
  display: block;
  font-weight: 500;
  line-height: 1.25;
}

.letter__sign span {
  color: var(--slate);
  font-size: 0.9375rem;
}

.letter__people {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* The stagger keeps two equal portraits from reading as a plain grid. */
.letter__slot:nth-child(2) {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.person {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--navy);
}

.person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  transition: transform 1.2s var(--ease);
}

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

.photo-tag {
  position: absolute;
  left: 0.625rem;
  bottom: 0.625rem;
  padding: 0.125rem 0.5rem;
  border-radius: 20px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.75rem;
}

.person .photo-tag {
  top: 0.75rem;
  bottom: auto;
  left: 0.75rem;
}

/* Names sit on the photos, so a face and its name read as one thing. */
.person figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 4.5rem 1.25rem 1.125rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0));
  color: var(--white);
}

.person h3 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.person figcaption p {
  margin-top: 0.125rem;
  color: var(--mist);
  font-size: 0.9375rem;
}

/* Packages */
/* Why us: one of everything, a plain promise rather than statistics a new firm can't have. */
.ones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-block: var(--section);
}

.ones__photo {
  position: relative;
}

.ones__figure {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0 24px 24px 0;
  background: var(--navy);
}

.ones__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.ones__body {
  padding-inline: clamp(2.5rem, 6vw, 6rem) max(var(--gutter), calc((100vw - 1320px) / 2));
}

.ones__label {
  color: var(--slate);
  font-size: 0.9375rem;
}

.ones__title {
  margin-top: 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.ones__list {
  margin-top: clamp(2rem, 3.5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.one {
  display: grid;
  grid-template-columns: clamp(3.25rem, 5.5vw, 5rem) 1fr;
  align-items: center;
  column-gap: 0.75rem;
  padding-block: clamp(0.875rem, 1.4vw, 1.25rem);
  border-top: 1px solid var(--line);
}

.one__n {
  font-family: var(--display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.one h3 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.one p {
  margin-top: 0.25rem;
  color: var(--slate);
  line-height: 1.4;
}

.plans-section {
  padding-block: var(--section);
  background: var(--navy);
  color: var(--white);
}

.plans-section .lead {
  color: var(--mist);
}

/* Comparison ledger: a highlighted column slides between packages, and the prices sit
   in a final "Razem" row above the double rule, the way a total closes a statement. */
.ledger {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.ledger__tabs {
  display: none;
}

.ledger__stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.ledger__spotlight {
  position: absolute;
  inset: 0 auto 0 36%;
  z-index: -1;
  width: calc(64% / 3);
  border-top: 2px solid var(--gold);
  background: linear-gradient(to bottom, rgba(197, 160, 89, 0.13), rgba(255, 255, 255, 0.045) 34%, rgba(255, 255, 255, 0.045));
  opacity: 0;
  transform: translateX(calc(var(--plan, 1) * 100%));
  transition: transform 0.8s var(--ease), opacity 0.5s var(--ease);
}

.ledger.is-ready .ledger__spotlight {
  opacity: 1;
}

.ledger__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.ledger__col {
  width: 36%;
}

.ledger__table th,
.ledger__table td {
  padding: 0.875rem 1.5rem;
  font-weight: 400;
  vertical-align: middle;
}

.ledger__table th[scope="row"],
.ledger__table .ledger__group th,
.ledger__table .ledger__corner {
  padding-left: 0;
}

.ledger__table tbody tr:not(.ledger__group) > * {
  border-top: 1px solid var(--line-dark);
}

.ledger__table td,
.ledger__table th[data-plan] {
  color: var(--mist);
  transition: color 0.5s var(--ease);
}

.ledger__table [data-plan].is-on {
  color: var(--white);
}

.ledger__table thead th {
  padding-block: 1.5rem 1.75rem;
  vertical-align: top;
}

.ledger__corner {
  color: var(--mist);
  font-size: 0.875rem;
}

.ledger__plan {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
}

.ledger__table thead th > span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.ledger__group th {
  padding-top: 2.25rem;
  padding-bottom: 0.625rem;
  color: var(--mist);
  font-size: 0.875rem;
}

.ledger__table tbody:first-of-type .ledger__group th {
  padding-top: 0;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--mist);
  transform: scale(0.88);
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease), transform 0.45s var(--ease);
  transition-delay: calc(var(--row, 0) * 48ms);
}

.is-on .mark {
  background: var(--gold);
  color: var(--navy);
  transform: none;
}

.ledger__none {
  color: rgba(203, 213, 225, 0.5);
}

.ledger__sum th,
.ledger__sum td {
  padding-block: 2.5rem 1.5rem;
  border-top: 1px solid var(--white);
}

.ledger__sum th {
  font-weight: 500;
}

.ledger__sum .total {
  font-size: clamp(2.25rem, 3.4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ledger__actions td {
  padding-block: 0.5rem 1.5rem;
}

.ledger__actions .btn {
  width: 100%;
}

.plans__note {
  margin-top: 1.5rem;
  color: var(--mist);
  font-size: 0.875rem;
}

/* Switching: dated steps rather than numbered ones, because the deadline is the point. */
.switch {
  padding-block: var(--section);
  background: var(--paper);
}

.switch__head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 1rem clamp(2.5rem, 5vw, 5rem);
  align-items: end;
}

.switch__head .lead {
  margin-top: 0;
}

.switch__photo {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* Morning light sweeps across the evening from the video as the page scrolls. A soft
   mask rather than a fade, so the two lamps never show as a double exposure. */
.switch__figure {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--navy);
}

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

.switch__dawn {
  --sun: 130%;
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--sun) - 30%), transparent var(--sun));
  mask-image: linear-gradient(100deg, #000 calc(var(--sun) - 30%), transparent var(--sun));
}

.switch__count {
  position: absolute;
  bottom: clamp(0.75rem, 1.6vw, 1.5rem);
  left: clamp(0.75rem, 1.6vw, 1.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  background: var(--navy);
  color: var(--white);
}

.switch__count[hidden] {
  display: none;
}

.switch__count b {
  color: var(--gold);
  font-family: var(--display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.switch__count span {
  color: var(--mist);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.switch__count strong {
  display: block;
  color: var(--white);
  font-weight: 500;
}

/* A calendar ruler: months share the width by their real length, one tick per day. */
.steps {
  display: grid;
  grid-template-columns: var(--months, 30fr 31fr 31fr 28fr);
  gap: 2.5rem 0;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

.step__ruler {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 1.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.24);
}

.step__ruler i {
  flex: 1 1 0;
  height: 0.75rem;
  border-left: 1px solid rgba(15, 23, 42, 0.36);
  transform-origin: bottom;
}

.step__ruler i.is-past {
  border-left-color: var(--navy);
}

.step__ruler i:first-child {
  height: 100%;
  border-left-color: var(--navy);
}

.step--start .step__ruler i:first-child {
  border-left: 2px solid var(--gold-deep);
}

.step__ruler i.is-today {
  height: 100%;
  border-left: 2px solid var(--gold-deep);
}

.step__today {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 0.25rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 20px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
}

.step__when,
.step h3,
.step > p:last-child {
  padding-right: clamp(1.25rem, 2.6vw, 2.75rem);
}

.step__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-height: 1.5rem;
  margin-top: 1rem;
  color: var(--slate);
  font-size: 0.9375rem;
}

.step.is-now .step__when {
  color: var(--navy);
  font-weight: 500;
}

.step__start {
  padding: 0.0625rem 0.5rem;
  border-radius: 20px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 500;
}

.step h3 {
  margin-top: 0.625rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.step > p:last-child {
  margin-top: 0.625rem;
  color: var(--slate);
  line-height: 1.4;
}

.switch__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
}

.switch__foot p {
  max-width: 38em;
  color: var(--slate);
  line-height: 1.4;
}

/* FAQ */
.faq {
  padding-block: var(--section);
}

.faq__grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 3rem;
  align-items: start;
}

.qa {
  border-top: 1px solid var(--line);
}

.qa:last-child {
  border-bottom: 1px solid var(--line);
}

.qa h3 {
  font-size: inherit;
}

.qa button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.25rem 0;
  border: 0;
  background: none;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.qa .layer__plus {
  background: var(--paper);
  transition: background-color 0.4s var(--ease);
}

.qa button:hover .layer__plus {
  background: var(--line);
}

.qa__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease);
}

.qa__panel.is-open {
  grid-template-rows: 1fr;
}

.qa__panel > div {
  overflow: hidden;
}

.qa__panel p {
  max-width: 40em;
  padding-bottom: 1.5rem;
  color: var(--slate);
}

/* Application card */
/* The page closes on one navy zone: the form runs straight into the footer. */
.apply-section {
  padding: clamp(3.5rem, 7vw, 6rem) var(--gutter);
  border-radius: 24px 24px 0 0;
  background: var(--navy);
  color: var(--white);
}

.apply {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px);
  gap: clamp(2rem, 4vw, 3.5rem) 1.5rem;
  max-width: 1320px;
  margin-inline: auto;
}

.apply__head {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr minmax(0, 560px);
  gap: 1rem 1.5rem;
  align-items: end;
}

.apply__head .lead {
  margin-top: 0;
  color: var(--mist);
}

/* The panel follows the form: photo above, the application's progress over its dark half. */
.apply__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 460px;
  overflow: hidden;
  border-radius: 12px;
  background: #0a101f;
}

.apply__panel > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.apply__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.82) 40%, rgba(15, 23, 42, 0) 66%);
}

.apply__panel .photo-tag {
  top: 0.75rem;
  bottom: auto;
  left: 0.75rem;
  z-index: 2;
}

.apply__status {
  position: relative;
  z-index: 2;
  padding: clamp(1.25rem, 2.6vw, 2.25rem);
}

.apply__match {
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 500;
}

.track__step {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.875rem;
  padding-bottom: 1.125rem;
  color: var(--mist);
  transition: color 0.5s var(--ease);
}

.track__step:last-child {
  padding-bottom: 0;
}

.track__step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 0;
  left: calc(0.75rem - 0.5px);
  width: 1px;
  background: var(--line-dark);
}

.track__mark {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  color: transparent;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
}

.track__step.is-current {
  color: var(--white);
}

.track__step.is-current .track__mark {
  border-color: var(--gold);
  background: radial-gradient(circle, var(--gold) 0 4px, transparent 4.5px);
}

.track__step.is-done {
  color: var(--white);
}

.track__step.is-done .track__mark {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
}

.track__progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  color: var(--mist);
  font-size: 0.875rem;
}

.track__bar {
  flex: 1;
  max-width: 14rem;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.track__bar i {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}

.form {
  display: grid;
  gap: 1.375rem;
  padding: clamp(1.25rem, 2.6vw, 2.25rem);
  border-radius: 12px;
  background: var(--white);
  color: var(--navy);
}

.form :focus-visible {
  outline-color: var(--navy);
}

.form__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.form__head p {
  font-family: var(--display);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.form__head img {
  width: 48px;
  height: 48px;
}

.field {
  display: grid;
  gap: 0.125rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
}

.field__optional {
  color: var(--slate);
  font-weight: 400;
}

.field input,
.field select {
  width: 100%;
  padding: 0.5625rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: transparent;
  color: var(--navy);
  font: 400 1.0625rem/1.4 var(--sans);
  appearance: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.field select {
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230f172a' stroke-width='1.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  cursor: pointer;
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 0;
  border-bottom-color: var(--navy);
  box-shadow: inset 0 -1px 0 0 var(--navy);
}

.field--invalid input,
.field--invalid select {
  border-bottom-color: var(--error);
}

.field__hint {
  margin-top: 0.25rem;
  color: var(--slate);
  font-size: 0.8125rem;
}

.field__error {
  margin-top: 0.25rem;
  color: var(--error);
  font-size: 0.8125rem;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  color: var(--slate);
  font-size: 0.8125rem;
}

.consent input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.0625rem 0 0;
  accent-color: var(--navy);
}

.consent .field__error {
  grid-column: 2;
  margin-top: 0;
}

.form__status {
  padding-top: 0.875rem;
  border-top: 1px solid var(--navy);
  font-size: 0.9375rem;
}

/* Footer */
.footer {
  padding-bottom: 3.5rem;
  background: var(--navy);
  color: var(--white);
}

.footer__grid {
  display: grid;
  grid-template-columns: 5fr 2fr 2fr 3fr;
  gap: 2.5rem 2rem;
  padding-top: clamp(2.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line-dark);
  font-size: 0.9375rem;
}

.footer__brand img {
  width: var(--footer-logo, 168px);
  height: auto;
}

.footer__brand p {
  max-width: 24em;
  margin-top: 1rem;
  color: var(--mist);
}

.footer__grid h2 {
  margin-bottom: 0.75rem;
  color: var(--mist);
  font-size: 0.875rem;
}

.footer__grid li {
  padding-block: 0.1875rem;
}

.footer a {
  text-decoration: none;
}

.footer li a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.25em;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  color: var(--mist);
  font-size: 0.875rem;
}

.footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

/* Working appendix under the footer: the photographer's brief and the design system.
   Nothing else depends on it, so the whole block can go before launch. */
.appendix {
  background: var(--white);
}

.appendix__tag {
  width: fit-content;
  padding: 0.125rem 0.625rem;
  border-radius: 20px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 500;
}

.brief {
  padding-block: var(--section);
}

.brief__head .title {
  margin-top: 0.875rem;
}

.brief__rules {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem clamp(1.25rem, 2.4vw, 2.25rem);
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-block: 1.5rem;
  border-block: 1px solid var(--line);
}

.brief__rules b {
  display: block;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
}

.brief__rules span {
  display: block;
  margin-top: 0.375rem;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.shot {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 1.5rem;
  align-items: start;
}

.shot--wide {
  grid-column: 1 / -1;
  grid-template-columns: 7fr 5fr;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.shot--mid {
  grid-template-columns: 5fr 7fr;
}

.shot__photo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: var(--navy);
}

.shot__photo img {
  width: 100%;
}

.shot__zone {
  position: absolute;
  inset-inline: 0.375rem;
  display: grid;
  place-items: center;
  padding: 0.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.42);
  color: var(--white);
  font-size: 0.8125rem;
  line-height: 1.2;
  text-align: center;
}

.shot__zone--top {
  top: 0.375rem;
}

.shot__zone--bottom {
  bottom: 0.375rem;
}

.shot__n {
  color: var(--slate);
  font-size: 0.875rem;
}

.shot h3 {
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.9vw, 1.625rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.shot dl,
.ds__specs {
  margin: 0;
}

.shot dl {
  margin-top: 0.875rem;
}

.shot dl div {
  display: grid;
  grid-template-columns: 6.25rem 1fr;
  gap: 0.75rem;
  padding-block: 0.5rem;
  border-top: 1px solid var(--line);
}

.shot dt {
  color: var(--slate);
  font-size: 0.875rem;
  line-height: 1.5;
}

.shot dd,
.ds__specs dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.ds__intro {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--navy);
  color: var(--white);
}

.ds__title {
  margin-top: 0.875rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.ds__lead {
  max-width: 34em;
  margin-top: 1rem;
  color: var(--mist);
}

.ds__group {
  display: grid;
  grid-template-columns: 2fr 10fr;
  gap: 1.5rem clamp(1.5rem, 3vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.ds__group:first-child {
  border-top: 0;
}

.ds__group > h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.ds__dark {
  background: var(--navy);
  color: var(--white);
}

.ds__choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 0.75rem;
}

.ds__choice {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.ds__choice .ds__label {
  margin-bottom: 0.25rem;
}

.ds__tile {
  display: grid;
  place-items: center;
  min-height: 8.5rem;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ds__tile.ds__dark {
  box-shadow: none;
}

.ds__tile img {
  width: min(100%, 196px);
}

.ds__tile .ds__tall {
  width: min(100%, 136px);
}

.ds__pick {
  justify-self: start;
  padding: 0.3125rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: 48px;
  background: none;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.ds__pick:hover,
.ds__pick[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.ds__note,
.ds__hint {
  margin-top: 0.875rem;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* The strip shows the mix: mostly navy and white, with brass kept to a small share. */
.ds__strip {
  display: flex;
  height: clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ds__strip span:nth-child(1) {
  flex: 6;
  background: var(--navy);
}

.ds__strip span:nth-child(2) {
  flex: 3;
}

.ds__strip span:nth-child(3) {
  flex: 1;
  background: var(--gold);
}

.ds__swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1rem;
  margin-top: 1.5rem;
}

.ds__swatches li {
  display: grid;
  gap: 0.0625rem;
}

.ds__swatches i {
  height: 3.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ds__swatches b {
  font-weight: 500;
}

code,
.ds__swatches span {
  color: var(--slate);
  font-family: var(--sans);
  font-size: 0.875rem;
}

.ds__pairs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ds__pairs li {
  display: grid;
  align-content: start;
  gap: 0.0625rem;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.35;
}

.ds__pairs b {
  margin-bottom: 0.375rem;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.ds__dark--gold b {
  color: var(--gold);
}

.ds__gold {
  background: var(--gold);
  color: var(--navy);
}

.ds__rule {
  box-shadow: inset 0 0 0 1px var(--line);
}

.ds__rule i {
  height: 2px;
  margin-block: 0.9375rem 0.75rem;
  background: var(--gold);
}

.ds__fonts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.ds__fonts > div {
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ds__fonts .ds__dark {
  box-shadow: none;
}

.ds__aa {
  display: block;
  font-family: var(--display);
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ds__aa--text {
  font-family: var(--sans);
}

.ds__fonts p {
  margin-top: 0.75rem;
  font-weight: 500;
}

.ds__fonts span {
  font-size: 0.9375rem;
  opacity: 0.8;
}

.ds__scale {
  margin-top: 1rem;
}

.ds__scale li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  padding-block: 0.875rem;
  border-top: 1px solid var(--line);
}

.ds__s1,
.ds__s2,
.ds__s3 {
  font-family: var(--display);
}

.ds__s1 {
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.ds__s2 {
  font-size: clamp(2rem, 3.9vw, 3.5rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.ds__s3 {
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  letter-spacing: -0.012em;
}

.ds__s5 {
  font-size: 0.875rem;
}

.ds__parts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.ds__part {
  min-width: 0;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ds__part.ds__dark {
  box-shadow: none;
}

.ds__part--wide {
  grid-column: 1 / -1;
}

.ds__label {
  margin-bottom: 1rem;
  color: var(--slate);
  font-size: 0.875rem;
}

.ds__dark .ds__label,
.ds__dark .ds__hint {
  color: var(--mist);
}

.ds__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.ds__part .step__today {
  position: static;
  margin: 0;
}

.ds__total {
  font-family: var(--display);
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ds__ruler {
  height: 1.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.24);
  background:
    linear-gradient(var(--navy), var(--navy)) left bottom / 2px 100% no-repeat,
    repeating-linear-gradient(to right, rgba(15, 23, 42, 0.36) 0 1px, transparent 1px calc(100% / 30)) left bottom / 100% 0.75rem no-repeat;
}

.ds__part .layer {
  width: fit-content;
  max-width: 100%;
}

.ds__part .layer__body,
.ds__part .layer.is-active .layer__body {
  grid-template-rows: 1fr;
  max-width: none;
}

.ds__part .layer__body p {
  width: 100%;
  min-height: 0;
}

.ds__part .field input {
  color: var(--slate);
}

.ds__part .account {
  margin-top: 0;
}

.ds__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(1.5rem, 3vw, 3rem);
}

.ds__specs div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  padding-block: 0.625rem;
  border-top: 1px solid var(--line);
}

.ds__specs dt {
  color: var(--slate);
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .brief__rules {
    grid-template-columns: repeat(3, 1fr);
  }

  .shots,
  .ds__group,
  .ds__specs {
    grid-template-columns: 1fr;
  }

  .shot,
  .shot--wide {
    grid-template-columns: 5fr 7fr;
  }

  .ds__parts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .brief__rules,
  .shot,
  .shot--wide {
    grid-template-columns: 1fr;
  }

  .ds__swatches,
  .ds__pairs {
    grid-template-columns: repeat(2, 1fr);
  }

  .ds__choices,
  .ds__parts,
  .ds__fonts {
    grid-template-columns: 1fr;
  }

  .ds__scale li {
    grid-template-columns: 1fr;
  }
}

/* Logo choice for the client, floating so the logos can be compared anywhere on the page. */
.logo-pick {
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(15, 23, 42, 0.18);
  color: var(--navy);
}

.logo-pick > span {
  padding-inline: 0.5rem 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.logo-pick button {
  display: grid;
  place-items: center;
  width: 4.75rem;
  height: 2.5rem;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease);
}

.logo-pick button:hover {
  background: var(--paper);
}

.logo-pick button[aria-pressed="true"] {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--navy);
}

.logo-pick img {
  width: 100%;
}

.logo-pick button:last-child img {
  width: 2.625rem;
}

.logo-pick b {
  display: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

@media (max-width: 760px) {
  .logo-pick button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .logo-pick img {
    display: none;
  }

  .logo-pick b {
    display: block;
  }
}

.draft-chip {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 15;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Motion. Everything here is opt-in through .motion, so the page reads fine without it. */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out) var(--d, 0s), transform 1.2s var(--ease-out) var(--d, 0s);
}

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

.motion .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 45ms);
}

.motion .is-in .word,
.motion .word.is-in {
  opacity: 1;
  transform: none;
}

/* The clip sits on a child of the observed slot: a clip-path on the target itself hides
   it from the IntersectionObserver and the reveal never fires. */
.motion [data-img] .person {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease) var(--d, 0s);
}

.motion [data-img].is-in .person {
  clip-path: inset(0);
}

.motion [data-img] .ones__figure {
  clip-path: inset(0 100% 0 0 round 0 24px 24px 0);
  transition: clip-path 1.4s var(--ease);
}

.motion [data-img].is-in .ones__figure {
  clip-path: inset(0 0 0 0 round 0 24px 24px 0);
}

.motion [data-img] .switch__figure {
  clip-path: inset(100% 0 0 0 round 12px);
  transition: clip-path 1.4s var(--ease);
}

.motion [data-img].is-in .switch__figure {
  clip-path: inset(0 0 0 0 round 12px);
}

/* The ticks rise in a wave from the first day of the ruler to the last. */
.motion .step__ruler i {
  transform: scaleY(0);
  transition: transform 0.7s var(--ease-out);
  transition-delay: calc(var(--t, 0) * 7ms);
}

.motion .step.is-in .step__ruler i {
  transform: none;
}

/* The T is drawn first, then the entries are posted to it. */
.motion .account::before {
  transform: scaleX(0);
  transition: transform 1.3s var(--ease);
}

.motion .account::after {
  transform: scaleY(0);
  transition: transform 1.3s var(--ease) 0.35s;
}

.motion .account.is-in::before,
.motion .account.is-in::after {
  transform: none;
}

.motion .account__side li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(0.45s + var(--r, 0) * 80ms);
}

.account__side li:nth-child(2) {
  --r: 1;
}

.account__side li:nth-child(3) {
  --r: 2;
}

.account__side li:nth-child(4) {
  --r: 3;
}

.motion .account.is-in .account__side li {
  opacity: 1;
  transform: none;
}

.motion .date::before {
  transform: scaleX(0);
  transition: transform 1.5s var(--ease);
}

.motion .date.is-in::before {
  transform: scaleX(1);
}

.motion .hero__media img {
  animation: hero-settle 2.8s var(--ease-out) both;
}

@keyframes hero-settle {
  from {
    opacity: 0;
    transform: scale(1.12);
  }
}

@media (max-width: 1100px) {
  .bar {
    grid-template-columns: 1fr auto;
  }

  .bar__links,
  .bar__link {
    display: none;
  }

  .brand {
    justify-self: start;
    padding-block: 0.375rem;
  }

  .bar__end {
    gap: 0.5rem;
  }

  .bar__end .btn--small {
    min-height: 2.75rem;
  }

  .bar__end .btn__dot {
    width: 2.125rem;
    height: 2.125rem;
  }

  .menu-btn {
    display: block;
  }

  .menu-btn[hidden] {
    display: none;
  }

  /* Fills the screen under the header, so the links get the room a phone needs. */
  .site-menu {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    align-content: start;
    height: calc(100svh - var(--header-h));
    padding: 0.5rem var(--gutter) 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--white);
    color: var(--navy);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), visibility 0s 0.5s;
  }

  .menu-open .site-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .site-menu a {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: 1.5rem;
    letter-spacing: -0.012em;
    text-decoration: none;
  }

  .letter__grid,
  .faq__grid,
  .dates__grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .ones {
    grid-template-columns: 1fr;
    row-gap: clamp(2rem, 5vw, 3rem);
  }

  .ones__photo {
    margin-right: var(--gutter);
    aspect-ratio: 16 / 9;
  }

  .ones__body {
    padding-inline: var(--gutter);
  }

  .dates__head {
    position: static;
  }

  .apply,
  .apply__head {
    grid-template-columns: 1fr;
  }

  /* Stacked, the form comes first and the panel explains what happens next. */
  .apply__panel {
    order: 1;
    min-height: 520px;
  }
}

@media (max-width: 860px) {
  .ledger__tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    padding: 0.25rem;
    border-radius: 48px;
    background: rgba(255, 255, 255, 0.07);
  }

  .ledger__tabs button {
    flex: 1;
    min-height: 2.75rem;
    padding: 0.5rem 0.25rem;
    border: 0;
    border-radius: 48px;
    background: none;
    color: var(--mist);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  }

  .ledger__tabs [aria-checked="true"] {
    background: var(--gold);
    color: var(--navy);
  }

  /* One package at a time: the label column plus the chosen plan. */
  .ledger.is-ready [data-plan]:not(.is-on) {
    display: none;
  }

  /* Stops at the total: the button under it runs the full width of the table. */
  .ledger__spotlight {
    bottom: 5.625rem;
    left: 56%;
    width: 44%;
    transform: none;
  }

  .ledger.is-ready .ledger__col {
    width: 56%;
  }

  .ledger__plan {
    min-height: 2.75rem;
    text-align: left;
  }

  .ledger__table th,
  .ledger__table td {
    padding-inline: 1rem;
  }

  .ledger__table th[scope="row"] {
    font-size: 0.9375rem;
    line-height: 1.25;
  }

  .ledger__actions td:first-child {
    display: none;
  }

  .ledger__actions td {
    padding-inline: 0;
  }

  .ledger__actions .btn {
    margin-top: 0.75rem;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__brand,
  .footer__contact {
    grid-column: 1 / -1;
  }

  .footer__grid li:has(a) {
    padding-block: 0;
  }

  .footer li a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .footer__legal ul {
    row-gap: 0;
  }
}

/* Compact stack: the pile fills the free space, with one card and the counter below it. */
@media (max-width: 860px), (max-height: 560px) {
  .stack__stage {
    grid-template-columns: 1fr;
  }

  .scene {
    --plate: min(64vw, 40svh);
    --type: 1.3;
  }

  .stack-live .stack {
    height: 400svh;
  }

  .stack-live .scene {
    inset: var(--header-h) 0 13rem;
  }

  .stack-live .stack__rail {
    top: auto;
    right: var(--gutter);
    bottom: 3.25rem;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.625rem 1rem;
    width: auto;
    max-width: 34rem;
    margin-inline: auto;
  }

  .stack-live .layers {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .stack-live .stack__progress {
    width: 100%;
  }

  .stack-live .layer:not(.is-active) {
    display: none;
  }

  .stack-live .layer.is-active {
    width: 100%;
    animation: layer-in 0.6s var(--ease-out);
  }

  .stack-live .layer.is-active .layer__body {
    max-width: none;
  }

  /* Three lines held open, so the counter does not jump between short and long cards. */
  .stack-live .layer__body p {
    width: 100%;
    min-height: calc(3 * 1.35em + 0.875rem);
  }

  .stack-live .layer__plus {
    display: none;
  }

  .stack-live .layer__pill {
    padding: 0.75rem 0.9375rem 0.25rem;
    font-weight: 500;
    cursor: default;
  }
}

/* Landscape phones have no height to spare, so the pile and card sit side by side. */
@media (max-height: 560px) and (min-width: 561px) {
  .scene {
    --plate: 44svh;
    --type: 1;
  }

  .stack-live .scene {
    inset: var(--header-h) 48% 0 0;
  }

  .stack-live .stack__rail {
    top: var(--header-h);
    bottom: 0;
    left: 54%;
    align-content: center;
  }

  .stack-live .layer__body p {
    min-height: 0;
  }
}

/* A sideways phone can't spare a third of its height on the header. */
@media (max-height: 560px) {
  :root {
    --header-h: 76px;
  }

  .announce {
    display: none;
  }

  .site-menu {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
}

@keyframes layer-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* On phones a wide duo can't crop to a tall frame, so the text sits under the photo
   and the fixed header never covers a face. */
@media (max-width: 760px) {
  :root {
    --header-h: 102px;
    --logo-w: 52px;
  }

  :root[data-logo="2"] {
    --logo-w: 116px;
  }

  :root[data-logo="3"] {
    --logo-w: 84px;
  }

  .bar {
    height: 68px;
  }

  /* A 16:9 frame cannot hold both here: the lamp and desk go on top, the quote on navy below. */
  .evening__frame {
    display: block;
    height: auto;
  }

  .evening__video {
    position: relative;
    display: block;
    height: auto;
    aspect-ratio: 1;
    object-position: 100% 50%;
  }

  .evening__frame::after {
    inset: 0 0 auto;
    aspect-ratio: 1;
    background: linear-gradient(to top, var(--navy) 0%, rgba(15, 23, 42, 0) 32%);
  }

  .evening__quote {
    padding-block: 0.5rem 3rem;
  }

  .evening__toggle {
    top: var(--gutter);
    bottom: auto;
  }

  .switch__head {
    grid-template-columns: 1fr;
  }

  .ones__photo {
    margin-inline: var(--gutter);
    aspect-ratio: 4 / 3;
  }

  .ones__figure {
    border-radius: 18px;
  }

  /* Forms are all thumbs here: taller fields and a box that is easy to hit. */
  .field input,
  .field select {
    padding-block: 0.8125rem;
  }

  .consent {
    font-size: 0.875rem;
  }

  .consent input {
    width: 1.375rem;
    height: 1.375rem;
  }

  .field__hint,
  .field__error,
  .step__today,
  .step__start {
    font-size: 0.875rem;
  }

  .photo-tag {
    font-size: 0.8125rem;
  }

  /* The sides of the account stack, so the T loses its upright. */
  .account {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 2rem;
  }

  .account::after {
    display: none;
  }

  .account__side,
  .account__side ul {
    grid-row: auto;
    grid-template-rows: none;
  }

  .account__side:first-child,
  .account__side + .account__side {
    padding-inline: 0;
  }

  .account__side:last-child h3 {
    padding-top: 0;
  }

  .fit__foot .btn,
  .switch__foot .btn {
    width: 100%;
  }

  .switch__figure {
    aspect-ratio: 4 / 3;
  }

  .switch__figure img {
    object-position: 88% 50%;
  }

  .switch__count {
    gap: 0.75rem;
    padding: 0.5rem 0.875rem;
  }

  /* Each month keeps its own short ruler above its step. */
  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    height: auto;
    min-height: 0;
  }

  .hero__frame {
    height: auto;
    padding-top: var(--header-h);
  }

  .hero__media {
    position: relative;
    aspect-ratio: 16 / 10;
  }

  .hero__media img {
    object-position: 50% 0;
  }

  .hero__media::after {
    background: linear-gradient(to top, var(--navy) 0%, rgba(15, 23, 42, 0) 38%);
  }

  .hero__body {
    position: static;
    padding: 0.75rem var(--gutter) 2.5rem;
  }

  .announce__more {
    display: none;
  }

  .strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 0;
  }

  .strip__viewport {
    width: 100%;
  }

  .date {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 2.5rem;
  }

  .letter__people {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .letter__slot:nth-child(2) {
    margin-top: 0;
  }

  .cases__track {
    align-items: flex-start;
  }

  .draft-chip span {
    display: none;
  }
}

@media (max-width: 760px) and (max-height: 560px) {
  :root {
    --header-h: 68px;
  }
}

/* The narrowest phones need every pixel: logo, button and menu share 288px. */
@media (max-width: 359px) {
  :root[data-logo="2"] {
    --logo-w: 100px;
  }

  .bar__end .btn--small {
    padding-right: 0.875rem;
  }

  .bar__end .btn__dot {
    display: none;
  }
}

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

  .cases__track,
  .case,
  .case__hit,
  .case__text,
  .qa__panel,
  .ledger__spotlight,
  .mark,
  .site-menu,
  .menu-btn span {
    transition: none;
  }
}
