/* Full case studies (public/casestudies/<name>/index.html): one layout for all of them, rebuilt from
   the Figma "Case studies" file. Each page sets its brand colours as --cs-* variables in its <head>.
   Sizes follow the 1920px design. Like the site, three layouts: below 1024px (max-width 64rem)
   the sizes shrink and most parts stack, tablets (641px to 1024px) get a hero of their own and keep
   the highlights, numbers and buttons side by side, phones (max-width 40rem) stack those too. Where
   the pages differ in layout, a --cs-* variable with a default here sets it. */

/* The site's Montserrat: one variable file with every weight from 400 to 700 */
@font-face {
  font-family: Montserrat;
  src: url('/fonts/MontserratVariable.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

/* Arial sized to Montserrat's measurements (the values next/font computes for the site), so text
   doesn't jump when Montserrat arrives */
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial');
  ascent-override: 84.98%;
  descent-override: 22.04%;
  line-gap-override: 0%;
  size-adjust: 113.9%;
}

:root {
  --cs-column: min(84.75rem, 100% - 3rem);
  /* The design's shadow, without its last layer (1% black): invisible, but slow to repaint */
  --cs-shadow: 0 0.5625rem 1.25rem rgba(0, 0, 0, 0.1), 0 2.25rem 2.25rem rgba(0, 0, 0, 0.09),
    0 5rem 3rem rgba(0, 0, 0, 0.05);
  --cs-dark-card: radial-gradient(closest-side, var(--cs-card-from), var(--cs-card-to));
}

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

html {
  scroll-behavior: smooth;
}

/* On a desktop screen the whole page scales with the window, keeping the proportions of the 1920px
   design (every size here is in rem): 1rem is 16px at 1920px wide and never less than 12px */
@media (min-width: 64.0625rem) {
  html {
    font-size: clamp(0.75rem, 100vw / 120, 1rem);
  }
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--cs-text);
  font-family: Montserrat, 'Montserrat Fallback', Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
blockquote,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

strong {
  font-weight: 700;
}

/* Dark on the light sections, the brand blue on the dark cards: 3:1 or more against both */
a:focus-visible {
  outline: 3px solid var(--cs-heading);
  outline-offset: 4px;
}

.products a:focus-visible {
  outline-color: var(--cs-bar);
}

.page {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9rem;
  padding: 7.5rem 0 2.75rem;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9.375rem;
  width: 100%;
}

/* Text on the page */

.prose {
  font-size: 1.25rem;
  line-height: 1.5;
}

.prose p + p {
  margin-top: 1rem;
}

/* A section heading between two bars that fade outwards */
.section-title {
  display: flex;
  align-items: center;
  /* Centred however wide the box is (a call to action stretches it to its text block) */
  justify-content: center;
  gap: 2rem;
  color: var(--cs-heading);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: none;
  width: 5.875rem;
  height: 0.5625rem;
  border-radius: 1.5rem;
  background: linear-gradient(to left, var(--cs-bar), #fff);
}

.section-title::after {
  background: linear-gradient(to right, var(--cs-bar), #fff);
}

.section-title--on-dark {
  color: #fff;
}

.section-title--on-dark::before {
  background: linear-gradient(to right, transparent, var(--cs-bar));
}

.section-title--on-dark::after {
  background: linear-gradient(to left, transparent, var(--cs-bar));
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: var(--cs-column);
}

/* A row of cards that may run wider than the column, up to the page's side margins */
.section--wide {
  width: min(100% - 3rem, 98rem);
}

.section--tight {
  gap: 2rem;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero__band {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* The light gradient behind the hero; it runs on under the top of the "Made in" card */
.hero__band::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -5rem 2.5rem var(--cs-hero-band-bottom, -5.5625rem);
  border-radius: 3.5rem;
  background: var(--cs-hero-band, linear-gradient(to top, var(--cs-hero-from), var(--cs-hero-to)));
}

/* Decoration on the band, clipped to its shape */
.hero__rings {
  position: absolute;
  z-index: -1;
  inset: -5rem 2.5rem var(--cs-hero-band-bottom, -5.5625rem);
  overflow: hidden;
  border-radius: 3.5rem;
}

.hero__rings img {
  position: absolute;
  top: 0;
  right: 0;
  width: 84.8438rem;
  max-width: none;
}

.hero__top {
  position: relative;
  width: var(--cs-column);
  height: var(--cs-hero-height, 52.625rem);
  padding-top: var(--cs-hero-pad-top, 0);
  /* Where the text starts and how far the picture reaches past the column: as in the design, but
     inside the band (which sits 2.5rem in from the window) */
  --cs-text-left: max(var(--cs-hero-text-shift, -1.375rem), 5.5rem - (100vw - 100%) / 2);
  --cs-visual-past: min(var(--cs-hero-visual-past, 6.5625rem), (100vw - 100%) / 2 - 3.5rem);
}

.hero__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--cs-hero-logo-gap, 6rem);
  width: 49.5rem;
  max-width: 100%;
  margin-left: var(--cs-text-left);
}

.hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid var(--cs-logo-border);
  border-radius: 1rem;
}

/* A logo that fills its box */
.hero__logo > img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

/* An app icon: larger, without the frame */
.hero__logo--app {
  width: 5rem;
  height: 5rem;
  border: 0;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.07), 0 0.375rem 0.375rem rgba(0, 0, 0, 0.06),
    0 0.875rem 0.5625rem rgba(0, 0, 0, 0.04);
}

