/* Home page: the first screen, "how it works" with the phone that changes screens, categories,
   the band for masters, trust, questions, the closing call. Tokens, the font, buttons, store
   badges, the header and the footer come from base.css. */

/* ==========================================================================
   1. Tokens of the home page
   ========================================================================== */

:root {
  /* Motion. landing.js keeps the matching timers in its CONFIG block. */
  --pulse-duration: 2.2s;
  --pulse-stagger: 1.1s;
  --dot-duration: 2.8s;
  --dot-stagger: .9s;
  --radar-duration: 1.8s;
  --spin-duration: 1s;
  --step-in-duration: .45s;
  --reveal-duration: .6s;
  --reveal-shift: 18px;
  --tile-duration: .25s;
  --tile-lift: -6px;
  --chevron-duration: .2s;
  /* Equals CONFIG.orderLeaveMs in landing.js */
  --order-leave-duration: .42s;
  --order-enter-duration: .35s;
  --cta-pulse-duration: 2.4s;
  /* How far the ring of a pulsing call goes. In the header it stays inside the
     gap between the call and the menu button. */
  --cta-pulse-spread: 8px;

  /* Sizes */
  --phone-width: 320px;
  --faq-max: 760px;
  --glow-size: 380px;
  --row-gap: 64px;
  --radius-panel: 32px;

  /* Colours and shadows that stay the same in both themes */
  --color-tile-dark-bg: #171717;
  --color-on-dark: #fff;
  --color-wash-on-accent: rgba(23, 23, 23, .1);
  --color-wash-on-dark: rgba(255, 255, 255, .12);
  --color-wash-badge: rgba(0, 0, 0, .04);
  --color-store-on-accent-hover: #303036;
  --shadow-store-on-accent-hover: 0 12px 26px rgba(23, 23, 23, .3);
  --shadow-tile-hover: 0 14px 28px rgba(30, 30, 50, .1);
  --shadow-tile-accent-hover: 0 18px 34px rgba(0, 0, 0, .18);
  --shadow-tile-dark-hover: 0 18px 34px rgba(0, 0, 0, .28);
  --shadow-orders: 0 24px 60px rgba(0, 0, 0, .35);
  --shadow-dot: 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-pin: drop-shadow(0 3px 5px rgba(0, 0, 0, .2));
}

/* ==========================================================================
   2. Keyframes
   ========================================================================== */

@keyframes vaySpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes vayPulse {
  0% {
    transform: scale(.4);
    opacity: .55;
  }

  100% {
    transform: scale(7);
    opacity: 0;
  }
}

@keyframes vayDotPop {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(.3);
  }

  22% {
    opacity: 1;
    transform: translate(calc(var(--tx) * .6), calc(var(--ty) * .6)) scale(1.25);
  }

  70% {
    opacity: 1;
    transform: translate(var(--tx), var(--ty)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(.6);
  }
}

@keyframes vayRadarRing {
  0% {
    transform: scale(.6);
    opacity: .85;
  }

  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

@keyframes vayStepIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* A ring that appears around the button, fades, then a pause. The ring itself is the static
   shadow of a pseudo-element, drawn at its full distance. Two animations run on it together: it
   grows from .9 to 1 of its size and, on the way, fades in and out. Only transform and opacity
   change. */
@keyframes vayCtaPulseGrow {
  0% {
    transform: scale(.9);
  }

  70%,
  100% {
    transform: scale(1);
  }
}

@keyframes vayCtaPulseFade {
  0% {
    opacity: 0;
  }

  14% {
    opacity: .7;
  }

  70%,
  100% {
    opacity: 0;
  }
}

/* ==========================================================================
   3. Sections appearing on scroll
   Hidden only when scripts run (html.js); landing.js adds .is-revealed.
   ========================================================================== */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) ease;
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* boot.js sets html.js-failed when a script of the page did not load: nothing would reveal the
   sections then, so they are shown at once. */
