/* ==========================================================================
   Pay Attention Labs — payattnlabs.com
   Built on the Foundation Software brand style guide
   (Crystal Armstrong, 2023): Montserrat / Helvetica Neue,
   #0B7FC2 · #ACCEED · #FCD602 · #FDE976 · #EEEFEF · #101010
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  --blue: #0B7FC2;
  --blue-dark: #0a6ea8;
  --blue-light: #ACCEED;
  --yellow: #FCD602;
  --yellow-light: #FDE976;
  --grey: #EEEFEF;
  --black: #101010;
  --white: #ffffff;

  /* sampled from the illustration artwork so panel grounds match exactly */
  --illo-blue: #acd0ee;
  --illo-yellow: #fce78d;

  --ink: #2b2b2b;
  --ink-soft: #3a3a3a;
  --ink-mute: #7a7a7a;
  --on-dark: #e6e6e6;
  --on-dark-mute: #a8a8a8;
  --hairline: #e2e3e3;
  --rule-dark: #333333;

  --font-head: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --r-sm: 3px;
  --r-btn: 4px;
  --r-chip: 7px;
  --r-card: 20px;
  --r-panel: 24px;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  --shadow-panel: 0 12px 34px rgba(16, 16, 16, 0.12);
  --shadow-studio: 0 14px 40px rgba(16, 16, 16, 0.16);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.4);

  /* the brand pattern: a dot grid over the light grey ground */
  --dots: radial-gradient(#d5d7d7 1.4px, transparent 1.4px);
  --dots-size: 14px 14px;
}

/* --- 2. Base ------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 12pt;
  line-height: 1.6;
  text-wrap: pretty;
  overflow-x: hidden;
}

/* The public marketing page's original 16px base.

   Every proportion on that page -- its rem/em sizing, its clamp() scales, its line lengths -- was
   drawn against a 16px root and looks right at it, so it keeps that base while everything else moves
   to 12pt. The class is written onto <body> by the marketing Layout itself
   (templarLayout.bodyClass -> Body::tag()), NOT by the Template: the marketing page and the signed-in
   shell are two Layouts of the SAME Template, so a Template-level setting would hit both and could
   never tell them apart. */
body.marketing {
  font-size: 16px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--black);
}

img {
  max-width: 100%;
}

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

::selection {
  background: var(--yellow-light);
  color: var(--black);
}

/* Site-wide heading styles -- the signed-in shell and every Templar admin screen.

   These three declarations are duplicated in the marketing rule below rather than shared through one
   selector, and the duplication is the point: the two must move independently, so restyling the
   site's headings can never disturb the public page. Don't "DRY" them back together.

   No margin here on purpose -- headings keep Bootstrap Reboot's own spacing, apart from h1. */
h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Breathing room under a page title; Reboot's 0.5rem isn't enough to separate it from the content.
   Overridden back to 0 on the marketing page by the rule below, which comes later at equal
   specificity. */
h1 {
  margin-bottom: 10px;
}

/* The marketing page's own heading styles -- what the rule above used to be, before it was scoped.

   It needed scoping because this file is served on the Templar admin screens too, so unscoped it
   reached every one of them, and its margin:0 is what left an admin page title flush against the
   content below it. Same leak, same fix as .btn/.card/.modal/.table/.panel further down.

   :where() rather than a plain "body.marketing h1", and this is not cosmetic. A bare descendant
   selector scores (0,1,2), which would outrank the single-class rules that style individual headings
   on that page -- .card__title's margin-bottom, .pal-offcanvas__header h2's letter-spacing -- and
   silently flatten them (six card titles lost their 12px gap when this was first written that way).
   :where() contributes zero specificity, so this lands at (0,0,1): identical to the unscoped rule it
   replaces, and every marketing-page override that won before still wins.

   Zero specificity also means source order alone separates it from the two rules above -- it must
   stay AFTER them, or the marketing page loses its margin:0. */
:where(body.marketing) h1,
:where(body.marketing) h2,
:where(body.marketing) h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

/* --- 3. Layout primitives ------------------------------------------------ */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The Template-level content container (templarTemplate.contentContainerClass).

   Deliberately NOT .wrap. .wrap clamps to --maxw and centres, which is why the footer sits well
   inside the masthead. The masthead has no max-width at all -- .nav is padding: 14px var(--gutter) --
   so its brand and its menu sit exactly one gutter from each edge. Matching that means taking the
   same gutter and no max-width: almost full width, but never touching the edge. */
/* The site's full-bleed container: one gutter in from each edge, no max-width.

   This is what the masthead already does (.nav is padding: 14px var(--gutter)), so anything using it
   lines up exactly with the brand on the left and the menu on the right. .wrap is the OTHER
   container -- it clamps to --maxw and centres -- which is why the marketing footer sits well inside
   its own header. The signed-in chrome wants the aligned one throughout. */
.page-shell,
.page-wrap {
  padding-inline: var(--gutter);
}

.page-shell {
  /* Breathing room between the content and the chrome above and below it.

     padding, not margin: .page-shell has no border and (without this) no block padding, so a vertical
     MARGIN here would collapse with the first and last child's own margins rather than adding to
     them. A page whose content opens with an <h1> would get the h1's margin instead of this value,
     and a page opening with a flush-topped element would get the value -- the same rule producing
     different gaps depending on what the page happens to start with. Padding always adds. */
  padding-block: 30px;

  /* Keeps the footer down the page on a short or empty page instead of riding up under the masthead.
     A minimum only -- taller content grows past it normally. */
  min-height: 50vh;
}

.band {
  background: var(--white);
}

.band--dots {
  background-color: var(--grey);
  background-image: var(--dots);
  background-size: var(--dots-size);
}

.kicker {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.26em;
  margin-bottom: 22px;
}

.kicker--yellow {
  color: var(--yellow);
}

.kicker--blue {
  color: var(--blue);
}

.section-title {
  font-size: clamp(27px, 3.3vw, 40px);
  line-height: 1.2;
}

.enquiry__copy h3 {
  font-size: 24pt;
}

.section-lede {
  font-size: 16px;
  line-height: 1.7;
  margin: 20px 0 0;
}

/* --- 4. Buttons ---------------------------------------------------------- */
/* Scoped to the marketing page: "btn" is a Bootstrap component name too, and the unscoped
   rule was overriding Bootstrap on every Templar admin screen. */
body.marketing .btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--r-btn);
  padding: 14px 26px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.btn--sm {
  font-size: 12px;
  padding: 11px 20px;
}

.btn--xs {
  font-size: 11.5px;
  padding: 11px 18px;
}

.btn--primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.btn--primary:hover {
  background: var(--yellow-light);
  border-color: black;
  color: var(--black);
}

.btn--primary:active {
  background: #e8c400;
  border-color: #e8c400;
}

.btn--outline {
  background: transparent;
  border-color: var(--black);
  color: var(--black);
}

.btn--outline:hover {
  background: var(--black);
  color: var(--white);
}

/* Re-assert the outline on the marketing page. "body.marketing .btn" above sets the shorthand
   "border: 2px solid transparent" and outweighs the bare ".btn--outline" class, so the outline
   button's border-color was being painted transparent -- the button read as bare text. Matching
   that rule's specificity puts the black border back, hover included. */
body.marketing .btn--outline,
body.marketing .btn--outline:hover {
  border-color: var(--black);
}