.hero__logo-crop {
  position: relative;
  width: 2.375rem;
  height: 2.375rem;
  overflow: hidden;
}

.hero__logo-crop img {
  position: absolute;
  top: 0;
  left: var(--cs-logo-left);
  width: var(--cs-logo-width);
  height: var(--cs-logo-height);
  max-width: none;
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 4.875rem;
}

.hero__titles {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero__name {
  color: var(--cs-title);
  font-size: 6rem;
  font-weight: 700;
  line-height: normal;
  letter-spacing: -0.02em;
}

.hero__tagline {
  max-width: 27.1875rem;
  margin-top: 0.5rem;
  color: var(--cs-tagline, var(--cs-text));
  font-size: 1.375rem;
  line-height: 2rem;
}

.platforms {
  display: flex;
  gap: 0.5625rem;
}

.platforms li {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
}

.platforms img {
  width: 1.875rem;
  height: 1.875rem;
}

/* Just the glyphs, larger, for a dark band */
.platforms--plain {
  gap: 1.2188rem;
}

.platforms--plain li {
  padding: 0;
  background: none;
  box-shadow: none;
}

.platforms--plain img {
  width: 2.4375rem;
  height: 2.4375rem;
}

/* --cs-tags-width: where the facts wrap on a wide screen, set per page for even rows */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  max-width: var(--cs-tags-width, 32.625rem);
}

.tags li {
  padding: 0.5625rem 1.125rem;
  border-radius: 1rem;
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
}

.tags--semibold li {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  line-height: normal;
}

/* The picture beside the text (its file is transparent around it). Full size on a wide screen; on
   narrower ones it shrinks to stay clear of the text, whose widest line is --cs-hero-text-room */
.hero__visual {
  position: absolute;
  top: var(--cs-hero-visual-top, 1.3125rem);
  right: calc(-1 * var(--cs-visual-past));
  width: min(
    var(--cs-hero-visual-width, 56.375rem),
    100% + var(--cs-visual-past) - var(--cs-text-left) - var(--cs-hero-text-room, 32.5rem) - 2rem
  );
  aspect-ratio: var(--cs-hero-visual-ratio, 902 / 821);
}

.hero__glow {
  position: absolute;
  top: 36.66%;
  left: 13.64%;
  width: 77.27%;
  height: 46.65%;
}

.hero__phones {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}

/* Dark cards */

.made-in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: var(--cs-made-in-width, var(--cs-column));
  padding: var(--cs-made-in-padding, 4.5rem 8.75rem);
  border-radius: 3.5rem;
  background: radial-gradient(
    closest-side,
    var(--cs-card-from),
    var(--cs-made-in-mid) 50%,
    var(--cs-made-in-to)
  );
  box-shadow: var(--cs-shadow);
}

.made-in__title {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.made-in ul {
  --cs-tech-gap: 2.5rem;
  display: flex;
  align-self: stretch;
  flex-wrap: wrap;
  align-items: var(--cs-made-in-align, stretch);
  justify-content: center;
  gap: 2rem var(--cs-tech-gap);
}

/* All in one row while the list is at least 34rem wide; below that, two to a row (the clamp is 0
   above 34rem and a half below) */
.made-in li {
  display: flex;
  flex: 1 1 clamp(0px, (34rem - 100%) * 999, (100% - var(--cs-tech-gap)) / 2);
  flex-direction: column;
  min-width: 0;
  max-width: 11.4375rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--cs-card-text);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.made-in img {
  width: 6.0625rem;
  height: 6.0625rem;
  object-fit: contain;
}

.highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 6rem;
  border-radius: 2rem;
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
  text-align: center;
}

