/* ==========================================================================
   Atlanta Digital Marketing Group
   Black, white and one gold line.

   Layers, lowest priority first:
     reset       browser defaults evened out
     tokens      colors, type, spacing and the skyline's geometry
     base        element styles
     components  pieces reused across sections (buttons, chips, header...)
     sections    one block per page section, in page order
     motion      everything that moves, so it can be switched off in one place

   Fonts: Montserrat for titles, Lato for subheadings and small labels, Roboto
   for body text. All three are under the SIL Open Font License 1.1, and each
   licence sits beside its font in ../fonts/.
   ========================================================================== */

@layer reset, tokens, base, components, sections, motion;

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-latin-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/fonts/Roboto-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  ol,
  dl,
  dd,
  figure,
  fieldset,
  legend,
  blockquote {
    margin: 0;
    padding: 0;
  }

  ul,
  ol {
    list-style: none;
  }

  fieldset {
    border: 0;
    min-width: 0;
  }

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

  img {
    height: auto;
  }

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

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

  [hidden] {
    display: none !important;
  }
}

@layer tokens {
  :root {
    --ink: #0b0b0d;
    --ink-2: #141417;
    --ink-3: #1f1f24;
    --paper: #f6f3ec;
    --paper-2: #ebe6d9;
    --gold: #fdd136;
    --gold-deep: #e6b800;

    --on-ink: var(--paper);
    --on-ink-muted: #aeaaa0;
    --on-paper: var(--ink);
    --on-paper-muted: #5b584f;
    --rule-on-ink: rgb(246 243 236 / 0.16);
    --rule-on-paper: rgb(11 11 13 / 0.16);

    /* Titles, subheadings and small labels, body text. */
    --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-subhead: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-text: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

    --gutter: clamp(1.25rem, 4.5vw, 4rem);
    --shell-max: 84rem;
    --shell: min(100% - (2 * var(--gutter)), var(--shell-max));
    --header-height: 4.25rem;
    --section-space: clamp(4.5rem, 10vw, 9rem);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* ---- Skyline geometry ------------------------------------------------
       The drawing is 1820 units wide and is sized so the Midtown towers stay
       a readable height at every viewport:
         phones    about 1.1 px per unit, with the tower cluster centred
         tall      on portrait tablets the drawing grows with the height
                   (255svh), so it fills the sky instead of leaving a gap
         desktops  the right-hand 960 units fill the width (190vw), capped by
                   viewport height so the towers never crowd the headline

       --skyline-u      one drawing unit as a length, for spacing things
                        against the drawing
       --skyline-shift  how far the drawing slides right so the tower cluster,
                        whose middle is 367 units from the right edge, sits
                        mid-screen on narrow viewports; zero once the towers
                        fit on the right-hand side
       --skyline-room   how far right of centre the cluster sits; sections use
                        it to tuck the drawing up beside their copy only as far
                        as the towers are clear of that copy */
    --skyline-w: max(100vw, min(125rem, 551vw), min(190vw, 310vh), min(551vw, 255vh));
    --skyline-u: calc(var(--skyline-w) / 1820);
    --skyline-shift: max(0px, calc((var(--skyline-u) * 367) - 50vw));
    --skyline-room: max(0px, calc(50vw - (var(--skyline-u) * 367)));
  }

  @supports (height: 1svh) {
    :root {
      --skyline-w: max(100vw, min(125rem, 551vw), min(190vw, 310svh), min(551vw, 255svh));
    }
  }

  @media (min-width: 48rem) {
    :root {
      --header-height: 4.75rem;
    }
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
    background: var(--ink);
  }

  body {
    min-height: 100vh;
    font-family: var(--font-text);
    font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
    line-height: 1.55;
    color: var(--on-paper);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overflow-x: clip;
  }

  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.035em;
    text-wrap: balance;
  }

  h3 {
    font-family: var(--font-subhead);
    letter-spacing: -0.01em;
  }

  p {
    text-wrap: pretty;
  }

  a {
    color: inherit;
    text-underline-offset: 0.22em;
    text-decoration-thickness: 0.08em;
  }

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

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

  mark {
    background: none;
    color: inherit;
  }
}