.btn--blue {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* "Find us on: [Discord]", carried over from payattn.com's masthead. That button is a yellow-
   outlined pill with the WHITE Discord mark, which works there because it sits on a black nav.
   The enquiry section here is white, so the pill brings its own dark ground rather than the
   mark being inverted -- Discord ships white, black and blurple marks and we only hold the
   white one, and recolouring a third party's logo is not ours to do. Same #FCD602 border, same
   invite. inline-flex so the mark and the word stay on one baseline with a real gap; the base
   "body.marketing .btn" sets the border shorthand AND display, both of which outrank a bare
   modifier class -- so this is scoped to match, the same fix .btn--outline needed. */
body.marketing .btn--discord {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--black);
  border-color: var(--yellow);
  color: var(--white);
}

/* Stays dark on hover on purpose: the mark is a white PNG, so a yellow fill would erase it. */
body.marketing .btn--discord:hover {
  background: var(--ink);
  border-color: var(--yellow-light);
  color: var(--white);
}

body.marketing .btn--discord img {
  height: 15px;
  width: auto;
  display: block;
}

/* The label and button sit below the ticks as the last thing in the left column, centred
   rather than left-aligned with the copy above.

   Centred on the TICKS measure, not the column. The column is 514px but the copy in it is
   ragged and narrower -- the ticks stop at 46ch -- so centring on the column put the row
   visibly right of where the eye reads the centre of the text. Sharing max-width with .ticks
   lines it up with the block directly above it and keeps them together if the copy reflows;
   a hardcoded nudge would not. */
.enquiry__discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 0;
  max-width: 46ch;
}

/* A step above the ticks (14.5px/400) on both axes, deliberately a small one: this is a
   label for the button beside it, not a heading competing with the section title. */
.enquiry__discord span {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
}

.btn--blue:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}

.brand:hover .clr-white-to-yellow {
  color: var(--yellow);
  --text-color: var(--yellow);
  --shimmer-color: #ffffff;
}

.brand:hover .clr-yellow-to-white {
  color: var(--white);
  --text-color: var(--white);
  --shimmer-color: #9da3ad;
}

.brand_footer_wrapper {
  cursor: pointer;
}

.brand_footer_wrapper:hover .clr-white {
  color: var(--white);
  --text-color: var(--white);
  --shimmer-color: #9da3ad;
}

.clr-blue-to-yellow {
  color: var(--blue);
  --text-color: var(--blue);
  --shimmer-color: var(--yellow);
}

.brand_footer_wrapper:hover .clr-yellow-to-blue {
  color: var(--blue);
  --text-color: var(--blue);
  --shimmer-color: var(--white);
}

.brand_footer_wrapper:hover .shimmer-text {
  animation: brand-shimmer 900ms ease-out;
}

.clr-yellow-to-white, .clr-yellow-to-blue {
  color: var(--yellow);
  --text-color: var(--yellow);
  --shimmer-color: #ffffff;
}

.clr-white-to-yellow, .clr-white {
  color: var(--white);
  --text-color: var(--white);
  --shimmer-color: #9da3ad;
}

/* --- 5. Masthead --------------------------------------------------------- */
/* nav.nav, not .nav: "nav" is also a Bootstrap component, and the site masthead was claiming every
   one of them. The Templar admin screens build their section menus as
   <div class="nav flex-column nav-pills">, so each inherited this rule's black background and gutter
   padding -- the black panel of blue links on the Edit Template form. The masthead is a <nav> ELEMENT
   in both layouts while Bootstrap's navs here are divs and uls, so the element qualifier separates
   them without touching Bootstrap or renaming the site's own class. */
nav.nav {
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  padding: 14px var(--gutter);
  background: var(--black);
  color: var(--white);
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  font-size: 14px;
}

/* The masthead links bar is a <div> on the marketing page but a <ul> in the logged-in shell, where
   it is the Navigation Builder's own arrangement and holds the menu items directly. Scoped to ul so
   the div usage is untouched. */
ul.nav__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  color: var(--white);
}

.nav__links a:hover {
  color: var(--yellow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
}

.brand img {
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand__name, .brand__sub {
  display: block;
  font-family: var(--font-head);
  line-height: 1;
}

.brand__name {
  font-weight: 700;
  font-size: 16pt;
  letter-spacing: 0.12em;
}

.brand__sub {
  font-weight: 500;
  font-size: 16pt;
  letter-spacing: 0.24em;
}

/* --- 6. Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 2;
  background: var(--white);
}

.hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
}

.hero__copy {
  flex: 1 1 400px;
  padding: 76px 0 32px;
}

.hero__title {
  line-height: 1.16;
}

.hero__title h1 {
  font-size: 40pt;
}

.hero__title h2 {
  font-size: 24pt;
}

.brush-highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
  white-space: nowrap;
}

.brush-highlight::before {
  content: "";
  position: absolute;
  z-index: -1;

  left: -0.08em;
  right: -0.12em;
  bottom: 0.25em;
  height: 0.55em;

  background: var(--yellow);

  transform: rotate(-1.5deg);

  clip-path: polygon(
          0 22%,
          4% 8%,
          12% 16%,
          21% 5%,
          33% 13%,
          45% 3%,
          58% 11%,
          70% 5%,
          82% 14%,
          93% 4%,
          100% 18%,
          98% 78%,
          89% 91%,
          76% 83%,
          64% 95%,
          50% 86%,
          37% 94%,
          25% 82%,
          12% 91%,
          2% 76%
  );
}

.hero__lede {
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 52ch;
  margin: 24px 0 0;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero__figure {
  flex: 1 1 460px;
  align-self: center;
}

/* the 560x400 box is the coordinate space the robot wire is drawn in —
   the photo, the arms and the chips all key off it, so keep the ratio */
.hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 560 / 400;
}

.hero__photo {
  position: absolute;
  left: 21.4%;
  right: 0;
  top: 2.5%;
  bottom: 15%;
  border-radius: 200px 0 20px 200px;
  overflow: hidden;
  background: var(--grey);
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(96deg,
  rgba(255, 255, 255, 0.92) 0%,
  rgba(255, 255, 255, 0.70) 30%,
  rgba(255, 255, 255, 0.44) 60%,
  rgba(255, 255, 255, 0.30) 100%);
}

.hero__wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/*
.hero__robot_clip {
  position: absolute;
  left: 54.4%; top: 50%; width: 10.714%;
  aspect-ratio: 1;
  object-fit: contain;
  pointer-events: none;
}
*/
.hero__robot {
  position: absolute;
  left: 51.4%;
  top: 40.5%;
  width: 10.714%;
  aspect-ratio: 1;
  z-index: 100;
  object-fit: contain;
  clip-path: polygon(
          0 0,
          100% 0,
          100% 60%,
          0 60%
  );
}

/* --- 7. The connector wire ----------------------------------------------- */
/* One continuous line threads hero -> SITUATION -> PROBLEM -> SOLUTION ->
   RESULT -> toolkit. Each strip is a full-width SVG whose entry/exit x
   matches its neighbour's, so the line reads unbroken across band seams. */
.wire {
  pointer-events: none;
}

.wire svg {
  display: block;
  overflow: visible;
}

.wire--start {
  position: relative;
  height: 20px;
}

.wire--gap {
  height: 56px;
}

.wire--drop {
  height: 64px;
}

.wire--end {
  position: relative;
  height: 82px;
}

.wire__node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--black);
}

.wire__node--start {
  left: 18%;
  top: 2px;
  transform: translate(-50%, -50%);
}

.wire__node--end {
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
}

/* --- 8. Story panels ----------------------------------------------------- */
/* Scoped to the marketing page: "panel" is a Bootstrap component name too, and the unscoped
   rule was overriding Bootstrap on every Templar admin screen. */
