/* ==========================================================================
   Alkando — the page colour that changes as you scroll (home).

   After structured.app: every stretch of the page has a colour, and when
   one reaches the middle of the window the whole background eases to it
   over about a second (flow.js writes --flow-bg). The sections themselves
   are transparent; the modes sheet, which has to cover the sky, paints the
   same variable so it changes in step.
   ========================================================================== */

body:has([data-flow]) {
  background: var(--flow-bg, #ebe4ff);
  transition: background-color 1200ms ease;
}

.modes__bg--base {
  /* replaces the fixed gradient in modes.css when flow is on */
  background: var(--flow-bg, #ebe4ff) !important;
  transition: background-color 1200ms ease;
}

/* Every stop is a light pastel taken from the app's mode and feature
   colours (lavender from Mix, pink from Gamified, blue from Work, amber from
   Activities, mint from Goals), so everything that sits on the flowing
   background switches to dark ink. Scoped to those sections — the header
   keeps its own dark glass and white text. */
.modes,
.fin-sec,
.feat,
body:has([data-flow]) .foot {
  --ak-text: #1e1436;
  --ak-text-2: #4d4670;
  --ak-text-3: #6a6289;
  --ak-section: #6a6289;
  color: var(--ak-text);
}

/* The mode tiles stay colour-filled, with white text. */
.mode {
  --ak-text: #fff;
  color: #fff;
}

body:has([data-flow]) .foot {
  border-top-color: rgba(30, 20, 54, 0.1);
}

body:has([data-flow]) .foot__bottom {
  border-top-color: rgba(30, 20, 54, 0.1);
}

body:has([data-flow]) .foot__social a {
  border-color: rgba(30, 20, 54, 0.14);
  background: rgba(255, 255, 255, 0.55);
  color: #4d4670;
}

@media (prefers-reduced-motion: reduce) {
  body:has([data-flow]),
  .modes__bg--base {
    transition-duration: 400ms;
  }
}
