:root {
  --parchment: #f2eadb;
  --parchment-deep: #e7dcc6;
  --ink: #2a2018;
  --ink-soft: #6b5b4a;
  --terracotta: #a4472a;
  --gold: #b08d4c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #b89a78; } /* colour shown until the video loads */

/* Whole page scale. 1 = the design's natural size. */
html { zoom: 1; }

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip; /* clip, so the top section can hold in place while scrolling */
  background: transparent;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* The video is the background of the whole page, fixed while content scrolls */
.page-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

/* Section 1: stats */
.stage { position: relative; margin-bottom: 40px; }
/* Heading straight on the video: white with a tight dark edge so it reads on bright or dark footage */
.stage h1,
.stage .dash-range {
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.7);
}
.stage .dash-range { font-weight: 500; }
main .tile { background: #ebe6da; }
main .tile:hover { background: #f3efe6; }
main .chart { background: #ebe6da; border-color: transparent; }

/* Hero: dashboard */
.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 104px 24px 48px;
  text-align: center;
}

.dash { text-align: left; }

/* Stats section at 90% on larger screens; the reels below keep their size */
@media (min-width: 861px) {
  .hero { zoom: 0.9; }
}

.dash-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(26px, 4.4vw, 34px);
  line-height: 1.1;
}
.dash-range { margin: 0; font-size: 16px; color: var(--ink-soft); }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 16px 16px 14px;
  background: var(--parchment-deep);
  border: 3px solid transparent;
  border-radius: 18px;
  transition: border-color 0.15s, background 0.15s;
}
.tile:hover { background: #e1d4ba; }
.tile:focus-visible { outline: 2px solid #5f7f9e; outline-offset: 2px; }
.tile[aria-selected="true"] { border-color: #5f7f9e; }
.tile-label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.tile-value {
  display: block;
  margin-top: 6px;
  font-size: clamp(22px, 2.8vw, 28px);
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}
.tile-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums;
}

/* Rounded panel behind the graph so the line reads clearly */
.chart {
  position: relative;
  margin-top: 20px;
  padding: 24px 20px 14px 12px;
  background: #fbf7ee;
  border: 1px solid #e3d6bc;
  border-radius: 20px;
}
#chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.grid { stroke: #d3cdbf; stroke-width: 1; }
.axis-text {
  fill: var(--ink-soft);
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-variant-numeric: lining-nums;
}
.line { fill: none; stroke: #5f7f9e; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line.est { stroke-dasharray: 2 7; }
.dot { fill: #5f7f9e; stroke: var(--parchment); stroke-width: 2; }
.cross { stroke: var(--ink-soft); stroke-width: 1; }

.tip {
  position: absolute;
  top: 0;
  pointer-events: none;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--parchment);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
.tip b { display: block; font-size: 16px; font-weight: 600; }

.links {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.links a {
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 26px;
  border: 1px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.links a:hover, .links a:focus-visible { background: var(--ink); color: var(--parchment); }

/* Gallery */
/* Reels section at 85% on larger screens */
@media (min-width: 861px) {
  main, .third { zoom: 0.847; }
  .section-title { font-size: 48px; margin-bottom: 80px; } /* keeps the heading the same size on screen */
}

/* Section 2 sits on one big rounded panel over the video */
main, .third {
  width: min(1168px, calc(100% - 48px));
  margin: 0 auto 72px;
  padding: 8px 40px 56px;
  background: transparent;
  border-radius: 28px;
}

.section-title {
  margin: 0 0 88px; /* heading sits high; the reels keep their place */
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 56px 36px;
}

.gallery-more { margin-top: 52px; }
.gallery[hidden] { display: none; }

.more-wrap { margin: 56px 0 0; text-align: center; }
.more-btn {
  appearance: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 34px;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}
.more-btn:hover, .more-btn:focus-visible { background: var(--ink); color: var(--parchment); }

.gallery > li { container-type: inline-size; }

/* Each reel is one piece: the arched thumbnail with a text box extending below it */
.card {
  display: block;
  height: 100%;
  padding-bottom: 18px;
  text-decoration: none;
  text-align: center;
  background: #ebe6da;
  border-radius: 14px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.6);
}
.card h3, .card .views, .card .meta { padding: 0 12px; }

/* arched niche, like a framed alcove */
.frame {
  padding: 8px 8px 0;
  border-radius: 14px 14px 0 0;
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
}

.num {
  margin: 20px 0 2px;
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  font-variant-numeric: lining-nums;
  color: #54647a; /* the blue of the sky in the background video */
}
.card h3 {
  margin: 0;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.2;
  text-wrap: balance;
}
.views {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: lining-nums;
}
.meta {
  margin: 2px 0 0;
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
}

/* Footer */
footer { text-align: center; padding: 0 24px 64px; }
footer p { margin: 0; font-size: 21px; }
footer a { text-decoration-color: var(--gold); text-underline-offset: 4px; }
footer a:hover { color: var(--terracotta); }
.fine { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }

@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .hero { padding: 64px 16px 36px; }
  .chart { padding: 16px 10px 8px 4px; border-radius: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card h3 { font-size: 15px; }
  .frame { padding: 5px 5px 0; }
  .card { padding-bottom: 14px; border-radius: 12px; }
  .card h3, .card .views, .card .meta { padding: 0 8px; }
  .rule span { width: 56px; }
  .tile { padding: 12px 12px 10px; border-radius: 14px; }
  .tile-label { font-size: 13px; }
  .tile-value { font-size: 20px; }
  .section-title { font-size: 25px; margin-bottom: 52px; }
  main, .third { width: calc(100% - 24px); margin: 0 auto 40px; padding: 8px 14px 36px; border-radius: 22px; }
  .gallery-more { margin-top: 32px; }
  .more-wrap { margin-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px auto;
  color: var(--gold);
}
.rule span { width: 90px; height: 1px; background: var(--gold); }
.rule i { font-style: normal; font-size: 14px; }

/* Section 2 has no panel: its text sits on the video, white with a tight dark edge */
main .section-title, .third .section-title {
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.7);
}
/* See more: no fill, just a border */
main .more-btn {
  background: transparent;
  color: #ebe6da;
  border: 3px solid #ebe6da;
  border-radius: 12px;
  font-weight: 600;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.6), 0 1px 5px rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}
main .more-btn:hover, main .more-btn:focus-visible { background: rgba(235, 230, 218, 0.18); color: #ebe6da; }

/* Page heading: centred, Instrument Serif */
.dash-head { justify-content: center; }
.dash-range[hidden] { display: none; }
.stage h1 {
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 5.4vw, 54px);
  text-align: center;
}

.stage .dash-head { margin-bottom: 52px; }
@media (max-width: 860px) { .stage .dash-head { margin-bottom: 36px; } }

/* Page heading in light cream, with a thin dark edge so it reads over the video */
.stage h1 {
  color: #f6ecd6; /* light cream */
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.6), 0 1px 6px rgba(0, 0, 0, 0.45);
}

/* Headings share the panels' colour */
.stage h1,
main .section-title, .third .section-title { color: #ebe6da; }

/* View counts on the reels */
.card .views { color: #cc7426; }

/* Both headings in Instrument Serif, with a soft shadow */
.stage h1,
main .section-title, .third .section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400; /* the font has a single weight */
  letter-spacing: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28), 0 0 1px rgba(0, 0, 0, 0.25);
}
.stage h1 { font-size: clamp(42px, 13vw, 78px); }
/* Handle under the page heading: same look at half the size */
.dash-title { text-align: center; }
.stage .dash-handle {
  margin: 6px 0 0;
  font-family: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(17px, 2.4vw, 24px);
  font-style: normal;
  line-height: 1.1;
  color: #ebe6da;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28), 0 0 1px rgba(0, 0, 0, 0.25);
}
main .section-title, .third .section-title { font-size: 74px; } /* 63px on screen after the section's 0.847 scale: same as the page heading */
@media (max-width: 860px) {
  main .section-title, .third .section-title { font-size: clamp(42px, 6.3vw, 63px); }
}

.stage .dash-handle a { color: inherit; text-decoration: none; }
.stage .dash-handle a:hover { text-decoration: underline; text-underline-offset: 0.15em; }

/* Still-frame version of the background, used on phones that block video */
.page-frames {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-size: 1000% 1200%;
  background-repeat: no-repeat;
}

/* See More in Instrument Serif, title case */
main .more-btn {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0;
  text-transform: none;
  padding: 10px 34px 12px;
}

/* Laptop and wider: heading and handle in a left column, stats and graph on the right */
@media (min-width: 1100px) {
  .hero { max-width: 1600px; padding-left: 102px; padding-right: 102px; }
  .dash {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 26px;
    align-items: center;
  }
  .stage .dash-head { display: block; grid-column: 1; grid-row: 1 / span 2; margin-bottom: 0; position: relative; top: -12px; }
  .dash-title { text-align: left; width: min-content; } /* one word per line */
  .stage h1 { text-align: left; font-size: 116px; line-height: 1; text-indent: -0.021em; } /* indent: lines the C up with the P and the byline */
  .stage .dash-handle { margin-top: 14px; position: relative; top: 96px; font-size: 21px; } /* stays where it was when the heading moved up */
  /* Stats and graph at 76%, pushed to the right so the heading has room */
  .stage .gallery { grid-column: 2; grid-row: 1 / span 2; min-width: 0; } /* narrower than its scale, so the graph is less wide */
}

/* Reels carousel (switched on by carousel.js; without it the reels stay a plain grid) */
html { overflow-x: clip; }
.gallery.carousel-on {
  --cw: clamp(190px, 58vw, 300px);
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  justify-items: center;
  padding: 10px 0 26px;
  perspective: 1500px;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.gallery.carousel-on.in { opacity: 1; }
.gallery.carousel-on.dragging { cursor: grabbing; }
.gallery.carousel-on > li {
  grid-area: 1 / 1;
  width: var(--cw);
  will-change: transform, opacity;
  backface-visibility: hidden;
  /* a fade mask three reels wide: the middle third is solid, so sliding it fades the reel's left or right edge */
  -webkit-mask: linear-gradient(to right, transparent 0, #000 33.34%, #000 66.66%, transparent 100%) 50% 0 / 300% 100% no-repeat;
  mask: linear-gradient(to right, transparent 0, #000 33.34%, #000 66.66%, transparent 100%) 50% 0 / 300% 100% no-repeat;
  -webkit-tap-highlight-color: transparent;
}
.gallery.carousel-on .card { -webkit-user-drag: none; -webkit-touch-callout: none; }
.gallery.carousel-on.dragging .card { pointer-events: none; }

/* Reel cards: no box, just the thumbnail with the view count and then the title under it */
.card {
  background: transparent;
  color: #ebe6da;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3);
}
.card:hover, .card:focus-visible { box-shadow: none; }
.card .frame { padding: 0; }
.card .frame img { border-radius: 12px; }
.card .views { margin: 16px 0 0; font-size: 27px; font-weight: 700; line-height: 1.1; color: #ebe6da; }
.card h3, .gallery.carousel-on .card h3 { margin: 6px 0 0; font-size: 17px; font-weight: 500; }

/* Test (switched on by swap.js): the top section holds in place and one small scroll swaps it for the reels */
html.swap .stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  margin-bottom: 0;
}
/* the top section sits in the middle of the screen */
html.swap .stage { display: flex; flex-direction: column; justify-content: center; }
html.swap .hero { width: 100%; }
@media (min-width: 861px) {
  html.swap .hero { padding-top: 40px; padding-bottom: 160px; } /* sits a little above centre: less empty space at the top */
}
html.swap main, html.swap .third {
  --z: 1; /* the section's zoom, so sizes can be worked out from the screen height */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  padding-top: 94px;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
@media (min-width: 861px) {
  html.swap main, html.swap .third { --z: 0.847; padding-top: 131px; } /* 72px plus 50px on screen */
}
html.swap main .section-title, .third .section-title { margin-bottom: 14px; }
/* the page is only one small scroll long, so hide the browser's oversized scroll bar and show a small marker */
html.swap { scrollbar-width: none; }
html.swap::-webkit-scrollbar { display: none; }
html.swap body { overflow-y: clip; }
.swap-dot {
  position: fixed;
  right: 12px;
  top: 50%;
  width: 3px;
  height: 56px;
  margin-top: -28px;
  border-radius: 2px;
  background: rgba(235, 230, 218, 0.3);
  z-index: 5;
  pointer-events: none;
}
.swap-dot span {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: #ebe6da;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.45s ease;
}
html.swap .stage { opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0s 0.45s; }
html.swap-at-0 .stage { opacity: 1; visibility: visible; transition: opacity 0.55s ease 0.3s, visibility 0s 0.3s; }
html.swap-at-1 main, html.swap-at-2 .third:not(.fourth), html.swap-at-3 .fourth { opacity: 1; pointer-events: auto; transition: opacity 0.55s ease 0.3s; }
.third .section-title { text-wrap: balance; }

/* Headline numbers in bold */
main .tile-value { font-weight: 800; }

/* Laptop: stat tiles taller (less of a strip) with bigger text */
@media (min-width: 1100px) {
  main .tile { display: flex; flex-direction: column; min-height: 172px; padding: 22px 20px 20px; border-radius: 22px; }
  main .tile-label { font-size: 16.5px; margin-bottom: auto; }
  main .tile-value { font-size: 33px; margin-top: 14px; }
  main .tile-sub { font-size: 14.5px; min-height: 1.3em; }
}

/* Section 3: the workflow, step by step from the left */
.flow {
  display: flex;
  align-items: center;
  margin-top: 150px;
  margin-left: -120px; /* further left than the heading's column */
  color: #f1ebdc; /* cream */
}
.flow-step { flex: none; width: 170px; text-align: center; }
.flow-icon { display: block; width: auto; height: 180px; margin: 0 auto; filter: drop-shadow(0 6px 22px rgba(255, 214, 130, 0.45)); }
.flow-label {
  margin: 14px 0 0;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3);
}
/* the arrow (line and triangle tip in one piece) sits level with the middle of the bulb, not the label */
.flow-arrow {
  flex: none;
  position: relative;
  top: -20px;
  width: 84px;
  height: 16px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
}
.flow-arrow::before { content: ""; position: absolute; left: 0; right: 10px; top: 6.5px; height: 3px; border-radius: 2px; background: currentColor; }
.flow-arrow::after { content: ""; position: absolute; right: 0; top: 0; width: 14px; height: 16px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
@media (max-width: 860px) {
  .flow { margin-top: 100px; margin-left: -6px; }
  .flow-step { width: 124px; }
  .flow-icon { height: 124px; }
  .flow-label { font-size: 15px; margin-top: 10px; }
  .flow-arrow { width: min(58px, 15vw); top: -15px; }
}
/* an app icon sits in the same height as the bulb, a little smaller, so the labels line up */
.flow-icon-app { box-sizing: border-box; padding: 22px 0; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3)); }
@media (max-width: 860px) {
  .flow-step { width: 112px; }
  .flow-icon-app { padding: 16px 0; }
  .flow { flex-wrap: wrap; row-gap: 30px; } /* later steps drop to a second row on a phone */
}
/* played each time the section comes in: each step rises and fades in with its label, then its arrow draws out
   to the right. --d on each element is when it starts. */
html.swap .flow-icon { opacity: 0; transform: translateY(26px); }
html.swap .flow-label { opacity: 0; }
html.swap .flow-arrow { clip-path: inset(-10px 100% -10px 0); }
html.swap-at-2 .flow-icon { opacity: 1; transform: none; transition: opacity 0.4s ease var(--d, 0s), transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
html.swap-at-2 .flow-label { opacity: 1; transition: opacity 0.4s ease var(--d, 0s); }
html.swap-at-2 .flow-arrow { clip-path: inset(-10px 0 -10px 0); transition: clip-path 0.35s cubic-bezier(0.5, 0, 0.2, 1) var(--d, 0s); }
@media (prefers-reduced-motion: reduce) {
  html.swap .flow-icon { transform: none; }
  html.swap-at-2 .flow-icon, html.swap-at-2 .flow-label, html.swap-at-2 .flow-arrow { transition-duration: 0.01s; transition-delay: 0s; }
}

/* Section 1 holds the reels carousel beside the heading; section 2 ("Performance") holds the stats and graph */
@media (min-width: 1100px) {
  /* seven reels have to fit in the column to the right of the heading */
  .stage .gallery.carousel-on { --cw: clamp(130px, calc((100vw / 0.9 - 640px) / 3.9), 320px); }
  .stage .gallery { position: relative; top: 96px; left: 40px; } /* the reels sit lower than the heading; the left side is not moved */
  .stage .card .views { font-size: 24px; margin-top: 14px; }
  .stage .card h3, .stage .gallery.carousel-on .card h3 { font-size: 15px; }
}
.perf { margin: 0 auto; width: min(100%, 940px); }
html.swap main .section-title { margin-bottom: 40px; }

/* A step made of two half-size app icons: one upper left, one lower right and on top, corners overlapping */
.flow-icon.flow-pair { position: relative; width: 136px; height: 136px; margin: 22px auto 0; filter: none; }
.flow-pair + .flow-label { margin-top: 36px; } /* keeps this label level with the others */
.flow-pair img { position: absolute; width: 60%; height: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
.flow-pair-a { left: 0; top: 0; }
.flow-pair-b { right: 0; bottom: 0; }
@media (max-width: 860px) {
  .flow-icon.flow-pair { width: 92px; height: 92px; margin: 16px auto 0; }
  .flow-pair + .flow-label { margin-top: 26px; }
}

/* Growth Metrics: on a laptop the whole block (tiles and graph) scales as one piece with the window, so the
   numbers never squash or spill. Sizes inside are fractions of the block's width (cqw). */
@media (min-width: 861px) {
  .perf { container-type: inline-size; }
  html.swap .perf { width: min(100%, 940px, calc((100vh / var(--z) - 290px) / 0.74)); }
  main .tiles { gap: 1.3cqw; }
  main .tile { display: flex; flex-direction: column; min-width: 0; min-height: 18.3cqw; padding: 2.3cqw 2.1cqw 2.1cqw; border-radius: 2.3cqw; border-width: max(2px, 0.32cqw); }
  main .tile-label { font-size: max(8px, 1.75cqw); margin-bottom: auto; }
  main .tile-value { font-size: 3.5cqw; margin-top: 1.5cqw; white-space: nowrap; }
  main .tile-sub { font-size: max(7px, 1.55cqw); min-height: 1.3em; }
  main .chart { margin-top: 2.1cqw; padding: 2.5cqw 2.1cqw 1.5cqw 1.3cqw; border-radius: 2.3cqw; }
}

/* Section 3: once every step is in, the row rises and a curved arrow loops back under it from Post to Scripting,
   with "Analytics" above the curve. Laptop only: on a phone the row wraps, so there is no clear path for it. */
.flow { position: relative; }
.flow-loop, .flow-loop-label { display: none; }
@media (min-width: 861px) {
  .flow { transform: translateY(-70px); }
  /* spans from the middle of the Scripting step to the middle of the Post step, starting a little under the labels */
  .flow-loop { display: block; position: absolute; left: 339px; top: calc(100% + 16px); width: 762px; height: 120px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35)); }
  .flow-loop svg { display: block; width: 762px; height: 120px; overflow: visible; }
  .flow-loop path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
  /* the triangle tip rides along the same curve as the line's leading end, so the two draw as one */
  .flow-loop-head {
    position: absolute; left: 0; top: 0; width: 14px; height: 16px;
    background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%);
    offset-path: path("M 752 4 C 752 130, 10 130, 10 16"); offset-rotate: auto; offset-distance: 100%;
  }
  .flow-loop-label {
    display: block; position: absolute; left: 339px; top: calc(100% + 16px + 132px); width: 762px; margin: 0;
    text-align: center; font-size: 20px; font-weight: 600;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3);
  }
  html.swap .flow { transform: none; }
  html.swap .flow-loop path { stroke-dashoffset: 1; }
  html.swap .flow-loop-head { offset-distance: 0%; opacity: 0; }
  html.swap .flow-loop-label { opacity: 0; }
  html.swap-at-2 .flow { transform: translateY(-70px); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 3.75s; }
  html.swap-at-2 .flow-loop path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.65s cubic-bezier(0.5, 0, 0.2, 1) 4.2s; }
  html.swap-at-2 .flow-loop-head { offset-distance: 100%; opacity: 1; transition: offset-distance 0.65s cubic-bezier(0.5, 0, 0.2, 1) 4.2s, opacity 0.05s linear 4.2s; }
  html.swap-at-2 .flow-loop-label { opacity: 1; transition: opacity 0.4s ease 4.55s; }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  html.swap-at-2 .flow, html.swap-at-2 .flow-loop path, html.swap-at-2 .flow-loop-head, html.swap-at-2 .flow-loop-label { transition-duration: 0.01s; transition-delay: 0s; }
}

/* The workflow row is centred under the heading */
.flow { justify-content: center; margin-left: 0; }
@media (min-width: 861px) {
  .flow { width: 1186px; margin-left: calc(50% - 593px); justify-content: flex-start; } /* five steps and four arrows */
}
@media (max-width: 860px) {
  .flow { margin-left: -8px; margin-right: -8px; } /* room for three steps per row */
}

/* Section 3 animates only on the way in. On the way out everything holds its finished state while the section
   fades, and resets (unseen) half a second later. Lower specificity than the entry rules, so those still win. */
.swap .flow-icon, .swap .flow-label, .swap .flow-arrow, .swap .flow,
.swap .flow-loop path, .swap .flow-loop-head, .swap .flow-loop-label { transition: all 0s linear 0.5s; }

/* Section 4: the comparison picture, centred under the heading and sized to fit the screen */
.formula-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(640px, calc(100vh / var(--z, 1) - 300px));
  margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* "Content Portfolio" blurs in once, when the page first opens (not when scrolling back to it) */
@media (prefers-reduced-motion: no-preference) {
  .stage h1 { animation: title-in 1.4s cubic-bezier(0.2, 0.6, 0.2, 1) 0.15s both; }
}
@keyframes title-in {
  from { opacity: 0; filter: blur(18px); }
  to   { opacity: 1; filter: blur(0); }
}

/* Section 4 layout: the picture on the left, with the rest of the row free for the workflow steps */
.formula { margin-top: 84px; }
@media (min-width: 861px) {
  .formula { display: flex; align-items: center; gap: 22px; margin-left: -60px; margin-right: -60px; }
  .formula .formula-item { flex: none; }
  .formula .formula-img { margin: 0; max-height: min(280px, calc((100vh / var(--z, 1) - 320px) / 2)); }
  .formula-steps { flex: 1; min-width: 0; }
}

/* Section 4: a labelled picture ("Hook" above the image) */
.formula-item { margin: 0; text-align: center; color: #f1ebdc; }
.formula-label { margin: 26px 0 0; font-size: 20px; font-weight: 800; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3); }
@media (max-width: 860px) { .formula-label { font-size: 15px; } }
.formula-item .formula-img { max-height: min(280px, calc((100vh / var(--z, 1) - 320px) / 2)); }

/* Section 4 arrow: same look as section 3's (line and triangle tip in one piece), level with the middle of the picture */
.formula-arrow { display: none; }
@media (min-width: 861px) {
  .formula-arrow {
    display: block; flex: none; position: relative; top: -28px; width: 84px; height: 16px; color: #f1ebdc;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
  }
  .formula-arrow::before { content: ""; position: absolute; left: 0; right: 10px; top: 6.5px; height: 3px; border-radius: 2px; background: currentColor; }
  .formula-arrow::after { content: ""; position: absolute; right: 0; top: 0; width: 14px; height: 16px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
}
/* Section 4 plays like section 3: the picture and its label rise and fade in, then the arrow draws out to the right.
   Only on the way in; on the way out it holds, then resets unseen. */
html.swap .formula-item, html.swap .formula-word { opacity: 0; transform: translateY(26px); }
html.swap .formula-arrow { clip-path: inset(-10px 100% -10px 0); }
html.swap-at-3 .formula-item, html.swap-at-3 .formula-word { opacity: 1; transform: none; transition: opacity 0.4s ease var(--d, 0s), transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
html.swap-at-3 .formula-arrow { clip-path: inset(-10px 0 -10px 0); transition: clip-path 0.35s cubic-bezier(0.5, 0, 0.2, 1) var(--d, 0s); }
.swap .formula-item, .swap .formula-word, .swap .formula-arrow { transition: all 0s linear 0.5s; }
@media (prefers-reduced-motion: reduce) {
  html.swap .formula-item, html.swap .formula-word { transform: none; }
  html.swap-at-3 .formula-item, html.swap-at-3 .formula-word, html.swap-at-3 .formula-arrow { transition-duration: 0.01s; transition-delay: 0s; }
}

/* Section 4 steps after the picture: plain words on the arrow line, then the star with "Reward" under it */
.formula-word {
  margin: 0; color: #f1ebdc; font-size: 24px; font-weight: 800; white-space: nowrap; text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3);
}
.formula-item-icon img { display: block; width: auto; height: 120px; margin: 0 auto; filter: drop-shadow(0 4px 18px rgba(255, 214, 110, 0.5)); }
@media (min-width: 861px) {
  .formula { justify-content: center; }
  .formula-word { flex: none; position: relative; top: -28px; } /* level with the arrows and the middle of the picture */
}
@media (max-width: 860px) {
  .formula { display: flex; flex-direction: column; align-items: center; gap: 18px; }
  .formula-word { font-size: 18px; }
  .formula-item-icon img { height: 80px; }
  .formula-label { margin-top: 10px; }
}

/* Intro animations play once. After a section has been visited and left (swap.js adds seen-N), coming back to it,
   from either direction, shows everything already in place. */
html.seen-2 .flow-icon, html.seen-2 .flow-label, html.seen-2 .flow-loop-label, html.seen-2 .flow-loop-head,
html.seen-3 .formula-item, html.seen-3 .formula-word { opacity: 1 !important; transition: none !important; }
html.seen-2 .flow-icon, html.seen-3 .formula-item, html.seen-3 .formula-word { transform: none !important; }
html.seen-2 .flow-arrow, html.seen-3 .formula-arrow { clip-path: inset(-10px 0 -10px 0) !important; transition: none !important; }
html.seen-2 .flow-loop path { stroke-dashoffset: 0 !important; transition: none !important; }
html.seen-2 .flow-loop-head { offset-distance: 100% !important; }
html.seen-2 .flow { transition: none !important; }
@media (min-width: 861px) {
  html.seen-2 .flow { transform: translateY(-70px) !important; }
}

/* The star sits in a box as tall as the picture, so "Reward" lines up with "Hook: 3/3 Rule" */
@media (min-width: 861px) {
  .formula { --fh: min(280px, calc((100vh / var(--z, 1) - 320px) / 2)); }
  .formula-item-icon img { box-sizing: border-box; height: var(--fh); padding: max(0px, calc((var(--fh) - 144px) / 2)) 0; object-fit: contain; }
}
@media (max-width: 860px) {
  .formula-item-icon img { height: 92px; }
}

.formula-word { line-height: 1.25; }

/* Section 4, laptop: fixed sizes so the loop-back arrow can be placed exactly.
   Row: picture 315 | arrow 56 | Context 140 | arrow | star 140 | arrow | CTA 140, with 30px gaps = 1083px wide. */
.formula-loop, .formula-loop-label { display: none; }
@media (min-width: 861px) {
  .formula { --fh: 280px; position: relative; width: 1083px; gap: 30px; margin-left: auto; margin-right: auto; justify-content: flex-start; transform: translateY(-60px); }
  .formula-arrow { width: 56px; }
  .formula .formula-img, .formula-item .formula-img { width: 315px; height: 280px; max-height: none; }
  .formula-word { width: 100px; }
  .formula-word-end { width: 70px; }
  .formula-item-icon { width: 140px; }
  /* from just under "CTA", down and round beneath the row, up to just under "Hook: 3/3 Rule" */
  .formula-loop { display: block; position: absolute; left: 147px; top: 150px; width: 877px; height: 300px; color: #f1ebdc; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35)); pointer-events: none; }
  .formula-loop svg { display: block; width: 877px; height: 300px; overflow: visible; }
  .formula-loop path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
  .formula-loop-head {
    position: absolute; left: 0; top: 0; width: 14px; height: 16px;
    background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%);
    offset-path: path("M 867 205 C 867 310, 10 310, 10 212"); offset-rotate: auto; offset-distance: 100%;
  }
  .formula-loop-label {
    display: block; position: absolute; left: 147px; top: 468px; width: 877px; margin: 0; color: #f1ebdc;
    text-align: center; font-size: 20px; font-weight: 600;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3);
  }
  html.swap .formula { transform: none; }
  html.swap .formula-loop path { stroke-dashoffset: 1; }
  html.swap .formula-loop-head { offset-distance: 0%; opacity: 0; }
  html.swap .formula-loop-label { opacity: 0; }
  html.swap-at-3 .formula { transform: translateY(-60px); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 2.9s; }
  html.swap-at-3 .formula-loop path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.65s cubic-bezier(0.5, 0, 0.2, 1) 3.35s; }
  html.swap-at-3 .formula-loop-head { offset-distance: 100%; opacity: 1; transition: offset-distance 0.65s cubic-bezier(0.5, 0, 0.2, 1) 3.35s, opacity 0.05s linear 3.35s; }
  html.swap-at-3 .formula-loop-label { opacity: 1; transition: opacity 0.4s ease 3.7s; }
  .swap .formula, .swap .formula-loop path, .swap .formula-loop-head, .swap .formula-loop-label { transition: all 0s linear 0.5s; }
  html.seen-3 .formula { transform: translateY(-60px) !important; transition: none !important; }
  html.seen-3 .formula-loop path { stroke-dashoffset: 0 !important; transition: none !important; }
  html.seen-3 .formula-loop-head { offset-distance: 100% !important; opacity: 1 !important; transition: none !important; }
  html.seen-3 .formula-loop-label { opacity: 1 !important; transition: none !important; }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  html.swap-at-3 .formula, html.swap-at-3 .formula-loop path, html.swap-at-3 .formula-loop-head, html.swap-at-3 .formula-loop-label { transition-duration: 0.01s; transition-delay: 0s; }
}

/* Phone, section 1: smaller reels, so the carousel and its captions fit on one screen under the heading */
@media (max-width: 860px) {
  .stage .gallery.carousel-on { --cw: clamp(120px, 40vw, 190px); padding-top: 18px; }
  .stage .card .views { font-size: 19px; margin-top: 12px; }
  .stage .card h3, .stage .gallery.carousel-on .card h3 { font-size: 13px; }
}

/* Phone, section 3: the workflow runs top to bottom, with small icons and arrows pointing down */
@media (max-width: 860px) {
  .flow { flex-direction: column; flex-wrap: nowrap; align-items: center; row-gap: 0; margin: 18px 0 0; }
  .flow-step { width: auto; }
  .flow-icon { height: 48px; }
  .flow-icon-app { height: 44px; padding: 0; }
  .flow-icon.flow-pair { width: 50px; height: 50px; margin: 0 auto; }
  .flow-label, .flow-pair + .flow-label { margin-top: 3px; font-size: 13px; }
  .flow-arrow { top: 0; width: 22px; height: 16px; margin: 8px auto; transform: rotate(90deg); }
  .flow-arrow::before { right: 8px; }
}

/* ---- Phone layouts for sections 3 and 4: one column on the left, running top to bottom, with the loop-back
   arrow curving up the right-hand side. Rows have fixed heights so the curve can be placed exactly. ---- */
.flow-loop .loop-m, .formula-loop .loop-m { display: none; }
@media (max-width: 860px) {
  /* section 3 column: five 72px steps with 32px arrow rows between them */
  .flow { align-items: flex-start; margin: 18px 0 0 6vw; }
  .flow-step { width: 130px; height: 72px; }
  .flow-arrow { margin: 8px 0 8px 54px; }

  /* section 4 column: picture 132 | arrow 32 | Context 78 | arrow | star 78 | arrow | CTA 78 */
  .formula { align-items: flex-start; gap: 0; margin: 20px 0 0 6vw; position: relative; }
  .formula-item, .formula-word { width: 150px; }
  .formula-item { height: 132px; }
  .formula-item-icon { height: 78px; }
  .formula-item .formula-img { height: 100px; max-height: none; width: auto; margin: 0 auto; }
  .formula-item-icon img { height: 46px; }
  .formula-label { margin-top: 10px; font-size: 14px; line-height: 1.4; }
  .formula-word { height: 28px; line-height: 28px; font-size: 17px; }
  .formula-arrow {
    display: block; position: relative; width: 22px; height: 16px; margin: 8px 0 8px 64px; color: #f1ebdc;
    transform: rotate(90deg); filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
  }
  .formula-arrow::before { content: ""; position: absolute; left: 0; right: 8px; top: 6.5px; height: 3px; border-radius: 2px; background: currentColor; }
  .formula-arrow::after { content: ""; position: absolute; right: 0; top: 0; width: 14px; height: 16px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

  /* loop-back arrows up the right side */
  .flow-loop .loop-d, .formula-loop .loop-d { display: none; }
  .flow-loop .loop-m, .formula-loop .loop-m { display: block; overflow: visible; }
  .flow-loop, .formula-loop { display: block; position: absolute; color: #f1ebdc; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35)); pointer-events: none; }
  .flow-loop path, .formula-loop path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
  .flow-loop-head, .formula-loop-head {
    position: absolute; left: 0; top: 0; width: 12px; height: 14px; background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%); offset-rotate: auto; offset-distance: 100%;
  }
  .flow-loop-label, .formula-loop-label {
    display: block; position: absolute; margin: 0; color: #f1ebdc; font-size: 12.5px; font-weight: 600; line-height: 1.3;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.3);
  }
  .flow-loop-label span, .formula-loop-label span { display: block; }
  /* section 3: from beside the Post icon (row 5) up to beside the Scripting icon (row 2) */
  .flow-loop { left: 105px; top: 128px; width: 100px; height: 312px; }
  .flow-loop .loop-m { width: 100px; height: 312px; }
  .flow-loop-head { offset-path: path("M 0 312 C 110 312, 110 0, 14 0"); }
  .flow-loop-label { left: 197px; top: 267px; }
  /* section 4: from beside CTA up to beside the picture */
  .formula-loop { left: 110px; top: 50px; width: 120px; height: 357px; }
  .formula-loop .loop-m { width: 120px; height: 357px; }
  .formula-loop-head { offset-path: path("M 0 357 C 130 357, 130 0, 46 0"); }
  .formula-loop-label { left: 220px; top: 212px; }

  /* same play-once animation as on a laptop */
  html.swap .flow-loop path, html.swap .formula-loop path { stroke-dashoffset: 1; }
  html.swap .flow-loop-head, html.swap .formula-loop-head { offset-distance: 0%; opacity: 0; }
  html.swap .flow-loop-label, html.swap .formula-loop-label { opacity: 0; }
  html.swap-at-2 .flow-loop path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.65s cubic-bezier(0.5, 0, 0.2, 1) 4.2s; }
  html.swap-at-2 .flow-loop-head { offset-distance: 100%; opacity: 1; transition: offset-distance 0.65s cubic-bezier(0.5, 0, 0.2, 1) 4.2s, opacity 0.05s linear 4.2s; }
  html.swap-at-2 .flow-loop-label { opacity: 1; transition: opacity 0.4s ease 4.55s; }
  html.swap-at-3 .formula-loop path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.65s cubic-bezier(0.5, 0, 0.2, 1) 3.3s; }
  html.swap-at-3 .formula-loop-head { offset-distance: 100%; opacity: 1; transition: offset-distance 0.65s cubic-bezier(0.5, 0, 0.2, 1) 3.3s, opacity 0.05s linear 3.3s; }
  html.swap-at-3 .formula-loop-label { opacity: 1; transition: opacity 0.4s ease 3.65s; }
  .swap .formula-loop path, .swap .formula-loop-head, .swap .formula-loop-label { transition: all 0s linear 0.5s; }
  html.seen-3 .formula-loop path { stroke-dashoffset: 0 !important; transition: none !important; }
  html.seen-3 .formula-loop-head { offset-distance: 100% !important; opacity: 1 !important; transition: none !important; }
  html.seen-3 .formula-loop-label { opacity: 1 !important; transition: none !important; }
}

/* Scroll marker: bigger and brighter */
.swap-dot { right: 10px; width: 5px; height: 88px; margin-top: -44px; border-radius: 3px; background: rgba(42, 32, 24, 0.3); box-shadow: 0 0 5px rgba(255, 255, 255, 0.15); }
.swap-dot span { width: 5px; height: 26px; border-radius: 3px; background: #2a2018; box-shadow: 0 0 5px rgba(255, 255, 255, 0.25); }

/* The page itself does not scroll: swap.js reads the wheel, touch and keys directly and switches sections */
html.swap, html.swap body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.swap body { touch-action: pinch-zoom; }
html.swap .stage { position: relative; top: 0 !important; height: 100vh; height: 100svh; }

/* Phone, section 3: the column builds in the middle of the screen, then slides left to make room for the loop arrow.
   (Its resting place is 6vw from the section's left edge; the offset below puts its middle at the screen's middle.) */
@media (max-width: 860px) {
  html.swap .flow { transform: translateX(calc(44vw - 91px)); }
  html.swap-at-2 .flow { transform: none; transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) 3.7s; }
  html.seen-2 .flow { transform: none !important; }
}

/* Phone, section 4: same as section 3. The column builds in the middle, then slides left before the loop arrow draws. */
@media (max-width: 860px) {
  html.swap .formula { transform: translateX(calc(44vw - 101px)); }
  html.swap-at-3 .formula { transform: none; transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) 2.8s; }
  .swap .formula { transition: all 0s linear 0.5s; }
  html.seen-3 .formula { transform: none !important; transition: none !important; }
}