body.marketing .panel {
  display: flex;
  flex-wrap: wrap;
  border-radius: var(--r-panel);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}

.panel__copy {
  flex: 1 1 300px;
  background: var(--black);
  color: var(--white);
  padding: 46px 38px;
}

.panel__copy p {
  font-size: 14.5px;
  line-height: 1.78;
  margin: 0;
  color: var(--on-dark);
}

/* the cell carries the artwork's own proportion so nothing is ever clipped */
.panel__illo {
  flex: 2 1 420px;
  align-self: stretch;
  overflow: hidden;
}

.panel__illo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.panel__illo--blue {
  background: var(--illo-blue);
}

.panel__illo--yellow {
  background: var(--illo-yellow);
}

/* --- 9. Toolkit ---------------------------------------------------------- */
.toolkit {
  background: var(--black);
  color: var(--white);
  padding: 84px 0;
}

.toolkit .section-lede {
  max-width: 62ch;
  color: #c9c9c9;
}

.toolkit .section-title {
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 22px;
  margin-top: 50px;
}

/* Scoped to the marketing page: "card" is a Bootstrap component name too, and the unscoped
   rule was overriding Bootstrap on every Templar admin screen. */
body.marketing .card {
  background: var(--white);
  color: var(--black);
  border-radius: var(--r-card);
  padding: 32px 28px;
}

/* one 48px-tall optical box; the brand icons vary in aspect ratio */
.card__icon {
  display: flex;
  align-items: center;
  height: 48px;
  margin: 0 0 18px;
}

.card__icon img {
  height: 48px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
}

.card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.3;
  margin: 0 0 12px;
}

.card p {
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0;
  color: var(--ink-soft);
}

.card--cta {
  background: var(--blue);
  color: var(--white);
  display: flex;
  flex-direction: column;
}

.card--cta p {
  color: #e8f3fb;
  margin-bottom: 24px;
}

.card--cta .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Same specificity trap as the outline button: "body.marketing .card" above wins over the bare
   ".card--cta" class, so the training card was painting white-on-white -- brand blue background
   lost, and its pale "#e8f3fb" paragraph left all but invisible. Match that specificity so the
   card gets the blue back and the title/body sit on it in white. */
