/* ── Tokens ──────────────────────────────────────────────── */
/* Light and dark colours follow the system appearance. */

:root {
  color-scheme: light dark;

  --color-background: #ffffff;
  --color-text: #0b0b0c;
  --color-muted: #6e6e73;
  --color-tint: #f5f5f7;
  --color-line: #d2d2d7;
  --color-bar: rgba(255, 255, 255, 0.8);
  --color-scrim: rgba(232, 232, 237, 0.4);
  --color-success: #1f9d55;
  --color-error: #c4282d;
  --color-eu-blue: #003399;
  --color-eu-blue-light: #1046b8;
  --color-eu-gold: #ffcc00;

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* One type scale for every page: hero and section headlines, and the subheadline
     below either, in the text colour like Apple's. */
  --type-hero-size: clamp(2.5rem, 7vw, 4.5rem);
  --type-subline-size: clamp(1.1875rem, 2.2vw, 1.75rem);
  --type-headline-size: clamp(2rem, 5vw, 3.5rem);

  --radius: 18px;
  --content-width: 980px;
  --bar-height: 53px;
  /* The height of the bar on top of the screen: the navigation at first, the sub navigation
     once the navigation has scrolled away. Pinned content sticks below it. */
  --nav-offset: calc(env(safe-area-inset-top, 0px) + var(--bar-height));
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #000000;
    --color-text: #f5f5f7;
    --color-muted: #86868b;
    --color-tint: #161617;
    --color-line: #333336;
    --color-bar: rgba(0, 0, 0, 0.72);
    --color-scrim: rgba(0, 0, 0, 0.45);
    --color-error: #ff6b6b;
  }
}


/* ── Base ────────────────────────────────────────────────── */

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

html {
  scroll-padding-top: calc(var(--nav-offset) + 16px);
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

main {
  flex: 1;
}

h1, h2, h3, p, dl, dd, figure {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 600;
  text-wrap: balance;
}

img, svg {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* ── Layout ──────────────────────────────────────────────── */

.container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  padding-block: clamp(72px, 10vw, 120px);
  background: var(--color-background);
}

.section--tinted {
  background: var(--color-tint);
}

.section--compact {
  padding-block: clamp(48px, 7vw, 80px);
}

/* Tones for pages that alternate their sections: paper and mist swap between
   light and dark appearance, so neighbours stay apart in both; ink is always dark. */
.section--paper {
  background: var(--color-background);
}

.section--mist {
  background: var(--color-tint);
}

@media (prefers-color-scheme: dark) {
  .section--paper {
    background: var(--color-tint);
  }

  .section--mist {
    background: var(--color-background);
  }
}

.section--ink {
  --color-text: #f5f5f7;
  --color-muted: #a1a1a6;
  --color-line: #333336;
  background: #000000;
  color: var(--color-text);
}

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }
}


/* ── Buttons and Links ───────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--color-text);
  border-radius: 980px;
  background: var(--color-text);
  color: var(--color-background);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.button:hover {
  opacity: 0.82;
}

.button--small {
  min-height: 30px;
  padding: 0 14px;
  font-size: 0.8125rem;
}

.text-link {
  font-weight: 500;
  text-decoration: none;
}

.text-link::after {
  content: " \203A";
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 32px;
}


/* ── Navigation ──────────────────────────────────────────── */

/* Scrolls away with the page; on product pages the sub navigation takes over. */
.site-nav {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* The landing page keeps the navigation on top of the screen instead. */
.site-nav--sticky {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
}

/* While a menu is open, bar and menu form one solid surface. */
.site-nav--open {
  border-bottom-color: transparent;
  background: var(--color-background);
}

.site-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 52px;
}

.site-nav__brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__trigger {
  padding: 16px 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: 0.8125rem;
  opacity: 0.72;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.site-nav__trigger:hover,
.site-nav__trigger[aria-expanded="true"],
.site-nav__trigger--current {
  opacity: 1;
}

.site-nav__trigger--current {
  font-weight: 600;
}

/* Hamburger icon that turns into a cross. */
.site-nav__toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  cursor: pointer;
}

.site-nav__toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.site-nav__toggle-line {
  transform-origin: 9px 9px;
  transition: transform 0.2s ease;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line--top {
  transform: translateY(3px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line--bottom {
  transform: translateY(-3px) rotate(-45deg);
}

.flyout,
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--color-background);
  animation: menu-drop 0.18s ease;
}

.flyout__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 0;
  padding-block: 28px 32px;
  list-style: none;
}

.flyout__list li {
  display: flex;
}

.flyout__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s ease;
}

a.flyout__link:hover,
.flyout__link[aria-current="page"] {
  background: var(--color-tint);
}

.flyout__title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.flyout__description {
  display: block;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.mobile-menu {
  max-height: calc(100vh - var(--bar-height));
  overflow-y: auto;
  padding-bottom: 24px;
}

.mobile-menu__label {
  padding: 16px 0 4px;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-menu__list + .mobile-menu__label {
  padding-top: 28px;
}

.mobile-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mobile-menu__list li:last-child .mobile-menu__link {
  border-bottom: 0;
}

.mobile-menu__link[aria-current="page"] {
  color: var(--color-muted);
}

/* Blurs and dims the page behind an open menu. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--color-scrim);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
  animation: fade-in 0.2s ease;
}

@media (max-width: 760px) {
  .site-nav__menu,
  .flyout {
    display: none !important;
  }

  .site-nav__toggle {
    display: grid;
  }
}

@media (min-width: 761px) {
  .mobile-menu {
    display: none !important;
  }
}

@keyframes menu-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ── Sub Navigation ──────────────────────────────────────── */

/* Pinned to the top, but only shown once the site nav has scrolled out of view
   (navigation.js toggles .subnav--visible). */
.subnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
}

.subnav--visible {
  transform: none;
  visibility: visible;
  transition: transform 0.3s ease, visibility 0s;
}

.subnav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
}

.subnav__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}


/* ── App Icon ────────────────────────────────────────────── */

.app-icon {
  display: block;
  flex: none;
  overflow: hidden;
  border-radius: 22.5%;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--color-line);
}

.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.app-icon--24  { width: 24px;  height: 24px; }
.app-icon--40  { width: 40px;  height: 40px; }
.app-icon--88  { width: 88px;  height: 88px; }
.app-icon--112 { width: 112px; height: 112px; }


/* ── Hero ────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(96px, 15vw, 184px) clamp(80px, 12vw, 144px);
  text-align: center;
}

.hero__headline {
  font-size: var(--type-hero-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero__subline {
  max-width: 32em;
  margin: 22px auto 0;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.hero .app-icon {
  margin: 0 auto 24px;
}


/* ── Landing Hero ────────────────────────────────────────── */
/* The stage stays pinned under the navigation for 80% of a screen of
   scrolling. The first section after it is pulled up by one screen so it
   rises over the fading stage and lands flush when the pin ends. */

.landing-hero {
  position: relative;
  height: calc(180svh - var(--bar-height));
}

.landing-hero__stage {
  position: sticky;
  top: var(--nav-offset);
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100svh - var(--bar-height));
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.landing-hero ~ * {
  position: relative;
  z-index: 2;
}

.landing-hero + * {
  z-index: 3;
  margin-top: calc(-100svh + var(--bar-height));
}