/* Smaller arrow tips everywhere */
.flow-arrow::after, .formula-arrow::after { top: 2.5px; width: 9px; height: 11px; }
.flow-arrow::before, .formula-arrow::before { right: 6px; }
.flow-loop-head, .formula-loop-head { width: 9px; height: 11px; }
@media (max-width: 860px) {
  .flow-arrow::before, .formula-arrow::before { right: 6px; }
  .flow-loop-head, .formula-loop-head { width: 8px; height: 10px; }
}

/* The speaker has no glow of its own colour: a plain soft shadow instead of the star's yellow one */
.formula-item-icon img[src*="cta-speaker"], .formula-item-icon img[src*="context-frame"] { filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3)); }

/* Phones: sections start a little higher, and their content scales from the top (swap.js sets the scale) so it always fits */
@media (max-width: 860px) {
  html.swap main, html.swap .third { padding-top: 64px; }
  .perf { transform-origin: 50% 0; }
  .flow, .formula { transform-origin: 0 0; }
  .flow-loop-label, .formula-loop-label { white-space: nowrap; }
}

/* Phone, section 4: the steps sit lower under the heading (the heading stays put) */
@media (max-width: 860px) {
  .formula { margin-top: 62px; }
}

/* The Hook picture is a link */
.formula-link { display: block; }
.formula-link .formula-img { transition: transform 0.25s ease; }
.formula-link:hover .formula-img, .formula-link:focus-visible .formula-img { transform: translateY(-4px); }

/* Section 4 on a laptop: the row sits lower under the heading (the heading stays put) */
@media (min-width: 861px) {
  .formula { margin-top: 128px; }
}

/* Phones: no background clip. A smooth gradient of the clip's own colours instead: dusk blue, pale haze, peach, warm brown. */
@media (max-width: 860px) {
  .page-video, .page-frames { display: none !important; }
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh; /* covers the area behind the browser's bars too */
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, #657186 0%, #7d8693 14%, #91969a 26%, #b7a489 40%, #bb8e6c 52%, #946a4a 66%, #7f5333 82%, #71482d 100%);
  }
  html { background: #8a6a52; }
}
