/* Motion for the Flowlogs landing pages.
   Almost everything that moves is transform and opacity, so the browser animates it on the
   compositor. Nothing moves when the visitor has asked for reduced motion, and every page
   reads the same without this file. */

:root {
  --fl-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fl-ink: #172b4d;
  --fl-muted: #626f86;
  --fl-blue: #0c66e4;
  --fl-red: #e2483d;
}

/* --- Hero entrance: the copy, line by line ---------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  [data-hero-copy] > * {
    animation: fl-enter 0.9s var(--fl-ease) both;
  }
  [data-hero-copy] > :nth-child(2) { animation-delay: 0.08s; }
  [data-hero-copy] > :nth-child(3) { animation-delay: 0.16s; }
  [data-hero-copy] > :nth-child(4) { animation-delay: 0.24s; }
  [data-hero-copy] > :nth-child(5) { animation-delay: 0.32s; }
  [data-hero-copy] > :nth-child(n + 6) { animation-delay: 0.4s; }
}
@keyframes fl-enter {
  from { opacity: 0; transform: translateY(18px); }
}

/* --- Hero stage: the app window and three cards in depth ---------------------------
   The window runs past the edge of the page; the cards float in front at their own
   depth, so they shift against it as the stage turns towards the pointer (motion.js
   sets --px and --py), and a light on the glass follows the pointer. The stage swings
   in on arrival, a light sweeps the days to the empty one, and it flattens on scroll
   (--fl-flat). */
@property --fl-flat {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}
.fl-hero {
  --px: 0;
  --py: 0;
  --turn: -16deg;
  --side: 1;
  position: relative;
  container-type: inline-size;
  perspective: 2200px;
}
[dir='rtl'] .fl-hero { --turn: 16deg; --side: -1; }
.fl-hero-glow {
  position: absolute;
  inset: -16% -24% -14% -14%;
  z-index: 0;
  pointer-events: none;
}
.fl-hero-glow::before,
.fl-hero-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}
.fl-hero-glow::before {
  inset: 10% 20% 25% 10%;
  background: radial-gradient(closest-side, rgba(12, 102, 228, 0.34), transparent);
}
.fl-hero-glow::after {
  inset: 40% 5% 0 45%;
  background: radial-gradient(closest-side, rgba(101, 84, 192, 0.26), transparent);
}
.fl-hero-scene {
  position: relative;
  z-index: 1;
  height: 84cqw;
  margin: 0;
  transform-style: preserve-3d;
  transform-origin: 30% 50%;
  transform:
    rotateX(calc(var(--fl-flat) * 9deg - var(--py) * 6deg))
    rotateY(calc(var(--fl-flat) * var(--turn) + var(--px) * 9deg));
  transition: transform 0.7s var(--fl-ease);
}
[dir='rtl'] .fl-hero-scene { transform-origin: 70% 50%; }
/* The window runs off the outer edge of the page. In Arabic that edge is on the left,
   where the app's names column is, so the window stays nearly within the column. */
