/* =============================================================
   AFFAF PRINTERS | COMPONENTS
   Logo, header, navigation, footer, buttons, cards, icon tiles,
   forms, floating WhatsApp button.
   Consumes tokens.css only. No raw colour or size values.
   ============================================================= */

/* -------------------------------------------------------------
   1. Skip to content
   ------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-skip);
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  padding-inline: var(--space-6);
  background-color: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--fs-nav);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-btn);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-6)));
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--text-on-accent);
}

/* -------------------------------------------------------------
   2. Logo
   AFFAF set heavy and tight, the CMYK dot grid to its right,
   and the location line beneath. Inline SVG so it recolours.
   ------------------------------------------------------------- */
.logo {
  display: block;
  height: var(--logo-h);
  width: auto;
  color: var(--text);
}

.logo--lg { height: var(--logo-h-lg); }

.site-footer .logo,
.band-ink .logo { color: var(--on-ink); }

.logo__name {
  font-family: var(--font-display);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-logo);
  fill: currentColor;
}

.logo__sub {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  fill: currentColor;
  opacity: 0.72;
}

.logo__dot-c { fill: var(--cyan); }
.logo__dot-m { fill: var(--magenta); }
.logo__dot-y { fill: var(--yellow); }
.logo__dot-k { fill: var(--key-print); }

.logo-link {
  display: inline-flex;
  flex: none;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.logo-link:hover { opacity: 0.8; }

/* -------------------------------------------------------------
   3. Header
   ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: box-shadow var(--dur-base) var(--ease-out);
}

/* The four colour stripe is the header bottom border at all times,
   one of only three places it appears. It is full width and sits
   outside the header padding, so nothing can clip it. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--stripe-h);
  background-image: linear-gradient(
    to right,
    var(--cyan)      0    25%,
    var(--magenta)   25%  50%,
    var(--yellow)    50%  75%,
    var(--key-print) 75% 100%
  );
}

/* Scrolling lifts the header off the page it is covering */
.site-header.is-scrolled { box-shadow: var(--shadow-1); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-h);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Below 600px the panel and the floating button carry the action */
@media (max-width: 600px) {
  .header__actions .header__cta { display: none; }
}

/* -------------------------------------------------------------
   4. Primary navigation
   ------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-nav);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

/* 2px crimson underline on the active page and on hover */
.nav__link::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 0;
  height: var(--rule);
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out);
}

.nav__link:hover { color: var(--text); }

.nav__link:hover::after { transform: scaleX(1); }

.nav__link:active { color: var(--accent-text); }

.nav__link[aria-current="page"] { color: var(--text); }

.nav__link[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 1024px) {
  .nav--desktop { display: none; }
}

/* -------------------------------------------------------------
   5. Theme toggle, a 44px outlined square
   ------------------------------------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--control-h);
  height: var(--control-h);
  color: var(--text);
  background-color: transparent;
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-btn);
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.theme-toggle:hover {
  border-color: var(--text-muted);
  background-color: var(--bg-alt);
}

.theme-toggle:active { background-color: var(--line); }

.theme-toggle svg {
  width: var(--space-5);
  height: var(--space-5);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__icon { display: inline-flex; }
.theme-toggle__icon[hidden] { display: none; }

/* Labelled version, used inside the mobile panel */
.theme-toggle--labelled {
  width: auto;
  gap: var(--space-3);
  padding-inline: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--fs-nav);
  font-weight: var(--fw-semibold);
}

/* -------------------------------------------------------------
   6. Hamburger button
   ------------------------------------------------------------- */
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--control-h);
  height: var(--control-h);
  color: var(--text);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-btn);
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.menu-btn:hover {
  border-color: var(--text-muted);
  background-color: var(--bg-alt);
}

.menu-btn__bars {
  display: block;
  position: relative;
  width: var(--space-5);
  height: var(--space-4);
}

.menu-btn__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--rule);
  background-color: currentColor;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}

.menu-btn__bars span:nth-child(1) { top: 2px; }
.menu-btn__bars span:nth-child(2) { top: 7px; }
.menu-btn__bars span:nth-child(3) { top: 12px; }

/* The dismissal control inside the open panel reads as a cross */
.menu-btn--close .menu-btn__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-btn--close .menu-btn__bars span:nth-child(2) { opacity: 0; }

.menu-btn--close .menu-btn__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .menu-btn { display: inline-flex; }
}

/* -------------------------------------------------------------
   7. Mobile navigation panel
   ------------------------------------------------------------- */
.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-1 * var(--space-4)));
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base) linear;
}

.mobile-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-h);
  border-bottom: var(--hairline) solid var(--line);
}

.mobile-panel__body {
  flex: 1;
  overflow-y: auto;
  padding-block: var(--space-7) var(--space-9);
}

.mobile-panel__links {
  display: flex;
  flex-direction: column;
  border-top: var(--hairline) solid var(--line);
}

.mobile-panel__link {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: var(--hairline) solid var(--line);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-display);
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out),
              padding-inline-start var(--dur-base) var(--ease-out);
}

.mobile-panel__link:hover {
  color: var(--accent-text);
  padding-inline-start: var(--space-2);
}

.mobile-panel__link[aria-current="page"] { color: var(--accent-text); }

.mobile-panel__index {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  color: var(--text-muted);
}

.mobile-panel__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  margin-block-start: var(--space-8);
}

/* -------------------------------------------------------------
   8. Buttons
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding-inline: var(--space-6);
  font-family: var(--font-body);
  font-size: var(--fs-nav);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: var(--hairline) solid transparent;
  border-radius: var(--radius-btn);
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.btn svg {
  width: var(--space-4);
  height: var(--space-4);
  flex: none;
}

/* The single crimson action allowed on a screen */
.btn--primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-on-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn--primary:active { transform: translateY(0); box-shadow: none; }

/* Outlined, sits beside the crimson action */
.btn--outline {
  background-color: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--text);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn--outline:active {
  background-color: var(--bg-alt);
  transform: translateY(0);
  box-shadow: none;
}

/* White outlined, for use on a navy band in both themes */
.btn--on-ink {
  background-color: transparent;
  border-color: var(--on-ink-line);
  color: var(--on-ink);
}