.js-failed [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   4. Shared pieces of the illustrations
   ========================================================================== */

/* Column of an illustration. Its auto margins take the free width of its line.
   Next to the text there is none (the text column takes it all), so the
   illustration stands at the right edge; alone on a line, in the stacked
   layout, it stands in the middle. */
.device {
  position: relative;
  flex: 0 0 auto;
  width: min(var(--phone-width), 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Text column of a row with an illustration: grows over all the free width,
   while its content keeps the measure of the design. Zero specificity: an
   element with a narrower measure of its own keeps it. */
:where(.hero__text, .how__text, .masters__text) > * {
  max-width: var(--text-measure);
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--color-phone-border);
  border-radius: var(--radius-phone);
  background: var(--color-surface-1);
}

.phone--hero {
  min-height: 660px;
  box-shadow: var(--shadow-card);
}

.phone--steps {
  z-index: 1;
  min-height: 580px;
  box-shadow: var(--shadow-card-2);
  transform: rotate(-3deg);
}

.phone__top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-screen-bg);
}

.phone__logo {
  font-size: 17px;
  font-weight: 900;
  color: var(--color-accent);
}

.phone__screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-screen-bg);
}

.phone__screen--hero {
  align-items: center;
  padding: 22px 24px 0;
}

.phone__screen--steps {
  padding: 22px 20px 24px;
  overflow-y: auto;
}

.phone__title {
  width: 100%;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.4px;
}

.phone__foot {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-screen-bg);
  box-shadow: var(--shadow-inner);
}

.phone__tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 8px 20px;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-screen-bg);
}

.phone__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted-light);
}

.phone__tab--active {
  font-weight: 700;
  color: var(--color-accent);
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px;
  border: 0;
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  color: var(--color-on-accent);
  background: var(--color-accent);
  cursor: pointer;
}

.phone-btn--sm {
  padding: 15px;
  border-radius: var(--radius-btn);
  font-size: 15px;
}

.phone-btn--reject {
  color: var(--color-text);
  background: var(--color-reject-bg);
}

/* The label of the first screen: looks like the button, does nothing */
.phone-btn--static {
  cursor: default;
}

/* Step 3: the search is running, the button waits */
.phone-btn--idle {
  opacity: .55;
  cursor: default;
}

.caption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--color-muted-light);
}

/* Map pin: the body takes currentColor, the hole takes the screen colour */
.pin {
  flex: none;
  color: var(--color-accent);
}

.pin__hole {
  fill: var(--color-screen-bg);
}

.pin--map {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -92%);
  filter: var(--shadow-pin);
}

/* A piece of a map: a soft backing with a grid of thin lines */
.map {
  position: relative;
  overflow: hidden;
  background: var(--color-accent-soft);
}

.map::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 var(--map-row), var(--color-accent) var(--map-row) calc(var(--map-row) + 1px)),
    repeating-linear-gradient(90deg, transparent 0 var(--map-col), var(--color-accent) var(--map-col) calc(var(--map-col) + 1px));
}

.map--radar {
  --map-row: 30px;
  --map-col: 38px;
  width: 152px;
  height: 152px;
  margin-top: 28px;
  border-radius: 26px;
}

.map--address {
  --map-row: 26px;
  --map-col: 32px;
  width: 100%;
  height: 150px;
  margin-bottom: 18px;
  border-radius: 18px;
}

.map__hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-muted);
  background: var(--color-screen-bg);
  box-shadow: var(--shadow-inner);
}

.address {
  width: 100%;
}

.address--hero {
  margin-top: 40px;
}

.address__label {
  padding: 0 2px 10px;
}

.address__field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 16px;
  background: var(--color-surface-2);
  box-shadow: var(--shadow-inner);
}

.address__field--screen {
  background: var(--color-screen-bg);
}

.address__text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}

.address__chevron {
  flex: none;
}

