/*
  Brand fonts, in src/assets/fonts/:
  - Against by 177Studio (serif)
  - Codec Pro by Zetafonts (main text) - CC BY-NC, credited in the footer.
    Only the Regular weight is included, so bold text is drawn from it.
  If a file is missing, the look-alikes after them in the font lists are used.
*/

@font-face {
  font-family: "Against";
  src: url("../fonts/against-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Codec Pro";
  src: url("../fonts/codec-pro-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

/*
  DES27 redesign - shared theme.
  Pages opt in with `theme: des27` in their front matter.
*/

.theme-des27 {
  /* Brand blue for lines, text, borders and buttons. A touch calmer than the
     original #2a44f0, which buzzed against the cream and lime. */
  --des-blue: #2b4bc4;
  --des-blue-deep: #1c38a2;
  --des-blue-soft: #7a92d8;
  /* Big blue areas (featured bands, merch hero) use a deeper, gently graded
     blue with fine grain instead of flat bright blue, so they don't glare. */
  --des-blue-field: linear-gradient(112deg, #1b358c 0%, #2240ab 34%, #2b4bbc 64%, #5d79cc 100%);
  --des-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --des-blue-surface: var(--des-grain) 0 0 / 220px, var(--des-blue-field);
  /* soft white for text on blue - pure white on saturated blue is harsh */
  --des-on-blue: #f3f2fa;
  --des-lime: #d8f26d;
  --des-cream: #f7f5f1;
  --des-ink: #0d0d0d;
  --des-grey: #d9d9d9;
  --des-white: #ffffff;

  --font-display: "Big Shoulders Display", "Impact", "Arial Narrow", sans-serif;
  --display-weight: 800;
  --font-script: "Against", "Prata", "Didot", Georgia, serif;
  --font-body: "Codec Pro", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--font-display);

  --des-max: 78rem;
  --des-gutter: clamp(1rem, 6.9vw, 6.25rem);
  /* distance from the container edge to the edge of the screen */
  --des-bleed: max(var(--des-gutter), (100vw - var(--des-max)) / 2);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --color-focus: var(--des-blue);
  --color-text: var(--des-ink);
  --color-accent: var(--des-blue);

  background: var(--des-cream);
  color: var(--des-ink);
}

.theme-des27 main {
  overflow-x: clip;
}

.des-container {
  width: 100%;
  max-width: calc(var(--des-max) + 2 * var(--des-gutter));
  margin-inline: auto;
  padding-inline: var(--des-gutter);
}

.theme-des27 .script {
  font-family: var(--font-script);
  font-weight: 400;
  font-optical-sizing: auto;
  text-transform: none;
  letter-spacing: 0.01em;
}


/* Header */

/* Sticky: always visible, frosted once the page scrolls */
.des-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--des-cream);
  transition: background-color 0.4s, box-shadow 0.4s;
}

.des-header.is-scrolled {
  background: color-mix(in srgb, var(--des-cream) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(43, 75, 196, 0.14), 0 14px 30px -24px rgba(13, 13, 40, 0.45);
}

.des-header__inner {
  transition: min-height 0.4s var(--ease-out);
}

.des-header.is-scrolled .des-header__inner {
  min-height: clamp(3.25rem, 4.6vw, 4.25rem);
}

.des-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: clamp(3.75rem, 5.8vw, 5.25rem);
}

/* DES logo (images/des-logo.png). It's drawn as a mask, so it takes the
   text colour and can be recoloured, e.g. on blue backgrounds. */
.des-logo {
  display: inline-flex;
  align-items: center;
  color: var(--des-ink);
  text-decoration: none;
  transition: color 0.35s, scale 0.35s var(--ease-out);
}

.des-logo:hover {
  color: var(--des-blue);
}

.des-logo:active {
  scale: 0.95;
}

.des-logo__mark {
  display: block;
  height: clamp(1.05rem, 1.55vw, 1.4rem);
  aspect-ratio: 600 / 239;
  background: currentColor;
  -webkit-mask: url("../images/des-logo.png") center / contain no-repeat;
  mask: url("../images/des-logo.png") center / contain no-repeat;
}

.des-nav a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
}

.des-nav a:hover,
.des-nav a[aria-current="page"] {
  text-decoration: none;
}

.des-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.3rem;
  height: 2px;
  background: var(--des-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.des-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.des-nav a[aria-current="page"]::after {
  display: none;
}

.des-nav__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.3rem;
  height: 2px;
  background: var(--des-blue);
  view-transition-name: nav-bar;
}