.landing-hero__starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* thin the stars out behind the headline and fade them out towards the bottom */
  -webkit-mask-image:
    radial-gradient(ellipse 55% 45% at 50% 50%, rgba(0, 0, 0, 0.25), #000 85%),
    linear-gradient(to bottom, #000 72%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 55% 45% at 50% 50%, rgba(0, 0, 0, 0.25), #000 85%),
    linear-gradient(to bottom, #000 72%, transparent);
  mask-composite: intersect;
}

.landing-hero__content {
  position: relative;
  z-index: 1;
  will-change: transform, opacity;
}

.landing-hero__headline {
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.landing-hero__employers {
  margin-top: clamp(72px, 18vh, 200px);
}

.landing-hero__employers-caption {
  margin-bottom: 20px;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.employer-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 64px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.employer-list__item {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  opacity: 0.5;
}

@media (max-width: 640px) {
  .employer-list {
    gap: 20px 36px;
  }

  .employer-list__item {
    font-size: 1.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero {
    height: auto;
  }

  .landing-hero__stage {
    position: relative;
    top: 0;
    height: auto;
    padding-block: clamp(96px, 15vw, 184px) clamp(80px, 12vw, 144px);
  }

  .landing-hero + * {
    margin-top: 0;
  }
}


/* ── Section Heading ─────────────────────────────────────── */

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-heading--centered {
  justify-items: center;
  margin: clamp(28px, 4vw, 40px) 0 0;
  text-align: center;
}

.section-heading__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.section-heading__text {
  max-width: 36em;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}


/* ── Results ─────────────────────────────────────────────── */
/* A row of figures with short labels; the metrics band shows them larger. */

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.results__item {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.results__value {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
  white-space: nowrap;
}

.results__label {
  max-width: 15em;
  color: var(--color-muted);
  text-wrap: balance;
}

.metrics {
  padding-block: clamp(80px, 11vw, 128px);
}

.metrics .results__value {
  font-size: clamp(2.75rem, 6vw, 4rem);
}


/* ── Landing Products ────────────────────────────────────── */
/* The products one below the other, apart by a gap in the page's background, also
   before the contact section. */

.landing-products {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}


/* ── Product Teaser ──────────────────────────────────────── */

.product-teaser {
  display: grid;
  text-align: center;
}

/* A phone peeking in above the name, cut off without a fade. */
.product-teaser__image {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 28px;
}

.product-teaser__name {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.product-teaser__tagline {
  max-width: 30em;
  margin: 14px auto 0;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.product-teaser .actions {
  margin-top: 26px;
}

/* Swift WebServices: its endpoint example tilted back and blurred out under the
   name, on a deeper take on Swift's orange, darkest at the links, so the white text stays readable on
   it. */
.product-teaser--swift {
  --color-text: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, #ee6c33, #c8461a);
  color: var(--color-text);
  /* The blur under the window reaches past the screen's edge on narrow screens. */
  overflow-x: clip;
}

.product-teaser--swift .button {
  border-color: #ffffff;
  background: #ffffff;
  color: #1d1d1f;
}

/* The whole window, tilted back a little from its bottom edge and turned down to
   the left, so only its bottom left corner runs on under the name, where it is
   blurred out. The tilt makes it shorter than upright, so the stage is set to what
   is left of it above the name. The stage turns with the blur under the window. */
.product-teaser__stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 212px;
  margin: 0 auto 28px;
  perspective: 1000px;
  perspective-origin: 50% 100%;
  transform: translateX(24px) rotate(-5deg);
  transform-origin: 50% 100%;
}

.code-window.product-teaser__code {
  position: absolute;
  right: 0;
  bottom: -46px;
  left: 0;
  transform: rotateX(20deg);
  transform-origin: 50% 100%;
}

/* Wider than the window and faded at every side, so the blur has no edge of its own
   across the window's shadow. */
.product-teaser__stage::after {
  content: "";
  position: absolute;
  top: calc(100% + 12px);
  right: -48px;
  left: -48px;
  height: 64px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 45%),
    linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, #000 45%),
    linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-composite: intersect;
  pointer-events: none;
}

.product-teaser--swift .product-teaser__name,
.product-teaser--swift .product-teaser__tagline {
  position: relative;
}

/* The name is smaller here, so the window runs on less far under it, and it stays
   in the middle, where it has no room to move to the right. */
@media (max-width: 480px) {
  .product-teaser__stage {
    height: 194px;
    transform: rotate(-4deg);
  }

  .code-window.product-teaser__code {
    bottom: -30px;
  }

  .product-teaser__code .code-window__code {
    padding-inline: 18px;
    font-size: 11px;
  }
}


/* ── Product Tile ────────────────────────────────────────── */
/* A product on the landing page as a tile of a fixed height, as on Apple's
   homepage: name, the subheadline of its page and its links on top, the picture
   filling the rest and cut off by the tile's edge, so it never adds height.
   Resonanz on its gold. */

.product-tile {
  height: 692px;
  overflow: hidden;
}

@media (max-width: 1068px) {
  .product-tile {
    height: 620px;
  }
}

@media (max-width: 734px) {
  .product-tile {
    height: 580px;
  }
}

.product-tile__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding-top: clamp(44px, 5vw, 56px);
  text-align: center;
}

.product-tile__name {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.product-tile__tagline {
  max-width: 30em;
  margin: 8px auto 0;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.product-tile .actions {
  margin-top: 20px;
}

/* The space below the copy. Pictures are sized by its height (cqh), so the part
   that matters lands just above the edge on every screen. */
.product-tile__visual {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  margin-top: clamp(28px, 4vw, 44px);
  container-type: size;
  display: flex;
  justify-content: center;
}

.product-tile__image {
  display: block;
  width: auto;
  max-width: none;
  height: var(--image-height);
}

/* On the gold, the colours stay the same in both appearances. */
.product-tile--resonanz {
  --color-text: #1d1d1f;
  --color-muted: rgba(29, 29, 31, 0.72);
  background: rgb(224, 186, 92);
  color: var(--color-text);
}

.product-tile--resonanz .button {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #ffffff;
}

/* What matters in Resonanz is below the record: the song and the dislike, play and
   favorite buttons, which end at 78% of the phone. */
.product-tile--resonanz .product-tile__image {
  --image-height: 124cqh;
}

/* Acadia on a road from one of its drives, shorter than the other tiles like
   Colorize, with its copy centred on it and dimmed behind it; white in both
   appearances. */
.product-tile--acadia {
  --color-text: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.86);
  position: relative;
  height: 520px;
  background: #000000;
  color: var(--color-text);
}

@media (max-width: 734px) {
  .product-tile--acadia {
    height: 440px;
  }
}

.product-tile--acadia .product-tile__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* On narrow screens, the crop keeps the centre lines of the curve. */
@media (max-width: 734px) {
  .product-tile--acadia .product-tile__backdrop {
    object-position: 22% 50%;
  }
}

.product-tile--acadia::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.product-tile--acadia .product-tile__content {
  position: relative;
  z-index: 1;
  justify-content: center;
  padding-top: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.product-tile--acadia .button {
  border-color: #ffffff;
  background: #ffffff;
  color: #1d1d1f;
  text-shadow: none;
}

/* Colorize on its photograph, shorter than the other tiles, with its copy centred on
   it and dimmed behind it; white in both appearances. */
.product-tile--colorize {
  --color-text: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.86);
  position: relative;
  height: 520px;
  background: #000000;
  color: var(--color-text);
}

@media (max-width: 734px) {
  .product-tile--colorize {
    height: 440px;
  }
}

/* More specific than Develop, which comes later. */
.product-tile--colorize .product-tile__backdrop {
  position: absolute;
  inset: 0;
}

.product-tile--colorize .product-tile__backdrop > img {
  height: 100%;
  object-fit: cover;
}

.product-tile--colorize .product-tile__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.product-tile--colorize .product-tile__content {
  position: relative;
  justify-content: center;
  padding-top: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.product-tile--colorize .button {
  border-color: #ffffff;
  background: #ffffff;
  color: #1d1d1f;
  text-shadow: none;
}

/* The Golf Credential on the tint with its card above the copy, as on its page;
   shorter like Acadia and Colorize, the content centred. */
.product-tile--golf {
  height: 600px;
  background: var(--color-tint);
}

@media (max-width: 734px) {
  .product-tile--golf {
    height: 560px;
  }
}

.product-tile--golf .product-tile__content {
  justify-content: center;
  padding-top: 0;
}

.product-tile__card {
  width: min(100%, 300px);
  margin-bottom: clamp(28px, 4vw, 40px);
}

.product-tile__symbol {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.1em;
}


/* ── Fact List ───────────────────────────────────────────── */

.fact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 56px;
}

.fact-list__item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-block: 20px;
  border-top: 1px solid var(--color-line);
}

.fact-list__term {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .fact-list {
    grid-template-columns: 1fr;
  }
}


/* ── Closing ─────────────────────────────────────────────── */

.closing {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.closing .app-icon {
  margin-bottom: 8px;
}

.closing__headline {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.closing .actions {
  margin-top: 8px;
}

/* Hand-drawn underline, drawn once when it scrolls into view (handwriting.js). */
.scribble {
  position: relative;
  display: inline-block;
  margin-bottom: 0.35em;
}

.scribble__line {
  position: absolute;
  left: -3%;
  bottom: -0.32em;
  width: 106%;
  height: 0.5em;
  overflow: visible;
  pointer-events: none;
}

.scribble__line path {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.scribble--drawn .scribble__line path:nth-child(1) {
  animation: draw-stroke 0.65s 0.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scribble--drawn .scribble__line path:nth-child(2) {
  animation: draw-stroke 0.45s 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes draw-stroke {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scribble__line path {
    stroke-dashoffset: 0;
  }
}


/* ── Expand ──────────────────────────────────────────────── */
/* Media that open from an inset, rounded card to their full size as they arrive,
   their content settling back from a slight zoom. jottre.js sets --open from 0 to 1;
   without it they simply show open. */

.expand {
  --open: 1;
  --inset-x: 7%;
  --inset-y: 6%;
  --radius: 32px;
  --radius-end: 0px;
  overflow: hidden;
  clip-path: inset(
    calc((1 - var(--open)) * var(--inset-y))
    calc((1 - var(--open)) * var(--inset-x))
    round calc(var(--radius-end) + (1 - var(--open)) * (var(--radius) - var(--radius-end)))
  );
}

.expand__content {
  transform: scale(calc(1.1 - var(--open) * 0.1));
}

.expand__content > img {
  display: block;
  width: 100%;
  height: auto;
}

/* Full-bleed media start at the width of the content. */
.expand--bleed {
  --inset-x: max(16px, calc((100vw - var(--content-width)) / 2 + 22px));
  --inset-y: 0px;
  margin-top: clamp(36px, 5vw, 56px);
}

/* Growing media zoom in instead, from a smaller size up to their own. */
.expand--grow .expand__content {
  transform: scale(calc(0.8 + var(--open) * 0.2));
}

/* A section that ends in a full-bleed medium ends with its edge. */
.section--bleed-end {
  padding-bottom: 0;
}


/* ── Jottre ──────────────────────────────────────────────── */

.jottre-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--nav-offset));
  padding-block: 48px;
  overflow: hidden;
  isolation: isolate;
}

.jottre-hero__content {
  position: relative;
  z-index: 1;
}

/* The icon, headline, subline and actions rise in one after another. */
.jottre-hero__content > * {
  animation: jottre-rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.jottre-hero__content > :nth-child(2) { animation-delay: 0.12s; }
.jottre-hero__content > :nth-child(3) { animation-delay: 0.24s; }
.jottre-hero__content > :nth-child(4) { animation-delay: 0.36s; }

@keyframes jottre-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* Pen strokes behind the hero, written by jottre.js. */
.handwriting {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.handwriting__stroke {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.55;
}

.handwriting__stroke--dot {
  fill: var(--color-text);
  fill-opacity: 0;
}

/* On narrow screens only the middle of the drawing shows, so the four drawings
   move in from the sides: two above the copy, two below it. */
@media (max-width: 760px) {
  .handwriting__group {
    transform-box: view-box;
    transform-origin: 0 0;
  }

  .handwriting__group--lines     { transform: translate(390px, -26px) scale(0.6); }
  .handwriting__group--chart     { transform: translate(92px, -15px) scale(0.6); }
  .handwriting__group--circle    { transform: translate(380px, 305px) scale(0.55); }
  .handwriting__group--checklist { transform: translate(176px, 306px) scale(0.55); }

  .handwriting__stroke {
    stroke-width: 4.5;
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .handwriting__stroke {
    stroke-dashoffset: 0;
  }

  .handwriting__stroke--dot {
    fill-opacity: 1;
  }
}


/* ── Jottre Stage ────────────────────────────────────────── */
/* Pinned under the navigation while the note is written, turns dark and is
   shared. The chapters share one grid cell, so the copy is as tall as the
   longest of them. */

.jottre-stage {
  position: relative;
}

.jottre-stage--animated {
  height: 460svh;
}

.jottre-stage__frame {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(24px, 4vh, 44px);
  min-height: calc(100svh - var(--nav-offset));
  padding: clamp(28px, 5vh, 56px) 22px;
  overflow: hidden;
}

.jottre-stage--animated .jottre-stage__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
}

.jottre-stage__copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 40px;
  max-width: 40em;
  text-align: center;
}

/* Each chapter fades on a layer of its own, so Safari leaves nothing of it behind
   where it moved away from. */
.jottre-stage--animated .jottre-chapter {
  grid-area: 1 / 1;
  opacity: 0;
  will-change: opacity, transform;
}

.jottre-chapter__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.jottre-chapter__text {
  max-width: 30em;
  margin: 14px auto 0;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

@media (max-width: 480px) {
  .jottre-stage__frame {
    padding-inline: 16px;
  }
}

/* As large as fits below the copy, at the screenshots' aspect ratio. */
.jottre-stage__media {
  position: relative;
  width: min(100%, 1120px, calc((100svh - var(--nav-offset) - 250px) * 2000 / 1397));
}

.jottre-note {
  --radius-end: clamp(8px, 1.6vw, 20px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.25);
}

.jottre-note__layer {
  position: relative;
}

.jottre-note__layer img {
  display: block;
  width: 100%;
  height: auto;
}

.jottre-note__layer--dark {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(var(--dark-end, 0) * 1%) 0 calc(var(--dark-start, 100) * 1%));
}

/* The same note with its share menu open fades in under the handwriting, which
   leaves the menu's corner of the canvas free. */
.jottre-note__layer .jottre-note__share {
  position: absolute;
  inset: 0;
  opacity: var(--share, 0);
}

/* The handwriting covers the canvas between the title bar and the tool palette. */
.note {
  position: absolute;
  top: 12%;
  left: 0;
  width: 100%;
  height: 70.7%;
}

.note__stroke {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jottre-note__layer {
  --ink: #1c1c1e;
  --blue: #007aff;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --purple: #af52de;
}

.jottre-note__layer--dark {
  --ink: #f2f2f7;
  --blue: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --purple: #bf5af2;
}

.note__stroke--ink    { --stroke: var(--ink); }
.note__stroke--blue   { --stroke: var(--blue); }
.note__stroke--green  { --stroke: var(--green); }
.note__stroke--orange { --stroke: var(--orange); }
.note__stroke--red    { --stroke: var(--red); }
.note__stroke--purple { --stroke: var(--purple); }

.note__stroke--dot {
  fill: var(--stroke);
}

.jottre-stage--animated .note__stroke {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.jottre-stage--animated .note__stroke--dot {
  fill-opacity: 0;
}

/* Follows the end of the stroke being written; its tip is the bottom centre. */
.apple-pencil {
  display: none;
}

.jottre-stage--animated .apple-pencil {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 2.6%;
  height: auto;
  aspect-ratio: 40 / 420;
  opacity: var(--pencil-opacity, 0);
  filter: drop-shadow(-10px 16px 12px rgba(0, 0, 0, 0.28));
  transform-origin: 50% 100%;
  transform: translate(calc(var(--pencil-x, 0px) - 50%), calc(var(--pencil-y, 0px) - 100%)) rotate(38deg);
  pointer-events: none;
}


/* ── Jottre Devices and Mac ──────────────────────────────── */


.jottre-devices .expand__content > img {
  width: min(100% - 44px, 900px);
  margin-inline: auto;
}

@media (max-width: 720px) {
  .jottre-mac .expand__content > img {
    height: 72vw;
    object-fit: cover;
    object-position: 72% 50%;
  }
}


/* ── Jottre iPhone ──────────────────────────────────────── */
/* Two phones side by side under the heading, cut off by the bottom of the section. */

.jottre-iphones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  height: calc(min(40vw, 320px) * 1.55);
  margin-top: clamp(36px, 5vw, 56px);
  overflow: hidden;
}

.jottre-iphones__phone {
  display: block;
  width: min(40vw, 320px);
  height: auto;
}


/* ── Principles ──────────────────────────────────────────── */

.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 720px) {
  .principle-grid {
    grid-template-columns: 1fr;
  }
}

.principle {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 12px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background: var(--color-tint);
}

@media (prefers-color-scheme: dark) {
  .principle {
    background: var(--color-background);
  }
}

.principle__visual {
  width: 120px;
  height: 84px;
  margin-bottom: 12px;
  overflow: visible;
}

.principle__visual path {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.principle__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.principle__text {
  color: var(--color-muted);
  font-size: 1.0625rem;
}

.principle .text-link {
  margin-top: 8px;
}


/* ── Resonanz ────────────────────────────────────────────── */
/* The stage is one screen of colour, like the app: the background takes the
   tint of the record that is playing. The introduction is in the gold of a
   favorite, with dark text and a soft light in the middle; while the record rises
   into the player, the gold gives way to the record's tint. resonanz.js pins the
   stage for a few screens of scrolling and drives all of this. */

.resonanz-stage {
  --intro-tint: 224, 186, 92;
  --stage-tint: var(--intro-tint);
  position: relative;
  background: rgb(var(--stage-tint));
  color: #ffffff;
}

.resonanz-stage--animated {
  height: 340svh;
}

.resonanz-stage__frame {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(20px, 4vh, 48px);
  min-height: calc(100svh - var(--nav-offset));
  padding: clamp(36px, 7vh, 80px) 22px clamp(28px, 5vh, 56px);
  overflow: hidden;
  isolation: isolate;
}

.resonanz-stage--animated .resonanz-stage__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
}

/* The light on the gold of the introduction. */
.resonanz-stage__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(255, 244, 214, 0.6), transparent 70%);
  pointer-events: none;
}

/* A short golden glow over the whole stage when a song becomes a favorite. */
.resonanz-stage__flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255, 204, 0, 0.28);
  opacity: 0;
  pointer-events: none;
}

.resonanz-stage--stargaze .resonanz-stage__flash {
  animation: stage-flash 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes stage-flash {
  12% { opacity: 1; }
  to  { opacity: 0; }
}

/* The chapters share one grid cell and cross-fade. */
.resonanz-stage__copy {
  display: grid;
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.resonanz-chapter {
  grid-area: 1 / 1;
  align-self: center;
  will-change: transform, opacity;
}

.resonanz-stage--animated .resonanz-stage__copy .resonanz-chapter {
  opacity: 0;
}

/* Without resonanz.js the stage shows only the introduction and the player. */
.resonanz-stage:not(.resonanz-stage--animated) .resonanz-stage__copy {
  display: none;
}

.resonanz-chapter__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.resonanz-chapter__symbol {
  display: inline-block;
  width: 0.86em;
  height: 0.86em;
  margin-left: 0.04em;
  vertical-align: -0.08em;
}

.resonanz-chapter__text {
  max-width: 30em;
  margin: 18px auto 0;
  color: inherit;
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.resonanz-chapter .actions {
  margin-top: 26px;
}

/* The introduction is centred on the stage; resonanz.js sets its top. */
.resonanz-chapter--intro {
  max-width: 720px;
  text-align: center;
}

/* No grid area: an absolutely positioned grid child would be placed within it. */
.resonanz-stage--animated .resonanz-chapter--intro {
  grid-area: auto;
  position: absolute;
  right: 22px;
  left: 22px;
  z-index: 3;
  margin-inline: auto;
}

/* Dark text on the gold of the introduction, whatever the system appearance. */
.resonanz-chapter--intro {
  color: #1d1d1f;
}

/* The introduction is the page's hero. */
.resonanz-chapter--intro .resonanz-chapter__title {
  font-size: var(--type-hero-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.button--on-gold {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #ffffff;
}

/* The player: record and the three round buttons, as in the app. */
.resonanz-player {
  --vinyl-size: min(40svh, 78vw, 460px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(20px, 3.4vh, 36px);
  height: 100%;
}

.resonanz-player__turntable {
  position: relative;
  will-change: transform;
  width: var(--vinyl-size);
  height: var(--vinyl-size);
}

.resonanz-player__controls {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 22px);
}

@media (min-width: 960px) and (min-aspect-ratio: 5/4) {
  .resonanz-stage__frame {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    padding-inline: max(22px, calc((100% - 1160px) / 2));
  }

  .resonanz-stage__copy {
    justify-self: start;
    max-width: 520px;
    text-align: left;
  }

  .resonanz-chapter:not(.resonanz-chapter--intro) .resonanz-chapter__text {
    margin-left: 0;
  }

  .resonanz-player {
    --vinyl-size: min(58svh, 40vw, 520px);
  }
}

@media (max-height: 640px) and (max-width: 959px) {
  .resonanz-player {
    --vinyl-size: min(34svh, 70vw);
  }

  .resonanz-chapter__text {
    font-size: 1rem;
  }
}


/* ── Vinyl ───────────────────────────────────────────────── */
/* The record of the app: 22 grooves between label and edge, a label of 36%
   of the diameter with the artwork, and a light sheen that does not turn.
   The label art here is abstract; each modifier sets it and its tint. */

.vinyl {
  --groove: rgba(255, 255, 255, 0.16);
  --grooves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23000' stroke-width='0.16'%3E%3Ccircle cx='50' cy='50' r='19.60'/%3E%3Ccircle cx='50' cy='50' r='20.92'/%3E%3Ccircle cx='50' cy='50' r='22.25'/%3E%3Ccircle cx='50' cy='50' r='23.57'/%3E%3Ccircle cx='50' cy='50' r='24.90'/%3E%3Ccircle cx='50' cy='50' r='26.22'/%3E%3Ccircle cx='50' cy='50' r='27.54'/%3E%3Ccircle cx='50' cy='50' r='28.87'/%3E%3Ccircle cx='50' cy='50' r='30.19'/%3E%3Ccircle cx='50' cy='50' r='31.51'/%3E%3Ccircle cx='50' cy='50' r='32.84'/%3E%3Ccircle cx='50' cy='50' r='34.16'/%3E%3Ccircle cx='50' cy='50' r='35.49'/%3E%3Ccircle cx='50' cy='50' r='36.81'/%3E%3Ccircle cx='50' cy='50' r='38.13'/%3E%3Ccircle cx='50' cy='50' r='39.46'/%3E%3Ccircle cx='50' cy='50' r='40.78'/%3E%3Ccircle cx='50' cy='50' r='42.10'/%3E%3Ccircle cx='50' cy='50' r='43.43'/%3E%3Ccircle cx='50' cy='50' r='44.75'/%3E%3Ccircle cx='50' cy='50' r='46.08'/%3E%3Ccircle cx='50' cy='50' r='47.40'/%3E%3C/svg%3E");
  position: absolute;
  inset: 0;
  will-change: transform;
}

.vinyl__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #0a0a0a;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5);
  transition: background-color 0.4s ease;
}

.vinyl__disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--groove);
  -webkit-mask: var(--grooves) center / 100% 100% no-repeat;
  mask: var(--grooves) center / 100% 100% no-repeat;
}

.vinyl__label {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: var(--art);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.vinyl__hole {
  position: absolute;
  inset: 48.9%;
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.3);
}

.vinyl__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 45%, transparent 72%);
  pointer-events: none;
}

.vinyl--gold {
  --groove: rgba(70, 45, 0, 0.45);
}

.vinyl--gold .vinyl__disc {
  background-color: rgb(209, 171, 64);
}

.vinyl--a {
  --tint: 91, 58, 88;
  --art:
    radial-gradient(circle at 30% 26%, #ffe0b8 0 7%, transparent 34%),
    conic-gradient(from 210deg at 60% 62%, #ff6a88, #ffb199, #b06ab3, #4c3a8f, #ff6a88);
}

.vinyl--b {
  --tint: 70, 85, 95;
  --art:
    radial-gradient(circle at 70% 30%, #e6fbff 0 6%, transparent 32%),
    conic-gradient(from 90deg at 40% 56%, #2bc0e4, #1c3f60, #5e8bb3, #b6fbff, #2bc0e4);
}


/* Before resonanz.js takes over, only the first record shows. */
.resonanz-player .vinyl:not(.vinyl--a) {
  visibility: hidden;
}


/* ── Player Buttons ──────────────────────────────────────── */

.player-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.16);
  color: #ffffff;
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.player-button > .symbol {
  width: 40%;
  height: 40%;
}

.player-button--play {
  width: 74px;
  height: 74px;
}

.player-button--active {
  background: rgba(255, 255, 255, 0.94);
  color: #1d1d1f;
}

.player-button--star.player-button--active {
  color: rgb(209, 171, 64);
}

/* The press of the app: squeezed and turned a little, then sprung back. */
.player-button--pressed {
  animation: player-press 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes player-press {
  from { transform: scale(0.65) rotate(-14deg); }
  to   { transform: none; }
}

/* Starring sends a ring and a handful of sparks out from the button. */
.stargaze {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stargaze__ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 204, 0, 0.9);
  border-radius: 50%;
  opacity: 0;
}

.stargaze__spark {
  position: absolute;
  top: calc(50% - 4px);
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd60a;
  box-shadow: 0 0 12px rgba(255, 214, 10, 0.9);
  opacity: 0;
}

.resonanz-stage--stargaze .stargaze__ring {
  animation: stargaze-ring 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.resonanz-stage--stargaze .stargaze__spark {
  animation: stargaze-spark 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes stargaze-ring {
  from { opacity: 0.95; transform: scale(1); }
  to   { opacity: 0; transform: scale(16); }
}

@keyframes stargaze-spark {
  from { opacity: 1; transform: rotate(var(--angle)) translateX(20px) scale(1.2); }
  to   { opacity: 0; transform: rotate(var(--angle)) translateX(150px) scale(0.2); }
}


/* ── Statement ───────────────────────────────────────────── */
/* Words light up one after another as the paragraph scrolls by. */

.statement {
  max-width: 21em;
  font-size: clamp(1.875rem, 4.6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.14;
  text-wrap: pretty;
}

.statement__word {
  transition: opacity 0.35s ease;
}

.statement--animated .statement__word {
  opacity: 0.2;
}

.statement--animated .statement__word--lit {
  opacity: 1;
}


/* ── Resonanz Devices ────────────────────────────────────── */
/* Text beside the devices on wide screens. The iPad zooms in as it arrives; the
   iPhone in front of it rises faster. */

.resonanz-devices-section {
  overflow: hidden;
}

.resonanz-devices-layout {
  display: grid;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.resonanz-devices-layout .section-heading {
  margin-bottom: 0;
}

/* Narrow enough that the devices fit one screen: the iPad is about as tall as
   the devices are wide. */
.resonanz-devices {
  position: relative;
  width: min(100%, 560px, calc((100svh - var(--nav-offset)) * 0.72));
  margin-inline: auto;
}

@media (min-width: 860px) {
  .resonanz-devices-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.resonanz-devices__ipad,
.resonanz-devices__iphone {
  display: block;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.16));
}

.resonanz-devices__ipad {
  width: 74%;
  transform: scale(var(--zoom, 1));
  transform-origin: 50% 70%;
}

.resonanz-devices__iphone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 31%;
  transform: translateY(var(--shift, 0px));
}


/* ── Highlights ──────────────────────────────────────────── */
/* Tiles with a small drawing and two lines of text. They rise into place
   when they scroll into view (resonanz.js). */

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.highlight {
  display: grid;
  grid-template-rows: minmax(200px, 1fr) auto;
  gap: 24px;
  min-width: 0;
  padding: 32px;
  border-radius: 28px;
  background: var(--color-tint);
  overflow: hidden;
}

.highlight__copy {
  display: grid;
  align-content: end;
  gap: 8px;
}

.highlight__title {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.highlight__text {
  max-width: 28em;
  color: var(--color-muted);
}

.highlight-visual {
  display: grid;
  place-items: center;
  min-width: 0;
}

.highlight-visual__turntable {
  --vinyl-size: 176px;
  position: relative;
  width: var(--vinyl-size);
  height: var(--vinyl-size);
}

.highlight-visual--scrub .highlight-visual__turntable {
  --vinyl-size: 208px;
}

/* Back and forth, like a finger on the record. */
.highlight-visual--scrub .vinyl__disc {
  animation: scrub-record 5s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@keyframes scrub-record {
  0%, 12%   { transform: rotate(0deg); }
  42%, 54%  { transform: rotate(150deg); }
  80%, 100% { transform: rotate(0deg); }
}

/* The opacity is on the whole drawing, so where arc and arrowhead overlap
   they do not add up. */
.scrub-arrows {
  position: absolute;
  inset: -16%;
  width: 132%;
  height: 132%;
  max-width: none;
  overflow: visible;
  opacity: 0.6;
}

.scrub-arrows path {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.highlight-visual__stack {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100%, 260px);
}

.glass-pill {
  display: grid;
  place-items: center;
  width: 128px;
  height: 40px;
  border-radius: 980px;
  background: var(--color-background);
  box-shadow: inset 0 0 0 0.5px var(--color-line), 0 6px 18px rgba(0, 0, 0, 0.08);
}

.glass-pill .symbol {
  width: 20px;
  height: 20px;
}

/* Rows of songs: artwork, two lines standing in for title and artist, and an
   optional mark (star or dislike) at the end. */
.track-list {
  display: grid;
  gap: 10px;
  width: min(100%, 260px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-list__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  background: var(--color-background);
}

.track-list__row--selected {
  box-shadow: inset 0 0 0 2px var(--color-text);
}

.track-list__art {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.track-list__art--a { background: conic-gradient(from 210deg at 60% 62%, #ff6a88, #ffb199, #b06ab3, #4c3a8f, #ff6a88); }
.track-list__art--b { background: conic-gradient(from 90deg at 40% 56%, #2bc0e4, #1c3f60, #5e8bb3, #b6fbff, #2bc0e4); }
.track-list__art--c { background: conic-gradient(from 30deg at 56% 44%, #f7971e, #ffd200, #e44d26, #7b2d26, #f7971e); }
.track-list__art--d { background: conic-gradient(from 160deg at 50% 40%, #a8e063, #56ab2f, #1d4d2b, #d4fc79, #a8e063); }

.track-list__lines {
  flex: 1;
  height: 22px;
  background:
    linear-gradient(var(--color-text), var(--color-text)) 0 0 / 70% 7px no-repeat,
    linear-gradient(var(--color-line), var(--color-line)) 0 100% / 46% 7px no-repeat;
  border-radius: 4px;
  opacity: 0.85;
}

.track-list__mark {
  flex: none;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  color: var(--color-muted);
}

.track-list__mark--star {
  color: rgb(209, 171, 64);
}

.highlight-visual__glyph {
  width: min(100%, 168px);
  height: auto;
  aspect-ratio: 1;
  color: var(--color-text);
}

@media (max-width: 720px) {
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .highlight {
    padding: 28px 24px;
  }
}

.resonanz-privacy {
  margin-top: 24px;
}

.closing__text {
  max-width: 28em;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}


/* ── Reveal ──────────────────────────────────────────────── */
/* Set by resonanz.js, so without it everything simply shows. */

.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.98);
  transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal--visible {
  opacity: 1;
  transform: none;
}

.symbol {
  fill: currentColor;
}


/* ── Develop ─────────────────────────────────────────────── */
/* Colorize's one motion: a picture starts in black and white, and the color sweeps
   across it from the left behind a thin line. colorize.js sets --develop from 0 to 1;
   without it, everything shows in color. */

.develop {
  --develop: 1;
  position: relative;
  overflow: hidden;
}

.develop > img {
  display: block;
  width: 100%;
  height: auto;
}

.develop__original--desaturated {
  filter: grayscale(1);
}

.develop__result {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc((1 - var(--develop)) * 100%) 0 0);
}

.develop > .develop__result {
  height: 100%;
  object-fit: cover;
}

/* Only shows while the color is on its way. */
.develop__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--develop) * 100%);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
  opacity: clamp(0, min(var(--develop), 1 - var(--develop)) * 16, 1);
  pointer-events: none;
}

/* ── Colorize ────────────────────────────────────────────── */
/* Colorize's colour is a magenta, close to Telekom's but not the same, used in the
   drawing of the network. */

.colorize {
  --colorize-magenta: #d81b84;
}

/* Hero: pinned while the photograph shrinks from the full screen to the width of the
   page and the headline moves up from its middle. colorize.js moves them from where
   they end, the layout below, and sets --overlap on the page: how far the frame's
   bottom is below the photograph's, negative when the photograph runs on below it.
   The next section then follows the photograph at --intro-gap: pulled up under the
   frame's empty bottom, or after room the hero makes below the frame. */
.colorize-intro {
  position: relative;
}

.colorize-intro--animated {
  --intro-gap: clamp(72px, 10vw, 120px);
  height: 260svh;
  padding-bottom: max(calc(var(--intro-gap) - var(--overlap, 0px)), 0px);
}

.colorize-intro__frame {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: clamp(24px, 4vh, 40px);
  padding: clamp(32px, 6vh, 64px) 22px 0;
  text-align: center;
}

/* Clipped at the top and sides only, so the photograph can run on below the frame. */
.colorize-intro--animated .colorize-intro__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
  clip-path: inset(0 0 -200vh 0);
}

/* The copy, and a white one over it while it is on the photograph. */
.colorize-intro__header {
  position: relative;
  z-index: 1;
  display: grid;
}

.colorize-intro__copy {
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.colorize-intro__copy--on-photo {
  display: none;
  --color-text: #ffffff;
  --color-muted: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.colorize-intro--animated .colorize-intro__copy--on-photo {
  display: grid;
}

.colorize-intro__headline {
  color: var(--color-text);
  font-size: var(--type-hero-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  padding-bottom: 0.08em;
  transform-origin: 50% 100%;
}

.colorize-intro__subline {
  max-width: 34em;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

/* As large as fits below the header, so the hero ends on the whole photograph. The
   reserve is the header and the frame's padding. */
.colorize-intro__figure {
  --reserve: calc(clamp(32px, 6vh, 64px) + clamp(2.5rem, 6vw, 4.5rem) * 1.13 + 10px + 2 * 1.35 * clamp(1.125rem, 2vw, 1.375rem) + clamp(24px, 4vh, 40px) + clamp(32px, 6vh, 64px));
  width: min(100%, 1196px, calc((100svh - var(--nav-offset) - var(--reserve)) * 911 / 607));
  min-width: min(100%, 320px);
  text-align: left;
}

.colorize-intro__card {
  --radius: 22px;
  --shade: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transform-origin: 50% 50%;
}

.colorize-intro--animated .colorize-intro__card {
  will-change: transform;
}

.colorize-intro__card .develop {
  border-radius: 0;
}

/* Darkens the photograph behind the white headline while it fills the screen. */
.colorize-intro__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: var(--shade);
  pointer-events: none;
}

.colorize-intro--animated + section {
  --intro-gap: clamp(72px, 10vw, 120px);
  position: relative;
  z-index: 1;
  margin-top: min(calc(var(--intro-gap) - var(--overlap, 0px)), 0px);
}

@media (max-width: 480px) {
  .colorize-intro__frame {
    padding-inline: 16px;
  }

  .colorize-intro__card {
    --radius: 16px;
  }
}

/* Gallery: one wide photograph, then two side by side, all in the same frame. */
.colorize-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 32px);
  max-width: 1240px;
}

.colorize-photo {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.colorize-photo--wide {
  grid-column: 1 / -1;
}

.colorize-photo .develop {
  border-radius: 22px;
}

.colorize-photo:not(.colorize-photo--wide) .develop {
  aspect-ratio: 4 / 3;
}

.colorize-photo:not(.colorize-photo--wide) .develop > img {
  height: 100%;
  object-fit: cover;
}

.colorize-photo__caption {
  max-width: 40em;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (max-width: 734px) {
  .colorize-gallery__grid {
    grid-template-columns: 1fr;
  }

  .colorize-photo .develop {
    border-radius: 16px;
  }
}

/* Network: pinned while the color flows through the drawing and the chapters
   cross-fade above it. They share one grid cell, so the copy is as tall as the
   longest of them. */
.colorize-network {
  position: relative;
}

.colorize-network--animated {
  height: 440svh;
}

.colorize-network__frame {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(28px, 6vh, 64px);
  min-height: calc(100svh - var(--nav-offset));
  padding-block: clamp(28px, 5vh, 56px);
  overflow: hidden;
}

.colorize-network--animated .colorize-network__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
}

.colorize-network__copy {
  display: grid;
  gap: 40px;
  max-width: 40em;
  padding-inline: 22px;
  text-align: center;
}

/* Each chapter fades on a layer of its own, so Safari leaves nothing of it behind
   where it moved away from. */
.colorize-network--animated .colorize-chapter {
  grid-area: 1 / 1;
  opacity: 0;
  will-change: opacity, transform;
}

.colorize-chapter__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.colorize-chapter__text {
  max-width: 30em;
  margin: 14px auto 0;
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

/* Never narrower than its labels can be read at. On narrow screens it runs past the
   edge, and colorize.js pans it along with the color. */
.colorize-network__viewport {
  width: 100%;
  max-width: var(--content-width);
  padding-inline: 22px;
  overflow: hidden;
}

.colorize-network:not(.colorize-network--animated) .colorize-network__viewport {
  overflow-x: auto;
}

.colorize-network__drawing {
  --pan: 0px;
  width: min(100%, calc((100svh - var(--nav-offset) - 360px) * 1050 / 400));
  min-width: 760px;
  margin-inline: auto;
  transform: translateX(calc(-1 * var(--pan)));
}

.colorize-network__drawing .develop__original--desaturated {
  filter: grayscale(1) opacity(0.6);
}

.colorize-network__drawing .develop__edge {
  background: var(--color-muted);
  box-shadow: none;
}

@media (max-width: 480px) {
  .colorize-network__copy,
  .colorize-network__viewport {
    padding-inline: 16px;
  }
}

.colorize-net {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-text);
}

.colorize-net__line {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.colorize-net__line--dashed {
  stroke-dasharray: 1 7;
}

.colorize-net__head {
  fill: var(--color-muted);
}

.colorize-net__label {
  fill: var(--color-text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.colorize-net__detail {
  fill: var(--color-muted);
  font-size: 14px;
}

/* The generator in magenta, its global branch lighter; the discriminator, only used
   while training, in outline. */
.colorize-net__blocks--encoder,
.colorize-net__blocks--decoder {
  fill: var(--colorize-magenta);
}

.colorize-net__blocks--global {
  fill: var(--colorize-magenta);
  fill-opacity: 0.5;
}

.colorize-net__blocks--discriminator {
  fill: var(--colorize-magenta);
  fill-opacity: 0.12;
  stroke: var(--colorize-magenta);
  stroke-width: 2;
}

.colorize-net__fusion circle {
  fill: var(--colorize-magenta);
}

.colorize-net__fusion path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ── Video ───────────────────────────────────────────────── */
/* A looping clip with a round play/pause button in its corner, as on Apple's pages.
   acadia.js shows the button and removes the browser's controls. */

.video {
  position: relative;
  overflow: hidden;
}

.video__media {
  display: block;
  width: 100%;
  height: auto;
  background: #000000;
}

.video__toggle {
  position: absolute;
  right: clamp(10px, 2%, 20px);
  bottom: clamp(10px, 2%, 20px);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(66, 66, 69, 0.72);
  color: #ffffff;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.video__toggle:hover {
  background: rgba(86, 86, 89, 0.82);
}

.video__icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.video__toggle[aria-pressed="true"] .video__icon--play,
.video__toggle:not([aria-pressed="true"]) .video__icon--pause {
  display: none;
}


/* ── Acadia ──────────────────────────────────────────────── */
/* Acadia's colour is the blue the app marks detected objects with. */

.acadia {
  --acadia-blue: #0a84ff;
}

/* Grows from a little smaller as the page starts to scroll, or as it arrives
   (acadia.js sets --grow from 0 to 1). */
[data-grow] {
  --grow: 1;
  transform: scale(calc(0.9 + var(--grow) * 0.1));
  transform-origin: 50% 0;
}

/* Hero: copy over the recording, both on black like the app. */
.acadia-hero {
  padding-bottom: clamp(48px, 7vw, 80px);
  overflow: hidden;
}

.acadia-hero__copy {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.acadia-hero__headline {
  font-size: var(--type-hero-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.acadia-hero__subline {
  max-width: 30em;
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.acadia-hero__stage {
  max-width: 1196px;
  margin: clamp(40px, 6vw, 72px) auto 0;
  padding-inline: 22px;
}

/* The statement follows the hero on the same black. */
.acadia-statement {
  padding-top: clamp(24px, 4vw, 48px);
}

/* A feature: copy, then its video. The road test's runs wider than the copy. */
.acadia-feature {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
}

.acadia-feature--wide {
  max-width: 1240px;
}

.acadia-feature--wide .acadia-feature__copy {
  width: 100%;
  max-width: calc(var(--content-width) - 44px);
  margin-inline: auto;
}

.acadia-feature__copy {
  display: grid;
  gap: 12px;
}

.acadia-feature__eyebrow {
  color: var(--color-muted);
  font-size: 1.0625rem;
  font-weight: 600;
}

.acadia-feature__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.acadia-feature__text {
  max-width: 34em;
  margin-top: 8px;
  font-size: var(--type-subline-size);
  line-height: 1.3;
  text-wrap: pretty;
}

.acadia-media {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.acadia-media__video {
  border-radius: 22px;
}

.acadia-media__caption {
  max-width: 40em;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.acadia-feature .acadia-media__caption {
  text-align: center;
  margin-inline: auto;
}

/* Workflow: the steps beside the prototype. */
.acadia-workflow {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
  gap: clamp(32px, 5vw, 64px);
}

.acadia-steps {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acadia-steps__item {
  display: grid;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--color-line);
}

.acadia-steps__title {
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.acadia-steps__text {
  color: var(--color-muted);
}

/* Pipeline: stages side by side, joined by lines that stretch to their height. The
   stages with three nodes centre them at a sixth, a half and five sixths of their
   height, where the lines end. acadia.js hides it until it scrolls into view, then
   the stages appear one after another (--stage). */
.acadia-pipeline {
  display: grid;
  grid-template-columns: auto minmax(32px, 1fr) auto minmax(32px, 1fr) auto minmax(32px, 1fr) auto;
  align-items: stretch;
  margin-top: clamp(40px, 6vw, 64px);
}

.acadia-pipeline__stage {
  display: grid;
  align-content: center;
  justify-items: center;
  transition: opacity 0.6s ease calc(var(--stage) * 0.18s), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--stage) * 0.18s);
}

.acadia-pipeline__stage--many {
  grid-template-rows: repeat(3, minmax(0, 1fr));
  align-content: stretch;
  align-items: center;
  gap: 14px;
}

.acadia-pipeline__stage--many .acadia-pipeline__node {
  width: 100%;
}

.acadia-pipeline__node {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-background);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.acadia-pipeline__node--decision {
  border-color: var(--acadia-blue);
  background: var(--acadia-blue);
  color: #ffffff;
}

.acadia-pipeline__node--output {
  border-color: transparent;
  background: transparent;
  color: var(--acadia-blue);
}

.acadia-pipeline__links {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.acadia-pipeline__links path {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s ease calc(var(--stage) * 0.18s);
}

.acadia-pipeline--hidden .acadia-pipeline__stage {
  opacity: 0;
  transform: translateY(16px);
}

.acadia-pipeline--hidden .acadia-pipeline__links path {
  stroke-dashoffset: 1;
}

/* On narrow screens, top to bottom: the stages with three nodes in a row, a short
   line between the stages instead of the drawn ones. */
@media (max-width: 734px) {
  .acadia-pipeline {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .acadia-pipeline__links {
    display: none;
  }

  .acadia-pipeline__stage + .acadia-pipeline__links + .acadia-pipeline__stage::before {
    content: "";
    display: block;
    grid-column: 1 / -1;
    justify-self: center;
    width: 1.5px;
    height: 28px;
    margin-bottom: 10px;
    background: var(--color-muted);
  }

  .acadia-pipeline__stage--many {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 10px 8px;
    width: 100%;
  }

  .acadia-pipeline__node {
    padding: 12px 10px;
    font-size: 0.8125rem;
    white-space: normal;
    text-wrap: balance;
  }

  .acadia-pipeline__stage--many .acadia-pipeline__node {
    display: grid;
    place-items: center;
    height: 100%;
  }
}

/* Models: pinned while they show one after another, as the network on the Colorize
   page. The chapters share one grid cell, and so do the drawings, so either is as
   tall as the tallest of them. acadia.js fades each model's text and drawing in and
   out together, and lets the color flow through the drawing while it shows. */
.acadia-models {
  position: relative;
}

.acadia-models--animated {
  height: 360svh;
}

.acadia-models__frame {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(28px, 6vh, 64px);
  min-height: calc(100svh - var(--nav-offset));
  padding-block: clamp(28px, 5vh, 56px);
  overflow: hidden;
}

.acadia-models--animated .acadia-models__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
}

.acadia-models__copy {
  display: grid;
  gap: 40px;
  max-width: 40em;
  padding-inline: 22px;
  text-align: center;
}

/* Each chapter fades on a layer of its own, so Safari leaves nothing of it behind. */
.acadia-models--animated .acadia-chapter {
  grid-area: 1 / 1;
  opacity: 0;
  will-change: opacity, transform;
}

.acadia-chapter__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.acadia-chapter__text {
  max-width: 30em;
  margin: 14px auto 0;
  font-size: var(--type-subline-size);
  line-height: 1.25;
  text-wrap: balance;
}

/* Never narrower than its labels can be read at. On narrow screens it runs past the
   edge, and acadia.js pans it along with the color. */
.acadia-models__viewport {
  width: 100%;
  max-width: var(--content-width);
  padding-inline: 22px;
  overflow: hidden;
}

.acadia-models:not(.acadia-models--animated) .acadia-models__viewport {
  overflow-x: auto;
}

.acadia-models__drawings {
  --pan: 0px;
  display: grid;
  gap: 48px;
  width: min(100%, 860px, calc((100svh - var(--nav-offset) - 320px) * 760 / 300));
  min-width: 620px;
  margin-inline: auto;
  transform: translateX(calc(-1 * var(--pan)));
}

.acadia-models--animated .acadia-models__drawing {
  grid-area: 1 / 1;
  opacity: 0;
}

.acadia-models__drawing .develop__original--desaturated {
  filter: grayscale(1) opacity(0.5);
}

.acadia-models__drawing .develop__edge {
  background: var(--color-muted);
  box-shadow: none;
}

.acadia-net {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-text);
}

.acadia-net__line {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acadia-net__line--dashed {
  stroke-dasharray: 1 6;
}

.acadia-net__head {
  fill: var(--color-muted);
}

.acadia-net__label {
  fill: var(--color-text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.acadia-net__detail {
  fill: var(--color-muted);
  font-size: 14px;
}

.acadia-net__blocks {
  fill: var(--acadia-blue);
}

.acadia-net__blocks--light {
  fill-opacity: 0.5;
}

.acadia-net__blocks--outline {
  fill-opacity: 0.12;
  stroke: var(--acadia-blue);
  stroke-width: 2;
}

.acadia-net__gauge {
  fill: none;
  stroke: var(--color-line);
  stroke-width: 8;
  stroke-linecap: round;
}

.acadia-net__needle {
  stroke: var(--acadia-blue);
  stroke-width: 4;
  stroke-linecap: round;
}

.acadia-net__map {
  fill: #000000;
}

.acadia-net__lane {
  fill: var(--acadia-blue);
  fill-opacity: 0.85;
}

@media (max-width: 734px) {
  .acadia-workflow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .acadia-hero__stage,
  .acadia-models__copy,
  .acadia-models__viewport {
    padding-inline: 16px;
  }

  .acadia-media__video {
    border-radius: 16px;
  }
}


/* ── Golf Credential ─────────────────────────────────────── */
/* The page's colour is the green of the credential in the wallet; its diagrams use
   a lighter one that reads on both appearances. */

.golf {
  --golf-green: #264a2c;
  --golf-accent: #2b8a43;
  --golf-surface: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .golf {
    --golf-accent: #4cc266;
    --golf-surface: #1c1c1e;
  }
}

/* The credential as a card in the wallet: ID-1 proportions, type sized by its width. */
.golf-card {
  container-type: inline-size;
  width: 100%;
}

.golf-card__face {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 85.6 / 54;
  padding: 6cqw;
  border-radius: 4.6cqw;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(150deg, #2f5b37, #264a2c 45%, #1b3620);
  color: #ffffff;
  text-align: left;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.golf-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4cqw;
}

.golf-card__name {
  font-size: max(15px, 5.8cqw);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.golf-card__issuer {
  margin-top: 1cqw;
  color: rgba(255, 255, 255, 0.72);
  font-size: max(11px, 3.2cqw);
}

.golf-card__seal {
  flex: none;
  width: 17cqw;
  height: auto;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 0.6cqw #ffffff;
}

.golf-card__holder {
  font-size: max(13px, 4.4cqw);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.golf-card__details {
  display: flex;
  gap: 4.4cqw;
  margin-top: 2.4cqw;
}

.golf-card__details dt {
  color: rgba(255, 255, 255, 0.66);
  white-space: nowrap;
  font-size: max(9px, 2.6cqw);
  font-weight: 600;
}

.golf-card__details dd {
  font-size: max(11px, 3.3cqw);
  font-weight: 500;
  white-space: nowrap;
}

/* Hero: the card above the copy, rising into place as the page loads. */
.golf-hero {
  overflow: hidden;
}

.golf-hero__stage {
  width: min(100% - 44px, 340px);
  margin: 0 auto clamp(36px, 5vw, 56px);
  animation: golf-card-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes golf-card-rise {
  from {
    opacity: 0;
    transform: translateY(32px) rotateX(18deg) scale(0.94);
  }
}

.golf-hero__copy {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.golf-hero__headline {
  font-size: var(--type-hero-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.golf-hero__subline {
  max-width: 30em;
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

/* The statement follows the hero on the same tone. */
.golf-statement {
  padding-top: 0;
}

/* Demo: pinned while scrolling plays the recordings (golf-credential.js). The
   captions share one grid cell and cross-fade; so do the recordings, as tall as the
   screen allows. Without the script, both recordings show side by side. */
.golf-demo {
  position: relative;
}

.golf-demo__frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 7vw, 96px);
  max-width: var(--content-width);
  margin-inline: auto;
  padding: clamp(72px, 10vw, 120px) 22px;
}

.golf-demo__tracks {
  display: none;
}

.golf-demo__captions {
  display: grid;
  gap: 40px;
}

.golf-demo__eyebrow {
  color: var(--color-muted);
  font-size: 1.0625rem;
  font-weight: 600;
}

.golf-demo__title {
  margin-top: 6px;
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.golf-demo__text {
  max-width: 24em;
  margin-top: 14px;
  font-size: var(--type-subline-size);
  line-height: 1.3;
  text-wrap: pretty;
}

.golf-demo__screens {
  display: flex;
  gap: 24px;
}

.golf-demo__video {
  display: block;
  width: min(260px, 36vw);
  height: auto;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--color-line), 0 30px 60px -36px rgba(0, 0, 0, 0.45);
}

.golf-demo--animated {
  height: 820svh;
}

.golf-demo--animated .golf-demo__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
  padding-block: clamp(24px, 4vh, 48px);
}

.golf-demo--animated .golf-demo__copy {
  display: grid;
  align-content: center;
  gap: clamp(32px, 6vh, 56px);
}

/* Two tracks, one per recording, filling while it plays (--fill). */
.golf-demo--animated .golf-demo__tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 360px;
}

.golf-demo__track {
  --fill: 0;
  display: grid;
  gap: 8px;
}

.golf-demo__track-name {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.golf-demo__bar {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--color-line);
}

.golf-demo__fill {
  display: block;
  height: 100%;
  background: var(--golf-accent);
  transform: scaleX(var(--fill));
  transform-origin: 0 50%;
}

.golf-demo--animated .golf-demo__eyebrow {
  display: none;
}

/* Hidden captions stay in the cell but out of the way, so the shown one can be
   selected; they hide once they have faded out. */
.golf-demo--animated .golf-demo__caption {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.45s;
}

.golf-demo--animated .golf-demo__caption--shown {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}

.golf-demo--animated .golf-demo__screens {
  display: grid;
}

.golf-demo--animated .golf-demo__video {
  grid-area: 1 / 1;
  width: auto;
  height: calc(100svh - var(--nav-offset) - clamp(48px, 8vh, 96px));
  max-height: 760px;
  aspect-ratio: 540 / 1102;
}

.golf-demo--animated .golf-demo__video + .golf-demo__video {
  opacity: 0;
}

/* On narrow screens, the recording above the caption. */
@media (max-width: 734px) {
  .golf-demo__frame {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .golf-demo__copy {
    order: 1;
  }

  .golf-demo--animated .golf-demo__frame {
    align-content: center;
    gap: 20px;
    padding-block: 16px 20px;
  }

  /* As tall as leaves room for the tracks and the longest caption below. */
  .golf-demo--animated .golf-demo__video {
    height: calc(100svh - var(--nav-offset) - 270px);
    max-height: none;
    border-radius: 22px;
  }

  .golf-demo--animated .golf-demo__copy {
    gap: 16px;
    width: 100%;
    text-align: center;
  }

  .golf-demo--animated .golf-demo__tracks {
    width: 100%;
    margin-inline: auto;
  }

  .golf-demo__title {
    font-size: 1.75rem;
  }

  .golf-demo__text {
    margin: 8px auto 0;
    font-size: 1.0625rem;
  }
}

/* Disclosure: pinned while the chapters show one after another, as the models on
   the Acadia page. The chapters share one grid cell, and so do the drawings. */
.golf-disclosure {
  position: relative;
}

.golf-disclosure--animated {
  height: 360svh;
}

.golf-disclosure__frame {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(28px, 6vh, 64px);
  min-height: calc(100svh - var(--nav-offset));
  padding-block: clamp(28px, 5vh, 56px);
  overflow: hidden;
}

.golf-disclosure--animated .golf-disclosure__frame {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
}

.golf-disclosure__copy {
  display: grid;
  gap: 40px;
  max-width: 40em;
  padding-inline: 22px;
  text-align: center;
}

/* Each chapter fades on a layer of its own, so Safari leaves nothing of it behind. */
.golf-disclosure--animated .golf-chapter {
  grid-area: 1 / 1;
  opacity: 0;
  will-change: opacity, transform;
}

.golf-chapter__title {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.golf-chapter__text {
  max-width: 30em;
  margin: 14px auto 0;
  font-size: var(--type-subline-size);
  line-height: 1.25;
  text-wrap: balance;
}

/* Never narrower than its labels can be read at. On narrow screens it runs past the
   edge, and golf-credential.js pans it along with the color. */
.golf-disclosure__viewport {
  width: 100%;
  max-width: var(--content-width);
  padding-inline: 22px;
  overflow: hidden;
}

.golf-disclosure:not(.golf-disclosure--animated) .golf-disclosure__viewport {
  overflow-x: auto;
}

.golf-disclosure__drawings {
  --pan: 0px;
  display: grid;
  gap: 48px;
  width: min(100%, 860px, calc((100svh - var(--nav-offset) - 330px) * 760 / 340));
  min-width: 620px;
  margin-inline: auto;
  transform: translateX(calc(-1 * var(--pan)));
}

.golf-disclosure--animated .golf-disclosure__drawing {
  grid-area: 1 / 1;
  opacity: 0;
}

.golf-disclosure__drawing .develop__original--desaturated {
  filter: grayscale(1) opacity(0.5);
}

.golf-disclosure__drawing .develop__edge {
  background: var(--color-muted);
  box-shadow: none;
}

.golf-net {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-text);
}

.golf-net__heading {
  fill: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
}

.golf-net__arrow-label {
  fill: var(--golf-accent);
  font-size: 14px;
  font-weight: 600;
}

.golf-net__card {
  fill: var(--golf-surface);
  stroke: var(--color-line);
}

.golf-net__card--shared {
  stroke: var(--golf-accent);
  stroke-width: 2;
}

.golf-net__highlight {
  fill: var(--golf-accent);
  fill-opacity: 0.14;
}

.golf-net__divider {
  stroke: var(--color-line);
}

.golf-net__name {
  fill: var(--color-muted);
  font-size: 13px;
}

.golf-net__value {
  fill: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}

.golf-net__value--shared {
  fill: var(--golf-accent);
}

.golf-net__digest {
  fill: var(--color-text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.golf-net__line {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 1.5;
}

.golf-net__line--shared {
  stroke: var(--golf-accent);
  stroke-width: 2;
}

.golf-net__head {
  fill: var(--color-muted);
}

.golf-net__head--shared {
  fill: var(--golf-accent);
}

/* Overview: the trust infrastructure above three nodes joined by the protocols. The lines from
   the root end above the centres of the outer nodes, at 0.5 and 4.1 of the 4.6
   fractions of the row (10.87% and 89.13%). golf-credential.js hides it until it scrolls into view, then
   the parts appear one after another (--stage). */
.golf-parties {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  margin-top: clamp(40px, 6vw, 64px);
}

.golf-parties > * {
  transition: opacity 0.45s ease calc(var(--stage) * 0.07s), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--stage) * 0.07s);
}

.golf-parties__node {
  display: grid;
  gap: 4px;
  padding: 18px 14px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-background);
  text-align: center;
}

.golf-parties__node--root {
  grid-column: 2 / 5;
  justify-self: center;
  padding-inline: 28px;
}

.golf-parties__node--wallet {
  border-color: var(--golf-green);
  background: var(--golf-green);
  color: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.74);
}

.golf-parties__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
}

.golf-parties__detail {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.golf-parties__trust {
  grid-column: 1 / -1;
  width: 100%;
  height: 56px;
  overflow: visible;
}

.golf-parties__trust path {
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.golf-parties__link {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-inline: 10px;
  text-align: center;
}

.golf-parties__protocol {
  color: var(--golf-accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.golf-parties__arrow {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--golf-accent);
}

.golf-parties__arrow::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -1px;
  border-block: 6px solid transparent;
  border-left: 10px solid var(--golf-accent);
}

.golf-parties--hidden > * {
  opacity: 0;
  transform: translateY(16px);
}

/* On narrow screens, top to bottom: the root's own text says what it signs. */
@media (max-width: 734px) {
  .golf-parties {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
  }

  .golf-parties__node {
    width: min(100%, 300px);
  }

  .golf-parties__node--root {
    grid-column: auto;
    margin-bottom: 18px;
  }

  .golf-parties__trust {
    display: none;
  }

  .golf-parties__link {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: min(100%, 300px);
    gap: 14px;
  }

  .golf-parties__protocol {
    justify-self: end;
  }

  .golf-parties__detail {
    justify-self: start;
  }

  .golf-parties__node .golf-parties__detail {
    justify-self: center;
  }

  .golf-parties__arrow {
    width: 2px;
    height: 40px;
  }

  .golf-parties__arrow::after {
    top: auto;
    right: -5px;
    bottom: -1px;
    border-block: 0;
    border-inline: 6px solid transparent;
    border-top: 10px solid var(--golf-accent);
  }
}

/* Tests: each test credential as a small card above its result. */
.golf-tests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 40vw), 1fr));
  gap: 32px clamp(14px, 3vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.golf-test {
  display: grid;
  align-content: start;
  gap: 18px;
}

.golf-test__card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  aspect-ratio: 85.6 / 54;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(150deg, #2f5b37, #264a2c 45%, #1b3620);
  color: #ffffff;
  box-shadow: 0 18px 36px -24px rgba(0, 0, 0, 0.5);
}

.golf-test__name {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.golf-test__detail {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
}

.golf-test__result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.golf-test__symbol {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.golf-test__symbol circle {
  fill: var(--color-error);
}

.golf-test__symbol--accepted circle {
  fill: var(--color-success);
}

.golf-test__symbol path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 480px) {
  .golf-test__card {
    padding: 12px 14px;
  }

  .golf-test__name {
    font-size: 1.0625rem;
  }

  .golf-test__detail {
    font-size: 0.8125rem;
  }

  .golf-disclosure__copy,
  .golf-disclosure__viewport {
    padding-inline: 16px;
  }

}


/* ── Code Window ─────────────────────────────────────────── */
/* Swift code in a window, in Xcode's dark colours. */

.code-window {
  overflow: hidden;
  border-radius: var(--radius);
  background: #1d1d1f;
  color: #f5f5f7;
  text-align: left;
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.5);
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid #333336;
}

.code-window__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #48484a;
}

.code-window__name {
  margin-left: 10px;
  color: #a1a1a6;
  font: 12px var(--font-mono);
}

.code-window__code {
  margin: 0;
  padding: 22px 24px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0;
  line-height: 1.65;
}

.code-window__line {
  display: inline-block;
  min-width: 100%;
  transition: opacity 0.4s ease, background 0.4s ease;
}

.code-window__code--focused .code-window__line:not(.code-window__line--active) {
  opacity: 0.35;
}

.code-window__line--active {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.syntax-keyword   { color: #fc5fa3; font-weight: 600; }
.syntax-type      { color: #5dd8ff; }
.syntax-string    { color: #fc6a5d; }
.syntax-number    { color: #d0bf69; }
.syntax-attribute { color: #fd8f3f; }
.syntax-property  { color: #67b7a4; }


/* ── Swift WebServices ───────────────────────────────────── */

.swift {
  --swift-brand-1: #ea623e;
  --swift-brand-2: #ef9c50;
  --swift-brand: linear-gradient(90deg, var(--swift-brand-1), var(--swift-brand-2));
  --swift-brand-ink: #c4461f;
  --swift-card: #ffffff;
  --swift-track: #e8e8ed;
  --swift-other: #a1a1a6;
}

@media (prefers-color-scheme: dark) {
  .swift {
    --swift-brand-ink: #ff8a5c;
    --swift-card: #1d1d1f;
    --swift-track: #333336;
    --swift-other: #6e6e73;
  }
}

.swift .text-link {
  color: var(--swift-brand-ink);
}

.swift-heading {
  justify-items: center;
  text-align: center;
}

/* Journey: the hero and the layers are one pinned scroll composition
   (swift-webservices.js). Only the code window moves between them. */
.swift-journey {
  position: relative;
  overflow: clip;
  text-align: center;
}

.swift-journey__track {
  height: 470svh;
}

.swift-journey__pin {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
  overflow: clip;
  perspective: 1600px;
}

.swift-journey__hero {
  position: absolute;
  top: 26%;
  left: 22px;
  right: 22px;
  z-index: 4;
  transform: translateY(-50%);
  will-change: transform;
}

.swift-journey__headline {
  font-size: var(--type-hero-size);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.swift-journey__highlight {
  background: var(--swift-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.swift-journey__hero .actions {
  gap: 12px 36px;
  margin-top: 24px;
}

.swift-journey__hero .text-link {
  font-size: 1.3125rem;
}

.swift-journey__heading {
  position: absolute;
  top: clamp(22px, 4svh, 48px);
  left: 22px;
  right: 22px;
  z-index: 2;
  visibility: hidden;
  will-change: opacity;
}

.swift-journey__stage {
  position: absolute;
  inset: clamp(110px, 14svh, 150px) 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  pointer-events: none;
}

.swift-journey__anchor {
  align-self: stretch;
  min-width: 0;
}

/* Placed and sized by the script, starting below the hero. */
.swift-journey__window {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 0;
  height: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}

.swift-journey__window .code-window__bar {
  position: relative;
  z-index: 2;
  height: 38px;
  background: #1d1d1f;
}

.swift-journey__names {
  position: relative;
  display: block;
  flex: 1;
  height: 1em;
}

.swift-journey__name {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
}

.swift-journey__name--active {
  opacity: 1;
}

.swift-journey__code {
  position: relative;
  height: calc(100% - 38px);
  overflow: hidden;
}

.swift-journey__panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  opacity: 0;
  font-size: clamp(10.5px, 1.05vw, 13px);
  line-height: 1.55;
  will-change: opacity;
}

.swift-journey__panel--active {
  opacity: 1;
}

/* In light mode, the journey's window uses Xcode's light colours. */
@media (prefers-color-scheme: light) {
  .swift-journey__window {
    background: #f5f5f7;
    color: #1d1d1f;
    box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.3), 0 0 0 1px #e5e5ea;
  }

  .swift-journey__window .code-window__bar {
    border-bottom-color: #e5e5ea;
    background: #f5f5f7;
  }

  .swift-journey__window .code-window__dot  { background: #d2d2d7; }
  .swift-journey__window .code-window__name { color: #86868b; }
  .swift-journey__window .syntax-keyword    { color: #9b2393; }
  .swift-journey__window .syntax-type       { color: #0b4f79; }
  .swift-journey__window .syntax-string     { color: #c41a16; }
  .swift-journey__window .syntax-number     { color: #1c00cf; }
  .swift-journey__window .syntax-attribute  { color: #815f03; }
  .swift-journey__window .syntax-property   { color: #326d74; }
}

.swift-layers {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  visibility: hidden;
  will-change: opacity;
}

.swift-layers__item {
  padding: 18px 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--swift-card) 58%, transparent);
  opacity: 0.4;
  transform: scale(0.985);
  transition: opacity 0.3s, transform 0.35s, background 0.3s, border-color 0.3s;
}

.swift-layers__item--active {
  border-color: color-mix(in srgb, var(--color-text) 22%, transparent);
  background: var(--swift-card);
  opacity: 1;
  transform: none;
}

.swift-layers__title {
  margin-bottom: 5px;
  font-size: 1.125rem;
}

.swift-layers__text {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* Web apps: code beside three facts, pinned while each fact in turn lights up
   the lines it describes and the window zooms to them (swift-webservices.js). */
.swift-web {
  overflow-x: clip;
  background: linear-gradient(120deg, #c4461f, #dc6a32);
  color: #ffffff;
}

.swift-web__track {
  height: 420vh;
}

.swift-web__pin {
  position: sticky;
  top: var(--nav-offset);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--nav-offset));
}

.swift-web__heading {
  margin: 0 0 40px;
}

@media (prefers-reduced-motion: no-preference) {
  .swift-web__window {
    position: relative;
    z-index: 1;
    transform-origin: 50% 50%;
    will-change: transform;
  }

  .swift-web__facts {
    position: relative;
    z-index: 2;
    will-change: transform;
  }

  .swift-web__heading {
    will-change: transform, opacity;
  }
}

.swift-web__layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 32px;
}

.swift-web__facts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swift-web__fact {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0);
  outline: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.swift-web__fact--active {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.swift-web__fact-title {
  font-size: 1.1875rem;
}

.swift-web__fact-text {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
}

@media (max-width: 900px) {
  .swift-journey__stage {
    inset: 104px 0 16px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .swift-journey__panel {
    padding: 16px 18px 20px;
    font-size: 10px;
    line-height: 1.45;
  }

  /* One layer and one fact at a time, below the code. */
  .swift-layers__item,
  .swift-web__fact {
    display: none;
  }

  .swift-layers__item--active,
  .swift-web__fact--active {
    display: block;
    animation: swift-fact-in 0.35s ease;
  }

  .swift-web__pin {
    justify-content: flex-start;
    min-height: calc(100svh - var(--nav-offset));
    padding-top: 20px;
  }

  .swift-web__heading {
    margin-bottom: 20px;
  }

  .swift-web__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .swift-web__window .code-window__code {
    padding: 14px 16px;
    font-size: 11px;
    line-height: 1.5;
  }
}

@media (max-width: 600px) {
  .swift-journey__track {
    height: 440svh;
  }

  .swift-journey__hero {
    top: 27%;
  }

  .swift-journey__heading {
    top: 22px;
  }

  .swift-journey__stage {
    top: 92px;
  }
}

@keyframes swift-fact-in {
  from { opacity: 0; transform: translateY(8px); }
}


/* ── Benchmarks ──────────────────────────────────────────── */

.benchmarks {
  display: grid;
  gap: 16px;
}

.benchmark {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: center;
  gap: 40px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--color-tint);
}

.benchmark__title {
  font-size: 1.5rem;
  line-height: 1.17;
}

.benchmark__text {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.benchmark__bars {
  display: grid;
  gap: 12px;
}

.benchmark-bar {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 14px;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.benchmark-bar__track {
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--swift-track);
}

.benchmark-bar__fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--swift-other);
}

.benchmark-bar__value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.benchmark-bar__unit {
  font-size: 0.75rem;
}

.benchmark-bar--highlighted {
  color: var(--color-text);
  font-weight: 600;
}

.benchmark-bar--highlighted .benchmark-bar__fill {
  background: var(--swift-brand);
}

.footnote-ref {
  margin-left: 2px;
  font-size: 0.55em;
  line-height: 0;
}

.footnote-ref a {
  color: var(--color-muted);
  text-decoration: none;
}

@media (max-width: 900px) {
  .benchmark {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .benchmark {
    padding: 24px 20px;
  }

  .benchmark-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .benchmark-bar__track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}


/* ── Library List ────────────────────────────────────────── */

.library-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.library-list__item {
  display: grid;
  gap: 4px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--color-background);
}

.library-list__name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

.library-list__text {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

@media (max-width: 900px) {
  .library-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .library-list {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ── Package Install ─────────────────────────────────────── */

.package-install {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 880px;
  margin-inline: auto;
  padding: 8px 8px 8px 20px;
  border-radius: 14px;
  background: var(--color-tint);
}

.package-install__code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  font: 13px var(--font-mono);
  letter-spacing: 0;
  white-space: nowrap;
  scrollbar-width: none;
}

.package-install__copy {
  flex: none;
}


/* ── Footnotes ───────────────────────────────────────────── */

.footnotes {
  margin: 0;
  padding-left: 16px;
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.footnotes li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.footnotes .text-link {
  color: var(--color-text);
}


/* ── Contact ─────────────────────────────────────────────── */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(32px, 6vw, 72px);
}

.contact__intro {
  display: grid;
  gap: 14px;
}

.contact__headline {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.contact__text {
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
}

.contact__direct {
  display: grid;
  margin-top: 10px;
  color: var(--color-muted);
}

.contact__email {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form__field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contact-form__label {
  font-size: 0.875rem;
  font-weight: 500;
}

.contact-form__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--color-text);
}

.contact-form__input--multiline {
  min-height: 160px;
  resize: vertical;
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.contact-form__consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-text);
}

.contact-form__submit {
  justify-self: start;
}

.contact-form__status {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--color-tint);
  font-size: 0.9375rem;
}

.section--tinted .contact-form__status {
  background: var(--color-background);
}

.contact-form__status--error {
  border-left: 3px solid var(--color-error);
}

@media (max-width: 760px) {
  .contact {
    grid-template-columns: 1fr;
  }
}


/* ── Legal ───────────────────────────────────────────────── */

.legal {
  max-width: 720px;
}

.legal__headline {
  margin-bottom: 40px;
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.legal__section {
  display: grid;
  gap: 10px;
  padding-block: 28px;
  border-top: 1px solid var(--color-line);
}

.legal__title {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.legal__text,
.legal__address {
  color: var(--color-muted);
}

.legal__address {
  display: grid;
  font-style: normal;
}


/* ── Contact sent ────────────────────────────────────────── */

.contact-sent-page {
  display: grid;
  align-content: center;
}

.contact-sent {
  display: grid;
  justify-items: center;
  gap: 20px;
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}

.contact-sent__mark {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.contact-sent__stroke {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: contact-sent-draw 0.6s ease-out forwards;
}

.contact-sent__stroke--check {
  animation-delay: 0.45s;
  animation-duration: 0.35s;
}

.contact-sent__headline {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.contact-sent__text {
  color: var(--color-text);
  font-size: var(--type-subline-size);
  font-weight: 400;
  line-height: 1.25;
}

@keyframes contact-sent-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-sent__stroke {
    animation: none;
    stroke-dashoffset: 0;
  }
}


/* ── Not found ───────────────────────────────────────────── */

.not-found-page {
  display: grid;
  align-content: center;
}

.not-found {
  display: grid;
  justify-items: center;
  gap: 20px;
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}

.not-found__headline {
  font-size: var(--type-headline-size);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.not-found .actions {
  margin-top: 12px;
}


/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  padding-block: 44px 28px;
  border-top: 1px solid var(--color-line);
  background: var(--color-tint);
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-line);
}

.site-footer__heading {
  margin-bottom: 10px;
  color: var(--color-text);
  font-size: 0.8125rem;
}

.site-footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__link {
  color: var(--color-muted);
  text-decoration: none;
}

.site-footer__link:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__copyright {
  padding-top: 18px;
}

@media (max-width: 520px) {
  .site-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