/* ==========================================================================
   5. First screen
   ========================================================================== */

.hero {
  padding-top: clamp(48px, 8vw, 96px);
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.hero__text {
  --text-measure: 600px;
  flex: 1 1 440px;
  min-width: 0;
}

.hero__lead {
  max-width: 480px;
  margin-top: 24px;
}

.hero__stores {
  margin-top: 36px;
}

.hero__note {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted-light);
}

/* Radar in the tile of the first screen: two pulses and three dots flying out
   of the centre */
.radar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
}

.radar__pulse,
.radar__dot {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: var(--color-accent);
}

.radar__pulse {
  width: 14px;
  height: 14px;
  margin: -7px;
  animation: vayPulse var(--pulse-duration) ease-out infinite;
}

.radar__pulse--late {
  animation-delay: var(--pulse-stagger);
}

.radar__dot {
  width: 11px;
  height: 11px;
  margin: -5.5px;
  box-shadow: var(--shadow-dot);
  animation: vayDotPop var(--dot-duration) ease-in-out infinite;
}

.radar__dot--1 {
  --tx: 46px;
  --ty: -42px;
}

.radar__dot--2 {
  --tx: -52px;
  --ty: 10px;
  animation-delay: var(--dot-stagger);
}

.radar__dot--3 {
  --tx: 28px;
  --ty: 48px;
  animation-delay: calc(var(--dot-stagger) * 2);
}

/* ==========================================================================
   6. How it works
   The blurred circle is wider than the phone column and the phone is rotated:
   the section clips its horizontal overflow so a narrow screen does not scroll
   sideways.
   ========================================================================== */

.how {
  padding: clamp(80px, 11vw, 136px) 0 clamp(64px, 9vw, 104px);
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--color-bg);
}

.how__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--row-gap);
}

.how__text {
  --text-measure: 520px;
  flex: 1 1 420px;
  min-width: 0;
}

.how__title {
  margin-bottom: 36px;
  line-height: 1.1;
}

.how__note {
  margin-top: 20px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted-light);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  font-family: inherit;
  text-align: left;
  color: var(--color-text);
  background: transparent;
  cursor: pointer;
}

.step[aria-current="step"] {
  background: var(--color-accent-soft);
}

.step__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-muted-light);
  background: var(--color-surface-2);
}

.step[aria-current="step"] .step__num {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.step__label {
  font-size: 17px;
  font-weight: 700;
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: var(--glow-size);
  height: var(--glow-size);
  border-radius: 50%;
  opacity: .7;
  background: var(--color-accent-soft);
  filter: blur(50px);
  transform: translate(-50%, -50%);
}

/* A screen fades in every time it is shown: the element leaves display: none
   and its animation starts again. */
.step-in {
  animation: vayStepIn var(--step-in-duration) ease;
}

.screen--wide {
  width: 100%;
}

.screen--center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Step 1: the search field and the list of categories */
.search__label {
  padding: 2px 2px 14px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-screen-bg);
  box-shadow: var(--shadow-inner);
}

.search__ring {
  position: absolute;
  top: 50%;
  left: 19px;
  width: 16px;
  height: 16px;
  margin: -8px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  animation: vayRadarRing var(--radar-duration) ease-out infinite;
}

.search__icon {
  position: relative;
  flex: none;
  color: var(--color-muted-light);
}

.search__text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted-light);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-screen-bg);
}

.option--active {
  border: 2px solid var(--color-accent);
  background: var(--color-accent-soft);
}

.option__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--color-icon-tint);
  background: var(--color-accent-soft);
}

.option--active .option__icon {
  background: var(--color-screen-bg);
}

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

.option--active .option__name {
  font-weight: 700;
  color: var(--color-text);
}

/* Step 3: the search is running */
.searching {
  gap: 22px;
}

.spinner {
  position: relative;
  width: 60px;
  height: 60px;
}