@media (max-width: 59.99em) {
  .des-nav ul {
    padding-bottom: var(--space-sm);
  }
}

@media (min-width: 60em) {
  .des-nav {
    flex: 1;
  }

  .des-nav ul {
    justify-content: center;
    gap: clamp(1.5rem, 5vw, 4.5rem);
    /* keep links centred on the page, not between logo and edge */
    padding-right: clamp(3rem, 6vw, 6rem);
  }
}


/* ---------- Phones and small tablets ----------
   Navigation moves to a tab bar at the bottom of the screen
   (partials/dock-des27.njk), where thumbs can reach it. It holds every page,
   so there's no separate menu. */

.des-dock {
  display: none;
}

@media (max-width: 59.99em) {
  .theme-des27 {
    --dock-h: 4rem;
    --dock-gap: max(0.75rem, env(safe-area-inset-bottom));
  }

  /* leave room under the footer for the tab bar */
  .theme-des27 .des-footer {
    padding-bottom: calc(var(--dock-h) + var(--dock-gap) + 1.75rem);
  }

  /* Header: just the logo, and it tucks away while scrolling down (nav.js).
     The page links are all in the tab bar. */
  .des-nav {
    display: none;
  }

  .des-header {
    transition: background-color 0.4s, box-shadow 0.4s, translate 0.45s var(--ease-out);
  }

  .des-header.is-tucked {
    translate: 0 -100%;
  }

  .des-header__inner,
  .des-header.is-scrolled .des-header__inner {
    min-height: 3.5rem;
  }

  /* Tab bar */
  .des-dock {
    position: fixed;
    z-index: 110;
    left: 50%;
    bottom: var(--dock-gap);
    display: block;
    width: min(calc(100% - 1.5rem), 28rem);
    translate: -50% 0;
    transition: translate 0.45s var(--ease-out);
    view-transition-name: dock;
  }

  .des-dock ul {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 0;
    padding: 0.3rem;
    list-style: none;
    background: color-mix(in srgb, var(--des-cream) 86%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(43, 75, 196, 0.14);
    border-radius: 1.4rem;
    box-shadow: 0 2px 6px rgba(13, 13, 40, 0.06), 0 14px 32px -16px rgba(13, 13, 40, 0.4);
  }

  .des-dock__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    height: calc(var(--dock-h) - 0.7rem);
    padding: 0;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: var(--des-ink);
    text-decoration: none;
    background: none;
    border: 0;
    border-radius: 1.05rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.35s, scale 0.25s var(--ease-out);
  }

  .des-dock__item > :not(.des-dock__pill) {
    position: relative;
  }

  .des-dock__item svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .des-dock__item:active {
    scale: 0.92;
  }

  .des-dock__item[aria-current="page"] {
    color: var(--des-on-blue);
  }

  /* slides to the new tab during page transitions */
  .des-dock__pill {
    position: absolute;
    inset: 0;
    background: var(--des-blue-surface);
    background-blend-mode: soft-light, normal;
    border-radius: inherit;
    view-transition-name: dock-pill;
  }
}

/* Touch screens: there's no hover, so give a little press feedback instead */
@media (hover: none) {
  .theme-des27 {
    -webkit-tap-highlight-color: transparent;
  }

  .des-btn,
  .ev-btn {
    transition: color 0.45s var(--ease-out), border-color 0.45s var(--ease-out), translate 0.6s var(--ease-out), scale 0.2s var(--ease-out);
  }

  .des-btn:active,
  .ev-btn:active,
  .ev-carousel__btn:active,
  .ev-archive__nav:active {
    scale: 0.95;
  }
}


/* ---------- Touch-screen motion (mobile.js) ----------
   Only switched on for touch screens without "reduce motion"; mobile.js adds
   .is-touch to <html>. Desktop keeps the cursor and hover effects instead. */

/* Tap bloom: a ring that spreads from where you tap */
.tap-bloom {
  position: fixed;
  z-index: 1001;
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0 -1.375rem;
  border: 1.5px solid var(--des-blue);
  border-radius: 50%;
  pointer-events: none;
  animation: tap-bloom 0.65s var(--ease-out) forwards;
}

.tap-bloom--hit {
  background: rgba(43, 75, 196, 0.12);
  animation-duration: 0.75s;
}

.tap-bloom--light {
  border-color: var(--des-lime);
  background: rgba(216, 242, 109, 0.12);
}