.highlight__title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.highlight__title--caps {
  text-transform: uppercase;
}

.highlight__text {
  color: var(--cs-highlight-text, var(--cs-card-text));
  font-size: 1.25rem;
  line-height: 3rem;
  letter-spacing: -0.02em;
}

.highlight--wide {
  gap: 0.5rem;
}

.highlight--wide .highlight__text {
  width: 30.625rem;
  max-width: 100%;
  line-height: 2rem;
}

/* An award: its badge above a two-line name */
.highlight--award {
  gap: 1rem;
  padding: 2rem 6rem;
}

.highlight--award .highlight__text {
  line-height: 2rem;
}

/* A picture whose file runs past its box, for a shadow or a glow. The box keeps the design's size
   (--w, --ratio) and the file sits over it (--x, --y, --iw, relative to the box), so both scale */
.overhang {
  position: relative;
  flex: none;
  width: var(--w);
  max-width: 100%;
  aspect-ratio: var(--ratio);
}

.overhang img {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--iw);
  max-width: none;
}

/* Story: a text card next to a picture, alternating sides */

.story {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  width: var(--cs-column);
}

.section .story {
  width: 100%;
}

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

.text-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3.5rem;
  border-radius: 2.5rem;
  background: radial-gradient(70% 90% at 0 100%, var(--cs-light-from), var(--cs-light-to));
}

.text-card--glow-right {
  background: radial-gradient(75% 90% at 100% 100%, var(--cs-light-from), var(--cs-light-to));
}

.text-card__title {
  color: var(--cs-accent);
  font-size: 2rem;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.02em;
}

/* The picture side; most have a dot grid that fades out to white at the edges */
.picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.picture--dots {
  background-image: radial-gradient(closest-side, rgba(255, 255, 255, 0) 62%, #fff),
    radial-gradient(circle, var(--cs-dots) 2px, transparent 2.5px);
  background-position: 0 0, 9px 8.5px;
  background-size: auto, 24px 24px;
}

/* A phone tilted to one side; the margins keep room for its corners */
.picture__phone {
  --cs-phone: 14.25rem;
  width: var(--cs-phone);
  margin: calc(var(--cs-phone) * 0.096) calc(var(--cs-phone) * 0.238);
  border-radius: calc(var(--cs-phone) * 0.158);
  box-shadow: var(--cs-shadow);
  transform: rotate(15deg);
}

.picture__phone--left {
  transform: rotate(-15deg);
}

.picture__logos {
  display: flex;
  align-items: center;
  gap: 4.7116rem;
  max-width: 100%;
}

.picture__logos img {
  min-width: 0;
  object-fit: cover;
}

/* Tiles: a logo over its name, on a light card */

.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 13.4375rem;
  padding: 2rem 1rem;
  border-radius: 2.5rem;
  background: radial-gradient(131% 106% at 50% 156%, var(--cs-tile-from), var(--cs-light-to));
  color: var(--cs-heading);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.tile:first-child {
  background: radial-gradient(70% 93% at 0 100%, var(--cs-tile-from), var(--cs-light-to));
}

.tile:last-child {
  background: radial-gradient(70% 93% at 100% 100%, var(--cs-tile-from), var(--cs-light-to));
}

.tile img {
  width: auto;
  height: 6.0625rem;
}

/* Quotes */

.quote {
  position: relative;
  overflow: hidden;
  width: var(--cs-column);
  padding: 4.5rem max(4rem, (var(--cs-column) - 64.9375rem) / 2);
  border-radius: 3.5rem;
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
}

.quote__mark {
  position: absolute;
  top: 6.25rem;
  left: calc(100% - 22.0625rem);
  color: var(--cs-quote-mark);
  font-size: 31.625rem;
  font-weight: 700;
  line-height: 0.7;
}

.quote__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 64.9375rem;
}

.quote__label {
  margin-bottom: 0.5rem;
  color: var(--cs-quote-label);
  font-size: var(--cs-quote-label-size, 1.25rem);
  font-style: var(--cs-quote-label-style, italic);
  line-height: 1.5;
}

.quote blockquote {
  color: #fff;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
}

.quote figcaption {
  display: flex;
  align-items: center;
  gap: 1rem;
  line-height: 1.5;
}

