/* The one-minute pitch. Built by /js/pitch.js; colours and fonts come from /css/site.css. */

.pitch-band { background: var(--frost); border-bottom: 1px solid var(--line); }
/* On the home page the film waits to be placed among the sections (see placeBands in /js/site.js) */
.pitch-band[data-after-section]:not(.is-placed) { display: none; }
.story > .pitch-band { border-top: 1px solid var(--line); }
.pitch-band-inner { max-width: 1040px; margin-inline: auto; padding: clamp(28px, 5vw, 64px) var(--gutter); }

.pitch-stage {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #001b38;
  box-shadow: 0 28px 60px -34px rgba(0, 36, 72, 0.55);
  color: #fff;
  font-family: var(--sans);
}

/* ---------- Photographs behind the scenes ---------- */

.pitch-world, .pitch-half, .pitch-bgs, .pitch-bg, .pitch-shade { position: absolute; inset: 0; }

/* The picture lies there twice, as a left and a right half, cut straight above the gap in the line.
   /js/pitch.js sets where the cut is (--cut), how far each half can move (--half) and how far it has moved (--split). */
.pitch-half { will-change: transform; }
.pitch-half--l {
  clip-path: inset(-6% calc(100% - var(--cut, 50%) - 0.5px) -6% -6%);
  transform: translate3d(calc(var(--split, 0) * var(--half, 0px) * -1), 0, 0);
}
.pitch-half--r {
  clip-path: inset(-6% -6% -6% var(--cut, 50%));
  transform: translate3d(calc(var(--split, 0) * var(--half, 0px)), 0, 0);
}
@keyframes pitch-quake {              /* the jolt as the picture breaks */
  0%, 100% { transform: translate3d(0, 0, 0); }
  12% { transform: translate3d(-0.7cqw, 0.3cqw, 0); }
  27% { transform: translate3d(0.6cqw, -0.25cqw, 0); }
  44% { transform: translate3d(-0.4cqw, 0.18cqw, 0); }
  62% { transform: translate3d(0.22cqw, -0.1cqw, 0); }
  80% { transform: translate3d(-0.1cqw, 0.05cqw, 0); }
}
.pitch-stage.is-cracking .pitch-world,
.pitch-stage.is-cracking .pitch-scene.is-active .pitch-headline { animation: pitch-quake 0.55s linear; }   /* the words feel it too */
.pitch-bg {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease;
  will-change: opacity, transform;
}
.pitch-bg.is-on { opacity: 1; }
.pitch-stage.is-wiping .pitch-bg { transition: opacity 0s linear 0.4s; }   /* swap while the sweep covers the frame */
.pitch-bg--top { background-position: center top; }
.pitch-bg--bottom { background-position: center bottom; }
.pitch-shade {                         /* keeps white text readable on any photograph */
  background:
    linear-gradient(0deg, rgba(0, 20, 44, 0.86) 0%, rgba(0, 20, 44, 0.5) 20%, rgba(0, 20, 44, 0) 42%),
    linear-gradient(98deg, rgba(0, 27, 56, 0.9) 0%, rgba(0, 30, 62, 0.72) 44%, rgba(0, 36, 72, 0.3) 100%);
}
.pitch-shade::after {                  /* the red-line scene turns the frame red for a moment, and keeps a trace of it */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 30% 55%, rgba(229, 72, 77, 0.55), rgba(229, 72, 77, 0.2) 60%, rgba(120, 20, 30, 0.35));
  opacity: 0;
}

/* ---------- The opening above the gap, and the ones who stand in it ---------- */

.pitch-chasm {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gapl, 41%);
  width: var(--gapw, 18%);
  background:
    radial-gradient(70% 34% at 0% 84%, rgba(233, 180, 76, 0.2), rgba(233, 180, 76, 0) 100%),
    radial-gradient(70% 34% at 100% 84%, rgba(233, 180, 76, 0.2), rgba(233, 180, 76, 0) 100%),
    linear-gradient(180deg, rgba(0, 8, 20, 0.45) 0%, rgba(0, 9, 22, 0.78) 55%, rgba(0, 10, 24, 0.94) 100%);
  transform: scaleX(var(--split, 0));
  transform-origin: center;
  visibility: hidden;
  pointer-events: none;
}
.pitch-stage.is-split .pitch-chasm { visibility: visible; }
.pitch-chasm::before,
.pitch-chasm::after {                  /* the two edges, lit from the line and fading upwards */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: max(2px, 0.22cqw);
  background: linear-gradient(to top, rgba(233, 180, 76, 0) 0%, var(--amber) 14%, rgba(233, 180, 76, 0.5) 46%, rgba(233, 180, 76, 0) 94%);
  filter: drop-shadow(0 0 0.55cqw rgba(233, 180, 76, 0.85));
}
.pitch-chasm::before { left: 0; }
.pitch-chasm::after { right: 0; }