@keyframes tap-bloom {
  from { scale: 0.3; opacity: 0.9; }
  to   { scale: 2.3; opacity: 0; }
}

/* Press tilt: quick to lean in, springy on the way back */
.is-touch .ev-card__media.is-pressed,
.is-touch .ev-archive__item figure.is-pressed {
  scale: 0.97;
  transition: transform 0.2s var(--ease-out), scale 0.2s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.is-touch .ev-card__media.is-springing,
.is-touch .ev-archive__item figure.is-springing {
  transition: transform 0.75s cubic-bezier(0.34, 1.7, 0.64, 1), scale 0.75s cubic-bezier(0.34, 1.7, 0.64, 1), box-shadow 0.6s var(--ease-out);
}

/* Hero: as you scroll away the title letters slip up into their mask at
   different speeds, the script word slides off, and the small text fades.
   --hero-out (0 at the top, 1 once the hero is mostly gone) is set by mobile.js. */
.is-touch .ev-hero .ev-letter {
  translate: 0 calc(var(--hero-out, 0) * -1 * (0.3em + var(--i, 0) * 0.13em));
  transition: translate 0.25s linear, color 0.5s var(--ease-out);
}

.is-touch .ev-hero__script {
  translate: calc(var(--hero-out, 0) * 35vw) 0;
  opacity: calc(1 - var(--hero-out, 0) * 0.9);
}

.is-touch .ev-hero__tags,
.is-touch .ev-hero__intro {
  translate: 0 calc(var(--hero-out, 0) * -1.5rem);
}

.is-touch .theme-des27 .ev-hero .reveal.is-visible {
  opacity: calc(1 - var(--hero-out, 0) * 1.3);
}

/* Headings rise out of a mask, the serif word a beat after the big one
   (in place of the whole heading fading up, as on desktop) */
.is-touch .theme-des27 .ev-heading.reveal {
  opacity: 1;
  transform: none;
}

.is-touch .ev-heading.reveal .ev-heading__big,
.is-touch .ev-heading.reveal .ev-heading__script {
  clip-path: inset(0 -0.2em 100% -0.2em);
  translate: 0 0.4em;
  transition:
    clip-path 0.9s var(--ease-out) calc(var(--delay, 0ms) + var(--lag, 0ms)),
    translate 1s var(--ease-out) calc(var(--delay, 0ms) + var(--lag, 0ms));
}

.is-touch .ev-heading.reveal .ev-heading__script {
  --lag: 140ms;
}

/* leaving through the top: come back in from above */
.is-touch .ev-heading.reveal[data-from="above"] .ev-heading__big,
.is-touch .ev-heading.reveal[data-from="above"] .ev-heading__script {
  clip-path: inset(100% -0.2em 0 -0.2em);
  translate: 0 -0.4em;
}

.is-touch .ev-heading.reveal.is-visible .ev-heading__big,
.is-touch .ev-heading.reveal.is-visible .ev-heading__script {
  clip-path: inset(-0.25em -0.2em -0.25em -0.2em);
  translate: none;
}

/* Tab bar: a thin line that fills as you read down the page */
.des-dock__progress {
  display: none;
}

.is-touch .des-dock__progress {
  position: absolute;
  z-index: 1;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 0.2rem;
  display: block;
  height: 2px;
  background: var(--des-blue);
  border-radius: 2px;
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  pointer-events: none;
}

/* the tab you've just opened gives a small hop as the page arrives */
.is-touch .des-dock__item[aria-current="page"] svg {
  animation: dock-land 0.7s var(--ease-out) 0.3s both;
}

@keyframes dock-land {
  35% { translate: 0 -5px; scale: 1.14; }
  70% { translate: 0 1px; scale: 0.97; }
}


/* Shared animation helpers */

.js .theme-des27 .reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition:
    opacity 0.9s var(--ease-out) var(--delay, 0ms),
    transform 1.1s var(--ease-out) var(--delay, 0ms);
}

.js .theme-des27 .reveal[data-from="above"] {
  transform: translateY(-1.75rem);
}