/* The avatar file carries its own shadow, so it is larger than the circle it shows */
.quote__avatar {
  position: relative;
  flex: none;
  width: 5.6875rem;
  height: 5.6875rem;
}

.quote__avatar img {
  position: absolute;
  top: -0.6875rem;
  left: -3.5625rem;
  width: 12.8125rem;
  height: 18.8125rem;
  max-width: none;
}

.quote__name {
  display: block;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.quote__role {
  display: block;
  color: var(--cs-quote-role);
  font-size: 1rem;
}

/* The same quote with a smaller, upright label */
.quote--plain-label {
  --cs-quote-label: var(--cs-quote-label-alt);
  --cs-quote-role: var(--cs-quote-label-alt);
  --cs-quote-label-size: 1rem;
  --cs-quote-label-style: normal;
}

/* Other products */

.products {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: var(--cs-column);
  padding: 4.5rem 3rem;
  border-radius: 3.5rem;
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
}

.products__text {
  max-width: 46.1875rem;
  color: var(--cs-card-text);
  text-align: center;
}

.products ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}

.product {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 4rem;
  border-radius: 2rem;
  background: var(--cs-product-bg);
  color: inherit;
  text-decoration: none;
}

.product__icon {
  position: relative;
  flex: none;
  width: var(--cs-icon, 8.0625rem);
  height: var(--cs-icon, 8.0625rem);
}

.product__icon.product__icon--plain > img {
  border-radius: 0;
  box-shadow: none;
}

.product__icon > img {
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  box-shadow: var(--cs-shadow);
}

/* An SVG icon that carries its own shadow */
.product__icon--svg > img {
  position: absolute;
  top: -0.6875rem;
  left: -3.5625rem;
  width: 15.1875rem;
  height: 21.1875rem;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}

.product__text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 13.1875rem;
}

.product__name {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product__description {
  color: var(--cs-card-text);
  font-size: 1rem;
  line-height: 1.5;
}

a.product:hover .product__name {
  text-decoration: underline;
}

/* Two equal products side by side */
.products--grid ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(70.75rem, 100%);
}

.products--grid .product {
  height: 100%;
  padding: 2rem 3rem;
  border-radius: 1.5rem;
}

.products--grid .product__text {
  flex: 1;
  width: auto;
}

/* Team in numbers */

.numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--cs-numbers-gap, 2.5rem);
  width: var(--cs-numbers-width, min(70.75rem, 100%));
}

.number {
  display: flex;
  flex: 1 1 calc(50% - 1.25rem);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--cs-number-gap, 0.5rem);
  max-width: var(--cs-number-max, 34.125rem);
  padding: var(--cs-number-padding, 2.5rem 3rem);
  border-radius: 2.5rem;
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
  text-align: center;
}