/* one post for each of the ones who have to say yes; they stand on the line, in the way */
.pitch-gates {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: var(--rail, 10cqw);
  height: 13cqw;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.pitch-gate {
  display: block;
  width: max(3px, 0.55cqw);
  height: 100%;
  border-radius: 0.3cqw 0.3cqw 0 0;
  background: var(--amber);
  box-shadow: 0 0 1.1cqw rgba(233, 180, 76, 0.7);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.25), background-color 0.18s ease, box-shadow 0.18s ease;
}
.pitch-gate.is-on { transform: scaleY(1); }
.pitch-gate.is-yes { background: var(--green); box-shadow: 0 0 1.4cqw rgba(48, 180, 84, 0.95); }
.pitch-gate.is-open { transform: scaleY(0); transition-duration: 0.3s, 0.18s, 0.18s; transition-timing-function: cubic-bezier(0.6, 0, 0.9, 0.4), ease, ease; }

/* the light along the cut when the picture closes */
.pitch-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cut, 50%);
  width: 0;
  pointer-events: none;
}
.pitch-seam::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.2cqw;
  width: 0.4cqw;
  background: linear-gradient(to top, #fff 0%, var(--green) 28%, rgba(48, 180, 84, 0) 96%);
  box-shadow: 0 0 3.2cqw 1cqw rgba(48, 180, 84, 0.5);
  opacity: 0;
}
@keyframes pitch-seal {
  0% { opacity: 1; transform: scaleX(7); }
  28% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
.pitch-stage.is-sealed .pitch-seam::before { animation: pitch-seal 1.1s ease-out both; }
.pitch-seam::after {                   /* the flash along the cut at the moment the picture breaks */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.12cqw;
  width: 0.24cqw;
  background: linear-gradient(to top, #fff 0%, #ffe9b8 40%, rgba(233, 180, 76, 0) 100%);
  box-shadow: 0 0 2.6cqw 0.7cqw rgba(255, 233, 184, 0.55);
  opacity: 0;
}
@keyframes pitch-crack { 0% { opacity: 1; } 100% { opacity: 0; } }
.pitch-stage.is-cracking .pitch-seam::after { animation: pitch-crack 0.32s ease-out both; }

/* ---------- The sweep that brings in a new photograph ---------- */

.pitch-wipe {
  position: absolute;
  z-index: 2;
  top: -2%;
  bottom: -2%;
  left: 0;
  width: 240cqw;
  background: #001a36;
  box-shadow: 2.2cqw 0 0 var(--green), -3cqw 0 0 rgba(255, 255, 255, 0.16);
  transform: translate3d(-262cqw, 0, 0) skewX(-14deg);
  visibility: hidden;
  pointer-events: none;
}
@keyframes pitch-wipe {
  from { transform: translate3d(-262cqw, 0, 0) skewX(-14deg); }
  to { transform: translate3d(122cqw, 0, 0) skewX(-14deg); }
}
.pitch-stage.is-wiping .pitch-wipe { visibility: visible; animation: pitch-wipe 0.8s cubic-bezier(0.35, 0, 0.65, 1) both; }

/* ---------- Scenes ---------- */

.pitch-scene {
  position: absolute;
  inset: 0 0 16cqw 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5cqw 7cqw 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s 0.45s;
}
.pitch-scene.is-active { opacity: 1; visibility: visible; transition: opacity 0.45s ease; }
@keyframes pitch-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(1.3cqw, 0, 0); } }
@keyframes pitch-out { from { opacity: 1; transform: translate3d(1.3cqw, 0, 0); } to { opacity: 0; transform: translate3d(1.3cqw, -3.5cqw, 0); } }
.pitch-stage.is-started .pitch-scene.is-active { animation: pitch-drift var(--dur, 7s) linear both; }
.pitch-stage.is-started .pitch-scene.is-leaving { animation: pitch-out 0.35s cubic-bezier(0.5, 0, 0.9, 0.4) both; }

.pitch-headline {
  margin: 0;
  max-width: 16em;
  font-size: 6cqw;
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.022em;
  text-wrap: balance;
  text-shadow: 0 0.04em 0.9em rgba(0, 18, 40, 0.55);
}
/* each word rises from behind its own baseline */
.pitch-w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.07em 0 0.16em; margin: -0.07em 0 -0.16em; }
.pitch-w > .pitch-anim { display: inline-block; }

.pitch-scene--list .pitch-headline { max-width: 24em; font-size: 3.6cqw; font-weight: 600; line-height: 1.18; letter-spacing: -0.012em; color: rgba(255, 255, 255, 0.88); }

.pitch-items { margin: 2.6cqw 0 0; padding: 0; list-style: none; }
.pitch-items li { position: relative; font-size: 3.4cqw; line-height: 1.15; text-shadow: 0 0.04em 0.9em rgba(0, 18, 40, 0.6); }
.pitch-item { display: block; }
.pitch-item-name { font-weight: 700; }
.pitch-item-note { font-weight: 400; color: rgba(255, 255, 255, 0.78); }