.btn--on-ink:hover {
  background-color: var(--on-ink);
  border-color: var(--on-ink);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn--on-ink:active { transform: translateY(0); box-shadow: none; }

/* Solid navy, used once on the sister company card. Inverts to a
   light button on the dark ground. */
.btn--ink {
  background-color: var(--btn-ink-bg);
  border-color: var(--btn-ink-bg);
  color: var(--btn-ink-fg);
}

.btn--ink:hover {
  background-color: var(--btn-ink-bg);
  border-color: var(--btn-ink-bg);
  color: var(--btn-ink-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn--ink:active { transform: translateY(0); box-shadow: none; }

.btn--ink svg { color: currentColor; }

.btn--lg {
  min-height: var(--space-10);
  padding-inline: var(--space-7);
  font-size: var(--fs-body);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  background-color: var(--line);
  border-color: var(--line);
  color: var(--text-muted);
  transform: none;
  pointer-events: none;
}

/* Crimson text link with a travelling arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

/* Only the arrow carries the accent, so the page keeps one
   crimson action. The whole link turns crimson on hover. */
.link-arrow svg {
  width: var(--space-4);
  height: var(--space-4);
  color: var(--accent-text);
  transition: transform var(--dur-base) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.link-arrow:hover { color: var(--accent-text); }

.link-arrow:hover svg { transform: translateX(var(--space-1)); }

/* -------------------------------------------------------------
   9. Icon tile
   A filled CMYK square carrying a solid glyph. The four colours
   rotate across a set of cards: cyan, magenta, yellow, key.
   ------------------------------------------------------------- */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--tile);
  height: var(--tile);
  background-color: var(--tile-bg);
  color: var(--tile-fg);
  border-radius: var(--radius-tile);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.icon-tile svg {
  width: var(--tile-icon);
  height: var(--tile-icon);
  fill: currentColor;
}

.icon-tile--c {
  --tile-bg: var(--cyan);
  --tile-fg: #FFFFFF;
  --tile-glow: rgba(0, 174, 239, 0.42);
}

.icon-tile--m {
  --tile-bg: var(--magenta);
  --tile-fg: #FFFFFF;
  --tile-glow: rgba(236, 0, 140, 0.42);
}

/* Yellow is far too light to carry white, so the glyph goes navy */
.icon-tile--y {
  --tile-bg: var(--yellow);
  --tile-fg: var(--ink);
  --tile-glow: rgba(255, 241, 0, 0.45);
}

/* Key follows the same inversion as the stripe: black on a light
   ground, light on a dark one, so the tile never disappears */
.icon-tile--k {
  --tile-bg: var(--key-print);
  --tile-fg: var(--key-glyph);
  --tile-glow: rgba(17, 17, 17, 0.38);
}

.card:hover .icon-tile,
.icon-tile:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px var(--tile-glow);
}

/* -------------------------------------------------------------
   10. Cards
   ------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-7);
  border: var(--hairline) solid transparent;
  border-radius: var(--radius-card);
  /* The fill and the edge are painted separately so the edge can be
     a soft top to bottom gradient on the dark ground */
  background-image:
    linear-gradient(var(--surface), var(--surface)),
    linear-gradient(to bottom, var(--card-border-top), var(--card-border-bottom));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.card:focus-within { border-color: var(--accent); }

.card__title {
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--text);
}

.card__text {
  font-size: var(--fs-body);
  color: var(--text-muted);
}

/* Pushes the link to the foot so it aligns across a row of cards */
.card .link-arrow { margin-block-start: auto; }

/* -------------------------------------------------------------
   11. Statistic, the proof numbers
   ------------------------------------------------------------- */
.stat__value {
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: var(--fw-heavy);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--text);
}

.stat__label {
  margin-block-start: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-stat);
  text-transform: uppercase;
  color: var(--text-muted);
}

.band-ink .stat__value { color: var(--on-ink); }
.band-ink .stat__label { color: var(--on-ink-muted); }

/* -------------------------------------------------------------
   11a. Process timeline
   Horizontal on desktop, vertical on mobile. The connector runs
   through the CMYK sequence, cyan, magenta, yellow, key, cyan.
   ------------------------------------------------------------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-7);
}

.timeline__step { position: relative; }

/* Sequence: step one appears, its connector draws, then step two,
   and so on. The resting state is the finished state, so nothing is
   hidden if the script never runs or motion is reduced. */
.timeline.is-running .timeline__step {
  animation: step-in var(--dur-base) var(--ease-out) calc(var(--i) * 450ms) backwards;
}

.timeline.is-running .timeline__num {
  animation: num-pop var(--dur-base) var(--ease-emphasis) calc(var(--i) * 450ms) backwards;
}

.timeline.is-running .timeline__step::after {
  animation: draw-x 400ms var(--ease-out) calc(var(--i) * 450ms + 250ms) backwards;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes num-pop {
  from { opacity: 0; transform: scale(0.6); }
}

@keyframes draw-x {
  from { transform: scaleX(0); }
}

@keyframes draw-y {
  from { transform: scaleY(0); }
}

.timeline__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  line-height: 1;
  letter-spacing: var(--ls-display);
  color: var(--accent-text);
}

.timeline__step::after {
  content: "";
  position: absolute;
  top: calc(var(--space-3) - 1px);
  left: var(--space-8);
  right: calc(-1 * var(--space-7));
  height: var(--rule);
  transform-origin: left center;
}

.timeline__step:nth-child(1)::after { background-color: var(--cyan); }
.timeline__step:nth-child(2)::after { background-color: var(--magenta); }
.timeline__step:nth-child(3)::after { background-color: var(--yellow); }
.timeline__step:nth-child(4)::after { background-color: var(--key-print); }
.timeline__step:nth-child(5)::after { background-color: var(--cyan); }
.timeline__step:last-child::after { content: none; }

.timeline__title {
  margin-block: var(--space-4) var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--text);
}

.timeline__text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.timeline__link {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

.timeline__link:hover { color: var(--accent-text); }

@media (max-width: 1024px) {
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* The last step in a row has nothing to connect to */
  .timeline__step:nth-child(3n)::after { content: none; }
}

@media (max-width: 700px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }

  .timeline__step { padding-inline-start: var(--space-8); }

  .timeline__num {
    position: absolute;
    top: 0;
    left: 0;
  }

  /* The connector turns and runs down the left edge */
  .timeline__step:nth-child(3n)::after { content: ""; }
  .timeline__step:last-child::after { content: none; }

  .timeline__step::after {
    top: var(--space-7);
    left: var(--space-2);
    right: auto;
    bottom: calc(-1 * var(--space-7));
    width: var(--rule);
    height: auto;
    transform-origin: center top;
  }

  .timeline.is-running .timeline__step::after {
    animation-name: draw-y;
  }

  .timeline__title { margin-block-start: 0; }
}