.spinner__ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  animation: vayRadarRing var(--radar-duration) ease-out infinite;
}

.spinner__arc {
  position: relative;
  width: 60px;
  height: 60px;
  border: 3px solid var(--color-accent-soft);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: vaySpin var(--spin-duration) linear infinite;
}

.searching__text {
  font-size: 16px;
  font-weight: 700;
}

/* Step 4: the page of the master */
.profile__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.profile__photo {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--color-accent-soft);
}

.profile__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: repeating-linear-gradient(45deg, transparent 0 6px, var(--color-accent) 6px 7px);
}

.profile__id {
  min-width: 0;
}

.profile__name {
  font-size: 16px;
  font-weight: 800;
}

.profile__checked {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
}

.profile__check {
  color: var(--color-accent);
}

.profile__since {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted-light);
}

.profile__label {
  margin-bottom: 8px;
  font-size: 11px;
}

.profile__label--tight {
  margin-bottom: 6px;
}

.profile__about {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-muted);
}

.profile__shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.profile__shot {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--color-surface-2);
}

.profile__shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 5px, var(--color-border) 5px 6px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 11px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 700;
  background: var(--color-surface-2);
}

.chip--more {
  color: var(--color-muted-light);
}

.confirm__timer {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-muted-light);
}

.confirm__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm__note {
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  color: var(--color-muted-light);
}

/* Step 5: the phone number is open */
.opened {
  gap: 14px;
  text-align: center;
}

.opened__badge {
  position: relative;
  width: 64px;
  height: 64px;
}

.opened__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--color-icon-tint);
  background: var(--color-accent-soft);
}

.opened__check {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 3px solid var(--color-screen-bg);
  border-radius: 50%;
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.opened__title {
  font-size: 17px;
  font-weight: 800;
}

.opened__text {
  max-width: 200px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-muted);
}

/* ==========================================================================
   7. Categories
   ========================================================================== */

.categories {
  padding: var(--section-pad) 0 clamp(64px, 9vw, 104px);
  background: var(--color-bg);
}

.categories__title {
  margin-bottom: 40px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-auto-rows: minmax(150px, auto);
  grid-auto-flow: dense;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--radius-card);
}

.tile--plain {
  padding: 24px 18px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-1);
  transition:
    transform var(--tile-duration) ease,
    box-shadow var(--tile-duration) ease,
    border-color var(--tile-duration) ease;
}

.tile--plain:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-tile-hover);
  transform: translateY(var(--tile-lift));
}

/* The tile under the "searching now" badge: the frame only, no lift */
.tile--plain.is-spot {
  border-color: var(--color-accent);
}

.tile--accent,
.tile--dark {
  grid-row: span 2;
  justify-content: space-between;
  padding: 26px 20px;
  transition: transform var(--tile-duration) ease, box-shadow var(--tile-duration) ease;
}

.tile--accent {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.tile--dark {
  color: var(--color-on-dark);
  background: var(--color-tile-dark-bg);
}

.tile--accent:hover,
.tile--dark:hover {
  transform: translateY(var(--tile-lift));
}

.tile--accent:hover {
  box-shadow: var(--shadow-tile-accent-hover);
}

.tile--dark:hover {
  box-shadow: var(--shadow-tile-dark-hover);
}

.tile--more {
  justify-content: center;
  padding: 24px 18px;
  border: 1.5px dashed var(--color-border);
}

.tile__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  transform: rotate(var(--tilt, 0deg));
}

.tile__icon--tint {
  color: var(--color-icon-tint);
  background: var(--color-accent-soft);
}

.tile__icon--muted {
  color: var(--color-muted);
  background: var(--color-surface-2);
}

.tile__icon--on-accent {
  background: var(--color-wash-on-accent);
}

.tile__icon--on-dark {
  background: var(--color-wash-on-dark);
}

.tile__icon--dashed {
  border: 1.5px dashed var(--color-border);
  color: var(--color-muted-light);
}