.js .theme-des27 .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.draw-line path {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

/* Lines draw and undraw with scroll; --draw (0-1) is set by events.js */
.js .draw-line path {
  stroke-dashoffset: calc(1 - var(--draw, 0));
  transition: stroke-dashoffset 1.2s var(--ease-out);
}

/* Scroll-linked drift; --tx / --ty are set by events.js */
[data-lag],
[data-speed],
[data-x] {
  translate: var(--tx, 0px) var(--ty, 0px);
  will-change: translate;
}

/* Card rows lean slightly with scroll speed; --skew is set by events.js */
[data-skew] {
  transform: skewY(var(--skew, 0deg));
  transition: transform 0.5s var(--ease-out);
}

/* Elements that lean toward the pointer */
[data-magnetic] {
  transition: translate 0.6s var(--ease-out);
}

.media-placeholder {
  width: 100%;
  height: 100%;
  background: var(--des-grey);
}

@media (prefers-reduced-motion: reduce) {
  .theme-des27 *,
  .theme-des27 *::before,
  .theme-des27 *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}


/* Outlined blue button with arrow */

.des-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1.25em;
  padding: 0.85em 1.4em;
  overflow: hidden;
  isolation: isolate;
  font-size: clamp(0.85rem, 1.05vw, 1rem);
  font-weight: 600;
  color: var(--des-blue);
  text-decoration: none;
  background: var(--des-cream);
  border: 2px solid var(--des-blue);
  border-radius: 6px;
  transition: color 0.45s var(--ease-out), translate 0.6s var(--ease-out);
}

.des-btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--des-blue);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
}

.des-btn:hover,
.des-btn:focus-visible {
  color: var(--des-white);
}

.des-btn:hover::before,
.des-btn:focus-visible::before {
  transform: none;
}

.des-btn:hover .ev-arrow,
.des-btn:focus-visible .ev-arrow {
  transform: translate(3px, -3px);
}


/* Footer */

.des-footer {
  padding-block: clamp(2rem, 4vw, 3rem);
  font-size: 0.875rem;
  background: var(--des-cream);
  border-top: 2px solid var(--des-blue);
}

.des-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.des-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem clamp(1rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.des-footer__links a {
  font-weight: 500;
  text-decoration: none;
}

.des-footer__links a:hover {
  color: var(--des-blue);
}

.des-footer__legal {
  flex-basis: 100%;
  margin: 0;
  color: #5f5f5f;
}


/* Custom cursor (cursor.js) - mouse/trackpad only */

.has-cursor,
.has-cursor * {
  cursor: none !important;
}

.des-cursor {
  --cursor-color: var(--des-blue);
  position: fixed;
  z-index: 1000;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.des-cursor.is-visible {
  opacity: 1;
}

.des-cursor__dot,
.des-cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
}

.des-cursor__dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--cursor-color);
  border-radius: 50%;
  transition: background-color 0.3s, scale 0.3s var(--ease-out);
}

.des-cursor__ring {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1.5px solid var(--cursor-color);
  border-radius: 50%;
  transition:
    width 0.45s var(--ease-out),
    height 0.45s var(--ease-out),
    margin 0.45s var(--ease-out),
    background-color 0.35s,
    border-color 0.3s,
    scale 0.25s var(--ease-out);
}

.des-cursor__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--des-white);
  opacity: 0;
  transition: opacity 0.3s;
}

/* over links and buttons */
.des-cursor.is-hover .des-cursor__ring {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: color-mix(in srgb, var(--cursor-color) 14%, transparent);
}

.des-cursor.is-hover .des-cursor__dot {
  scale: 0.5;
}

/* over areas with a label, e.g. "Drag" on the carousel */
.des-cursor.is-label .des-cursor__ring {
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  background: var(--cursor-color);
}

.des-cursor.is-label .des-cursor__label {
  opacity: 1;
}

.des-cursor.is-label .des-cursor__dot {
  scale: 0;
}

/* on the blue featured band */
.des-cursor.is-light {
  --cursor-color: var(--des-lime);
}

.des-cursor.is-light .des-cursor__label {
  color: var(--des-blue-deep);
}

.des-cursor.is-down .des-cursor__ring {
  scale: 0.8;
}






/* Page transitions (View Transitions API - Chrome, Edge, Safari 18+).
   The nav stays put and its underline slides to the new page, while the new
   page flows in like liquid from where you clicked. */

@view-transition {
  navigation: auto;
}

.des-header { view-transition-name: site-header; }

::view-transition-group(*) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* The new page spreads out from where you clicked, through two soft blobs
   growing at slightly different speeds so the edge ripples like liquid.
   --vt-x / --vt-y are set in base.njk from the click position. */