@layer components {
  .shell {
    width: var(--shell);
    margin-inline: auto;
  }

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

  .skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    background: var(--gold);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    transform: translateY(-200%);
  }

  .skip-link:focus-visible {
    transform: none;
    outline-color: var(--paper);
  }

  /* ---- Small labels ----------------------------------------------------- */

  .eyebrow {
    font-family: var(--font-subhead);
    font-size: 0.6875rem;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted, var(--on-ink-muted));
  }

  /* The short gold rule in front of every label. It is inline, so a label
     that wraps on a narrow screen still wraps like ordinary text. */
  .eyebrow::before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    width: 1.75rem;
    height: 2px;
    margin: -0.15em 0.75rem 0 0;
    background: var(--gold);
  }

  @media (min-width: 40rem) {
    .eyebrow {
      font-size: 0.75rem;
      letter-spacing: 0.14em;
    }
  }

  .eyebrow [aria-hidden="true"] {
    color: var(--gold);
  }

  .nowrap {
    white-space: nowrap;
  }

  /* ---- Section headings ------------------------------------------------- */

  .title {
    margin-top: 1.1rem;
    font-size: clamp(2.5rem, 5.7vw, 5.25rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    word-spacing: 0.04em;
  }

  /* A highlighter stroke behind the word that matters. */
  .title mark,
  .lost__title mark,
  .builder__name mark {
    padding-inline: 0.08em;
    margin-inline: -0.08em;
    color: var(--ink);
    background: linear-gradient(var(--gold) 0 0) no-repeat 0 62% / 100% 78%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  .lede {
    margin-top: 1.4rem;
    max-width: 36rem;
    font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
    line-height: 1.45;
    color: var(--muted);
  }

  /* ---- Logo: the ATL | DMG split box ------------------------------------ */

  .logo {
    --logo-fg: var(--paper);
    --logo-bg: var(--ink);
    display: inline-flex;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1;
    letter-spacing: 0.06em;
    text-decoration: none;
    border: 2px solid var(--logo-fg);
  }

  .logo span {
    padding: 0.42em 0.5em 0.4em 0.56em;
  }

  .logo__atl {
    color: var(--logo-fg);
    background: var(--logo-bg);
  }

  .logo__dmg {
    color: var(--logo-bg);
    background: var(--logo-fg);
  }

  /* ---- Buttons and links ------------------------------------------------ */

  .button {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.95em 1.5em;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.1;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, transform 0.3s var(--ease-out);
  }

  .button [aria-hidden] {
    transition: transform 0.3s var(--ease-out);
  }

  .button:hover {
    background: #fff;
  }

  .button:hover [aria-hidden] {
    transform: translateX(0.25em);
  }

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

  .button--small {
    padding: 0.7em 1.15em;
    font-size: 0.9375rem;
    white-space: nowrap;
  }

  /* The narrowest phones: keep the header button on one line beside the logo. */
  @media (max-width: 22.49rem) {
    .button--small {
      padding: 0.65em 0.9em;
      font-size: 0.8125rem;
    }
  }

  .button--ink {
    background: var(--ink);
    color: var(--paper);
  }

  .button--ink:hover {
    background: #2b2b31;
  }

  .button--large {
    padding: 1em 1.5em;
    font-size: clamp(1.125rem, 0.9rem + 1.1vw, 1.75rem);
  }

  .button__label {
    overflow-wrap: anywhere;
  }

  .text-link {
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(currentColor 0 0) no-repeat 0 100% / 100% 2px;
    padding-bottom: 0.2em;
    transition: background-size 0.4s var(--ease-out);
  }

  .text-link:hover {
    background-size: 0 2px;
    background-position: 100% 100%;
  }

  /* ---- Header ----------------------------------------------------------- */

  .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-height);
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    color: var(--paper);
    transition: background-color 0.3s, box-shadow 0.3s;
  }

  /* Solid until the script takes over, so the links stay readable over the
     light sections when it never runs; then clear at the top of the page. */
  .site-header:not([data-scroll-aware]),
  .site-header[data-scrolled] {
    background: rgb(11 11 13 / 0.9);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 1px 0 var(--rule-on-ink);
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2.25rem);
    font-size: 0.9375rem;
    font-weight: 500;
  }

  .site-nav__link {
    display: none;
    text-decoration: none;
    opacity: 0.82;
    transition: opacity 0.2s;
  }

  .site-nav__link:hover {
    opacity: 1;
  }

  @media (min-width: 44rem) {
    .site-nav__link {
      display: inline;
    }
  }

  /* ---- Page sections ---------------------------------------------------- */

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

  .section--paper {
    --muted: var(--on-paper-muted);
    --rule: var(--rule-on-paper);
    --focus: var(--ink);
    background: var(--paper);
    color: var(--on-paper);
  }

  .section--ink {
    --muted: var(--on-ink-muted);
    --rule: var(--rule-on-ink);
    --focus: var(--gold);
    background: var(--ink);
    color: var(--on-ink);
  }

  /* Intro on the left, content on the right. */
  .split {
    display: grid;
    gap: clamp(2.5rem, 6vw, 6rem);
  }

  @media (min-width: 62rem) {
    .split {
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
      align-items: start;
    }
  }

  /* ---- Chips: checkboxes dressed as pills ------------------------------- */

  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .chips + .chips {
    margin-top: 1.75rem;
  }

  .chips__legend {
    float: left;
    width: 100%;
    margin-bottom: 0.9rem;
    font-family: var(--font-subhead);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .chip {
    position: relative;
    display: inline-flex;
    border-radius: 999px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    /* Rounded like the pill (and the label around it), so a tap just past a pill's rounded end
       reaches the chip beside it. A native checkbox ignores border-radius, so its built-in look
       is switched off (it is invisible anyway). */
    appearance: none;
    border-radius: 999px;
    opacity: 0;
    cursor: pointer;
  }

  .chip span {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.62em 1.05em;
    border: 1.5px solid var(--rule);
    border-radius: 999px;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.2s, border-color 0.2s;
  }

  /* The tick grows in from nothing so unchecked chips stay compact. */
  .chip span::before {
    content: "";
    width: 0;
    height: 0.65em;
    background: currentColor;
    clip-path: polygon(8% 52%, 0 64%, 38% 100%, 100% 18%, 88% 8%, 37% 74%);
    transition: width 0.25s var(--ease-out);
  }

  .chip:hover span {
    border-color: currentColor;
  }

  /* Each chip leans its own way (--tilt, -1 to 1), and the lean grows with --chaos: how strained
     the pile is, from 0 to the script's PILE_FEEL.peak (1.5) and climbing faster with each pick,
     which the script sets on the picker. One pick is a polite tilt; all of them is a pile of
     labels slipping off the page. Without the script every chip keeps the polite tilt. The
     script also gives each chip a --drop, how far it sinks as the pile grows. The whole label
     turns, not just its pill, so the checkbox laid over it turns too and a tap always lands on
     the chip it looks like it lands on. */
  .chip {
    --tilt: -1;
  }

  .chip:nth-child(even) {
    --tilt: 0.8;
  }

  .chip:has(input:checked) {
    --lean: calc(1 + var(--chaos, 0) * 6);
    transform:
      translateY(calc(var(--drop, 0) * var(--chaos, 0) * 0.45rem))
      rotate(calc(var(--tilt) * var(--lean) * 1.5deg))
      scale(calc(1 + var(--chaos, 0) * 0.06));
  }

  .chip input:checked + span {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
  }

  /* Browsers without :has() skip the rule above, so they keep the polite tilt on the pill. */
  @supports not selector(:has(*)) {
    .chip input:checked + span {
      transform: rotate(calc(var(--tilt) * 1.5deg));
    }
  }

  .chip input:checked + span::before {
    width: 0.8em;
  }

  /* A keyboard-focused chip sits above its leaning neighbours so none of them covers its focus
     ring. Only keyboard focus: some browsers focus a checkbox on click, and lifting that would
     change which chip an overlapping tap lands on. */
  .chip:has(input:focus-visible) {
    z-index: 1;
  }

  .chip input:focus-visible + span {
    outline: 3px solid var(--focus, var(--ink));
    outline-offset: 3px;
  }
}