.tilt-n6 {
  --tilt: -6deg;
}

.tilt-n5 {
  --tilt: -5deg;
}

.tilt-n4 {
  --tilt: -4deg;
}

.tilt-n3 {
  --tilt: -3deg;
}

.tilt-p3 {
  --tilt: 3deg;
}

.tilt-p4 {
  --tilt: 4deg;
}

.tilt-p5 {
  --tilt: 5deg;
}

.tile__ring {
  position: absolute;
  inset: 0;
  border: 2px solid currentColor;
  border-radius: 16px;
  opacity: .75;
  animation: vayRadarRing var(--radar-duration) ease-out infinite;
}

.tile__glyph {
  position: relative;
}

.tile__name {
  font-size: 15px;
  font-weight: 700;
}

.tile--accent .tile__name,
.tile--dark .tile__name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.tile--more .tile__name {
  font-size: 14px;
  color: var(--color-muted-light);
}

/* "Searching now": in the markup of every tile, shown on the one landing.js
   marks with .is-spot */
.tile__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-badge);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-muted);
  background: var(--color-wash-badge);
}

.tile.is-spot .tile__badge {
  display: flex;
}

.tile__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.tile--accent .tile__badge,
.tile--dark .tile__badge {
  top: 12px;
  right: 12px;
}

.tile--accent .tile__badge {
  color: var(--color-on-accent);
  background: var(--color-wash-on-accent);
}

.tile--accent .tile__badge::before {
  background: var(--color-on-accent);
}

.tile--dark .tile__badge {
  color: var(--color-on-dark);
  background: var(--color-wash-on-dark);
}

/* ==========================================================================
   8. For masters
   The order card flies out to the right when it changes: the section clips
   its horizontal overflow for the same reason as "how it works".
   ========================================================================== */

.masters {
  padding: var(--section-pad) 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--color-masters-bg);
}

.masters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--row-gap);
}

.masters__text {
  --text-measure: 560px;
  flex: 1 1 420px;
  min-width: 0;
}

.masters__title {
  margin-bottom: 32px;
  line-height: 1.1;
  color: var(--color-on-dark);
}

.masters__points {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-masters-divider);
  list-style: none;
}

.masters__point {
  padding: 20px 0;
  border-top: 1px solid var(--color-masters-divider);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-masters-text);
}

/* The free start: painted like the yellow buttons of the site (same two tokens). The phrase wraps
   inside the badge: a long one must not run past the edge the section clips. */
.masters__free {
  display: inline-block;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  overflow-wrap: anywhere;
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.masters__cta {
  margin-top: 32px;
  padding: 15px 28px;
}

.orders {
  padding: 28px 14px 14px;
}

.orders__ghost {
  position: absolute;
  border: 1px solid var(--color-phone-border);
  border-radius: var(--radius-card);
  background: var(--color-surface-1);
}

.orders__ghost--far {
  top: 0;
  right: 34px;
  left: 34px;
  height: 160px;
  opacity: .45;
  transform: rotate(5deg);
}

.orders__ghost--near {
  top: 12px;
  right: 18px;
  left: 18px;
  height: 170px;
  opacity: .7;
  transform: rotate(-3deg);
}

.orders__panel {
  position: relative;
  padding: 20px;
  border: 1px solid var(--color-phone-border);
  border-radius: var(--radius-card);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-orders);
}

.orders__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.orders__logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.orders__caption {
  letter-spacing: .3px;
}

.orders__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  opacity: 1;
  background: var(--color-accent-soft);
  transform: translateY(0) scale(1);
  transition: transform var(--order-enter-duration) ease, opacity var(--order-enter-duration) ease;
}

.order-card.is-leaving {
  opacity: 0;
  transform: translateX(130px) rotate(8deg);
  transition: transform var(--order-leave-duration) ease, opacity var(--order-leave-duration) ease;
}