.fl-hero-win {
  position: absolute;
  top: 2cqw;
  left: 0;
  width: 134cqw;
  overflow: hidden;
  border-radius: 1.6cqw;
  background: #f7f8f9;
  box-shadow:
    0 0 0 1px rgba(9, 30, 66, 0.08),
    0 4cqw 10cqw -2cqw rgba(9, 30, 66, 0.38),
    0 1cqw 2cqw -1cqw rgba(9, 30, 66, 0.2);
  direction: ltr;
}
[dir='rtl'] .fl-hero-win { left: auto; right: 0; width: 108cqw; }
.fl-hero-dots {
  display: flex;
  gap: 0.7cqw;
  align-items: center;
  height: 3cqw;
  padding: 0 1.4cqw;
  background: #f1f2f4;
  border-bottom: 1px solid #dcdfe4;
}
.fl-hero-dots i { width: 0.9cqw; aspect-ratio: 1; border-radius: 50%; background: #c1c7d0; }
.fl-hero-bar,
.fl-hero-sheet img { display: block; width: 100%; height: auto; }
.fl-hero-body { padding: 2.6cqw 0 3.4cqw; }
.fl-hero-sheet { position: relative; width: var(--sheet); margin: 0 auto; }
.fl-hero-scan {
  position: absolute;
  top: 30%;
  height: 58%;
  border-radius: 0.6cqw;
  background: rgba(12, 102, 228, 0.16);
  box-shadow:
    inset 0 0 0 0.2cqw rgba(12, 102, 228, 0.55),
    0 0 2cqw rgba(12, 102, 228, 0.35);
  opacity: 0;
  pointer-events: none;
}
.fl-hero-ring {
  position: absolute;
  box-sizing: border-box;
  border: 0.35cqw solid var(--fl-red);
  border-radius: 0.7cqw;
  box-shadow: 0 0 1.6cqw rgba(226, 72, 61, 0.5);
}
.fl-hero-ring::after {
  content: '';
  position: absolute;
  inset: -0.35cqw;
  border: 0.35cqw solid var(--fl-red);
  border-radius: inherit;
  opacity: 0;
}
/* The label opens away from the PDF card, which floats on the outer side. */
.fl-hero-chip {
  --chip-x: calc(-100% + 2.4cqw);
  position: absolute;
  margin-top: 0.8cqw;
  padding: 0.5cqw 1.1cqw;
  border-radius: 99px;
  background: #c9372c;
  color: #fff;
  font-size: max(10px, 1.5cqw);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  translate: var(--chip-x) 0;
  box-shadow: 0 0.6cqw 1.6cqw -0.4cqw rgba(226, 72, 61, 0.6);
}
[dir='rtl'] .fl-hero-chip { --chip-x: -2.4cqw; }
.fl-hero-shine,
.fl-hero-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fl-hero-shine {
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%);
  opacity: 0;
}
.fl-hero-glare {
  background: radial-gradient(
    circle at calc(45% + var(--px) * 110%) calc(25% + var(--py) * 110%),
    rgba(255, 255, 255, 0.32),
    transparent 42%
  );
}