/* plain list: a short green dash before each line */
.pitch-scene:not([class*="pitch-fig--"]) .pitch-items li { padding: 0.28em 0 0.28em 1.15em; }
.pitch-scene:not([class*="pitch-fig--"]) .pitch-items li::before {
  content: ""; position: absolute; left: 0; top: 0.72em; width: 0.5em; height: 0.16em; background: var(--green);
}
.pitch-scene:not([class*="pitch-fig--"])[data-items="4"] .pitch-items li { font-size: 2.85cqw; }

/* the names in a list rise from behind their own line, like the words of the headline */
.pitch-fig--grid .pitch-items li,
.pitch-fig--columns .pitch-items li,
.pitch-scene:not([class*="pitch-fig--"]) .pitch-items li { overflow: hidden; }

/* "grid" and "columns": each item sits under a hairline that draws in */
.pitch-fig--grid .pitch-items,
.pitch-fig--columns .pitch-items { display: grid; gap: 2.6cqw 3.2cqw; }
.pitch-fig--grid .pitch-items { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 62cqw; }
.pitch-fig--columns .pitch-items { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.pitch-fig--grid .pitch-items li,
.pitch-fig--columns .pitch-items li { padding-top: 1.25cqw; font-size: 4.2cqw; }
.pitch-fig--columns .pitch-items li { font-size: 2.9cqw; }
.pitch-rule {
  position: absolute; top: 0; left: 0; right: 0;
  height: max(1.5px, 0.17cqw);
  background: rgba(255, 255, 255, 0.6);
  transform-origin: left center;
}
.pitch-fig--columns .pitch-rule { height: max(2px, 0.3cqw); background: var(--green); }

/* "tags": outlined labels that land like a stamp */
.pitch-fig--tags .pitch-items { display: flex; flex-wrap: wrap; gap: 1.5cqw; }
.pitch-fig--tags .pitch-items li:nth-child(odd) { --r: -6deg; }
.pitch-fig--tags .pitch-items li:nth-child(even) { --r: 5deg; }
.pitch-fig--tags .pitch-items li::after {          /* the ring a stamp leaves when it lands */
  content: "";
  position: absolute;
  inset: 0;
  border: max(1.5px, 0.17cqw) solid #fff;
  border-radius: 0.5cqw;
  opacity: 0;
  pointer-events: none;
}
.pitch-fig--tags .pitch-item {
  padding: 0.42em 0.8em 0.46em;
  border: max(1.5px, 0.17cqw) solid rgba(255, 255, 255, 0.8);
  border-radius: 0.5cqw;
  background: rgba(0, 27, 56, 0.35);
  font-size: 4.2cqw;
  letter-spacing: -0.01em;
}

/* "frameworks": a line drawing beside each name */
.pitch-fig--frameworks .pitch-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.6cqw 4cqw; margin-top: 3.2cqw; max-width: 78cqw; }
.pitch-fig--frameworks .pitch-items li { display: grid; grid-template-columns: 7.2cqw minmax(0, 1fr); gap: 1.9cqw; align-items: center; font-size: 2.8cqw; }
.pitch-fig--frameworks .pitch-item-note { display: block; margin-top: 0.2em; font-size: 0.8em; }
.pitch-glyph { display: block; width: 7.2cqw; height: 7.2cqw; color: #fff; }
.pitch-glyph svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pitch-draw { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pitch-draw--amber { stroke: var(--amber); stroke-dasharray: 0.045 0.03; }
.pitch-rise { fill: currentColor; transform-box: fill-box; transform-origin: 50% 100%; }
.pitch-tint { fill: var(--amber); opacity: 0.92; }
.pitch-tint--green { fill: var(--green); opacity: 1; }

/* "redline": one red line across the whole frame */
.pitch-redline {
  display: block;
  height: max(2px, 0.26cqw);
  margin: 2.4cqw -10cqw 0;
  background: #e5484d;
  box-shadow: 0 0 1.6cqw rgba(229, 72, 77, 0.7);
  transform-origin: left center;
}

.pitch-detail {
  margin: 2.2cqw 0 0;
  max-width: 30em;
  font-family: var(--serif);
  font-size: 2.6cqw;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0.04em 0.9em rgba(0, 18, 40, 0.55);
}
.pitch-cta { margin: 2.6cqw 0 0; }
.pitch-cta .btn { font-size: max(1.9cqw, 0.9rem); }

/* ---------- Entrances ---------- */

@keyframes pitch-in { from { opacity: 0; transform: translateY(0.5em); } to { opacity: 1; transform: none; } }
@keyframes pitch-word { from { transform: translateY(112%); } to { transform: none; } }
@keyframes pitch-word-beat { from { transform: translateY(112%); } 60% { transform: translateY(-7%); } to { transform: none; } }
@keyframes pitch-stamp {
  0% { opacity: 0; transform: scale(1.9) rotate(var(--r, 0deg)); }
  55% { opacity: 1; transform: scale(0.95) rotate(0deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes pitch-stamp-ring { from { opacity: 0.75; transform: scale(1); } to { opacity: 0; transform: scale(1.32, 1.7); } }
@keyframes pitch-redflash { 0% { opacity: 0; } 14% { opacity: 1; } 100% { opacity: 0.3; } }
@keyframes pitch-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pitch-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pitch-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pitch-fade { from { opacity: 0; } }

.pitch-stage.is-started .pitch-scene.is-active .pitch-anim {
  animation: pitch-in 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-w > .pitch-anim {
  animation: pitch-word 0.7s cubic-bezier(0.16, 0.8, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-w--beat > .pitch-anim {      /* the held-back last word lands harder */
  animation: pitch-word-beat 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active.pitch-fig--grid .pitch-item,
.pitch-stage.is-started .pitch-scene.is-active.pitch-fig--columns .pitch-item,
.pitch-stage.is-started .pitch-scene.is-active:not([class*="pitch-fig--"]) .pitch-item {
  animation: pitch-word 0.7s cubic-bezier(0.16, 0.8, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active.pitch-fig--tags .pitch-item {
  animation: pitch-stamp 0.42s cubic-bezier(0.3, 0, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active.pitch-fig--tags .pitch-items li::after {
  animation: pitch-stamp-ring 0.6s ease-out forwards;
  animation-delay: calc(var(--d, 0s) + 0.22s);
}
.pitch-stage.is-started[data-fig="redline"] .pitch-shade::after {
  animation: pitch-redflash 1.8s ease-out both;
  animation-delay: var(--hit, 1s);
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-rule,
.pitch-stage.is-started .pitch-scene.is-active .pitch-redline {
  animation: pitch-sweep 0.8s cubic-bezier(0.6, 0, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-redline { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.7, 0, 0.15, 1); }
.pitch-stage.is-started .pitch-scene.is-active .pitch-draw {
  animation: pitch-stroke 0.9s cubic-bezier(0.5, 0, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-draw--late { animation-delay: calc(var(--d, 0s) + 0.5s); }
.pitch-stage.is-started .pitch-scene.is-active .pitch-draw--amber { animation-name: pitch-fade; }
.pitch-stage.is-started .pitch-scene.is-active .pitch-rise {
  animation: pitch-grow 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--d, 0s) + var(--k, 0) * 0.09s);
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-tint {
  animation: pitch-fade 0.5s ease both;
  animation-delay: calc(var(--d, 0s) + 0.95s);
}
.pitch-stage.is-paused *,
.pitch-stage.is-paused *::before,
.pitch-stage.is-paused *::after { animation-play-state: paused !important; }
.pitch-stage.is-paused .pitch-seg i { transition: none; }

/* ---------- The line with a gap in it ---------- */

.pitch-line {
  --x: 0.02;
  position: absolute;
  left: 7cqw;
  right: 7cqw;
  bottom: 5.4cqw;
  z-index: 3;                          /* stays in view while the photographs cut behind the sweep */
  display: grid;
  grid-template-columns: 62fr 18fr 20fr;   /* the gap sits to the right, where the photograph shows */
  font-size: 1.75cqw;
}
.pitch-seg { position: relative; display: block; padding-top: 1.25em; }
.pitch-seg i {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.3em;
  background: #fff;
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 1.4s ease, background-color 0.9s ease;
}
.pitch-seg--left i { transform-origin: left center; }
.pitch-seg--right i { transform-origin: right center; }
.pitch-seg--gap i { background: var(--green); transform-origin: left center; }
.pitch-seg b {
  display: block;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}
.pitch-seg--right b { text-align: right; }
.pitch-seg--gap b { position: absolute; top: 1.25em; left: 0; right: 0; text-align: center; }
.pitch-seg--gap::before {            /* the gap itself, drawn as a dashed outline */
  content: "";
  position: absolute;
  top: 0;
  left: 0.5em;
  right: 0.5em;
  height: 0.3em;
  border-top: 0.16em dashed var(--amber);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pitch-gap-label { color: var(--amber) !important; }
.pitch-stage[data-line="bridge"] .pitch-gap-label { transition: opacity 0.15s ease; }   /* gone before the new name comes in */
.pitch-bridge-label { color: #fff !important; font-weight: 700 !important; }

.pitch-stage:not([data-line="none"]) .pitch-seg--left i,
.pitch-stage:not([data-line="none"]) .pitch-seg--right i { transform: scaleX(1); }
.pitch-stage:not([data-line="none"]) .pitch-seg--left b,
.pitch-stage:not([data-line="none"]) .pitch-seg--right b { opacity: 1; }

.pitch-stage[data-line="gap"] .pitch-seg--gap::before,
.pitch-stage[data-line="gap"] .pitch-gap-label { opacity: 1; }

.pitch-stage[data-line="bridge"] .pitch-seg--gap i { transform: scaleX(1); box-shadow: 0 0 1.1em rgba(48, 180, 84, 0.75); transition-duration: 0.6s, 1.4s, 0.9s; transition-timing-function: cubic-bezier(0.7, 0, 0.2, 1), ease, ease; }
.pitch-stage[data-line="bridge"] .pitch-bridge-label { opacity: 1; }

/* the gap flashes when it opens */
@keyframes pitch-gapflash { 0% { opacity: 0; transform: scaleY(3); filter: brightness(2.4); } 100% { opacity: 1; transform: none; filter: none; } }
.pitch-stage.is-started[data-line="gap"] .pitch-seg--gap::before { transform-origin: center top; animation: pitch-gapflash 0.7s ease-out both; }

/* a glint runs down the line when the gap closes */
.pitch-line::after {
  content: "";
  position: absolute;
  top: -0.25em;
  left: 0;
  width: 12%;
  height: 0.8em;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  opacity: 0;
  pointer-events: none;
}
@keyframes pitch-glint { 0% { opacity: 0; transform: translateX(300%); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(740%); } }
.pitch-stage.is-started[data-line="bridge"] .pitch-line::after { animation: pitch-glint 1s cubic-bezier(0.5, 0, 0.3, 1) 0.45s both; }

/* at the end the whole line has turned green */
.pitch-stage.is-arrived .pitch-seg i { background: var(--green); }
.pitch-stage.is-arrived .pitch-seg--right b { color: #fff; }

/* the venture: a dot that travels the line, waits at the gap and crosses when it closes */
.pitch-dot {
  position: absolute;
  top: 0.15em;
  left: calc(var(--x) * 100%);
  width: 1.05em;
  height: 1.05em;
  margin: -0.525em 0 0 -0.525em;
  opacity: 0;
  color: #fff;
  transition: opacity 0.4s ease, color 0.8s ease;
}
.pitch-stage:not([data-line="none"]) .pitch-dot { opacity: 1; }
.pitch-stage[data-line="gap"] .pitch-dot { color: var(--amber); }
.pitch-stage[data-line="bridge"] .pitch-dot { color: var(--green); }
.pitch-dot::before {                 /* the streak behind the dot: /js/pitch.js sets --tail from its speed */
  content: "";
  position: absolute;
  top: 50%;
  right: 50%;
  width: calc(var(--tail, 0) * 13em);
  height: 0.46em;
  margin-top: -0.23em;
  border-radius: 0.3em;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: 0.9;
}
.pitch-dot b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.22em rgba(255, 255, 255, 0.2), 0 0 1.3em rgba(255, 255, 255, 0.65);
  transition: box-shadow 0.8s ease;
}
.pitch-stage[data-line="gap"] .pitch-dot b { box-shadow: 0 0 0 0.22em rgba(233, 180, 76, 0.35), 0 0 1.3em rgba(233, 180, 76, 0.8); }
.pitch-stage[data-line="bridge"] .pitch-dot b { box-shadow: 0 0 0 0.22em rgba(48, 180, 84, 0.4), 0 0 1.3em rgba(48, 180, 84, 0.85); }

@keyframes pitch-nudge {            /* runs at the gap, and is thrown back */
  0%, 44%, 100% { transform: translateX(0); }
  58% { transform: translateX(0.95em); }
  68% { transform: translateX(-0.5em); }
  82% { transform: translateX(0.12em); }
}
@keyframes pitch-recoil {           /* the moment the gap opens in front of it */
  0% { transform: translateX(0); }
  22% { transform: translateX(-1.7em); }
  100% { transform: translateX(0); }
}
.pitch-stage.is-started[data-line="gap"] .pitch-dot b { animation: pitch-recoil 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), pitch-nudge 2.1s ease-in-out 1.1s infinite; }
/* before the film starts, the dot already tries the gap */
.pitch-stage:not(.is-started)[data-line="gap"] .pitch-dot b { animation: pitch-nudge 2.6s ease-in-out 1.2s infinite; }

@keyframes pitch-ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }
.pitch-dot::after { content: ""; position: absolute; inset: 0; border: 0.12em solid var(--green); border-radius: 50%; opacity: 0; }
.pitch-stage.is-arrived .pitch-dot::after { animation: pitch-ring 1.5s ease-out 3; }

/* ---------- Poster and controls ---------- */

.pitch-poster {
  position: absolute;
  inset: 0 0 16cqw 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3cqw;
  padding: 5cqw 7cqw 0;
}
.pitch-stage.is-started .pitch-poster { display: none; }
.pitch-stage:not(.is-started) .pitch-seg i,
.pitch-stage:not(.is-started) .pitch-seg b,
.pitch-stage:not(.is-started) .pitch-seg--gap::before { transition: none; }
.pitch-poster-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8em 1.4em; margin: 0; }
.pitch-poster-note { font-size: max(1.7cqw, 0.9rem); font-weight: 500; color: rgba(255, 255, 255, 0.82); }

.pitch-start { display: inline-flex; align-items: center; gap: 0.7em; font-size: max(2cqw, 1rem); }

.pitch-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.42em 0 0.42em 0.7em;
  border-color: transparent transparent transparent currentColor;
}

.pitch-controls { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-family: var(--sans); }
.pitch-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}
.pitch-toggle:hover { border-color: var(--ink); }
.pitch-toggle.is-on .pitch-icon {          /* pause: two bars */
  width: 0.72em;
  height: 0.84em;
  border-width: 0 0.24em;
  border-color: transparent currentColor;
}

.pitch-steps { flex: 1 1 auto; display: flex; gap: 4px; }
.pitch-step { flex: 1 1 0; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.pitch-step::before { content: ""; display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.pitch-step span {
  position: absolute;
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--green-deep);
  transform: scaleX(0);
  transform-origin: left center;
}
.pitch-step { position: relative; }
.pitch-step span { left: 0; right: 0; top: 50%; margin-top: -3px; }
.pitch-step:hover::before { background: #b9c6d3; }

.pitch-time { flex: 0 0 auto; min-width: 5.6em; text-align: right; font-size: 0.9rem; font-variant-numeric: tabular-nums; color: var(--text-soft); }

.pitch-transcript { margin-top: 10px; font-size: 1rem; color: var(--text-soft); }
.pitch-transcript summary { font-family: var(--sans); font-size: 0.92rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.pitch-transcript ol { margin: 0.8em 0 0; padding-left: 1.4em; max-width: var(--measure); color: var(--text); }
.pitch-transcript li { margin-bottom: 0.5em; }

/* ---------- Wide stages: while the picture is parted, the text keeps to the left of the opening ---------- */

@container (min-width: 561px) {
  .pitch-scene--gapped { padding-right: var(--clear, 7cqw); }
  .pitch-scene--gapped.pitch-fig--grid .pitch-items li { font-size: 3.6cqw; }
  .pitch-scene--gapped.pitch-fig--tags .pitch-item { font-size: 3.8cqw; }
}

/* ---------- Narrow stages (phones) ---------- */

@container (max-width: 560px) {
  .pitch-gates { height: 8.5cqw; left: 16%; right: 16%; }
  .pitch-scene { inset: 0 0 27cqw 0; padding: 8cqw 7cqw 0; }
  .pitch-headline { font-size: 8.6cqw; }
  .pitch-scene--list .pitch-headline { font-size: 5.3cqw; }
  .pitch-items { margin-top: 5cqw; }
  .pitch-items li { font-size: 6cqw; }
  .pitch-scene:not([class*="pitch-fig--"])[data-items="4"] .pitch-items li { font-size: 4.7cqw; }

  .pitch-fig--grid .pitch-items,
  .pitch-fig--columns .pitch-items { gap: 4.4cqw 5cqw; max-width: none; }
  .pitch-fig--columns .pitch-items { grid-auto-flow: row; }
  .pitch-fig--grid .pitch-items li { padding-top: 2.2cqw; font-size: 5.7cqw; }
  .pitch-fig--columns .pitch-items li { padding-top: 2.2cqw; font-size: 5.7cqw; }

  .pitch-fig--tags .pitch-items { gap: 2.6cqw; }
  .pitch-fig--tags .pitch-item { font-size: 6.2cqw; border-radius: 1cqw; }

  .pitch-fig--frameworks .pitch-items { grid-template-columns: minmax(0, 1fr); gap: 3.4cqw; margin-top: 5cqw; }
  .pitch-fig--frameworks .pitch-items li { grid-template-columns: 10cqw minmax(0, 1fr); gap: 3.4cqw; font-size: 4.8cqw; }
  .pitch-glyph { width: 10cqw; height: 10cqw; }

  .pitch-redline { margin-top: 5cqw; }
  .pitch-detail { margin-top: 4.4cqw; font-size: 4.6cqw; }
  .pitch-cta { margin-top: 5cqw; }
  .pitch-line { bottom: 8cqw; font-size: 2.85cqw; grid-template-columns: 34fr 30fr 36fr; }
  .pitch-fig--frameworks .pitch-items { max-width: none; }
  .pitch-poster { inset: 0 0 27cqw 0; gap: 6cqw; padding: 8cqw 7cqw 0; }
  /* tall frame: show the upper part of the photograph larger, so its subject sits below the text */
  .pitch-bg--top { background-size: auto 140%; }
  .pitch-poster-note { font-size: 0.95rem; }
}
@media (max-width: 600px) {
  .pitch-stage { aspect-ratio: 4 / 5; }
}

/* ---------- The film on its own page ---------- */

body[data-page="pitch"] { background: var(--frost); }
body[data-page="pitch"] .pitch-band { border-bottom: 0; }
body[data-page="pitch"] .pitch-band-inner { max-width: 1240px; }

@media (prefers-reduced-motion: reduce) {
  .pitch-stage.is-started .pitch-scene.is-active,
  .pitch-stage.is-started .pitch-scene.is-leaving,
  .pitch-stage.is-started .pitch-scene.is-active *,
  .pitch-stage.is-started .pitch-scene.is-active *::after { animation: none !important; }
  .pitch-stage .pitch-dot b, .pitch-stage .pitch-dot::after,
  .pitch-stage .pitch-line::after, .pitch-stage .pitch-seg--gap::before, .pitch-stage .pitch-shade::after { animation: none !important; }
  .pitch-wipe, .pitch-dot::before, .pitch-seam { display: none; }
  .pitch-stage .pitch-world { animation: none !important; }
  .pitch-scene, .pitch-bg, .pitch-seg i, .pitch-seg b, .pitch-seg--gap::before, .pitch-gate { transition: none; }
}

/* ---------- Recording mode (/pitch.html?autoplay&record): the film fills the window ---------- */

.pitch-record body { overflow: hidden; }
.pitch-record .site-header { display: none; }
.pitch-record .pitch-poster { display: none; }
.pitch-record .pitch-stage { position: fixed; inset: 0; z-index: 999; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.pitch-record .pitch-cta::after { content: "attolloogroup.com"; margin-left: 1.4em; font-size: 2.2cqw; font-weight: 600; vertical-align: middle; }

/* The pitch as plain text, shown when scripts are off */
.pitch-static { max-width: var(--measure); }
.pitch-static h2 { font-family: var(--sans); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; color: var(--ink); margin: 0 0 0.6em; }
.pitch-static ol { margin: 0 0 1.4em; padding-left: 1.4em; color: var(--text); }
.pitch-static li { margin-bottom: 0.5em; }

/* ---------- Light, beat and the cold open (added with the soundtrack) ---------- */

/* the canvas where light drifts through the frame and sparks fly (/js/pitch.js, Fx) */
.pitch-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }

/* the beat: a breath of light over the whole frame, and the line glows with it */
.pitch-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(90% 70% at 50% 100%, rgba(255, 236, 200, 0.5), rgba(255, 236, 200, 0) 70%);
  mix-blend-mode: soft-light;
  opacity: calc(var(--pulse, 0) * 0.55);
}
.pitch-line { filter: drop-shadow(0 0 calc(var(--pulse, 0) * 1.4cqw) rgba(255, 255, 255, 0.65)); }

/* the cold open: the frame comes up out of the dark, from close to far, behind a flare */
@keyframes pitch-reveal {
  0% { filter: brightness(0) blur(1.6cqw); transform: scale(1.38); }
  22% { filter: brightness(0.35) blur(1.1cqw); }
  100% { filter: none; transform: none; }
}
.pitch-stage.is-intro .pitch-world { animation: pitch-reveal 1.7s cubic-bezier(0.2, 0.75, 0.1, 1) both; }
@keyframes pitch-intro-shade { from { opacity: 1; } to { opacity: 0; } }
.pitch-stage.is-intro .pitch-shade::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000a16;
  animation: pitch-intro-shade 1.2s ease-out 0.15s both;
}

/* a cut to a new scene nudges the camera forward */
@keyframes pitch-kick { from { transform: scale(1.045); } to { transform: none; } }
.pitch-stage.is-kick .pitch-bgs { animation: pitch-kick 0.9s cubic-bezier(0.15, 0.7, 0.2, 1) both; }

/* lit words: they rise like the others, then flare once, in the colour of the moment */
.pitch-w--key > .pitch-anim { position: relative; color: #ffd58a; text-shadow: 0 0 0.5em rgba(255, 196, 92, 0.55), 0 0.04em 0.9em rgba(0, 18, 40, 0.55); }
.pitch-stage[data-line="bridge"] .pitch-w--key > .pitch-anim { color: #9af2bb; text-shadow: 0 0 0.5em rgba(80, 220, 130, 0.55), 0 0.04em 0.9em rgba(0, 18, 40, 0.55); }
.pitch-stage[data-fig="redline"] .pitch-w--key > .pitch-anim { color: #ff9a9d; text-shadow: 0 0 0.5em rgba(229, 72, 77, 0.6), 0 0.04em 0.9em rgba(0, 18, 40, 0.55); }
@keyframes pitch-pop {              /* uses scale, not transform, so it does not undo the rise */
  0% { scale: 1; filter: none; }
  35% { scale: 1.14; filter: brightness(1.6); }
  100% { scale: 1; filter: none; }
}
.pitch-stage.is-started .pitch-scene.is-active .pitch-w--key > .pitch-anim {
  animation: pitch-word 0.7s cubic-bezier(0.16, 0.8, 0.2, 1) both, pitch-pop 0.6s ease-out both;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + 0.55s);
  animation-fill-mode: both, none;
  transform-origin: 50% 70%;
}
.pitch-w--key { padding-left: 0.3em; padding-right: 0.3em; margin-left: -0.3em; margin-right: -0.3em; }   /* room for the glow */

/* ---------- The poster: alive before anyone presses play ---------- */

@keyframes pitch-breathe { from { transform: scale(1); } to { transform: scale(1.09) translate3d(-1.4%, 0.6%, 0); } }
.pitch-stage:not(.is-started) .pitch-bgs { animation: pitch-breathe 15s ease-in-out infinite alternate; }

/* slow rays of light from the upper right */
@keyframes pitch-rays { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.pitch-poster::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -30%;
  width: 120%;
  height: 180%;
  pointer-events: none;
  background: repeating-conic-gradient(from 200deg at 80% 30%, rgba(255, 232, 190, 0.13) 0deg 4deg, rgba(255, 232, 190, 0) 4deg 13deg);
  -webkit-mask-image: radial-gradient(60% 55% at 78% 32%, #000 0%, transparent 72%);
  mask-image: radial-gradient(60% 55% at 78% 32%, #000 0%, transparent 72%);
  mix-blend-mode: screen;
  transform-origin: 80% 30%;
  animation: pitch-rays 18s ease-in-out infinite alternate;
}
.pitch-poster > * { position: relative; }

.pitch-poster-title { font-size: 6.4cqw; max-width: 13em; }
.pitch-poster-title .pitch-anim { transform: translateY(112%); }
.pitch-stage.is-ready:not(.is-started) .pitch-poster-title .pitch-anim {
  animation: pitch-word 0.95s cubic-bezier(0.16, 0.8, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}
.pitch-stage.is-ready:not(.is-started) .pitch-poster-title .pitch-w--key > .pitch-anim {
  animation: pitch-word 0.95s cubic-bezier(0.16, 0.8, 0.2, 1) both, pitch-pop 0.7s ease-out both;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + 0.8s);
  animation-fill-mode: both, none;
}
@keyframes pitch-rise-in { from { opacity: 0; transform: translateY(1.2em); } to { opacity: 1; transform: none; } }
.pitch-stage.is-ready:not(.is-started) .pitch-poster-row { animation: pitch-rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.9s both; }

/* the play button: a bright disc that breathes, with rings going out from it */
.pitch-start {
  display: inline-flex;
  align-items: center;
  gap: 1.1em;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: 700 max(2.2cqw, 1rem) / 1 var(--sans);
  cursor: pointer;
}
.pitch-start-disc {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(8.4cqw, 3.4rem);
  height: max(8.4cqw, 3.4rem);
  border-radius: 50%;
  background: #fff;
  color: #001b38;
  font-size: max(2.6cqw, 1.15rem);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5), 0 0.8cqw 3cqw rgba(0, 10, 30, 0.45);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3), background-color 0.2s ease;
}
.pitch-start-disc .pitch-icon { margin-left: 0.18em; }
@keyframes pitch-ripple { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
.pitch-start-disc::before,
.pitch-start-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: pitch-ripple 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.pitch-start-disc::after { animation-delay: 1.2s; }
.pitch-start:hover .pitch-start-disc,
.pitch-start:focus-visible .pitch-start-disc { transform: scale(1.08); background: #e9fff1; }
.pitch-start:focus-visible { outline: none; }
.pitch-start:focus-visible .pitch-start-disc { outline: 3px solid #fff; outline-offset: 4px; }
.pitch-start-label { text-shadow: 0 0.04em 0.8em rgba(0, 18, 40, 0.6); }

/* the sound switch beside the time */
.pitch-sound {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.pitch-sound:hover { border-color: var(--ink); }
.pitch-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pitch-sound-body { fill: currentColor; }
.pitch-sound-off { display: none; }
.pitch-sound.is-off .pitch-sound-on { display: none; }
.pitch-sound.is-off .pitch-sound-off { display: inline; }

@container (max-width: 560px) {
  .pitch-poster-title { font-size: 9.4cqw; }
  .pitch-start-disc { width: 15cqw; height: 15cqw; font-size: 4.6cqw; }
  .pitch-start { font-size: 4.6cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .pitch-fx, .pitch-stage::after, .pitch-poster::before { display: none; }
  .pitch-stage .pitch-bgs, .pitch-stage .pitch-start-disc::before, .pitch-stage .pitch-start-disc::after,
  .pitch-stage .pitch-poster-row, .pitch-stage .pitch-poster-title .pitch-anim { animation: none !important; transform: none; }
  .pitch-stage.is-intro .pitch-world, .pitch-stage.is-intro .pitch-shade::before { animation: none !important; }
}
.pitch-stage.is-paused .pitch-fx { opacity: 0.85; }
.pitch-record .pitch-sound { display: none; }