.order-card.is-entering {
  opacity: 0;
  transform: translateY(10px) scale(.95);
  transition: none;
}

.order-card__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--color-icon-tint);
  background: var(--color-screen-bg);
}

.order-card__body {
  min-width: 0;
}

.order-card__title {
  font-size: 16px;
  font-weight: 800;
}

.order-card__address {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
}

.order-btn {
  flex: 1;
  padding: 14px;
  border: 0;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.order-btn--accept {
  color: var(--color-accept-text);
  background: var(--color-accept-bg);
}

.order-btn--reject {
  color: var(--color-text);
  background: var(--color-reject-bg);
}

/* ==========================================================================
   9. Trust
   ========================================================================== */

.trust {
  padding: clamp(64px, 9vw, 104px) 0;
  text-align: center;
  background: var(--color-surface-1);
}

.trust__inner {
  max-width: var(--column-max);
}

.trust__title {
  margin-bottom: 18px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -.8px;
}

.trust__text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-muted);
}

/* ==========================================================================
   10. Questions
   <details name="faq">: the browser keeps one item open, no script involved.
   ========================================================================== */

.faq {
  padding: var(--section-pad) 0;
  background: var(--color-bg);
}

.faq__inner {
  max-width: var(--faq-max);
}

.faq__title {
  margin-bottom: 32px;
}

.faq__list {
  border-top: 1px solid var(--color-border);
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 2px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  list-style: none;
  cursor: pointer;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__chevron {
  flex: none;
  transition: transform var(--chevron-duration) ease;
}

.faq__item[open] .faq__chevron {
  transform: rotate(180deg);
}

.faq__answer {
  padding: 0 2px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-muted);
}

.faq__link {
  border-radius: 4px;
  font-weight: 700;
  color: var(--color-text);
}

/* ==========================================================================
   11. Closing call
   An accent card inside the container. The questions above end with their own
   padding, so the section adds none at the top. The card is yellow in both
   themes: its text and its store badges are dark in both.
   ========================================================================== */

.cta {
  padding: 0 0 var(--section-pad);
  background: var(--color-bg);
}

.cta__card {
  --color-store-bg: var(--color-on-accent);
  --color-store-bg-hover: var(--color-store-on-accent-hover);
  --color-store-border: transparent;
  --color-store-ring: var(--color-on-accent);
  --shadow-store-hover: var(--shadow-store-on-accent-hover);
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px);
  border-radius: var(--radius-panel);
  text-align: center;
  background: var(--color-accent);
}

.cta__title {
  margin-bottom: 32px;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--color-on-accent);
}

/* ==========================================================================
   12. Calls that pulse
   The two yellow calls of the page: "download" in the header and "become a
   master". The ring is the static shadow of a pseudo-element, --cta-pulse-spread
   wide, shrunk a little and let out to full size by vayCtaPulseGrow while
   vayCtaPulseFade shows and hides it. The scale never goes above 1, so the ring
   goes no farther than the spread; it takes no room, adds no scroll and leaves
   the box-shadow of the button to the focus ring. Only this file knows about
   it, so the header of the service pages stays still.
   ========================================================================== */

.masters__cta {
  --cta-pulse-spread: 12px;
  position: relative;
}

.site-header__cta::before,
.masters__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 var(--cta-pulse-spread) var(--color-accent);
  opacity: 0;
  pointer-events: none;
  animation:
    vayCtaPulseGrow var(--cta-pulse-duration) ease-out infinite,
    vayCtaPulseFade var(--cta-pulse-duration) ease-out infinite;
}

/* ==========================================================================
   13. Reduced motion
   base.css switches every animation and transition off. Here: what would stay
   out of sight without them, and the ring of the calls, which is not drawn.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .site-header__cta::before,
  .masters__cta::before {
    content: none;
  }

  .order-card.is-leaving,
  .order-card.is-entering {
    opacity: 1;
    transform: none;
  }
}