@layer sections {
  /* ==== Hero ============================================================= */

  .hero,
  .lost {
    --muted: var(--on-ink-muted);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: max(100vh, 38rem);
    overflow: hidden;
    overflow: clip;
    background: var(--ink);
    color: var(--on-ink);
  }

  @supports (height: 1svh) {
    .hero,
    .lost {
      min-height: max(100svh, 38rem);
    }
  }

  .hero__sky {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(1px 1px at 12% 22%, rgb(255 255 255 / 0.7) 50%, transparent 51%),
      radial-gradient(1px 1px at 31% 12%, rgb(255 255 255 / 0.5) 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 47% 30%, rgb(255 255 255 / 0.55) 50%, transparent 51%),
      radial-gradient(1px 1px at 63% 9%, rgb(255 255 255 / 0.6) 50%, transparent 51%),
      radial-gradient(1px 1px at 78% 26%, rgb(255 255 255 / 0.45) 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 90% 14%, rgb(255 255 255 / 0.6) 50%, transparent 51%),
      radial-gradient(1px 1px at 22% 40%, rgb(255 255 255 / 0.35) 50%, transparent 51%),
      radial-gradient(1px 1px at 71% 44%, rgb(255 255 255 / 0.35) 50%, transparent 51%),
      radial-gradient(1px 1px at 55% 52%, rgb(255 255 255 / 0.3) 50%, transparent 51%),
      radial-gradient(1px 1px at 86% 48%, rgb(255 255 255 / 0.4) 50%, transparent 51%),
      var(--ink);
  }

  .hero__copy,
  .lost__copy {
    position: relative;
    z-index: 2;
    padding-top: calc(var(--header-height) + clamp(1.5rem, 4.5vh, 3.5rem));
  }

  /* Montserrat is wide: on phones "marketing." (5.6em) sets the limit.
     The top margin clears the highlight, which rises 0.12em above the line,
     so the label above sits as far from it as from the header. */
  .hero__title {
    margin-top: calc(1.6rem + 0.12em);
    font-size: clamp(2.75rem, 15.2vw, 5.9rem);
    font-weight: 800;
    line-height: 0.86;
    letter-spacing: -0.03em;
  }

  /* Each line is a mask, so its text can rise into view from below. */
  .hero__title .line {
    display: block;
    overflow: hidden;
    padding: 0.14em 0.12em;
    margin: -0.14em -0.12em;
  }

  .hero__title .line > span {
    display: inline-block;
  }

  /* The title's tight line height leaves the mark no room above the letters,
     so it borrows some from the line's mask: the highlight stands well clear
     of the tallest letters and stops just under the baseline. */
  .hero__title mark {
    --mark-h: 0.97em;
    display: inline-block;
    color: var(--ink);
    padding: 0.12em 0.1em 0;
    margin: -0.12em -0.1em 0;
    background: linear-gradient(var(--gold) 0 0) no-repeat 0 0 / 100% var(--mark-h);
  }

  @media (min-width: 40rem) {
    /* Sized by whichever runs out first, width or height, so the headline and
       the skyline both fit on short laptop screens. */
    .hero__title {
      font-size: clamp(4.25rem, min(11.6vw, 17.5vh), 10.75rem);
    }

    .hero__title .line {
      display: inline-block;
      vertical-align: top;
    }

    .hero__title .line--last {
      display: block;
    }
  }

  .hero__lede {
    margin-top: clamp(1.25rem, 3vh, 2.1rem);
    max-width: 34rem;
    font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
    line-height: 1.45;
    color: var(--on-ink-muted);
  }

  .hero__actions {
    margin-top: clamp(1.5rem, 3.4vh, 2.1rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.1rem 1.75rem;
  }

  /* On wide screens the lede tucks in beside the headline's shorter second
     line: it starts just past "marketing." (5.56em) and just below the
     highlight on the first line (whose bottom sits 1em above the headline's
     bottom), so it can never run into either. Both are worked out from the
     headline's size. Narrower screens stack the lede under the headline. */
  @media (min-width: 72rem) {
    .hero__copy {
      --hero-lede-w: 21rem;
      --title-size: clamp(4.5rem, min((min(100vw - 2 * var(--gutter), var(--shell-max)) - var(--hero-lede-w) - 2rem) / 7.5, 17.5vh), 10.75rem);
      display: grid;
      grid-template-columns: calc(5.56 * var(--title-size)) minmax(0, 1fr);
      column-gap: clamp(2rem, 3vw, 3.5rem);
      align-content: start;
    }

    .hero__title {
      font-size: var(--title-size);
    }

    .hero__copy > * {
      grid-column: 1 / -1;
    }

    .hero__title {
      grid-row: 2;
    }

    .hero__lede,
    .hero__actions {
      grid-row: 3;
    }

    .hero__lede {
      grid-column: 2;
      align-self: start;
      max-width: 30rem;
      margin: calc(2.6rem - var(--title-size)) 0 0;
    }

    .hero__actions {
      grid-column: 1;
      align-self: start;
    }
  }

  @media (min-width: 90rem) {
    .hero__copy {
      --hero-lede-w: 25rem;
    }
  }

  /* Once the towers sit to the right of the copy the drawing slides up beside
     it, by up to 55 units, so the whole hero fits on one screen. */
  .hero__skyline {
    position: relative;
    z-index: 1;
    margin-top: calc(1.25rem - min(var(--skyline-room), (var(--skyline-u) * 55) + 1.25rem));
  }

  .hero__caption {
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.5rem;
    padding-bottom: clamp(0.7rem, 1.6vw, 1.15rem);
    font-family: var(--font-subhead);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-ink-muted);
  }

  .hero__coords {
    display: none;
  }

  .hero__coords span {
    color: var(--gold);
    margin-inline: 0.35em;
  }

  @media (min-width: 40rem) {
    .hero__coords {
      display: inline;
    }
  }

  .hero__redraw {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.35em 0;
    letter-spacing: inherit;
    text-transform: inherit;
    color: var(--paper);
    opacity: 0.75;
    transition: opacity 0.2s, color 0.2s;
  }

  .hero__redraw:hover {
    opacity: 1;
    color: var(--gold);
  }

  .hero__redraw svg {
    transition: transform 0.6s var(--ease-out);
  }

  .hero__redraw:hover svg {
    transform: rotate(360deg);
  }

  /* ---- Phones: the skyline comes first ---------------------------------
     On a phone the copy alone fills the screen, which would push the drawing
     below the fold where nobody sees it being drawn. So the hero's pieces are
     re-ordered: label, headline, skyline, caption, then the lede and buttons.
     The header keeps the audit button on screen the whole time. */
  @media (max-width: 39.99rem) {
    .hero {
      display: flex;
      flex-direction: column;
      padding-bottom: 3rem;
    }

    /* Dissolve the copy wrapper so its children can be ordered around the
       skyline; each child then carries the page gutters itself. */
    .hero__copy {
      display: contents;
    }

    .hero__copy > * {
      position: relative;
      z-index: 2;
      width: var(--shell);
      margin-inline: auto;
    }

    .hero .eyebrow {
      margin-top: clamp(5.5rem, 13vh, 10rem);
    }

    /* Cut off along the bottom edge only, so the glow behind the towers stops
       at the ground instead of shining through underneath it, while its top
       still fades out softly into the sky. */
    .hero__skyline {
      order: 1;
      clip-path: inset(-20rem 0 0);
    }

    /* The caption sits on the dark ground at the foot of the drawing. */
    .hero__caption {
      order: 2;
      position: relative;
      inset: auto;
      margin-top: -2.5rem;
      padding-bottom: 0;
    }

    .hero__lede {
      order: 3;
      margin-top: 1.75rem;
    }

    .hero__actions {
      order: 4;
    }
  }

  /* ==== Skyline ========================================================== */

  .skyline {
    /* How long the pen would take to draw the whole line. The visible part
       takes less, because --trace-skip jumps the part that is off-screen. */
    --trace-dur: 6.8s;
    --trace-delay: 0.9s;
    --trace-skip: 0.59;
    display: block;
    width: var(--skyline-w);
    max-width: none;
    height: auto;
    margin-left: calc(100% - var(--skyline-w) + var(--skyline-shift));
    overflow: visible;
  }

  /* The script replaces these with an exact value for the current viewport.
     They are the no-script estimates of where the line enters the screen. */
  @media (min-width: 48rem) {
    .skyline {
      --trace-skip: 0.45;
    }
  }

  @media (min-width: 64rem) {
    .skyline {
      --trace-skip: 0.35;
    }
  }

  .skyline__trace {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
  }

  .skyline__mass {
    fill: var(--ink);
  }

  .skyline__glow {
    pointer-events: none;
  }

  /* The pen glow and the haze fade gold to nothing; the markup sets only how much. */
  .skyline stop {
    stop-color: var(--gold);
  }

  .skyline__orb {
    fill: none;
    stroke: var(--gold);
    stroke-opacity: 0.6;
    stroke-width: 1;
  }

  .skyline__detail {
    fill: none;
    stroke: var(--paper);
    stroke-opacity: 0.3;
    stroke-width: 0.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .skyline__windows,
  .skyline__light {
    fill: var(--gold);
  }

  .skyline__windows {
    fill-opacity: 0.88;
  }

  .skyline__beacon {
    fill: #fff;
  }

  .skyline__pen {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
  }

  .skyline__pen[data-on] {
    opacity: 1;
    transition-duration: 0.15s;
  }

  @media (min-width: 64rem) {
    .skyline__trace {
      stroke-width: 1.7;
    }

    .skyline__detail {
      stroke-width: 0.75;
    }
  }

  /* The crane is only worth showing whole. When the frame is cropped to the
     tower cluster, the left edge of the screen can slice through the crane and
     leave a stray dash, so in that case the crane drops out of the clipped
     area. It fits with room to spare while the drawing is at most 3.48
     screens wide; past that, the offset below jumps from zero to its maximum. */
  [data-segment="trees-crane"] {
    translate: 0 clamp(0px, calc((var(--skyline-w) - 348vw) * 4000), 4000px);
  }

  /* ---- Silhouette variant: solid city against a gold sky ----------------- */

  .skyline--silhouette .skyline__detail {
    stroke: var(--ink);
    stroke-opacity: 1;
    stroke-width: 1.1;
  }

  .skyline--silhouette .skyline__sun {
    fill: #fff6cf;
  }

  /* ==== Gut check ======================================================== */

  .feelings__reply {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--rule);
    display: grid;
    gap: 1.25rem;
    justify-items: start;
  }

  .feelings__result {
    min-height: 2.9em;
    max-width: 30rem;
    font-family: var(--font-subhead);
    font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  /* Shown after the button is used, for visitors whose browser has no email app to open. */
  .feelings__fallback {
    max-width: 30rem;
    font-size: 0.9375rem;
    color: var(--muted);
  }

  .feelings__fallback button.text-link {
    font: inherit;
    font-weight: 600;
    color: inherit;
    border: 0;
    padding: 0 0 0.2em;
    cursor: pointer;
  }

  /* ==== Lean: the idea =================================================== */

  .lean {
    background: var(--paper-2);
  }

  .statement {
    margin-top: 1.5rem;
    max-width: 68rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.1vw, 4.75rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
  }

  .principles {
    margin-top: clamp(3rem, 7vw, 6rem);
    display: grid;
    gap: 2.25rem clamp(1.5rem, 3vw, 3rem);
  }

  @media (min-width: 40rem) {
    .principles {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 68rem) {
    .principles {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  .principle {
    padding-top: 1.1rem;
    border-top: 2px solid var(--ink);
    color: var(--muted);
  }

  .principle__index {
    font-family: var(--font-subhead);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
  }

  .principle__title {
    margin: 0.9rem 0 0.6rem;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    letter-spacing: -0.03em;
    color: var(--on-paper);
  }

  /* ==== Services ========================================================= */

  .services__list {
    margin-top: clamp(2.5rem, 6vw, 5rem);
    border-top: 1px solid var(--rule);
  }

  .service {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.75rem 1rem;
    align-items: baseline;
    padding-block: clamp(1.6rem, 3.2vw, 2.9rem);
    border-bottom: 1px solid var(--rule);
  }

  .service__index {
    font-family: var(--font-subhead);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    color: var(--muted);
  }

  .service__title {
    font-size: clamp(2rem, 4.4vw, 3.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
  }

  /* A highlighter swipe that grows under the title when the row is hovered. */
  .service__title span {
    background: linear-gradient(var(--gold) 0 0) no-repeat 0 88% / 0% 36%;
    transition: background-size 0.55s var(--ease-out);
  }

  .service:hover .service__title span {
    background-size: 100% 36%;
  }

  .service__text {
    grid-column: 2;
    max-width: 38rem;
    color: var(--muted);
  }

  @media (min-width: 56rem) {
    .service {
      grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.15fr);
      column-gap: 2rem;
    }

    .service__text {
      grid-column: 3;
    }
  }

  /* ==== Approach ========================================================= */

  .approach__grid {
    display: grid;
    gap: clamp(3rem, 7vw, 6rem);
  }

  @media (min-width: 66rem) {
    .approach__grid {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
      align-items: start;
    }

    .approach__demo {
      position: sticky;
      top: calc(var(--header-height) + 1.5rem);
    }
  }

  .approach .title mark {
    white-space: nowrap;
  }

  .steps {
    position: relative;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    display: grid;
    gap: 2.25rem;
  }

  /* The gold line that threads the four steps together. */
  .steps::before {
    content: "";
    position: absolute;
    left: calc(1.375rem - 1px);
    top: 1.4rem;
    bottom: 3rem;
    width: 2px;
    background: var(--gold);
    opacity: 0.55;
    transform-origin: top;
  }

  .step {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    column-gap: 1.25rem;
    row-gap: 0.4rem;
    color: var(--muted);
  }

  .step__index {
    position: relative;
    z-index: 1;
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: var(--ink);
    font-family: var(--font-subhead);
    font-size: 0.9375rem;
    color: var(--gold);
  }

  .step__title {
    padding-top: 0.45rem;
    font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
    letter-spacing: -0.03em;
    color: var(--on-ink);
  }

  .step p {
    grid-column: 2;
    max-width: 30rem;
  }

  /* ---- The backlog demo -------------------------------------------------- */

  .board {
    --cycle: 4.2s;
    padding: clamp(1rem, 2.2vw, 1.5rem);
    border: 1px solid var(--rule-on-ink);
    border-radius: 1.25rem;
    background: var(--ink-2);
  }

  .board__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2rem;
    margin-bottom: 1rem;
  }

  .board__name,
  .board__toggle {
    font-family: var(--font-subhead);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-ink-muted);
  }

  .board__name::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.6rem;
    border-radius: 50%;
    background: var(--gold);
  }

  .board__toggle {
    padding: 0.5em 0.9em;
    border: 1px solid var(--rule-on-ink);
    border-radius: 999px;
    transition: color 0.2s, border-color 0.2s;
  }

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

  .board__columns {
    display: grid;
    gap: 0.75rem;
  }

  @media (min-width: 34rem) {
    .board__columns {
      grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
      grid-template-rows: auto 1fr;
    }

    .board__column--backlog {
      grid-row: span 2;
    }
  }

  .board__column {
    padding: 0.8rem;
    border-radius: 0.9rem;
    background: var(--ink);
  }

  .board__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-text);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--on-ink);
  }

  .board__heading span {
    font-family: var(--font-subhead);
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-ink-muted);
  }

  .board__list {
    display: grid;
    gap: 0.5rem;
    align-content: start;
    counter-reset: rank;
  }

  /* Room for the fullest state of each column, so the board never changes
     height (and nudges the page) as cards move through it. */
  .board__list[data-board-list="backlog"] {
    min-height: 14rem;
  }

  .board__list[data-board-list="doing"] {
    min-height: 3.9rem;
  }

  .board__list[data-board-list="done"] {
    min-height: 7.3rem;
  }

  .card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.9rem;
    padding: 0.5rem 0.55rem 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    background: var(--ink-3);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--on-ink);
    overflow: hidden;
  }

  .card::before {
    counter-increment: rank;
    content: counter(rank);
    font-family: var(--font-subhead);
    font-size: 0.75rem;
    color: var(--gold);
  }

  .card__moves {
    display: flex;
    gap: 0.15rem;
  }

  .card__move {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4rem;
    color: var(--on-ink-muted);
    transition: background-color 0.15s, color 0.15s;
  }

  .card__move:hover:not(:disabled) {
    background: var(--gold);
    color: var(--ink);
  }

  .card__move:disabled {
    opacity: 0.25;
    cursor: default;
  }

  .card__move svg {
    width: 0.75rem;
    height: 0.75rem;
  }

  /* Cards can be dragged by mouse anywhere; touch uses the arrows, so the
     page still scrolls when a finger lands on the board. */
  .board[data-ready] [data-board-list="backlog"] .card {
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
  }

  .card[data-dragging] {
    z-index: 2;
    border-color: var(--gold);
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.5);
    cursor: grabbing;
  }

  /* In progress: a gold edge and a bar that fills while the work happens. */
  [data-board-list="doing"] .card {
    border-color: var(--gold);
  }

  [data-board-list="doing"] .card::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--gold);
  }

  [data-board-list="doing"] .card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0.6);
    transform-origin: left;
  }

  /* Done: ticked and quiet. */
  [data-board-list="done"] .card {
    color: var(--on-ink-muted);
  }

  [data-board-list="done"] .card::before {
    content: "";
    width: 0.8rem;
    height: 0.65rem;
    background: var(--gold);
    clip-path: polygon(8% 52%, 0 64%, 38% 100%, 100% 18%, 88% 8%, 37% 74%);
  }

  .board__hint {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--on-ink-muted);
  }

  /* ==== Who we work with ================================================= */

  .audiences__grid {
    margin-top: clamp(2.5rem, 6vw, 5rem);
    display: grid;
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  @media (min-width: 48rem) {
    .audiences__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .audience {
    --focus: var(--gold);
    padding: clamp(1.5rem, 3.4vw, 3rem);
    border-radius: 1.25rem;
    background: var(--ink);
    color: var(--on-ink-muted);
  }

  /* Each card opens with its own gold line: a steep climb, a steady one. */
  .audience__line {
    width: 100%;
    height: auto;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    overflow: visible;
  }

  .audience__line path {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .audience__line circle {
    fill: var(--gold);
  }

  .audience__title {
    margin-bottom: 1rem;
    font-size: clamp(2.25rem, 4.6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--on-ink);
  }

  .audience p {
    max-width: 30rem;
    font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  }

  /* ==== About ============================================================ */

  .about {
    padding-top: 0;
  }

  .about__grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
  }

  @media (min-width: 56rem) {
    .about__grid {
      grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }
  }

  /* The portrait sits inside a ring of type, echoing the round logo. */
  .about__portrait {
    position: relative;
    width: min(100%, 23rem);
    aspect-ratio: 1;
    margin-inline: auto;
  }

  .about__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  /* The text turns, not the SVG box: a rotating square would poke outside the
     column at 45 degrees and make narrow screens scroll sideways. */
  .about__ring text {
    font-family: var(--font-subhead);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    fill: var(--ink);
    transform-box: view-box;
    transform-origin: 100px 100px;
  }

  .about__photo {
    position: absolute;
    inset: 15%;
    width: 70%;
    height: 70%;
    border: 5px solid var(--gold);
    border-radius: 50%;
    object-fit: cover;
    background: var(--paper-2);
  }

  .about__body > p:not(.eyebrow, .lede) {
    margin-top: 1.1rem;
    max-width: 36rem;
    color: var(--muted);
  }

  .facts {
    margin-block: 2rem;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--rule);
  }

  .facts div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1rem;
    padding-block: 0.8rem;
    border-bottom: 1px solid var(--rule);
  }

  .facts dt {
    font-family: var(--font-subhead);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    align-self: center;
  }

  .facts dd {
    font-weight: 600;
  }

  /* The second person on the team, smaller than Katie's portrait. */
  .builder {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: clamp(6.5rem, 22vw, 8.5rem) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 1.75rem);
    align-items: center;
    max-width: 36rem;
  }

  .builder__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border: 3px solid var(--gold);
    border-radius: 50%;
    object-fit: cover;
    background: var(--paper-2);
  }

  .builder__name {
    font-size: clamp(2rem, 1.6rem + 1.4vw, 2.625rem);
    font-weight: 900;
  }

  .builder__body p {
    margin-block: 0.6rem 0.9rem;
    color: var(--muted);
  }

  /* ==== Audit call to action ============================================= */

  .cta {
    --muted: rgb(11 11 13 / 0.72);
    --focus: var(--ink);
    position: relative;
    overflow: hidden;
    overflow: clip;
    padding-top: var(--section-space);
    background: var(--gold);
    color: var(--ink);
  }

  .cta .eyebrow::before {
    background: var(--ink);
  }

  .cta__inner {
    position: relative;
    z-index: 1;
  }

  .cta__title {
    margin-top: 1rem;
    font-size: clamp(2.75rem, 9.2vw, 11rem);
    font-weight: 800;
    line-height: 0.86;
    letter-spacing: -0.035em;
    word-spacing: 0.04em;
  }

  .cta__lede {
    margin-block: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 38rem;
    font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
    line-height: 1.4;
  }

  .cta__note {
    margin-top: 1.25rem;
    font-size: 0.9375rem;
    color: var(--muted);
  }

  .cta__skyline {
    margin-top: calc(1.5rem - min(var(--skyline-room), (var(--skyline-u) * 40) + 1.5rem));
  }

  /* ==== Footer =========================================================== */

  .site-footer {
    --muted: var(--on-ink-muted);
    padding-block: clamp(3rem, 6vw, 5rem) 2rem;
    background: var(--ink);
    color: var(--on-ink);
  }

  .site-footer__grid {
    display: grid;
    gap: 2.5rem 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    align-self: start;
  }

  @media (min-width: 56rem) {
    .site-footer__grid {
      grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    }

    .site-footer__brand {
      grid-column: auto;
    }
  }

  .site-footer__roundel {
    flex: none;
    width: 4.5rem;
    height: 4.5rem;
  }

  .site-footer__tagline {
    max-width: 14rem;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.035em;
  }

  .site-footer__heading {
    margin-bottom: 1rem;
    font-family: var(--font-subhead);
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-ink-muted);
  }

  .site-footer__nav ul {
    display: grid;
    gap: 0.55rem;
    font-size: 1rem;
  }

  .site-footer__nav a {
    text-decoration: none;
    overflow-wrap: anywhere;
    background: linear-gradient(var(--gold) 0 0) no-repeat 0 100% / 0 2px;
    padding-bottom: 0.15em;
    transition: background-size 0.35s var(--ease-out);
  }

  .site-footer__nav a:hover {
    background-size: 100% 2px;
  }

  .site-footer__legal {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule-on-ink);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    font-size: 0.8125rem;
    color: var(--on-ink-muted);
  }

  /* ==== 404 ============================================================== */

  .lost__title {
    margin-top: 1.1rem;
    max-width: 17ch;
    font-size: clamp(2.75rem, 8vw, 7.5rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.03em;
    word-spacing: 0.04em;
  }

  .lost .hero__lede {
    margin-top: clamp(1.75rem, 4.5vh, 2.75rem);
  }
}