/* -------------------------------------------------------------
   11b. Pill, a small outlined marker
   ------------------------------------------------------------- */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-pill);
}

.band-ink .pill {
  color: var(--on-ink);
  border-color: var(--on-ink-line);
}

/* -------------------------------------------------------------
   11d. Sector marquee
   Outlined display type running continuously. The track holds two
   identical runs and shifts by half its width, so the loop is seamless.
   ------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  /* Never allow the track to widen the page */
  max-width: 100%;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
  animation-play-state: paused;
}

.marquee__run {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee__word {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: var(--fw-heavy);
  line-height: 1.2;
  letter-spacing: var(--ls-display);
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

/* Where the stroke property is unsupported the words stay readable */
@supports not (-webkit-text-stroke: 1px currentColor) {
  .marquee__word { color: var(--text-muted); }
}

.marquee__dot {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
  margin-inline: var(--space-7);
  border-radius: var(--radius-pill);
}

.marquee__dot--c { background-color: var(--cyan); }
.marquee__dot--m { background-color: var(--magenta); }
.marquee__dot--y { background-color: var(--yellow); }
.marquee__dot--k { background-color: var(--key-print); }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (max-width: 700px) {
  .marquee__word { font-size: 2.25rem; }
}

/* -------------------------------------------------------------
   11e. Featured client card
   ------------------------------------------------------------- */
.featured {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  margin-block-start: var(--space-11);
  padding: var(--space-8);
  border: var(--hairline) solid transparent;
  border-radius: var(--radius-card);
  background-image:
    linear-gradient(var(--surface), var(--surface)),
    linear-gradient(to bottom, var(--card-border-top), var(--card-border-bottom));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.featured__label {
  display: block;
  margin-block-end: var(--space-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--accent-text);
}

.featured__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-display);
  color: var(--text);
}

.featured__text {
  margin-block-start: var(--space-3);
  font-size: var(--fs-body);
  color: var(--text-muted);
  max-width: 52ch;
}

/* -------------------------------------------------------------
   11f. Export map
   ------------------------------------------------------------- */
.map { width: 100%; height: auto; }

.map__dots use {
  fill: var(--on-ink);
  opacity: 0.25;
}

.map__arc {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 3 6;
  stroke-dashoffset: 0;
}

.map.is-running .map__arc {
  animation: draw-arc 1100ms var(--ease-out) calc(var(--i) * 180ms) backwards;
}

@keyframes draw-arc {
  from { stroke-dashoffset: 520; }
}

.map__pin { fill: var(--cyan); }

.map__pin--home { fill: var(--crimson); }

.map__pulse {
  fill: var(--cyan);
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-pulse 2.6s var(--ease-out) infinite;
}

.map__pulse--home {
  fill: var(--crimson);
  animation-delay: 0.4s;
}

@keyframes pin-pulse {
  0%   { opacity: 0.55; transform: scale(0.6); }
  70%  { opacity: 0;    transform: scale(2.6); }
  100% { opacity: 0;    transform: scale(2.6); }
}

/* -------------------------------------------------------------
   11g. CMYK bloom, a soft colour wash behind an illustration
   ------------------------------------------------------------- */
.bloom {
  position: absolute;
  /* Held inside its container: a negative inset would widen the page
     on narrow screens. The blur alone gives the wash its spread. */
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--bloom-opacity);
  filter: blur(46px);
  background-image:
    radial-gradient(circle at 26% 28%, var(--cyan) 0, transparent 62%),
    radial-gradient(circle at 74% 24%, var(--magenta) 0, transparent 62%),
    radial-gradient(circle at 30% 76%, var(--yellow) 0, transparent 62%),
    radial-gradient(circle at 78% 74%, var(--key-print) 0, transparent 62%);
}

/* -------------------------------------------------------------
   11i. Sticky sub navigation, used on the services page
   ------------------------------------------------------------- */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 70;
  background-color: var(--bg);
  border-bottom: var(--hairline) solid var(--line);
}

.subnav__inner {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-block: var(--space-3);
  scrollbar-width: none;
  /* Soft fade at both ends, so it reads as scrollable */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px,
                      #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 28px,
              #000 calc(100% - 28px), transparent 100%);
}

.subnav__inner::-webkit-scrollbar { display: none; }

.subnav__link {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  text-decoration: none;
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.subnav__link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.subnav__link[aria-current="true"] {
  background-color: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

[data-theme="dark"] .subnav__link[aria-current="true"] {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--ink);
}

.subnav__select { display: none; }

@media (max-width: 700px) {
  .subnav__inner { display: none; }

  .subnav__select {
    display: block;
    padding-block: var(--space-3);
  }
}

/* -------------------------------------------------------------
   11j. Filter bar, used on the work page
   ------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-end: var(--space-9);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-8);
  padding-inline: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  background-color: transparent;
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-btn[aria-pressed="true"] {
  background-color: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* How many pieces sit behind each pill */
.filter-btn__n {
  margin-inline-start: var(--space-2);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  opacity: 0.65;
}

.load-more {
  display: flex;
  justify-content: center;
  margin-block-start: var(--space-9);
}

/* -------------------------------------------------------------
   11k. Work card
   ------------------------------------------------------------- */
.work {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--hairline) solid transparent;
  border-radius: var(--radius-card);
  background-image:
    linear-gradient(var(--surface), var(--surface)),
    linear-gradient(to bottom, var(--card-border-top), var(--card-border-bottom));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.work:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.work__art {
  display: block;
  width: 100%;
  height: auto;
  background-color: var(--bg-alt);
  border-bottom: var(--hairline) solid var(--line);
}

.work__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-6) var(--space-7);
}

.work__title {
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--text);
}