/* Cards: the holder sets the depth, the picture inside drifts. */
.fl-hero-card {
  position: absolute;
  transform-style: preserve-3d;
}
.fl-hero-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1cqw;
  box-shadow:
    0 0 0 1px rgba(9, 30, 66, 0.08),
    0 5cqw 8cqw -2.5cqw rgba(9, 30, 66, 0.42);
}
.fl-hero-attention {
  top: 54cqw;
  inset-inline-start: 2cqw;
  width: 60cqw;
  transform: translateZ(90px);
}
.fl-hero-pdf {
  top: 42cqw;
  inset-inline-start: 72cqw;
  width: 27cqw;
  transform: translateZ(150px) rotate(calc(var(--side) * 4deg));
}
.fl-hero-pdf img { border-radius: 0.5cqw; }
[dir='rtl'] .fl-hero-pdf { top: 47cqw; }
.fl-hero-kpi {
  top: 3cqw;
  inset-inline-start: 62cqw;
  width: 30cqw;
  transform: translateZ(230px) rotate(calc(var(--side) * -2deg));
}
.fl-hero-kpi img { border-radius: 1.4cqw; }
[dir='rtl'] .fl-hero-kpi { inset-inline-start: 34cqw; }
@media (max-width: 1023px) {
  .fl-hero { margin-top: 1rem; }
  .fl-hero-scene { height: 80cqw; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Arrival: the stage swings round as the window slides in, the cards rise one after
     another, a light sweeps the days and stops on the empty one, which is ringed. */
  .fl-hero-scene { animation: fl-hero-swing 1.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .fl-hero-win { animation: fl-hero-win 1.3s var(--fl-ease) 0.1s both; }
  .fl-hero-attention { animation: fl-hero-rise 1.2s var(--fl-ease) 0.5s both; }
  .fl-hero-pdf { animation: fl-hero-pdf 1.3s var(--fl-ease) 0.7s both; }
  .fl-hero-kpi { animation: fl-hero-drop 1.2s var(--fl-ease) 0.9s both; }
  .fl-hero-scan { animation: fl-hero-scan 1.1s cubic-bezier(0.65, 0, 0.35, 1) 1.2s both; }
  .fl-hero-ring { animation: fl-hero-ring 0.6s var(--fl-ease) 2.2s both; }
  .fl-hero-ring::after { animation: fl-pulse 2s ease-out 2.8s infinite; }
  .fl-hero-chip { animation: fl-hero-chip 0.6s var(--fl-ease) 2.45s both; }
  .fl-hero-shine { animation: fl-hero-shine 1.6s ease-in-out 1s both; }
  .fl-hero-glow::before { animation: fl-drift 11s ease-in-out infinite alternate; }
  .fl-hero-glow::after { animation: fl-drift 14s ease-in-out -5s infinite alternate-reverse; }
  /* Then the cards keep drifting, each at its own pace. */
  .fl-hero-attention img { animation: fl-float 6s ease-in-out 2s infinite alternate; }
  .fl-hero-pdf img { animation: fl-float 7.5s ease-in-out 2.4s infinite alternate-reverse; }
  .fl-hero-kpi img { animation: fl-float 5s ease-in-out 2.2s infinite alternate; }
}
/* No opacity here: it would flatten the stage's depth while it ran. */
@keyframes fl-hero-swing {
  from { rotate: y calc(var(--side) * -30deg); scale: 0.86; }
}
@keyframes fl-hero-win {
  from { opacity: 0; translate: calc(var(--side) * 12cqw) 0; }
}
@keyframes fl-hero-rise {
  from { opacity: 0; translate: 0 14cqw; }
}
@keyframes fl-hero-pdf {
  from { opacity: 0; translate: 0 20cqw; rotate: calc(var(--side) * 12deg); }
}
@keyframes fl-hero-drop {
  from { opacity: 0; translate: 0 -10cqw; scale: 0.8; }
}
@keyframes fl-hero-scan {
  0% { opacity: 0; transform: none; }
  15% { opacity: 1; }
  80% { opacity: 1; transform: translateX(var(--to)); }
  100% { opacity: 0; transform: translateX(var(--to)); }
}
@keyframes fl-hero-ring {
  from { opacity: 0; scale: 1.8; }
}
@keyframes fl-hero-chip {
  from { opacity: 0; translate: var(--chip-x) 1cqw; }
}
@keyframes fl-hero-shine {
  0% { opacity: 1; transform: translateX(-100%); }
  100% { opacity: 1; transform: translateX(100%); }
}
@keyframes fl-drift {
  from { transform: translate(-4%, -3%) scale(1); }
  to { transform: translate(5%, 4%) scale(1.12); }
}
@keyframes fl-float {
  from { transform: translateY(0); }
  to { transform: translateY(-1.4cqw); }
}
@keyframes fl-pulse {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 0; transform: scale(1.7); }
}

/* The stage flattens as the page starts to scroll. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .fl-hero {
      animation: fl-flatten linear both;
      animation-timeline: scroll(root);
      animation-range: 0 75vh;
    }
  }
}
@keyframes fl-flatten {
  to { --fl-flat: 0.15; }
}

/* --- Reveals: each block rises once as it comes into view (motion.js adds .is-in) ---
   Cards in the same row follow one another (--i), and section headings arrive word by
   word (--w). Without motion.js, or with reduced motion, nothing is hidden. */
.fl-js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 1s var(--fl-ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.fl-js [data-reveal].is-in { opacity: 1; transform: none; }
.fl-js h2.fl-words { opacity: 1; transform: none; }
.fl-js h2.fl-words .fl-w {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(0.55em);
  transition: opacity 0.6s ease, transform 0.8s var(--fl-ease);
  transition-delay: calc(var(--w) * 60ms);
}
.fl-js h2.fl-words.is-in .fl-w { opacity: 1; transform: none; }
/* A pinned element may never cross the line that reveals it. */
.fl-js [class*='sticky'] [data-reveal],
.fl-js [class*='sticky'][data-reveal] { opacity: 1; transform: none; }
/* Comparison cards: once a card has risen, its rows follow one by one and the Flowlogs
   ticks draw themselves. */
.fl-js .fl-cmp-card .fl-cmp-row {
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.5s ease, translate 0.7s var(--fl-ease), background-color 0.2s ease;
  transition-delay: calc(var(--i, 0) * 90ms + 250ms + var(--r) * 70ms), calc(var(--i, 0) * 90ms + 250ms + var(--r) * 70ms), 0s;
}
.fl-js .fl-cmp-card.is-in .fl-cmp-row { opacity: 1; translate: none; }
.fl-js .fl-cmp-card .fl-cmp-yes path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.45s var(--fl-ease) calc(var(--i, 0) * 90ms + 550ms + var(--r) * 70ms);
}
.fl-js .fl-cmp-card.is-in .fl-cmp-yes path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .fl-cmp-main::before { animation: fl-orbit 7s linear infinite; }
}
@keyframes fl-orbit { to { --fl-angle: 560deg; } }