@property --vt-size {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

::view-transition-old(root) {
  animation: vt-sink 1.25s cubic-bezier(0.5, 0, 0.2, 1) both;
}

::view-transition-new(root) {
  --b: calc(var(--vt-size) * 0.9);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 240 240'%3E%3Cfilter id='s'%3E%3CfeGaussianBlur stdDeviation='4'/%3E%3C/filter%3E%3Cpath filter='url(%23s)' d='M100 6C142 4 186 36 192 82C198 126 172 174 126 190C80 206 28 184 12 138C-4 92 20 46 54 24C68 14 84 7 100 6Z'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 240 240'%3E%3Cfilter id='s'%3E%3CfeGaussianBlur stdDeviation='4'/%3E%3C/filter%3E%3Cpath filter='url(%23s)' d='M108 10C156 18 196 58 188 110C180 156 140 196 92 190C46 184 10 150 10 104C10 62 38 22 76 12C86 9 97 8 108 10Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 240 240'%3E%3Cfilter id='s'%3E%3CfeGaussianBlur stdDeviation='4'/%3E%3C/filter%3E%3Cpath filter='url(%23s)' d='M100 6C142 4 186 36 192 82C198 126 172 174 126 190C80 206 28 184 12 138C-4 92 20 46 54 24C68 14 84 7 100 6Z'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 240 240'%3E%3Cfilter id='s'%3E%3CfeGaussianBlur stdDeviation='4'/%3E%3C/filter%3E%3Cpath filter='url(%23s)' d='M108 10C156 18 196 58 188 110C180 156 140 196 92 190C46 184 10 150 10 104C10 62 38 22 76 12C86 9 97 8 108 10Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--vt-size) var(--vt-size), var(--b) var(--b);
  mask-size: var(--vt-size) var(--vt-size), var(--b) var(--b);
  -webkit-mask-position:
    calc(var(--vt-x, 50vw) - var(--vt-size) / 2) calc(var(--vt-y, 50vh) - var(--vt-size) / 2),
    calc(var(--vt-x, 50vw) - var(--b) / 2 + 2vmax) calc(var(--vt-y, 50vh) - var(--b) / 2 - 1vmax);
  mask-position:
    calc(var(--vt-x, 50vw) - var(--vt-size) / 2) calc(var(--vt-y, 50vh) - var(--vt-size) / 2),
    calc(var(--vt-x, 50vw) - var(--b) / 2 + 2vmax) calc(var(--vt-y, 50vh) - var(--b) / 2 - 1vmax);
  animation: vt-spread 1.25s cubic-bezier(0.5, 0, 0.2, 1) both;
}

@keyframes vt-spread {
  from { --vt-size: 0px; }
  to { --vt-size: 300vmax; }
}

@keyframes vt-sink {
  to { transform: scale(0.94); filter: blur(6px) brightness(0.85); }
}

/* Phones and tablets: the blurred liquid mask and the blurred old page are
   repainted full-screen on every frame, which stutters on mobile GPUs. Here
   the new page opens as a plain circle from the tap point instead (a cheap
   clip, no blur), and the old page only scales and dims (compositor-only). */
@media (max-width: 59.99em), (hover: none) and (pointer: coarse) {
  ::view-transition-group(*) {
    animation-duration: 0.5s;
  }

  ::view-transition-old(root) {
    animation: vt-sink-lite 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  ::view-transition-new(root) {
    -webkit-mask-image: none;
    mask-image: none;
    will-change: clip-path;
    animation: vt-spread-lite 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
}

@keyframes vt-spread-lite {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 50%)); }
}

@keyframes vt-sink-lite {
  to { transform: scale(0.96); opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}


/* Scroll hint: a short line at the bottom of heroes with a drop sliding down it */

.des-scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(1.25rem, 2.5vw, 2rem);
  width: 2px;
  height: 3.25rem;
  overflow: hidden;
  color: var(--des-blue);
  background: color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 2px;
  opacity: 0;
  translate: -50% 0;
  animation: cue-in 0.8s var(--ease-out) calc(var(--enter-delay, 0s) + 1.4s) forwards;
}

.des-scroll-cue span {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 40%;
  background: currentColor;
  border-radius: 2px;
  animation: cue-drop 1.8s var(--ease-in-out) infinite;
}

.des-scroll-cue--light {
  left: var(--des-gutter);
  translate: none;
  color: var(--des-white);
}

.des-scroll-cue--light span {
  background: var(--des-lime);
}

@keyframes cue-in {
  to { opacity: 1; }
}

@keyframes cue-drop {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(260%); }
}