.work__spec {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* The ask link is revealed by hover, and always reachable by keyboard */
.work__ask {
  margin-block-start: var(--space-3);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.work:hover .work__ask,
.work:focus-within .work__ask {
  opacity: 1;
  transform: none;
}

/* Cards fade in as the filter changes */
.work.is-in {
  animation: work-in var(--dur-base) var(--ease-out) backwards;
}

@keyframes work-in {
  from { opacity: 0; transform: scale(0.97); }
}

.pill--sm {
  padding: 2px var(--space-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   11l. Timeline variants
   ------------------------------------------------------------- */
.timeline--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .timeline--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline--4 .timeline__step:nth-child(3n)::after { content: ""; }
  .timeline--4 .timeline__step:nth-child(2n)::after { content: none; }
  .timeline--4 .timeline__step:last-child::after { content: none; }
}

/* Always stacked, used for the history on the about page */
.timeline--stack {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-9);
}

.timeline--stack .timeline__step { padding-inline-start: var(--space-9); }

.timeline--stack .timeline__num {
  position: absolute;
  top: 0;
  left: 0;
}

.timeline--stack .timeline__step::after {
  top: var(--space-7);
  left: var(--space-2);
  right: auto;
  bottom: calc(-1 * var(--space-9));
  width: var(--rule);
  height: auto;
  transform-origin: center top;
}

.timeline--stack .timeline__step:nth-child(3n)::after { content: ""; }
.timeline--stack .timeline__step:last-child::after { content: none; }
.timeline--stack .timeline__title { margin-block-start: 0; }

.timeline.timeline--stack.is-running .timeline__step::after {
  animation-name: draw-y;
}

/* -------------------------------------------------------------
   11m. The 404 mark, CMYK halftone dots clipped to the numerals
   ------------------------------------------------------------- */
.halftone-mark {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 13rem);
  font-weight: var(--fw-heavy);
  line-height: 1;
  letter-spacing: var(--ls-display);
  color: transparent;
  background-image:
    radial-gradient(var(--cyan)      1.6px, transparent 1.7px),
    radial-gradient(var(--magenta)   1.6px, transparent 1.7px),
    radial-gradient(var(--yellow)    1.6px, transparent 1.7px),
    radial-gradient(var(--key-print) 1.8px, transparent 1.9px);
  background-size: 9px 9px;
  background-position: 0 0, 3px 2px, 6px 4px, 4px 6px;
  -webkit-background-clip: text;
  background-clip: text;
}

/* Where background-clip on text is unsupported the numerals stay solid */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .halftone-mark {
    color: var(--text);
    background-image: none;
  }
}

/* -------------------------------------------------------------
   11n. Shared page furniture
   ------------------------------------------------------------- */
.page-hero { padding-block: var(--space-12) var(--space-11); }

/* Thirty percent less vertical air, used for a long list of groups */
.section--tight { padding-block: calc(var(--section-y) * 0.7); }

.page-hero h1 { margin-block-start: var(--space-4); }

.page-hero .lead { margin-block: var(--space-6) var(--space-7); }

.section__head { margin-block-end: var(--space-9); }

.section__head h2 { margin-block-start: var(--space-4); }

.section__head p { margin-block-start: var(--space-5); }

.center-cta {
  display: flex;
  justify-content: center;
  margin-block-start: var(--space-9);
}

.quote-band p { margin-block: var(--space-5) var(--space-7); }

/* -------------------------------------------------------------
   11o. Sister company card, used on the home and about pages
   ------------------------------------------------------------- */
.sister {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-11);
  align-items: start;
  padding: var(--space-9);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-xl);
  background-color: var(--surface);
  /* Nothing should ever reach past the card edge and widen the page */
  overflow: hidden;
}

@media (max-width: 900px) {
  .sister {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-9);
    padding: var(--space-7);
  }
}

/* On a phone the card stacks and the button spans the full width
   rather than pushing past the card edge */
@media (max-width: 767px) {
  .sister {
    gap: var(--space-7);
    padding: var(--space-6);
    text-align: left;
  }

  .sister .btn {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
  }
}

/* The supplied logo is a JPEG on white, so it sits on its own white
   plate and reads correctly in both themes. The plate carries the
   padding so the artwork itself is a true 64px. */
.sister__plate {
  display: inline-block;
  margin-block-end: var(--space-6);
  padding: var(--space-3);
  background-color: #FFFFFF;
  border-radius: var(--radius-btn);
  line-height: 0;
}

.sister__logo {
  width: auto;
  height: 64px;
}

/* Print Matrix supplies a PNG whose cream circle runs to the edge of the
   canvas, so the artwork is already its own plate and the white one is
   dropped. The circle then grows to fill the exact box the white plate
   occupies, 64px of artwork plus its padding on both sides, so the two
   blocks stay in register side by side and stacked. */
.sister__plate--bare {
  /* Only the white ground goes. The padding and therefore the box are
     left exactly as the Cute Books plate, so the two blocks stay in
     register side by side and stacked. */
  background-color: transparent;
}

.sister__plate--bare .sister__logo {
  /* A filled cream disc reads heavier than the open Cute Books artwork,
     so the circle is grown by a transform rather than by height: it
     takes the weight of the plate it replaces while the box it sits in,
     and every baseline below it, stay where they were. */
  transform: scale(1.125);
  border-radius: var(--radius-pill);
  /* The cream is only a shade off white, so the edge needs a hairline to
     hold its shape in light theme. Full strength line token first, then
     the same token softened wherever color-mix is supported. */
  border: var(--hairline) solid var(--line);
  border: var(--hairline) solid color-mix(in srgb, var(--line) 55%, transparent);
}


.sister p { margin-block: var(--space-5) var(--space-7); }

/* Both sister companies are presented the same way: plate, name,
   description, link. Neither leads the other. */
.sister-co__name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--text);
}



/* -------------------------------------------------------------
   11p. Hero band
   Hero bands are always dark, in both themes. The tokens are
   redefined on the band itself, so every component inside it
   picks up the dark values without any special casing.
   ------------------------------------------------------------- */
.hero-dark {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #0B0B0F;
  color: #F5F5F7;

  --bg:          #0B0B0F;
  --bg-alt:      #111117;
  --surface:     #16161E;
  --text:        #F5F5F7;
  --text-muted:  #A0A3AD;
  --line:        #26262F;

  --accent-text: #FF5A63;
  --key-print:   #FFFFFF;
  --key-glyph:   var(--ink);

  --card-border-top: #2A2A36;
  --card-border-bottom: #1A1A22;

  --halftone-ink: rgba(245, 245, 247, 0.05);
  --bloom-opacity: 0.14;
}

/* The halftone screen over a soft gradient ground */
.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(var(--halftone-ink) 1.1px, transparent 1.1px),
    linear-gradient(135deg, #0B0B0F 0%, #111117 100%);
  background-size: 12px 12px, auto;
}

.hero-dark h1,
.hero-dark h2,
.hero-dark h3 { color: var(--text); }