/* Cards light up under the pointer: a soft glow follows it across the card and along its
   border (motion.js sets --sx and --sy, and .is-lit while the pointer is over it). */
.fl-glow { position: relative; isolation: isolate; }
.fl-glow::before,
.fl-glow::after {
  content: '';
  position: absolute;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.fl-glow::before {
  inset: 0;
  z-index: -1;
  background: radial-gradient(26rem circle at var(--sx) var(--sy), rgba(12, 102, 228, 0.1), transparent 45%);
}
.fl-glow::after {
  inset: -1px;
  padding: 1.5px;
  background: radial-gradient(18rem circle at var(--sx) var(--sy), #388bff, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.fl-glow.is-lit::before,
.fl-glow.is-lit::after { opacity: 1; }
.fl-js .fl-glow {
  transition: opacity 0.8s ease, transform 1s var(--fl-ease), translate 0.35s var(--fl-ease);
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s;
}
.fl-js .fl-glow.is-lit { translate: 0 -3px; }
/* Comparison cards stay put, so their rows keep lining up with the labels. */
.fl-js .fl-cmp-card.fl-glow.is-lit { translate: none; }

/* --- Reading progress and header lift, tied to the page scroll -------------------- */
.fl-progress { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .fl-progress {
      display: block;
      position: fixed;
      inset: 0 0 auto 0;
      height: 3px;
      z-index: 70;
      pointer-events: none;
      background: var(--fl-blue);
      transform-origin: 0 50%;
      animation: fl-grow linear both;
      animation-timeline: scroll(root);
    }
    [dir='rtl'] .fl-progress { transform-origin: 100% 50%; }
    body > header {
      animation: fl-lift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 140px;
    }
  }
}
@keyframes fl-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes fl-lift {
  to { box-shadow: 0 12px 32px -20px rgba(9, 30, 66, 0.45); }
}

/* --- The tour: the flow report builds itself while the camera moves over it ---------
   The build lays every part of the capture at its place (--a and --b: when it arrives,
   as a share of the pinned scroll) and writes the camera path (@keyframes fl-cam). With
   reduced motion, or without scroll-driven animation, the screenshot and the captions
   show as a list instead. */
.fl-tour {
  position: relative;
  overflow: clip;
  padding-top: 7rem;
  color: #fff;
  background:
    radial-gradient(56rem 28rem at 50% 4rem, rgba(12, 102, 228, 0.28), transparent 70%),
    #0b1630;
}
.fl-tour-head {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.fl-tour-eyebrow {
  margin: 0 0 0.5rem;
  color: #85b8ff;
  font-size: 0.875rem;
  font-weight: 600;
}
.fl-tour-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.875rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.fl-tour-static {
  max-width: 72rem;
  margin: 3.5rem auto 0;
  padding: 0 1.5rem 7rem;
}
.fl-tour-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 40px 100px -30px rgba(12, 102, 228, 0.55);
}
.fl-tour-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.75rem 2rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.fl-tour-list h3 { margin: 0 0 0.35rem; color: #fff; font-size: 1rem; font-weight: 700; }
.fl-tour-list p { margin: 0; color: #b3bac5; font-size: 0.9375rem; line-height: 1.6; }
.fl-tour-live { display: none; }

@property --fl-n {
  syntax: '<integer>';
  inherits: true;
  initial-value: 0;
}
@property --fl-deg {
  syntax: '<angle>';
  inherits: false;
  initial-value: 360deg;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fl-tour-static { display: none; }
    .fl-tour-live {
      display: block;
      position: relative;
      height: 640vh;
      view-timeline: --fl-tour block;
    }
    .fl-cam {
      animation-duration: auto;
      animation-fill-mode: both;
      animation-timeline: --fl-tour;
      animation-range: contain 0% contain 100%;
    }
    .fl-tour-live [style*='--a'],
    .fl-chapters i::after {
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --fl-tour;
      animation-range: contain var(--a) contain var(--b);
    }
  }
}

.fl-tour-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 2.6vh, 1.75rem);
  padding: 4.75rem 1rem 1.25rem;
  background:
    radial-gradient(60rem 34rem at 50% 45%, rgba(12, 102, 228, 0.3), transparent 70%),
    radial-gradient(36rem 26rem at 85% 95%, rgba(101, 84, 192, 0.2), transparent 70%);
}
.fl-window {
  --win: min(1180px, 94vw, calc((100svh - 16rem) * 16 / 9));
  width: var(--win);
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 50px 140px -40px rgba(12, 102, 228, 0.7),
    0 30px 60px -30px rgba(0, 0, 0, 0.7);
  transform-origin: 50% 100%;
  animation: fl-window-in linear both;
  animation-timeline: --fl-tour;
  animation-range: entry 0% contain 0%;
}
/* Portrait screens get a taller window (the build switches the camera to match). */
@media (max-aspect-ratio: 1 / 1) {
  .fl-tour-pin { padding-top: 7rem; }
  .fl-window { --win: min(94vw, calc((100svh - 17rem) * 4 / 5)); }
}
@keyframes fl-window-in {
  from { opacity: 0.2; transform: perspective(1400px) rotateX(26deg) translateY(8%) scale(0.8); }
}
.fl-window-bar {
  display: flex;
  align-items: center;
  gap: calc(var(--win) * 0.006);
  height: calc(var(--win) * 0.026);
  padding-inline: calc(var(--win) * 0.012);
  background: #f1f2f4;
  border-bottom: 1px solid #dcdfe4;
  direction: ltr;
}
.fl-window-bar i {
  width: calc(var(--win) * 0.008);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #c1c7d0;
}
.fl-view {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  container-type: inline-size;
  background: #f7f8f9;
  direction: ltr;
}
.fl-cam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100cqw;
  transform-origin: 0 0;
  animation-name: fl-cam;
  will-change: transform;
}
.fl-shell { display: block; width: 100%; height: auto; }
.fl-cam > :not(.fl-shell) { position: absolute; display: block; }
.fl-part { background-image: url('img/tour/full.webp'); background-repeat: no-repeat; }
/* The capture loads only once the tour is near (motion.js). */
.fl-tour-live:not(.is-near) .fl-part { background-image: none; }