body.marketing .card--cta {
  /* The brand pattern tile is a 972px square of the same #0B7FC2 with lighter line work, so the
     colour underneath is a seamless fallback rather than a flash of the wrong blue. "cover" over
     "repeat" because the card is far smaller than the tile -- one scaled crop fills it corner to
     corner with no seam to line up. */
  background-color: var(--blue);
  background-image: url("/assets/pay_attention_development_pattern_blue.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
}

body.marketing .card--cta .card__title {
  color: var(--white);
}

body.marketing .card--cta p {
  color: #e8f3fb;
}

/* --- Robot animation ----------------------------------------------------- */

/* Hero robot builds on initial page load. */
.robot-wire {
  opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-robot-wire 650ms ease-out both;
}

.robot-terminus,
.robot-tool {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: reveal-robot-part 300ms ease-out both;
}

.robot-unit:nth-of-type(1) .robot-wire {
  animation-delay: 1s;
}

.robot-unit:nth-of-type(1) .robot-terminus {
  animation-delay: 1.55s;
}

.robot-unit:nth-of-type(1) .robot-tool {
  animation-delay: 1.7s;
}

.robot-unit:nth-of-type(2) .robot-wire {
  animation-delay: 1.8s;
}

.robot-unit:nth-of-type(2) .robot-terminus {
  animation-delay: 2.35s;
}

.robot-unit:nth-of-type(2) .robot-tool {
  animation-delay: 2.5s;
}

.robot-unit:nth-of-type(3) .robot-wire {
  animation-delay: 2.6s;
}

.robot-unit:nth-of-type(3) .robot-terminus {
  animation-delay: 3.15s;
}

.robot-unit:nth-of-type(3) .robot-tool {
  animation-delay: 3.3s;
}

.robot-unit:nth-of-type(4) .robot-wire {
  animation-delay: 3.4s;
}

.robot-unit:nth-of-type(4) .robot-terminus {
  animation-delay: 3.95s;
}

.robot-unit:nth-of-type(4) .robot-tool {
  animation-delay: 4.1s;
}

.robot-unit:nth-of-type(5) .robot-wire {
  animation-delay: 4.2s;
}

.robot-unit:nth-of-type(5) .robot-terminus {
  animation-delay: 4.75s;
}

.robot-unit:nth-of-type(5) .robot-tool {
  animation-delay: 4.9s;
}

@keyframes draw-robot-wire {
  0% {
    opacity: 0;
    stroke-dashoffset: 1;
  }

  1% {
    opacity: 1;
    stroke-dashoffset: 1;
  }

  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes reveal-robot-part {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* The photograph remains; only the hero robot artwork disappears. */
.hero__robot-home {
  transition: opacity 250ms ease;
}

.hero__robot-shimmer {
  opacity: 1;
  transition: opacity 120ms ease;
  pointer-events: none;
}

body.robot-retracting .hero__robot-shimmer,
body.robot-companion-visible .hero__robot-shimmer,
body.robot-restoring .hero__robot-shimmer {
  opacity: 0;
}

/* Retract the hero robot in reverse arm order. */
body.robot-retracting .robot-wire {
  animation-name: retract-robot-wire;
  animation-duration: 320ms;
  animation-timing-function: ease-in;
  animation-fill-mode: both;
}

body.robot-retracting .robot-terminus,
body.robot-retracting .robot-tool {
  animation-name: hide-robot-part;
  animation-duration: 180ms;
  animation-timing-function: ease-in;
  animation-fill-mode: both;
}

body.robot-retracting .robot-unit:nth-of-type(5) .robot-tool,
body.robot-retracting .robot-unit:nth-of-type(5) .robot-terminus {
  animation-delay: 0ms;
}

body.robot-retracting .robot-unit:nth-of-type(5) .robot-wire {
  animation-delay: 100ms;
}

body.robot-retracting .robot-unit:nth-of-type(4) .robot-tool,
body.robot-retracting .robot-unit:nth-of-type(4) .robot-terminus {
  animation-delay: 180ms;
}

body.robot-retracting .robot-unit:nth-of-type(4) .robot-wire {
  animation-delay: 280ms;
}

body.robot-retracting .robot-unit:nth-of-type(3) .robot-tool,
body.robot-retracting .robot-unit:nth-of-type(3) .robot-terminus {
  animation-delay: 360ms;
}

body.robot-retracting .robot-unit:nth-of-type(3) .robot-wire {
  animation-delay: 460ms;
}

body.robot-retracting .robot-unit:nth-of-type(2) .robot-tool,
body.robot-retracting .robot-unit:nth-of-type(2) .robot-terminus {
  animation-delay: 540ms;
}

body.robot-retracting .robot-unit:nth-of-type(2) .robot-wire {
  animation-delay: 640ms;
}

body.robot-retracting .robot-unit:nth-of-type(1) .robot-tool,
body.robot-retracting .robot-unit:nth-of-type(1) .robot-terminus {
  animation-delay: 720ms;
}

body.robot-retracting .robot-unit:nth-of-type(1) .robot-wire {
  animation-delay: 820ms;
}

@keyframes retract-robot-wire {
  from {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  to {
    opacity: 0;
    stroke-dashoffset: 1;
  }
}

@keyframes hide-robot-part {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.7);
  }
}

/* Keep the hero artwork hidden while the companion is active. */
body.robot-companion-visible .robot-wire,
body.robot-companion-visible .robot-terminus,
body.robot-companion-visible .robot-tool {
  opacity: 0;
  animation: none;
}

body.robot-companion-visible .hero__robot {
  opacity: 0;
}

/* Rebuild the hero when the user returns to the top. */
body.robot-restoring .robot-wire {
  animation: restore-robot-wire 420ms ease-out both;
}

body.robot-restoring .robot-terminus,
body.robot-restoring .robot-tool {
  animation: restore-robot-part 220ms ease-out both;
}

body.robot-restoring .robot-unit:nth-of-type(1) .robot-wire {
  animation-delay: 0ms;
}

body.robot-restoring .robot-unit:nth-of-type(1) .robot-terminus,
body.robot-restoring .robot-unit:nth-of-type(1) .robot-tool {
  animation-delay: 300ms;
}

body.robot-restoring .robot-unit:nth-of-type(2) .robot-wire {
  animation-delay: 150ms;
}

body.robot-restoring .robot-unit:nth-of-type(2) .robot-terminus,
body.robot-restoring .robot-unit:nth-of-type(2) .robot-tool {
  animation-delay: 450ms;
}

body.robot-restoring .robot-unit:nth-of-type(3) .robot-wire {
  animation-delay: 300ms;
}

body.robot-restoring .robot-unit:nth-of-type(3) .robot-terminus,
body.robot-restoring .robot-unit:nth-of-type(3) .robot-tool {
  animation-delay: 600ms;
}

body.robot-restoring .robot-unit:nth-of-type(4) .robot-wire {
  animation-delay: 450ms;
}

body.robot-restoring .robot-unit:nth-of-type(4) .robot-terminus,
body.robot-restoring .robot-unit:nth-of-type(4) .robot-tool {
  animation-delay: 750ms;
}

body.robot-restoring .robot-unit:nth-of-type(5) .robot-wire {
  animation-delay: 600ms;
}

body.robot-restoring .robot-unit:nth-of-type(5) .robot-terminus,
body.robot-restoring .robot-unit:nth-of-type(5) .robot-tool {
  animation-delay: 900ms;
}

body.robot-restoring .hero__robot {
  animation: restore-robot-image 300ms 700ms ease-out both;
}

@keyframes restore-robot-wire {
  from {
    opacity: 0;
    stroke-dashoffset: 1;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes restore-robot-part {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes restore-robot-image {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body.robot-restored .robot-wire {
  opacity: 1;
  stroke-dashoffset: 0;
  animation: none;
}

body.robot-restored .robot-terminus,
body.robot-restored .robot-tool {
  opacity: 1;
  transform: scale(1);
  animation: none;
}

body.robot-restored .hero__robot {
  opacity: 1;
  animation: none;
}

/* Fixed brand and robot companion. */

.scroll-companion {
  --companion-pad-top: 14px;
  --companion-pad-left: var(--gutter);

  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;

  width: clamp(270px, 28vw, 400px);
  height: 450px;

  padding: var(--companion-pad-top) var(--companion-pad-left);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateX(-100%);

  transition: opacity 350ms ease,
  transform 750ms cubic-bezier(0.4, 0, 0.6, 1),
  visibility 0s linear 750ms;

  isolation: isolate;
}

.companion-nav {
  position: absolute;
  left: calc(var(--companion-pad-left) + 76px);
  top: var(--companion-pad-top);
  z-index: 3;

  width: 150px;
  height: 390px;

  font-family: var(--font-head);
  pointer-events: none;
}

.companion-nav__heading {
  position: absolute;
  top: 42px;
  left: 14px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  opacity: 0;
  transform: translateY(-6px);
}

.companion-nav__link {
  position: absolute;
  left: 14px;

  display: block;
  width: max-content;
  max-width: 145px;

  padding: 4px 7px;

  border: 0;
  background: var(--white);
  color: var(--black);

  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;

  cursor: pointer;
  pointer-events: auto;

  opacity: 0;
  transform: translateX(-8px);

  transition: color 150ms ease,
  opacity 200ms ease,
  transform 250ms ease;
}

.companion-nav__link:hover {
  color: var(--blue);
}

.companion-nav__link--1 {
  top: 80px;
}

.companion-nav__link--2 {
  top: 140px;
}

.companion-nav__link--3 {
  top: 200px;
}

.companion-nav__link--4 {
  top: 260px;
}

.companion-nav__link--5 {
  top: 320px;
}

/*
.scroll-companion {
    position: fixed;
    left: 0;
    top: 0;
  padding: 14px var(--gutter);
    z-index: 60;
    width: clamp(270px, 28vw, 400px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition:
        opacity 220ms ease,
        transform 500ms cubic-bezier(0.2, 0.85, 0.3, 1),
        visibility 0s linear 500ms;
}
*/

.brand__sub_companion {
  font-weight: 500;
  font-size: 16pt;
  letter-spacing: 0.12em;
}

.brand__name_companion {
  font-weight: 700;
  font-size: 16pt;
  letter-spacing: 0.06em;
}

body.robot-companion-visible .scroll-companion {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 220ms ease,
  transform 500ms cubic-bezier(0.2, 0.85, 0.3, 1),
  visibility 0s;
}

.scroll-companion__brand {
  position: relative;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  min-height: 44px;

  color: var(--blue);
  pointer-events: auto;
}

.scroll-companion__brand .flex-logo {
  min-width: 44px;
}

.scroll-companion__brand .flex-brand {
  margin-top: 8px;
}

.scroll-robot {
  position: absolute;

  /*
  These match the brand container's padding. The SVG origin at 22,22
  therefore sits at the center of the 44px brand logo.
  */
  left: var(--companion-pad-left);
  top: var(--companion-pad-top);

  width: 220px;
  height: 390px;

  z-index: -1;
  pointer-events: none;

  opacity: 1;
  transform: none;
  transition: none;
}


.scroll-robot__arms {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.scroll-arm__wire {
  fill: none;
  stroke: var(--black);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;

  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.scroll-arm__terminus {
  fill: var(--white);
  stroke: var(--black);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;

  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.7);
}

body.robot-companion-visible .scroll-arm__wire {
  animation: side-arm-draw 350ms ease-out both;
}

body.robot-companion-visible .scroll-arm__wire {
  animation: side-arm-draw 500ms ease-out both;
}

body.robot-companion-visible .scroll-arm__terminus {
  animation: side-terminus-show 180ms ease-out both;
}

/* First list item */
body.robot-companion-visible .scroll-arm--1 .scroll-arm__wire {
  animation-delay: 600ms;
}

body.robot-companion-visible .scroll-arm--1 .scroll-arm__terminus {
  animation-delay: 1s;
}

/* Second */
body.robot-companion-visible .scroll-arm--2 .scroll-arm__wire {
  animation-delay: 850ms;
}

body.robot-companion-visible .scroll-arm--2 .scroll-arm__terminus {
  animation-delay: 1.25s;
}

/* Third */
body.robot-companion-visible .scroll-arm--3 .scroll-arm__wire {
  animation-delay: 1.1s;
}

body.robot-companion-visible .scroll-arm--3 .scroll-arm__terminus {
  animation-delay: 1.5s;
}

/* Fourth */
body.robot-companion-visible .scroll-arm--4 .scroll-arm__wire {
  animation-delay: 1.35s;
}

body.robot-companion-visible .scroll-arm--4 .scroll-arm__terminus {
  animation-delay: 1.75s;
}

/* Fifth */
body.robot-companion-visible .scroll-arm--5 .scroll-arm__wire {
  animation-delay: 1.6s;
}

body.robot-companion-visible .scroll-arm--5 .scroll-arm__terminus {
  animation-delay: 2s;
}

@keyframes side-arm-draw {
  from {
    opacity: 0;
    stroke-dashoffset: 1;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes side-terminus-show {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.robot-companion-visible .companion-nav__heading {
  animation: companion-link-show 250ms 500ms ease-out both;
}

body.robot-companion-visible .companion-nav__link--1 {
  animation: companion-link-show 250ms 1s ease-out both;
}

body.robot-companion-visible .companion-nav__link--2 {
  animation: companion-link-show 250ms 1.25s ease-out both;
}

body.robot-companion-visible .companion-nav__link--3 {
  animation: companion-link-show 250ms 1.5s ease-out both;
}

body.robot-companion-visible .companion-nav__link--4 {
  animation: companion-link-show 250ms 1.75s ease-out both;
}

body.robot-companion-visible .companion-nav__link--5 {
  animation: companion-link-show 250ms 2s ease-out both;
}

@keyframes companion-link-show {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.robot-companion-exiting .companion-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

body.robot-companion-exiting .scroll-companion {
  transform: translateX(0);
}

body.robot-companion-instant-hide .scroll-companion {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100%);
  transition: none !important;
}

body.robot-companion-exiting .scroll-companion__header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

/* Shimmer only while each robot is stationary. */
.scroll-companion .shimmer-pal::after,
.scroll-companion .shimmer-text {
  animation: none;
}

body.robot-companion-settled .scroll-companion .shimmer-pal::after,
body.robot-companion-settled .scroll-companion .shimmer-text {
  animation: brand-shimmer 900ms ease-out;
}

body.robot-companion-exiting .scroll-companion .shimmer-pal::after,
body.robot-companion-exiting .scroll-companion .shimmer-text {
  opacity: 0;
  animation: none;
}

body.robot-companion-exiting .scroll-arm__wire {
  animation: companion-arm-retract 400ms ease-in both;
}

body.robot-companion-exiting .scroll-arm__terminus {
  animation: companion-terminus-hide 180ms ease-in both;
}

body.robot-companion-exiting .scroll-arm--5 .scroll-arm__wire {
  animation-delay: 0ms;
}

body.robot-companion-exiting .scroll-arm--5 .scroll-arm__terminus {
  animation-delay: 0ms;
}

body.robot-companion-exiting .scroll-arm--4 .scroll-arm__wire {
  animation-delay: 70ms;
}

body.robot-companion-exiting .scroll-arm--4 .scroll-arm__terminus {
  animation-delay: 70ms;
}

body.robot-companion-exiting .scroll-arm--3 .scroll-arm__wire {
  animation-delay: 140ms;
}

body.robot-companion-exiting .scroll-arm--3 .scroll-arm__terminus {
  animation-delay: 140ms;
}

body.robot-companion-exiting .scroll-arm--2 .scroll-arm__wire {
  animation-delay: 210ms;
}

body.robot-companion-exiting .scroll-arm--2 .scroll-arm__terminus {
  animation-delay: 210ms;
}

body.robot-companion-exiting .scroll-arm--1 .scroll-arm__wire {
  animation-delay: 280ms;
}

body.robot-companion-exiting .scroll-arm--1 .scroll-arm__terminus {
  animation-delay: 280ms;
}

@keyframes companion-arm-retract {
  from {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  to {
    opacity: 0;
    stroke-dashoffset: 1;
  }
}

@keyframes companion-terminus-hide {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .robot-wire {
    opacity: 1;
    stroke-dashoffset: 0;
    animation: none;
  }

  .robot-terminus,
  .robot-tool,
  .scroll-arm__terminus {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .scroll-arm__wire {
    opacity: 1;
    stroke-dashoffset: 0;
    animation: none;
  }

  .scroll-companion,
  .scroll-robot,
  .hero__robot-home {
    transition: none;
  }
}

@media (max-width: 1600px) {
  .scroll-robot {
    display: none;
  }

  .scroll-companion {
    height: 75px;
    background-color: black;
    width: 100%;
  }

  .companion-nav {
    display: none;
  }
}


/* --- 10. Studio ---------------------------------------------------------- */
.studio {
  padding: 84px 0;
}

.studio__head {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
}

.studio__note {
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0;
  max-width: 38ch;
  color: var(--ink-soft);
}

.studio__frame {
  border-radius: var(--r-panel);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-studio);
}

.studio__chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  background: var(--black);
  color: var(--white);
  padding: 13px 22px;
}

.studio__chrome img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.studio__mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.studio__sep {
  width: 1px;
  height: 16px;
  background: #454545;
}

.studio__engagement {
  font-size: 13px;
  color: #b9b9b9;
}

.studio__state {
  margin-left: auto;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  background: var(--yellow);
  color: var(--black);
  border-radius: var(--r-btn);
  padding: 6px 12px;
}

.studio__body {
  display: flex;
  flex-wrap: wrap;
}

.studio__rail {
  flex: 0 0 236px;
  background: #f7f8f8;
  border-right: 1px solid var(--hairline);
  padding: 18px 0;
}

.studio__tab {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.4;
  padding: 13px 22px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.studio__tab:hover {
  background: #eef0f0;
}

.studio__tab[aria-selected="true"] {
  background: var(--white);
  color: var(--black);
  border-left-color: var(--blue);
}

.studio__meta {
  border-top: 1px solid var(--hairline);
  margin-top: 18px;
  padding: 18px 22px 0;
}

.studio__meta dt {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #8a8a8a;
  margin: 0 0 8px;
}

.studio__meta dd {
  font-size: 13px;
  margin: 0;
  color: var(--ink-soft);
}

.studio__panel {
  flex: 1 1 380px;
  padding: 26px 26px 30px;
  min-width: 0;
}

.studio__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.studio__panel-head h3 {
  font-size: 19px;
  line-height: 1.3;
}

.studio__panel-head .btn {
  margin-left: auto;
}

.studio__count {
  font-size: 13px;
  color: var(--ink-mute);
}

.studio__scroll {
  overflow-x: auto;
}

/* Scoped to the marketing page: "table" is a Bootstrap component name too, and the unscoped
   rule was overriding Bootstrap on every Templar admin screen. */
body.marketing .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f6f6f;
  padding: 0 14px 10px 0;
  border-bottom: 2px solid var(--black);
  white-space: nowrap;
}

.table td {
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid #e6e7e7;
  color: #4a4a4a;
}

.table td:first-child {
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
}

.table th:last-child, .table td:last-child {
  padding-right: 0;
}

.pill {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-btn);
  padding: 5px 10px;
  white-space: nowrap;
}

.pill--info {
  background: #d9edf9;
  color: #0a5a8a;
}

.pill--neutral {
  background: #f1f2f2;
  color: #4a4a4a;
}

.pill--warn {
  background: var(--yellow-light);
  color: #5a4a00;
}

.pill--active {
  background: var(--yellow);
  color: var(--black);
}

/* --- 11. Contact --------------------------------------------------------- */
/* The wire drops out of the RESULT panel and terminates on this card. */
.contact {
  padding: 0 0 92px;
}

.flex-container {
  display: flex;
  flex-wrap: nowrap;
}

.flex-logo {
  min-width: 44px;
  margin-right: 20px;
}

.flex-brand {
  margin-top: 12px;
  flex: 1;
}

.form {
  width: min(700px, 100%);
  margin: 28px auto 0;
  background: var(--black);
  color: var(--white);
  border-radius: var(--r-panel);
  padding: 46px 46px 42px;
}

.form h2 {
  font-size: 30px;
  line-height: 1.22;
  margin: 0 0 32px;
}

.form label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: #f0f0f0;
}

.form input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--blue);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--black);
  margin-bottom: 20px;
}

.form input:last-of-type {
  margin-bottom: 26px;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.form__status {
  font-size: 13px;
  color: var(--yellow);
}

.btn--send {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 16px;
}

.btn--send:hover {
  background-color: var(--yellow);
}

/* --- 11b. Get in touch (full section) ------------------------------------ */
.enquiry {
  background: var(--white);
  padding: 84px 0 88px;
}

.enquiry__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  align-items: center;
}

.enquiry__copy {
  flex: 1 1 380px;
}

.enquiry__copy .section-title {
  max-width: 24ch;
}

.enquiry__copy .section-lede {
  max-width: 52ch;
  color: var(--ink);
}

.ticks {
  display: grid;
  gap: 14px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  max-width: 46ch;
}

.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.55;
}

.tick {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: var(--r-btn);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.tick--blue {
  background: var(--blue);
  color: var(--white);
}

.tick--yellow {
  background: var(--yellow);
  color: var(--black);
}

/* the wide variant sits in a two-column row instead of centred on the wire */
.form--wide {
  flex: 1 1 420px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 40px 36px;
}

.form--wide h2 {
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 26px;
}

.form--wide label {
  font-size: 13px;
  margin-bottom: 7px;
  color: #cfcfcf;
}

.form--wide input {
  padding: 10px 12px;
  border: 0;
  margin-bottom: 18px;
}

.form--wide input:last-of-type {
  margin-bottom: 18px;
}

.form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--black);
  resize: vertical;
  margin-bottom: 24px;
}

/* --- 12. Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--black);
  color: var(--white);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-block: 54px 34px;
}

.site-footer__inner > .site-footer__col:last-child {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

.site-footer__brand {
  flex: 0 1 360px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.site-footer__brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: none;
}

.footer-link:hover {
  color: white;
}

.site-footer__brand p {
  font-size: 13px;
  line-height: 1.7;
  margin: 16px 0 0;
  color: var(--on-dark-mute);
  max-width: 36ch;
}

.site-footer__brand .brand__name {
  font-size: 16pt;
}

.site-footer__brand .brand__sub {
  font-size: 14pt;
  letter-spacing: 0.12em;
}

.site-footer__col {
  flex: 1 1 150px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.site-footer__col--ruled {
  border-left: 1px solid var(--rule-dark);
  padding-left: 30px;
}

.site-footer__col a {
  font-size: 14px;
  color: var(--white);
}

.site-footer__col a:hover {
  color: var(--yellow);
}

.site-footer__legal {
  border-top: 1px solid var(--rule-dark);
}

/* Both containers, because the legal strip uses .wrap on the marketing page and .page-wrap on the
   signed-in one. Listing only .wrap silently dropped the padding, size and colour from the signed-in
   footer the moment its container class changed -- the strip still rendered, just unstyled. */
.site-footer__legal .wrap,
.site-footer__legal .page-wrap {
  padding-block: 18px;
  font-size: 12px;
  color: #8a8a8a;
}

/* Centred only in the full-bleed container. On the marketing page .wrap is already a narrow centred
   column, so its copyright reads as centred without this; .page-wrap spans the whole viewport, which
   would otherwise strand the line against the far left edge. */
.site-footer__legal .page-wrap {
  text-align: center;
}

/* The Pay Attention! Network attribution. Styled here once for BOTH footers: the marketing one,
   where it arrives as a {{pan}} token expanded into the Footer Fragment, and the signed-in one,
   where it is a PoweredBy Block in the Workshop tree. Both land inside .site-footer__legal, which
   already owns the size and colour of that strip -- so all this has to do is stop a <p> adding a
   paragraph's worth of margin to a line-tall strip.

   Every Layout carries it by rule (Templar refuses to activate a Template whose Layouts do not),
   which is exactly why it cannot be styled per-footer.

   `display: inline` is what puts it on the SAME line as the copyright rather than under it. The
   attribution is a <p> because Foundation's PoweredBy component returns 'p' from htmlTag(), and
   Foundation is not edited to satisfy one product's footer -- so the block-ness is undone here
   instead. The separator is a ::before rather than markup for the same reason: the strip's own
   "Development . payattnlabs.com" divider is a literal character in the Fragment, which this side
   cannot reach. */
.site-footer__legal .pal-attribution {
  display: inline;
  margin: 0;
}

.site-footer__legal .pal-attribution::before {
  content: "\00A0\00B7\00A0";
}

/* Beats the base `a` rule on its own (0,1,0 against 0,0,1) and needs no body.marketing scope --
   unlike .btn--outline/.card--cta/.btn--discord, which each had a body.marketing ancestor rule to
   outrank. Checked rather than assumed, because that is the bug this stylesheet keeps growing. */
.pal-attribution__link {
  color: var(--yellow);
}

.pal-attribution__link:hover {
  color: var(--white);
}

/* --- 13. Sign-in dialog -------------------------------------------------- */
/* Scoped to the marketing page: "modal" is a Bootstrap component name too, and the unscoped
   rule was overriding Bootstrap on every Templar admin screen. */
body.marketing .modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 16, 16, 0.64);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal__card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--r-card);
  padding: 34px 32px;
  box-shadow: var(--shadow-modal);
}