/* The secondary action is outlined in white on this ground */
.hero-dark .btn--outline {
  border-color: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

.hero-dark .btn--outline:hover {
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* A hero that carries a scene beside its text */
.hero-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-11);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-scene {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-9);
  }
}

.scene-box {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 30rem;
  margin-inline-start: auto;
}

/* -------------------------------------------------------------
   11q. Offset press scene, on the services hero
   Four rollers turn in place while a sheet passes underneath and
   picks up a colour bar at each one.
   ------------------------------------------------------------- */
.press { width: 100%; height: auto; }

.press__roller {
  transform-box: fill-box;
  transform-origin: center;
  animation: roll 3s linear infinite;
}

@keyframes roll {
  to { transform: rotate(360deg); }
}

.press__sheet {
  animation: sheet-pass 6s linear infinite;
}

@keyframes sheet-pass {
  from { transform: translateX(-190px); }
  to   { transform: translateX(210px); }
}

.press__ink { opacity: 0; }

.press__ink--c { animation: ink-c 6s linear infinite; }
.press__ink--m { animation: ink-m 6s linear infinite; }
.press__ink--y { animation: ink-y 6s linear infinite; }
.press__ink--k { animation: ink-k 6s linear infinite; }

/* Each bar appears at the moment the sheet reaches its roller */
@keyframes ink-c { 0%, 36%   { opacity: 0; } 37.5%, 100% { opacity: 1; } }
@keyframes ink-m { 0%, 43.5% { opacity: 0; } 45%,   100% { opacity: 1; } }
@keyframes ink-y { 0%, 51%   { opacity: 0; } 52.5%, 100% { opacity: 1; } }
@keyframes ink-k { 0%, 58.5% { opacity: 0; } 60%,   100% { opacity: 1; } }

/* -------------------------------------------------------------
   11r. Work carousel, on the portfolio hero
   Five printed pieces on a ring, the front one at full strength.
   ------------------------------------------------------------- */
.ring-stage {
  position: relative;
  height: 21rem;
  perspective: 1400px;
}

.ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: ring-spin 20s linear infinite;
}

@keyframes ring-spin {
  to { transform: rotateY(-360deg); }
}

.ring__item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11rem;
  margin: -5.5rem 0 0 -5.5rem;
  opacity: 0.6;
  /* Seven pieces on the ring, so 360 divided by 7. The radius is set
     so neighbours clear the piece at the front. */
  transform: rotateY(calc(var(--i) * 51.4286deg)) translateZ(15.5rem);
  animation: ring-face 20s linear infinite;
  animation-delay: calc((var(--i) * 2.857 - 20) * 1s);
}

/* Each piece sits on its own paper coloured card, so the printed
   objects read the way they do on the work page */
.ring__item {
  --surface: #FFFFFF;
  --line: #E3E8F0;
  --text: #0B1F3A;
}

.ring__item svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  background-color: #F4F6FA;
}

@keyframes ring-face {
  0%, 4%    { opacity: 1; }
  11%, 100% { opacity: 0.6; }
}

@media (max-width: 900px) {
  .ring-stage { height: 17rem; }
  .ring__item {
    width: 8.5rem;
    margin: -4.25rem 0 0 -4.25rem;
    transform: rotateY(calc(var(--i) * 51.4286deg)) translateZ(12rem);
  }
}

/* -------------------------------------------------------------
   11s. The 1991 dot scene, on the about hero
   Each dot travels in from a scattered start to its place in
   the numerals.
   ------------------------------------------------------------- */
.dots-1991 {
  width: 84%;
  height: auto;
}

/* The mark sits beside the numerals rather than under them */
.scene-box .reg-turn {
  position: absolute;
  right: 0;
  bottom: 16%;
}

.dots-1991 circle {
  animation: assemble 1200ms var(--ease-out) backwards;
  animation-delay: calc(var(--d) * 1ms);
}

@keyframes assemble {
  from {
    opacity: 0;
    transform: translate(var(--dx), var(--dy));
  }
}

.reg-turn {
  transform-box: fill-box;
  transform-origin: center;
  animation: reg-once 2400ms var(--ease-in-out) 900ms 1 both;
}

@keyframes reg-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   11t. Reduced motion for the hero scenes
   Each one rests in a finished frame, so nothing has to be
   reconstructed here, the animation is simply switched off.
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .press__roller,
  .press__sheet,
  .press__ink,
  .ring,
  .ring__item,
  .dots-1991 circle,
  .reg-turn {
    animation: none;
  }

  .press__ink { opacity: 1; }
  .ring__item:not(:first-child) { opacity: 0.6; }
  .ring__item:first-child { opacity: 1; }
}

/* -------------------------------------------------------------
   11u. FAQ accordion
   The panels are open in the markup, so a visitor without
   JavaScript reads every answer. The js class is what allows
   them to collapse at all.
   ------------------------------------------------------------- */
.faq {
  border-top: var(--hairline) solid var(--line);
}

.faq__item {
  border-bottom: var(--hairline) solid var(--line);
}

.faq__q { margin: 0; }

.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  width: 100%;
  padding-block: var(--space-6);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out);
}

.faq__btn:hover { color: var(--accent-text); }

.faq__icon {
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

/* The upright stroke retracts, so the plus becomes a minus */
.faq__icon .faq__bar {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out);
}

.faq__item.is-open .faq__icon .faq__bar { transform: scaleY(0); }

/* Collapsing a grid row from 1fr to 0fr animates the height without
   any measurement in script */
.faq__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}

.js .faq__item:not(.is-open) > .faq__panel {
  grid-template-rows: 0fr;
}

.faq__panel > div { overflow: hidden; }

.faq__panel p {
  padding-block-end: var(--space-6);
  color: var(--text-muted);
  max-width: 68ch;
}

/* -------------------------------------------------------------
   11v. Back to top
   Sits on the opposite corner to the WhatsApp button so the two
   can never collide.
   ------------------------------------------------------------- */
.to-top {
  position: fixed;
  left: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-float);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-h);
  height: var(--control-h);
  color: var(--text);
  background-color: var(--bg);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(var(--space-2));
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base) linear,
              border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--text-muted);
  background-color: var(--bg-alt);
}

.to-top svg {
  width: var(--space-5);
  height: var(--space-5);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 768px) {
  .to-top {
    left: var(--space-7);
    bottom: var(--space-7);
  }
}