/* Loading placeholders, where the data has yet to arrive. */
.fl-sk {
  overflow: hidden;
  border-radius: 0.6cqw;
  background: #eceff3;
  animation-name: fl-out;
}
.fl-sk::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-100%);
  animation: fl-shimmer 1.6s ease-in-out infinite;
}
@keyframes fl-shimmer { to { transform: translateX(100%); } }
@keyframes fl-out { to { opacity: 0; } }

.fl-headline { animation-name: fl-wipe; }
@keyframes fl-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.fl-kpi { animation-name: fl-pop; }
@keyframes fl-pop {
  from { opacity: 0; transform: translateY(3cqw) scale(0.92); }
}
.fl-num {
  font-family: 'GhroobBB', sans-serif;
  white-space: nowrap;
  animation-name: fl-count;
}
.fl-num::before { counter-reset: fl-n var(--fl-n); content: counter(fl-n) attr(data-suffix); }
@keyframes fl-count {
  0% { opacity: 0; --fl-n: 0; }
  15% { opacity: 1; }
  100% { opacity: 1; --fl-n: var(--to); }
}
.fl-row { animation-name: fl-slide; }
@keyframes fl-slide {
  from { opacity: 0; transform: translateX(-1.5cqw); }
}
/* Needs attention: everything but the flagged person dims, and she is outlined. */
.fl-spot { inset: 0; pointer-events: none; animation-name: fl-spot; }
.fl-spot i { position: absolute; background: rgba(9, 30, 66, 0.58); }
.fl-spot b {
  position: absolute;
  box-sizing: border-box;
  border: 0.22cqw solid var(--fl-red);
  border-radius: 0.5cqw;
  box-shadow: 0 0 2.4cqw rgba(226, 72, 61, 0.55);
}
@keyframes fl-spot {
  0% { opacity: 0; }
  25%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
.fl-bar { transform-origin: 50% 100%; animation-name: fl-rise; }
@keyframes fl-rise {
  from { transform: scaleY(0); }
}
/* The ring sweeps round; the total in its middle stays whole. */
.fl-donut {
  -webkit-mask-image: radial-gradient(closest-side, #000 64%, transparent 64.5%), conic-gradient(#000 var(--fl-deg), transparent 0);
  mask-image: radial-gradient(closest-side, #000 64%, transparent 64.5%), conic-gradient(#000 var(--fl-deg), transparent 0);
  animation-name: fl-donut;
}
@keyframes fl-donut {
  from { --fl-deg: 0deg; transform: scale(0.88); }
  to { --fl-deg: 360deg; transform: none; }
}
.fl-legend { animation-name: fl-slide-in; }
@keyframes fl-slide-in {
  from { opacity: 0; transform: translateX(3cqw); }
}
.fl-tr { animation-name: fl-row-in; }
@keyframes fl-row-in {
  from { opacity: 0; transform: translateY(1.6cqw); }
}
/* The finale: Export pulses under the cursor and the PDF flies out of it. */
.fl-ping {
  box-sizing: border-box;
  border: 0.35cqw solid var(--fl-blue);
  border-radius: 0.6cqw;
  opacity: 0;
  animation-name: fl-ping;
}
@keyframes fl-ping {
  0%, 30% { opacity: 0; transform: scale(1); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.7, 2.2); }
}
.fl-pdf {
  position: absolute;
  height: auto;
  border-radius: 0.4cqw;
  box-shadow: 0 3cqw 6cqw -2cqw rgba(9, 30, 66, 0.55), 0 0 0 1px rgba(9, 30, 66, 0.08);
  animation-name: fl-pdf;
}
@keyframes fl-pdf {
  0% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.05); animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
  15% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-2.5deg); }
}
.fl-cursor {
  position: absolute;
  width: 2.4cqw;
  margin: -0.3cqw 0 0 -0.5cqw;
  overflow: visible;
  transform-origin: 21% 12%;
  filter: drop-shadow(0 0.3cqw 0.4cqw rgba(9, 30, 66, 0.35));
  animation-name: fl-cursor;
}
@keyframes fl-cursor {
  0% { opacity: 0; transform: translate(var(--dx), var(--dy)); animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1); }
  10% { opacity: 1; }
  42% { transform: none; }
  50% { transform: scale(0.78); }
  58% { transform: none; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: none; }
}