/* ==========================================================================
   Motion
   Everything above is the finished, still page. Movement is layered on only
   for people who have not asked their device to reduce it.
   ========================================================================== */

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

    /* Picking more chips would swing every picked chip at once. Keep them at the polite tilt. */
    .chip {
      --chaos: 0;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    /* ---- Gut-check chips -------------------------------------------------- */

    .chip {
      transition: transform 0.3s var(--ease-out);
    }

    /* The pill keeps its colour fade; the transform eases the fallback tilt in older browsers. */
    .chip span {
      transition: background-color 0.2s, border-color 0.2s, transform 0.3s var(--ease-out);
    }

    /* ---- Hero copy ------------------------------------------------------ */

    .hero__title .line > span {
      transform: translateY(108%);
      animation: rise 1s var(--ease-out) forwards;
    }

    .hero__title .line:nth-child(2) > span {
      animation-delay: 0.09s;
    }

    .hero__title .line:nth-child(3) > span {
      animation-delay: 0.18s;
    }

    .hero__title mark {
      color: var(--paper);
      background-size: 0% var(--mark-h);
      animation: highlight 0.7s var(--ease-in-out) 0.75s forwards;
    }

    .hero .eyebrow,
    .hero__lede,
    .hero__actions,
    .hero__caption {
      opacity: 0;
      animation: fade-up 0.9s var(--ease-out) 0.45s forwards;
    }

    .hero__lede {
      animation-delay: 0.6s;
    }

    .hero__actions {
      animation-delay: 0.75s;
    }

    .hero__caption {
      animation-delay: 1.4s;
    }

    /* ---- Skyline: the pen, then the lights ------------------------------ */

    /* pathLength="1" on the path makes the dash maths unit-free: a dash of 1
       is the whole line, and the offset is how much of it is still hidden. */
    .skyline__trace {
      stroke-dasharray: 1 2;
      stroke-dashoffset: calc(1.002 - var(--trace-skip));
      animation: trace calc((1 - var(--trace-skip)) * var(--trace-dur)) linear var(--trace-delay) forwards;
    }

    /* --at is how far along the line each building ends, set in the markup.
       The pen moves at a constant speed, so that is also when it gets there. */
    .skyline__reveal {
      opacity: 0;
      animation: fade 1s var(--ease-out) forwards;
      animation-delay: calc(var(--trace-delay) + ((var(--at) - var(--trace-skip)) * var(--trace-dur)));
    }

    .skyline__orb,
    .skyline__glow {
      opacity: 0;
      animation: fade 2.4s var(--ease-out) forwards;
      animation-delay: calc(var(--trace-delay) + ((1 - var(--trace-skip)) * var(--trace-dur)) - 0.6s);
    }

    .skyline__orb {
      animation-name: orb-rise;
    }

    .skyline__windows--1 {
      animation: twinkle 7s ease-in-out -2s infinite;
    }

    .skyline__windows--2 {
      animation: twinkle 9s ease-in-out -5s infinite;
    }

    .skyline__windows--3 {
      animation: twinkle 11s ease-in-out -1s infinite;
    }

    .skyline__beacon {
      animation: blink 2.6s steps(1, end) calc(var(--i, 0) * -0.9s) infinite;
    }

    /* Restarting: drop every skyline animation for one frame. */
    .skyline[data-resetting] * {
      animation: none !important;
    }

    /* Below the fold: the script holds the drawing until it scrolls into view. */
    .skyline[data-waiting] * {
      animation-play-state: paused !important;
    }

    /* ---- Scroll reveals -------------------------------------------------- */

    /* .reveal-ready is added by the script once it is watching, so content
       is never hidden from a visitor whose script failed to load. */
    .reveal-ready [data-reveal] {
      opacity: 0;
      transform: translateY(1.75rem);
      transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
      transition-delay: calc(var(--i, 0) * 90ms);
    }

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

    .reveal-ready [data-reveal] .title mark,
    .reveal-ready .builder[data-reveal] .builder__name mark {
      background-size: 0% 78%;
      transition: background-size 0.8s var(--ease-in-out) 0.35s;
    }

    .reveal-ready [data-reveal].is-in .title mark,
    .reveal-ready .builder[data-reveal].is-in .builder__name mark {
      background-size: 100% 78%;
    }

    .reveal-ready .section--ink [data-reveal] .title mark {
      color: var(--paper);
      transition: background-size 0.8s var(--ease-in-out) 0.35s, color 0.3s 0.6s;
    }

    .reveal-ready .section--ink [data-reveal].is-in .title mark {
      color: var(--ink);
    }

    /* ---- Who we work with ------------------------------------------------ */

    .reveal-ready .audience__line path {
      stroke-dasharray: 1 2;
      stroke-dashoffset: 1.002;
      transition: stroke-dashoffset 1.6s var(--ease-in-out) 0.25s;
    }

    .reveal-ready .audience.is-in .audience__line path {
      stroke-dashoffset: 0;
    }

    .reveal-ready .audience__line circle {
      opacity: 0;
      transition: opacity 0.4s 1.7s;
    }

    .reveal-ready .audience.is-in .audience__line circle {
      opacity: 1;
    }

    /* ---- About ----------------------------------------------------------- */

    .about__ring text {
      animation: spin 70s linear infinite;
    }

    /* ---- Backlog demo ---------------------------------------------------- */

    .board[data-ready] [data-board-list="doing"] .card::after {
      transform: scaleX(0);
      animation: work var(--cycle) linear forwards;
    }

    .board[data-paused] [data-board-list="doing"] .card::after {
      animation-play-state: paused;
    }

    .card[data-entering] {
      animation: card-in 0.5s var(--ease-out) backwards;
    }
  }

  /* The demo's clock is the bar on the in-progress card. When motion is
     reduced the board starts paused, so the bar holds still until the visitor
     presses play. Pausing freezes the bar where it is rather than removing it,
     so playing again picks up where it stopped. */
  @media (prefers-reduced-motion: reduce) {
    .board[data-ready] [data-board-list="doing"] .card::after {
      transform: scaleX(0);
      animation: work var(--cycle) linear forwards;
    }

    .board[data-paused] [data-board-list="doing"] .card::after {
      animation-play-state: paused;
    }
  }

  /* ---- Tied to scroll position, where the browser can do that ------------ */

  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      /* The statement lights up word by word as it crosses the screen. */
      .statement {
        view-timeline: --statement block;
      }

      .statement__word {
        opacity: 0.16;
        animation: fade linear both;
        animation-timeline: --statement;
        animation-range: cover calc(16% + (var(--i) * 1.5%)) cover calc(26% + (var(--i) * 1.5%));
      }

      /* The line through the four steps draws itself as you read down. */
      .steps {
        view-timeline: --steps block;
      }

      .steps::before {
        animation: draw-down linear both;
        animation-timeline: --steps;
        animation-range: cover 12% cover 58%;
      }

      /* The ring behind the hero sinks as the page scrolls away... */
      .skyline__orb-drift {
        animation: sink linear both;
        animation-timeline: scroll(root);
        animation-range: 0 100vh;
      }

      /* ...and the sun behind the closing skyline sets as you arrive. */
      .cta {
        view-timeline: --cta block;
      }

      .skyline__sun-drift {
        animation: sunset linear both;
        animation-timeline: --cta;
        animation-range: entry 20% cover 70%;
      }
    }
  }

  @keyframes trace {
    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes fade {
    to {
      opacity: 1;
    }
  }

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

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes rise {
    to {
      transform: none;
    }
  }

  @keyframes highlight {
    to {
      color: var(--ink);
      background-size: 100% var(--mark-h);
    }
  }

  @keyframes orb-rise {
    from {
      opacity: 0;
      transform: translateY(46px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes twinkle {
    0%,
    100% {
      opacity: 1;
    }

    42% {
      opacity: 0.2;
    }

    58% {
      opacity: 0.9;
    }
  }

  @keyframes blink {
    0%,
    100% {
      opacity: 1;
    }

    55% {
      opacity: 0.12;
    }
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes work {
    to {
      transform: scaleX(1);
    }
  }

  @keyframes card-in {
    from {
      opacity: 0;
      transform: translateY(0.6rem) scale(0.97);
    }
  }

  @keyframes draw-down {
    from {
      transform: scaleY(0);
    }
  }

  @keyframes sink {
    to {
      transform: translateY(54px);
    }
  }

  @keyframes sunset {
    from {
      transform: translateY(-58px);
    }

    to {
      transform: translateY(34px);
    }
  }
}