.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal__head img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.modal__card h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 12px;
}

.modal__card > p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 22px;
  color: #4a4a4a;
}

.modal__card label {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--ink-soft);
}

/* The sign-in dialog's two numbered steps. They sit between the intro paragraph and the SSO
   button, so they take the same size and colour as ".modal__card > p" above -- left to the
   browser default they render at the 16px body size next to 14px copy. */
.modal__steps {
  font-size: 14px;
  line-height: 1.65;
  color: #4a4a4a;
  margin: 0 0 22px;
  padding-left: 20px;
}

.modal__steps li + li {
  margin-top: 6px;
}

.modal__card input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 11px 12px;
  border: 2px solid #dcdddd;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
}

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 10px;
}

.shimmer {
}

.shimmer-pal {
  position: relative;
}

.shimmer-pal img {
  z-index: 0;
}

.shimmer-pal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  background: linear-gradient(
          115deg,
          transparent 30%,
          rgba(190, 195, 205, 0.15) 40%,
          rgba(255, 255, 255, 0.95) 50%,
          rgba(185, 190, 200, 0.25) 60%,
          transparent 70%
  );

  background-size: 250% 100%;
  background-position: 150% 0;

  -webkit-mask-image: url("assets/pay-attention-labs.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: url("assets/pay-attention-labs.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  pointer-events: none;
}