/* Captions: one per camera stop, crossfading in the same place. */
.fl-caps {
  display: grid;
  width: min(40rem, 92vw);
  text-align: center;
}
.fl-cap { grid-area: 1 / 1; animation-name: fl-cap; }
.fl-cap-first { animation-name: fl-cap-first; }
.fl-cap-last { animation-name: fl-cap-last; }
.fl-cap h3 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.fl-cap p {
  margin: 0;
  color: #b3bac5;
  font-size: clamp(0.9375rem, 1.25vw, 1.0625rem);
  line-height: 1.55;
}
@keyframes fl-cap {
  0% { opacity: 0; transform: translateY(14px); }
  15%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-14px); }
}
@keyframes fl-cap-first {
  0%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-14px); }
}
@keyframes fl-cap-last {
  0% { opacity: 0; transform: translateY(14px); }
  15%, 100% { opacity: 1; transform: none; }
}
.fl-chapters {
  display: flex;
  gap: 6px;
  width: min(20rem, 70vw);
}
.fl-chapters i {
  position: relative;
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}
.fl-chapters i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #579dff;
  transform-origin: 0 50%;
  animation-name: fl-grow;
}
[dir='rtl'] .fl-chapters i::after { transform-origin: 100% 50%; }

/* --- Screenshots lean towards the pointer (motion.js, mouse only) ---------------------- */
.fl-tilt {
  transform-style: preserve-3d;
  transition: transform 0.6s var(--fl-ease);
  will-change: transform;
}
.fl-tilt.is-tilting { transition-duration: 0.12s; }

/* --- Moving between pages and languages crossfades, the header stays put --------------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  body > header { view-transition-name: fl-header; }
  ::view-transition-old(root) { animation: 0.25s ease both fl-page-out; }
  ::view-transition-new(root) { animation: 0.35s var(--fl-ease) both fl-page-in; }
}
@keyframes fl-page-out { to { opacity: 0; } }
@keyframes fl-page-in { from { opacity: 0; transform: translateY(12px); } }

/* --- FAQ answers open and close smoothly instead of jumping ---------------------------- */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    :root { interpolate-size: allow-keywords; }
    details:not(.fl-lang)::details-content {
      height: 0;
      overflow: clip;
      transition: height 0.4s var(--fl-ease), content-visibility 0.4s allow-discrete;
    }
    details:not(.fl-lang)[open]::details-content { height: auto; }
  }
}