/* -------------------------------------------------------------
   11w. Hero typography, shared by every page
   Two tiers inside a single h1: the statement, then the line that
   qualifies it. Both are spans, so the heading is still one
   sentence to a screen reader.
   ------------------------------------------------------------- */
.hero-h1 {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 8vw, 5rem);
  font-weight: var(--fw-heavy);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-wrap: balance;
  max-width: 16ch;
}

.hero-sub {
  display: block;
  margin-block-start: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3.2vw, 1.75rem);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  letter-spacing: 0;
  color: #A0A3AD;
  text-wrap: balance;
  max-width: 30ch;
}

/* The home headline is set to 16ch. The other pages carry longer
   headlines, and at 16ch they break to four lines with a single word
   stranded on the last one, so they get a wider measure. */
.hero-h1--wide { max-width: 22ch; }

/* Where a scene sits beside the headline the text column is roughly
   half the page, so the display size is capped to suit it. */
.hero-scene .hero-h1,
.export-hero__grid .hero-h1 { font-size: clamp(1.75rem, 3.7vw, 2.75rem); }

/* A narrower measure on the middle widths keeps a single word from
   being left alone on the last line */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-h1 { max-width: 13ch; }
  .hero-h1--wide { max-width: 20ch; }
  .hero-sub { max-width: 26ch; }
}

@media (max-width: 420px) {
  .hero-h1 { max-width: 14ch; }
  .hero-h1--wide { max-width: 18ch; }
  .hero-sub { max-width: 24ch; }
}

/* -------------------------------------------------------------
   11x. Hero entrance
   Each word rises out of its own mask. The word carries the
   descender room and the mask is pulled back by the same amount,
   so the mask is exactly as tall as the word: translateY(110%)
   starts it fully out of sight and descenders are never clipped.
   ------------------------------------------------------------- */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-block-end: -0.14em;
}

.w__i {
  display: inline-block;
  padding-block-end: 0.14em;
  animation: word-rise 500ms var(--ease-rise) var(--d, 0ms) backwards;
}

@keyframes word-rise {
  from { transform: translateY(110%); }
}

.hero-fade {
  animation: hero-fade 400ms var(--ease-out) var(--d, 0ms) backwards;
}

@keyframes hero-fade {
  from { opacity: 0; transform: translateY(12px); }
}

.hero-eyebrow-in {
  animation: hero-eyebrow 300ms var(--ease-out) backwards;
}

@keyframes hero-eyebrow {
  from { opacity: 0; }
}

/* The stripe under an inner page headline. The home page sets its
   own spacing in its page styles. */
.page-hero .stripe,
.export-hero .stripe {
  width: 100%;
  margin-block: var(--space-6) var(--space-7);
}

.hero-stripe-in {
  transform-origin: left center;
  animation: stripe-draw 500ms var(--ease-out) var(--d, 0ms) backwards;
}

@keyframes stripe-draw {
  from { transform: scaleX(0); }
}

/* -------------------------------------------------------------
   11y. Press hall hero, home page only
   A hand drawn one point perspective scene fills the hero at full
   opacity. A gradient overlay above it keeps the type readable and
   the content sits above both. Every moving part animates transform
   or opacity only, and all of it stops under reduced motion.
   ------------------------------------------------------------- */
.hero-hall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Darkest at the foot where the paragraph and button sit, lightest
   across the middle where the machines are. The halftone screen
   lives in the same layer. */
.hero-hall__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(245, 245, 247, 0.04) 1.1px, transparent 1.1px),
    linear-gradient(to bottom,
      rgba(11, 11, 15, 0.5) 0%, rgba(11, 11, 15, 0.28) 45%, rgba(11, 11, 15, 0.84) 100%);
  background-size: 12px 12px, auto;
}

/* The type, centred in a 900px column above the scene. Secondary
   text uses the on band muted tone: over a visible scene the usual
   #A0A3AD cannot reach AA without blacking the scene out. */
.hero-hall__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  text-align: center;
  --text-muted: var(--on-ink-muted);
}

.hero-hall__content .hero-h1 { max-width: 18ch; margin-inline: auto; }

.hero-hall__content .hero-sub {
  max-width: 34ch;
  margin-inline: auto;
  color: var(--on-ink-muted);
}

.hero-hall__content .hero-stripe-in { transform-origin: center; }

/* On a phone the slice shows the middle of the drawing. Shifting it
   right keeps the nearest press units and the paper stack behind
   the type. */
@media (max-width: 767px) {
  .hero-hall__scene { transform: translateX(270px); }
}

/* Rollers on the two nearest units, one turn every three seconds */
.hh-roller { animation: hh-turn 3s linear infinite; }

@keyframes hh-turn { to { transform: rotate(360deg); } }

/* Sheets run along the top of the press from the feeder at the far
   end, then drop into the delivery stack. Three run two seconds
   apart. The static transform on each group is where it rests when
   motion is switched off. */
.hh-sheet {
  animation: hh-feed 6s linear infinite;
  animation-delay: var(--d, 0s);
}

@keyframes hh-feed {
  0%   { transform: translate(699px, 412px) scale(0.36); opacity: 0; }
  10%  { opacity: 1; }
  70%  { transform: translate(496px, 468px) scale(1); opacity: 1; }
  88%  { transform: translate(380px, 600px) scale(1); opacity: 1; }
  100% { transform: translate(300px, 672px) scale(1); opacity: 0; }
}

/* The stack rises 3px each time a sheet lands, fifteen times in
   thirty seconds, then settles back over the last second */
.hh-stack {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: hh-grow 30s linear infinite;
}

@keyframes hh-grow {
  0%, 6.6%     { transform: scaleY(1); }
  6.7%, 13.3%  { transform: scaleY(1.025); }
  13.4%, 19.9% { transform: scaleY(1.05); }
  20%, 26.6%   { transform: scaleY(1.075); }
  26.7%, 33.3% { transform: scaleY(1.1); }
  33.4%, 39.9% { transform: scaleY(1.125); }
  40%, 46.6%   { transform: scaleY(1.15); }
  46.7%, 53.3% { transform: scaleY(1.175); }
  53.4%, 59.9% { transform: scaleY(1.2); }
  60%, 66.6%   { transform: scaleY(1.225); }
  66.7%, 73.3% { transform: scaleY(1.25); }
  73.4%, 79.9% { transform: scaleY(1.275); }
  80%, 86.6%   { transform: scaleY(1.3); }
  86.7%, 93.3% { transform: scaleY(1.325); }
  93.4%, 96.6% { transform: scaleY(1.35); }
  100%         { transform: scaleY(1); }
}