.shimmer-text {
  display: inline-block;

  background-image: linear-gradient(
          115deg,
          var(--text-color) 0%,
          var(--text-color) 40%,
          var(--shimmer-color) 50%,
          var(--text-color) 60%,
          var(--text-color) 100%
  );

  background-size: 250% 100%;
  background-position: 150% 0;

  -webkit-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;
  color: transparent;
}

.brand:hover .shimmer-pal::after,
.brand:hover .shimmer-text {
  animation: brand-shimmer 900ms ease-out;
}

@keyframes brand-shimmer {
  from {
    background-position: 150% 0;
  }

  to {
    background-position: -50% 0;
  }
}

/* --- 14. Narrow widths --------------------------------------------------- */
@media (max-width: 1024px) {
  .panel {
    display: flex;
    flex-direction: column;
  }

  .panel__copy,
  .panel__illo {
    flex: none;
    width: 100%;
  }

  .panel__illo {
    aspect-ratio: 1162 / 602;
  }

  .panel__illo img {
    width: 100%;
    height: 100%;
    /*    object-fit: contain; */
    object-position: center top;
  }
}

@media (max-width: 900px) {
  .hero__copy {
    padding-top: 56px;
  }

  .studio__rail {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    flex-wrap: wrap;
    padding: 0;
  }

  .studio__tab {
    width: auto;
    border-left: 0;
    border-bottom: 4px solid transparent;
  }

  .studio__tab[aria-selected="true"] {
    border-left-color: transparent;
    border-bottom-color: var(--blue);
  }

  .studio__meta {
    flex: 1 1 100%;
    border-top: 1px solid var(--hairline);
    margin: 0;
    padding: 14px 22px;
  }

  .studio__meta dt {
    display: inline;
    margin-right: 8px;
  }

  .studio__meta dd {
    display: inline;
  }
}