.number__value {
  background: linear-gradient(
    to bottom,
    var(--cs-number-from, #fff) var(--cs-number-stop, 31.731%),
    var(--cs-number-to)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.number__label {
  color: #fff;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* A longer text in place of a number */
.number__value--small {
  font-size: 3rem;
}

.number--narrow {
  max-width: 34.125rem;
  min-height: 15rem;
}

.results {
  width: calc(var(--cs-column) * 0.7655);
}

/* A centred paragraph under a section title */
.section__text {
  max-width: 50.875rem;
  text-align: center;
}

/* Logos in rows that wrap, each at its design width (--w, in rem) */
.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 2.5rem;
}

.logos img {
  width: calc(var(--w) * 1rem);
}

/* App stores */

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
}

/* A box shadow on the badge's rounded corners: Safari draws a filter shadow far more slowly */
.stores img {
  width: 19.1875rem;
  border-radius: 0.5625rem;
  box-shadow: var(--cs-shadow);
}

.stores__note {
  color: var(--cs-note);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

/* Closing call to action */

.cta {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: calc(100% - 5rem);
  padding: 4.5rem 3rem;
  border-radius: 2.5rem;
  background: var(--cs-cta-bg);
  text-align: center;
}

/* Decoration behind the call to action, cropped to it */
.cta__rings {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.cta__rings img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.cta a:focus-visible {
  outline-color: var(--cs-cta-focus, var(--cs-heading));
}

.cta__title {
  color: var(--cs-cta-title, var(--cs-accent));
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta__text {
  max-width: 34.5rem;
  margin: 1rem auto 0;
  color: var(--cs-cta-text, var(--cs-text));
  font-size: 1.25rem;
  line-height: 1.5;
}

.cta__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.button {
  padding: 1.5rem 6rem;
  border-radius: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.button--primary {
  background: var(--cs-dark-card);
  box-shadow: var(--cs-shadow);
  color: #fff;
}

.button--secondary {
  background: var(--cs-secondary-bg);
  color: var(--cs-secondary-text);
}

/* Tablets and phones (up to 1024px): smaller sizes, and the parts that stack on both */
@media (max-width: 64rem) {
  .page {
    gap: 4rem;
    padding-top: 3rem;
  }

  .content {
    gap: 5rem;
  }

  .prose {
    font-size: 1.0625rem;
  }

  .section-title {
    gap: 1rem;
    font-size: 1.75rem;
  }

  .section-title::before,
  .section-title::after {
    width: 2.5rem;
    height: 0.375rem;
  }

  .hero__band::before,
  .hero__rings {
    inset: -2rem 0.75rem -3rem;
    border-radius: 2rem;
  }

  .hero__top {
    height: auto;
    padding-top: 0;
  }

  .hero__text {
    gap: 3rem;
    margin-left: 0;
  }

  .hero__intro {
    gap: 2rem;
  }

  .hero__titles {
    gap: 1.5rem;
  }

  .hero__name {
    font-size: clamp(2.5rem, 9vw, 3.25rem);
  }

  .hero__tagline {
    font-size: 1.125rem;
    line-height: 1.6;
  }

  .hero__visual {
    position: relative;
    top: auto;
    right: auto;
  }

  .made-in {
    width: var(--cs-column);
    padding: 3rem 1rem;
    border-radius: 2rem;
  }

  .made-in__title {
    font-size: 1.75rem;
  }

  .made-in ul {
    --cs-tech-gap: 0.5rem;
    row-gap: 1.5rem;
  }

  .made-in li {
    font-size: 0.9375rem;
  }

  .made-in img {
    width: 4rem;
    height: 4rem;
  }

  /* One line (a row on tablets, a column on phones), so a card wider than the column can't
     widen the others */
  .highlights {
    flex-wrap: nowrap;
    width: 100%;
  }

  .highlight {
    min-width: 0;
    padding: 2rem 1.5rem;
  }

  .highlight--wide .highlight__text {
    width: auto;
  }

  .highlight--award {
    padding: 2rem 1.5rem;
  }

  .highlight__title {
    font-size: 1.25rem;
  }

  .highlight__text {
    font-size: 1rem;
    line-height: 2;
  }

  .story {
    gap: 3rem;
  }

  /* Side by side while both halves get at least 18rem, otherwise one below the other */
  .story__row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  }

  .text-card {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
  }

  .text-card__title {
    font-size: 1.5rem;
  }

  .picture {
    padding: 1rem;
  }

  .picture__phone {
    --cs-phone: 11rem;
  }

  .tiles {
    gap: 1rem;
  }

  .tile {
    width: calc(50% - 0.5rem);
    padding: 1.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 1.25rem;
  }

  .tile img {
    height: 4.5rem;
  }

  .logos {
    gap: 1.5rem 2rem;
  }

  .logos img {
    width: calc(var(--w) * 0.625rem);
  }

  .picture__logos {
    gap: 2rem;
  }

  .quote {
    padding: 3rem 1.5rem;
    border-radius: 2rem;
  }

  .quote__mark {
    top: 1.5rem;
    right: 1rem;
    left: auto;
    font-size: 12rem;
  }

  .quote blockquote {
    font-size: 1.0625rem;
  }

  .products {
    padding: 3rem 1.5rem;
    border-radius: 2rem;
  }

  .products ul {
    flex-direction: column;
    gap: 1rem;
  }

  .product {
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .product__icon {
    width: 5rem;
    height: 5rem;
  }

  .product__icon > img {
    border-radius: 1.25rem;
  }

  .product__icon--svg > img {
    top: -0.4375rem;
    left: -2.2rem;
    width: 9.42rem;
    height: 13.14rem;
  }

  .product__text {
    width: auto;
  }

  .products--grid ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .products--grid .product {
    padding: 1.25rem;
  }

  .product__name {
    font-size: 1.25rem;
  }

  .number {
    padding: 2rem 1.5rem;
  }

  .number--narrow {
    min-height: 0;
  }

  .number__value {
    font-size: 3rem;
  }

  .number__value--small {
    font-size: 1.75rem;
  }

  .results {
    width: var(--cs-column);
  }

  .number__label {
    font-size: 1.25rem;
  }

  .stores {
    gap: 1rem;
  }

  .stores img {
    width: 13rem;
  }

  .cta {
    width: calc(100% - 1.5rem);
    padding: 3rem 1.5rem;
    border-radius: 2rem;
  }

  .cta__title {
    font-size: 2.25rem;
  }

  .cta__text {
    font-size: 1.0625rem;
  }

  .button {
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
  }
}

/* Tablets (641px to 1024px), on top of the block above: the hero gets a layout of its own and the
   highlights share one row; the rest keeps the desktop arrangement at the sizes above */
@media (min-width: 40.0625rem) and (max-width: 64rem) {
  /* The logo and the name beside the picture, both ending on one line; under them the platforms
     with the tagline right after them, then the tags across the full width. The first column is
     as wide as the platforms, the second takes the rest of the name, the third is the picture's.
     The space below keeps the tags clear of the "Made in" card, which follows under the hero */
  .hero__top {
    display: grid;
    grid-template-columns: min-content auto minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto;
    grid-template-areas:
      'logo logo visual'
      'name name visual'
      'platforms tagline tagline'
      'tags tags tags';
    align-items: start;
    gap: 1.5rem 2rem;
    /* The text as far inside the band as the cards below hold theirs (48px from the screen's
       edge); the picture keeps the right edge */
    padding: 0 0 3rem 1.5rem;
  }

  .hero__text,
  .hero__intro,
  .hero__titles,
  .hero__titles > :first-child {
    display: contents;
  }

  /* Right above the name, both at the bottom of the picture's height */
  .hero__logo {
    grid-area: logo;
    align-self: end;
  }

  .hero__name {
    grid-area: name;
    align-self: end;
  }

  .hero__tagline {
    grid-area: tagline;
    align-self: center;
  }

  /* Their own size: the column is only as wide as the icons need, which the site-wide
     max-width: 100% on images would otherwise shrink to nothing */
  .platforms {
    grid-area: platforms;
  }

  .platforms img {
    max-width: none;
  }

  /* A little more compact than on phones, so the facts fit one line on more tablets */
  .tags {
    grid-area: tags;
    max-width: none;
    gap: 0.625rem;
  }

  .tags li,
  .tags--semibold li {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }

  /* The rings behind the picture (DriveScore, the only page with them), centred on its phones and
     framing them as on desktop. The phones' centre sits half the band's width plus 10.75rem from its
     left edge, 12.6rem from its top (the rings' own centre is 58.4% across and 45.2% down the
     file): measured for DriveScore's layout above */
  .hero__rings img {
    top: 0.9375rem;
    right: auto;
    left: calc(50% - 9.5625rem);
    width: 34.75rem;
  }

  /* Most of the column's width, but at most 27.5rem tall, so a portrait picture (DriveScore's
     phones) doesn't push the page down. The negative margin lets it reach down through the gap
     to the row of the tagline, and lets the empty space at the bottom of its file
     (--cs-hero-visual-empty-bottom, a share of its height) hang below, without making the rows
     taller: what shows ends just above the tagline, and nothing empty is added above it */
  .hero__visual {
    --cs-visual-height: min(95% / (var(--cs-hero-visual-ratio, 902 / 821)), 27.5rem);

    grid-area: visual;
    justify-self: var(--cs-hero-visual-justify, end);
    width: min(95%, 27.5rem * (var(--cs-hero-visual-ratio, 902 / 821)));
    margin: 0 0
      calc(-1 * (var(--cs-hero-visual-empty-bottom, 0) * var(--cs-visual-height) + 1.5rem));
  }

  /* The highlights share their row equally */
  .highlight {
    flex: 1 1 0;
  }
}

/* Phones (up to 640px): the phone hero's picture, rings and facts, and the highlights, numbers and
   buttons one under the other */
@media (max-width: 40rem) {
  .hero__rings img {
    width: 42rem;
  }

  .tags {
    gap: 0.75rem;
  }

  .tags li {
    font-size: 1rem;
  }

  .hero__visual {
    width: min(100%, 28rem);
    margin: 2rem auto;
  }

  .highlights {
    flex-direction: column;
    align-items: stretch;
  }

  .number {
    flex-basis: 100%;
  }

  .cta__buttons {
    flex-direction: column;
    align-self: stretch;
  }
}