/* Signal towers: cyan steady, yellow blinks once every four seconds */
.hh-amber { animation: hh-blink 4s linear infinite; }

@keyframes hh-blink {
  0%, 82%, 100% { opacity: 0.25; }
  86%, 94%      { opacity: 0.6; }
}

/* Bound books ride the conveyor toward the viewer, staggered */
.hh-book {
  animation: hh-ride 8s linear infinite;
  animation-delay: var(--d, 0s);
}

@keyframes hh-ride {
  0%   { transform: translate(1150px, 600px) scale(0.5); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translate(1570px, 864px) scale(1.1); opacity: 0; }
}

/* One overhead light dips briefly once every eleven seconds */
.hh-flicker { animation: hh-flicker 11s linear infinite; }

@keyframes hh-flicker {
  0%, 88%, 91%, 100% { opacity: 1; }
  89%                { opacity: 0.55; }
  90%                { opacity: 0.9; }
  90.5%              { opacity: 0.65; }
}

/* Ink indicators pulse in sequence, cyan, magenta, yellow, key */
.hh-ink {
  animation: hh-pulse 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes hh-pulse {
  0%, 30%, 100% { opacity: 0.55; }
  12%           { opacity: 1; }
}

/* Yellow is the brightest ink, so its indicator pulses in a lower
   band and never lifts the ground under the type above AA */
.hh-ink--y { animation-name: hh-pulse-y; }

@keyframes hh-pulse-y {
  0%, 30%, 100% { opacity: 0.25; }
  12%           { opacity: 0.45; }
}

/* -------------------------------------------------------------
   11z. Artboard scene, design page
   Four separations, 320 by 220, lift apart along z, tilt 18
   degrees, hold, then settle flat again every 4.8 seconds.
   Flat is the resting state, so reduced motion shows the stack
   in register.
   ------------------------------------------------------------- */
.artboard {
  position: relative;
  width: 320px;
  max-width: 100%;
  height: 220px;
  margin-inline-start: auto;
  perspective: 1200px;
}

.artboard__stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: artboard-tilt 4.8s var(--ease-in-out) infinite;
}

.artboard__layer {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  border: 2px solid currentColor;
  animation: artboard-lift 4.8s var(--ease-in-out) infinite;
}

.artboard__layer--c { color: var(--cyan);    background-color: rgba(0, 174, 239, 0.14); }
.artboard__layer--m { color: var(--magenta); background-color: rgba(236, 0, 140, 0.14); }
.artboard__layer--y { color: var(--yellow);  background-color: rgba(255, 241, 0, 0.14); }
.artboard__layer--k { color: #FFFFFF;        background-color: rgba(255, 255, 255, 0.10); }

@keyframes artboard-tilt {
  0%, 100% { transform: rotateX(0deg); }
  30%, 65% { transform: rotateX(18deg); }
}

@keyframes artboard-lift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  30%, 65% { transform: translate3d(0, calc(var(--i) * -12px), calc(var(--i) * 48px)); }
}

/* Under 768px the stack sits below the hero text, smaller and centred,
   with 40px of air above it. The layers only move in y and z, so the
   tilt never widens the page. */
@media (max-width: 767px) {
  .hero-scene--design { gap: 40px; }

  /* 48px of headroom inside the box, because the lifted layers rise
     above their resting place and must not touch the button */
  .artboard {
    width: 240px;
    height: 213px;
    margin-inline: auto;
  }

  .artboard__stack { inset: 48px 0 0 0; }
}

/* -------------------------------------------------------------
   11aa. Reduced motion for everything added above
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .w__i,
  .hero-fade,
  .hero-eyebrow-in,
  .hero-stripe-in,
  .hh-roller,
  .hh-sheet,
  .hh-stack,
  .hh-amber,
  .hh-book,
  .hh-flicker,
  .hh-ink,
  .artboard__stack,
  .artboard__layer {
    animation: none;
  }
}

/* -------------------------------------------------------------
   11h. Reduced motion for the moving pieces above
   The marquee becomes a static wrapped row, the pins stop pulsing,
   and every sequenced reveal shows its finished state.
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow: visible; }

  .marquee__track {
    animation: none;
    transform: none;
    flex-wrap: wrap;
    width: auto;
  }

  .marquee__run {
    flex: 1 1 auto;
    flex-wrap: wrap;
  }

  /* The second run exists only to make the loop seamless */
  .marquee__run + .marquee__run { display: none; }

  .map__pulse { display: none; }

  .work.is-in,
  .map.is-running .map__arc,
  .timeline.is-running .timeline__step,
  .timeline.is-running .timeline__num,
  .timeline.is-running .timeline__step::after {
    animation: none;
  }

  .icon-tile,
  .card:hover .icon-tile,
  .icon-tile:hover {
    transform: none;
    box-shadow: none;
  }

  /* The ask link cannot depend on a hover transition here */
  .work__ask {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------
   12. Forms
   Retained for the quote form on the contact page. States are
   rest, error, success, disabled and busy.
   ------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.field__required { color: var(--accent-text); }

.control {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-body);
  color: var(--text);
  background-color: var(--surface);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-btn);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.control::placeholder { color: var(--text-muted); }

.control:hover { border-color: var(--text-muted); }

.control:focus {
  outline: none;
  border-color: var(--accent);
}

.control:disabled {
  cursor: not-allowed;
  background-color: var(--line);
  color: var(--text-muted);
}

textarea.control {
  min-height: var(--space-15);
  resize: vertical;
  line-height: var(--lh-snug);
}

.select-wrap {
  position: relative;
  display: block;
}

select.control {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: var(--space-9);
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--space-5);
  width: var(--space-2);
  height: var(--space-2);
  margin-top: calc(-1 * var(--space-1));
  border-right: var(--rule) solid var(--text-muted);
  border-bottom: var(--rule) solid var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.field__msg {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text-muted);
}

.field__msg svg {
  width: var(--space-4);
  height: var(--space-4);
  flex: none;
  margin-top: 0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field--error .control { border-color: var(--danger); }
.field--error .field__msg { color: var(--danger); }

.field--success .control { border-color: var(--success); }
.field--success .field__msg { color: var(--success); }

/* Panel shown once the enquiry has been handed to WhatsApp */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-7);
  background-color: var(--surface);
  border: var(--hairline) solid var(--success);
  border-radius: var(--radius-card);
}