@media (max-width: 620px) {
  .nav {
    gap: 14px;
  }

  .nav__links {
    gap: 12px 18px;
    font-size: 13px;
  }

  .panel__copy {
    padding: 34px 26px;
  }

  .toolkit, .studio, .enquiry {
    padding-block: 60px;
  }

  .contact {
    padding-bottom: 60px;
  }

  .form {
    padding: 34px 28px 30px;
  }

  .wire--gap {
    height: 40px;
  }
}

/* Below this, the masthead brand (logo + wordmark) no longer fits on the same row as the menu
   toggle -- .nav wraps them onto two rows instead. Shrinking the brand back down is cheaper than
   giving up the single-row masthead, so every dimension here is trimmed just enough to keep both
   on one row down to a 320px viewport; see the git history of this rule for the arithmetic.

   Every selector below is scoped under nav.nav on purpose. .brand/.flex-logo/.flex-brand/
   .brand__name/.brand__sub are shared with .scroll-companion__brand (its own link carries BOTH
   "scroll-companion__brand" and "brand"), which lives OUTSIDE nav.nav and has its own -- already
   correct -- sizing. An unscoped rule here would leak into it too and only be masked by its higher-
   specificity min-width/margin-top overrides for some properties, not all of them; scoping under
   nav.nav is what actually keeps the two independent, the same way .scroll-companion__brand's own
   rules stay independent of these.

   .flex-brand's margin-top is the same trick .scroll-companion__brand already uses to centre the
   wordmark on the logo (see that rule below): .flex-container has no align-items, so the text is
   nudged down by hand instead of stretched. It has to be re-tuned here, not left at its 44px-logo
   value of 12px, or the wordmark reads visibly low against the smaller icon.

   .flex-brand also gets font-size: 0. .brand__name/.brand__sub are inline-block, so their vertical
   position is baseline-aligned against an invisible "strut" line box sized off .flex-brand's OWN
   (inherited, ~16px) font -- at the original 21px wordmark size that strut was close enough to the
   text's own size to be invisible, but shrunk to 10pt here the mismatch opens a real gap above the
   text. Zeroing the strut's font-size removes it; the children re-set their own font-size right
   after, so the visible text is untouched. */
@media (max-width: 489.98px) {
  .nav {
    gap: 10px;
  }

  nav.nav .flex-logo {
    min-width: 28px;
    margin-right: 8px;
  }

  nav.nav .flex-brand {
    margin-top: 7px;
    font-size: 0;
  }

  nav.nav .brand img {
    width: 28px;
    height: 28px;
  }

  nav.nav .brand__name, nav.nav .brand__sub {
    font-size: 10pt;
  }

  nav.nav .pal-menu-toggle {
    width: 40px;
    height: 38px;
    padding: 7px;
  }
}

/* --- 15. Print ----------------------------------------------------------- */
@media print {
  .nav {
    position: static;
  }

  .modal {
    display: none !important;
  }

  .panel, .studio__frame, .card {
    box-shadow: none;
  }
}

/* --- Menu -- */
/* ------------------------------------------------------------
   Responsive top navigation
   ------------------------------------------------------------ */

.pal-menu-toggle {
  display: none;
  position: relative;

  width: 48px;
  height: 44px;
  margin-left: auto;
  padding: 9px;

  border: 1px solid rgba(252, 214, 2, 0.45);
  border-radius: 4px;

  background: transparent;
  cursor: pointer;
}

.pal-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;

  border-radius: 2px;
  background: var(--yellow);

  transition: transform 180ms ease,
  opacity 180ms ease;
}

.pal-menu-toggle:hover {
  border-color: var(--yellow);
  background: rgba(252, 214, 2, 0.08);
}