.form-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-9);
  height: var(--space-9);
  color: var(--success);
  border: var(--rule) solid currentColor;
  border-radius: var(--radius-pill);
}

.form-success__icon svg {
  width: var(--space-5);
  height: var(--space-5);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.is-busy {
  cursor: progress;
  pointer-events: none;
}

.btn.is-busy .btn__spinner { display: block; }

.btn__spinner {
  display: none;
  width: var(--space-4);
  height: var(--space-4);
  border: var(--rule) solid currentColor;
  border-top-color: transparent;
  border-radius: var(--radius-pill);
  animation: spin var(--dur-slow) linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   13. Footer
   Full bleed navy in both themes, four colour stripe on top.
   ------------------------------------------------------------- */
.site-footer {
  position: relative;
  background-color: var(--ink);
  color: var(--on-ink);
  /* Keeps the key segment of the stripe and the key logo dot
     visible against the navy ground in both themes */
  --key-print: var(--on-ink);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--stripe-h);
  background-image: linear-gradient(
    to right,
    var(--cyan)      0    25%,
    var(--magenta)   25%  50%,
    var(--yellow)    50%  75%,
    var(--key-print) 75% 100%
  );
}

.footer__statement {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
  padding-block: var(--space-11) var(--space-7);
}

/* The logo and the statement share a line, the social link sits below */
.footer__statement-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
}

.footer__statement p {
  flex: 1 1 24rem;
  font-size: var(--fs-statement);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  color: var(--on-ink);
  max-width: 46ch;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-8);
  height: var(--space-8);
  color: var(--on-ink);
  border: var(--hairline) solid var(--on-ink-line);
  border-radius: var(--radius-pill);
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.social-link:hover {
  background-color: var(--on-ink);
  border-color: var(--on-ink);
  color: var(--ink);
}

.social-link svg {
  width: var(--space-5);
  height: var(--space-5);
  fill: currentColor;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-9) var(--space-7);
  padding-block: var(--space-8) var(--space-11);
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
}

.footer__heading {
  margin-block-end: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--on-ink);
}

.footer__list li + li {
  margin-block-start: var(--space-3);
}

.footer__link {
  font-size: var(--fs-body);
  color: var(--on-ink-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer__link:hover { color: var(--on-ink); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-style: normal;
  font-size: var(--fs-body);
  color: var(--on-ink-muted);
}

/* The phone and the email are the point of the page */
.footer__strong {
  font-size: var(--fs-contact);
  font-weight: var(--fw-semibold);
  color: var(--on-ink);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.footer__strong:hover {
  color: var(--on-ink);
  opacity: 0.8;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-top: var(--hairline) solid var(--on-ink-line);
  font-size: var(--fs-sm);
  color: var(--on-ink-muted);
}

.footer__bottom a {
  color: var(--on-ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer__bottom a:hover {
  color: var(--on-ink);
  opacity: 0.8;
}

/* -------------------------------------------------------------
   13b. Lineage, the three generations on the about page
   Three items sitting on one hairline, each marked with a CMYK
   dot so the succession reads left to right. Yellow is left out
   of the rotation here: a yellow dot on the light ground would
   not read, and the dot carries the position in the line.
   ------------------------------------------------------------- */
.lineage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineage__item {
  position: relative;
  padding-block-start: var(--space-6);
  border-block-start: var(--hairline) solid var(--line);
}

/* Straddles the hairline so the dot reads as a marker on the line */
.lineage__dot {
  position: absolute;
  inset-block-start: calc(var(--space-2) * -0.5);
  inset-inline-start: 0;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
}

.lineage__item:nth-child(1) .lineage__dot { background-color: var(--cyan); }
.lineage__item:nth-child(2) .lineage__dot { background-color: var(--magenta); }
.lineage__item:nth-child(3) .lineage__dot { background-color: var(--key-print); }

.lineage__gen {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-stat);
  text-transform: uppercase;
  color: var(--text-muted);
}

.lineage__name {
  margin-block-start: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--text);
}

.lineage__role {
  margin-block-start: var(--space-1);
  font-size: var(--fs-body);
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .lineage {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* Both named companies sit together at the end of the bottom row
   and wrap onto their own lines before they crowd the copyright. */
.footer__companies {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

/* The named companies are the point of this row, so they carry
   weight. config.js rewrites the anchor text, so the emphasis has
   to be a style rather than a <strong> inside the link. */
.footer__companies a { font-weight: var(--fw-bold); }

/* The floating WhatsApp and back to top buttons are fixed over the
   foot of the page, so on narrow screens the bottom row keeps a lane
   clear underneath itself and no line ever sits behind a button. */
@media (max-width: 767px) {
  .footer__bottom {
    padding-block-end: calc(var(--space-5) + var(--space-10) + var(--space-4));
  }
}

/* -------------------------------------------------------------
   14. Floating WhatsApp button
   Brand green in both themes with a ring in the page colour, so
   it never bleeds into a navy band it is scrolled over.
   ------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-float);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-10);
  height: var(--space-10);
  background-color: var(--whatsapp);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 4px var(--wa-ring), var(--shadow-3);
  animation: wa-enter var(--dur-slow) var(--ease-emphasis) 600ms backwards;
  transition: transform var(--dur-base) var(--ease-out);
}

.wa-float svg {
  width: var(--space-7);
  height: var(--space-7);
  fill: #FFFFFF;
}

.wa-float:hover { transform: translateY(-3px); }

.wa-float:active { transform: translateY(0); }

.wa-float:focus-visible {
  outline: var(--rule) solid var(--focus-ring);
  outline-offset: 6px;
}

@media (min-width: 768px) {
  .wa-float {
    right: var(--space-7);
    bottom: var(--space-7);
    width: 60px;
    height: 60px;
  }

  .wa-float svg {
    width: var(--space-8);
    height: var(--space-8);
  }
}

@keyframes wa-enter {
  from {
    opacity: 0;
    transform: translateY(var(--space-4)) scale(0.7);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float { animation: none; }
  .wa-float:hover { transform: none; }
}

/* WhatsApp link inside the mobile panel */
.wa-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text);
  text-decoration: none;
}

.wa-inline svg {
  width: var(--space-5);
  height: var(--space-5);
  fill: var(--whatsapp);
}

.wa-inline:hover { color: var(--accent-text); }