/*
Bootstrap sets --bs-offcanvas-width on the offcanvas itself.
At 1024–1599px, the panel occupies half the viewport.
*/
.pal-offcanvas {
  --bs-offcanvas-width: 50vw;

  color: var(--white);
  background: rgba(16, 16, 16, 0.9);
  border-left: 1px solid rgba(252, 214, 2, 0.35);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pal-offcanvas__header {
  padding: 28px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.pal-offcanvas__header h2 {
  color: var(--yellow);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pal-offcanvas__body {
  display: flex;
  align-items: flex-start;
  padding: 30px 32px;
}

.pal-offcanvas__links {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.pal-offcanvas__links a,
.pal-offcanvas__login {
  display: block;
  width: 100%;
  padding: 18px 4px;

  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);

  background: transparent;
  color: var(--white);

  font-family: var(--font-head);
  font-size: 14pt;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;

  cursor: pointer;

  transition: color 150ms ease,
  padding-left 180ms ease,
  background-color 150ms ease;
}

.pal-offcanvas__links a:hover,
.pal-offcanvas__login:hover {
  padding-left: 14px;
  background: rgba(252, 214, 2, 0.07);
  color: var(--yellow);
}

/* Darken the rest of the page while preserving some transparency. */
.offcanvas-backdrop.show {
  opacity: 0.42;
}

.scroll-companion__header {
  position: relative;
  z-index: 4;

  display: flex;
  align-items: center;
  gap: 18px;

  width: 100%;
  min-width: 250px;
}

.pal-menu-toggle--companion {
  flex: none;
  margin-left: auto;
}

@media (max-width: 1023.98px) {
  .pal-offcanvas {
    --bs-offcanvas-width: 100vw;
  }
}

@media (max-width: 1599.98px) {
  /* Renamed from .nav__links--desktop. Every request field is run through
     Shortcuts::PurifyString(), whose SQL-comment defence strips '--' outright, so a BEM modifier
     class cannot be typed into the Templar UI at all -- it arrives as .nav__linksdesktop. The
     class had to lose the '--', not the sanitizer its rule. */
  .nav__links_desktop {
    display: none;
  }

  .pal-menu-toggle {
    display: block;
  }


  #story,
  #toolkit,
  #studio,
  #get-in-touch {
    scroll-margin-top: 70px;
  }
}

/* ------------------------------------------------------------
   Nested navigation menus (dropdowns and submenus)

   Bootstrap 5 styles the first .dropdown-menu and nothing below it -- it dropped Bootstrap 3's
   submenu support and never replaced it -- so every deeper level is defined here, against the markup
   NavItemCapsule emits. Behaviour comes from pal-nav.js, which is depth- and viewport-agnostic; the
   ONLY thing that makes a submenu a desktop flyout in one place and a mobile accordion in another is
   which of the two blocks below is in scope. Neither block uses a per-level selector, so a menu six
   levels deep needs no additions here.
   ------------------------------------------------------------ */

.nav__links .dropdown-menu {
  --bs-dropdown-bg: #141414;
  --bs-dropdown-link-color: var(--white);
  --bs-dropdown-link-hover-bg: rgba(252, 214, 2, 0.10);
  --bs-dropdown-link-hover-color: var(--yellow);
  --bs-dropdown-border-color: rgba(255, 255, 255, 0.14);

  min-width: 230px;
  padding: 6px 0;
  font-size: 14px;

  /* A flipped level lands on top of the one it came from -- unavoidable once the chain runs out of
     screen, and what every cascading menu does. The shadow is what makes that read as one panel over
     another instead of two merged lists, since both share the same near-black background. */
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}

/* The row pairs the real destination link with the caret that opens the branch. They are separate
   controls on purpose: a parent item is a page in its own right, so following it and expanding it
   stay two different clicks rather than the toggle swallowing the link. */
.dropdown-submenu__row {
  display: flex;
  align-items: stretch;
}

.dropdown-submenu__row > .dropdown-item {
  flex: 1 1 auto;
}

/* An explicit colour, NOT inherit. The caret is drawn from currentColor, and inherit resolves up
   through the <li> to the <ul class="dropdown-menu">, whose colour is Bootstrap's own near-black
   --bs-body-color (#212529) -- the dropdown's light text comes from --bs-dropdown-link-color, which
   styles .dropdown-item only and never reaches this button. The result was a near-black caret on a
   #141414 menu: present, correctly sized, and invisible, so a branch looked identical to a leaf. */
.dropdown-submenu__toggle {
  flex: none;
  width: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.dropdown-submenu__toggle:hover,
.dropdown-submenu__toggle:focus-visible {
  background: rgba(252, 214, 2, 0.10);
  color: var(--yellow);
}

/* A header row: a branch that groups its children and has no destination of its own, so there is no
   link to separate from the toggle and the WHOLE row is the toggle. That is why this carries the
   caret itself instead of sitting beside a .dropdown-submenu__toggle -- a header has nothing to put
   on the other side of one, and a full-width target is easier to hit than a 40px caret.

   A <button> styled back down to look like the .dropdown-item it sits among: browsers give buttons a
   centred, bordered, system-font look that would otherwise make the one header in a menu the only
   row that does not line up with its siblings. */
.dropdown-item--header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dropdown-item--header:hover,
.dropdown-item--header:focus-visible {
  background: rgba(252, 214, 2, 0.10);
  color: var(--yellow);
}

/* A header with nothing beneath it is a caption, not a control: no pointer, and no hover response
   promising an interaction that will not happen. */
.dropdown-item--static,
.dropdown-item--static:hover,
.dropdown-item--static:focus-visible {
  background: transparent;
  cursor: default;
}

/* A chevron drawn from two borders, so it needs no icon font -- this menu renders inside the
   generated template, which cannot assume Font Awesome or Tabler loaded. */
.dropdown-submenu__caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.dropdown-submenu > .dropdown-menu {
  display: none;
}

.dropdown-submenu.is-open > .dropdown-menu {
  display: block;
}

/* --- Wide viewport: submenus fly out beside their parent --------------------------------- */
@media (min-width: 1600px) {
  .nav__links .dropdown-submenu {
    position: relative;
  }

  /* 85%, not 100%: the flyout overlaps the parent row by ~15% of its own width (about 34px at the
     230px min-width) and sits on top of it. Butted exactly against the parent's edge, the pointer has
     to cross a seam with no forgiveness -- drift a pixel into the gap on the way across and the
     submenu closes. The overlap gives that diagonal travel somewhere to land. */
  .nav__links .dropdown-submenu > .dropdown-menu {
    position: absolute;
    top: 0;
    left: 85%;
    margin-top: -6px;

    /* Each level must paint above the one it overlaps. Nested positioned elements already paint in
       tree order, but the stack is made explicit so a future z-index elsewhere cannot invert it. */
    z-index: 1;
  }

  /* Hover opens as well as click, matching how the top-level items already behave on a pointer
     device. is-open still wins for keyboard and touch, which never produce hover.

     pal-nav.js mirrors this with a mouseenter listener purely so the flyout can be MEASURED. A
     submenu revealed by this rule alone runs no JavaScript, so nothing ever decided which side it
     should open on -- which is how a hovered branch could sail off the right-hand edge while the
     same branch opened by clicking its caret flipped correctly. */
  .nav__links .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }

  /* A flyout points sideways; only the stacked accordion form rotates to point down. */
  .nav__links .dropdown-submenu__caret {
    transform: rotate(-45deg);
  }

  /* Each level opens where its parent ended, so a deep chain marches off the right-hand edge --
     level 4 of the admin menu measured x=2232 in a 2048px viewport. pal-nav.js adds this class only
     to the levels that actually overflow, after measuring, so a menu that fits is never flipped. */
  .nav__links .dropdown-submenu.opens-left > .dropdown-menu {
    left: auto;
    right: 85%;
  }
}

/* --- Off-canvas: the same submenus become an accordion ----------------------------------- */
.pal-offcanvas .nav__links {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  font-size: inherit;
}

.pal-offcanvas .nav__links .nav-link,
.pal-offcanvas .nav__links .dropdown-item {
  padding: 18px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 14pt;
  font-weight: 600;
  line-height: 1.2;
  white-space: normal;
}

.pal-offcanvas .nav__links .nav-link:hover,
.pal-offcanvas .nav__links .dropdown-item:hover {
  background: rgba(252, 214, 2, 0.07);
  color: var(--yellow);
}

/* Static, not absolutely positioned: an open branch pushes the rows beneath it down instead of
   floating over them, which is the whole difference between a flyout and an accordion. */
.pal-offcanvas .nav__links .dropdown-menu {
  position: static !important;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform: none !important;
}

/* Bootstrap toggles .show on the top-level menu; every deeper level is driven by .is-open. Both are
   spelled out because the top level is Bootstrap's to control and the rest are ours. */
.pal-offcanvas .nav__links > .dropdown > .dropdown-menu {
  display: none;
}

.pal-offcanvas .nav__links > .dropdown > .dropdown-menu.show {
  display: block;
}

/* Each level steps in by one notch. Written against nesting depth rather than a level class, so it
   keeps applying however deep the list goes -- past the fourth step the indent simply stops growing
   rather than pushing labels off the panel. */
.pal-offcanvas .nav__links .dropdown-menu .dropdown-item {
  padding-left: 20px;
}

.pal-offcanvas .nav__links .dropdown-menu .dropdown-menu .dropdown-item {
  padding-left: 40px;
}

.pal-offcanvas .nav__links .dropdown-menu .dropdown-menu .dropdown-menu .dropdown-item {
  padding-left: 60px;
}

.pal-offcanvas .nav__links .dropdown-menu .dropdown-menu .dropdown-menu .dropdown-menu .dropdown-item {
  padding-left: 80px;
}

/* A stacked row's caret points down when closed and up when open -- the usual accordion affordance,
   and the reason the wide-viewport block above pins its own caret back to the sideways angle. */
.pal-offcanvas .dropdown-submenu__caret {
  transform: rotate(45deg);
}

.pal-offcanvas .dropdown-submenu.is-open > .dropdown-submenu__row .dropdown-submenu__caret {
  transform: rotate(-135deg);
}

.pal-offcanvas .dropdown-submenu__toggle {
  width: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}