/* Tarot page fold flow; normal layout is unchanged when the flow is bypassed. */
.is-tarot-flow .tarot-landing-hero {
  --flow-header: 96px;
  position: relative;
  min-height: max(560px, calc(100svh - var(--flow-header)));
  isolation: isolate;
  overflow: visible;
}

.is-tarot-flow .tarot-landing-hero__inner {
  position: relative;
  z-index: 2;
}

.is-tarot-flow .tarot-landing-hero__line {
  display: none;
}

.is-tarot-flow .tarot-landing-hero__meta {
  border-bottom: 0;
}

.is-tarot-flow .tarot-flow-scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.is-tarot-flow .tarot-flow-cards,
.is-tarot-flow .tarot-flow-ink,
.is-tarot-flow .tarot-flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.is-tarot-flow .tarot-flow-cards {
  z-index: 0;
  opacity: 0;
}

.is-tarot-flow [data-flow-pigment] {
  display: none;
}

.is-tarot-flow .tarot-flow-ink {
  z-index: 1;
  display: block;
}

.is-tarot-flow .tarot-flow-svg {
  z-index: 2;
}

.is-tarot-flow .tarot-flow-char {
  display: inline-block;
  white-space: pre;
}

.is-tarot-flow .tarot-flow-card {
  position: absolute;
  left: var(--flow-card-x);
  top: var(--flow-card-y);
  width: clamp(166px, 19vw, 268px);
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  opacity: 1;
  transform: translate(-50%, -50%) rotate(var(--flow-card-angle));
  transform-origin: center;
  pointer-events: none;
  user-select: none;
}

.is-tarot-flow .tarot-flow-card--high-priestess {
  --flow-card-x: 10%;
  --flow-card-y: 17%;
  --flow-card-angle: -16deg;
}

.is-tarot-flow .tarot-flow-card--star {
  --flow-card-x: 32%;
  --flow-card-y: 12%;
  --flow-card-angle: 12deg;
}

.is-tarot-flow .tarot-flow-card--moon {
  --flow-card-x: 62%;
  --flow-card-y: 18%;
  --flow-card-angle: -12deg;
}

.is-tarot-flow .tarot-flow-card--fool {
  --flow-card-x: 90%;
  --flow-card-y: 15%;
  --flow-card-angle: 17deg;
}

.is-tarot-flow .tarot-flow-card--empress {
  --flow-card-x: 8%;
  --flow-card-y: 43%;
  --flow-card-angle: 8deg;
}

.is-tarot-flow .tarot-flow-card--world {
  --flow-card-x: 93%;
  --flow-card-y: 43%;
  --flow-card-angle: -14deg;
}

.is-tarot-flow .tarot-flow-card--sun {
  --flow-card-x: 11%;
  --flow-card-y: 66%;
  --flow-card-angle: -13deg;
}

.is-tarot-flow .tarot-flow-card--magician {
  --flow-card-x: 90%;
  --flow-card-y: 67%;
  --flow-card-angle: 12deg;
}

.is-tarot-flow .tarot-flow-card--death {
  --flow-card-x: 9%;
  --flow-card-y: 91%;
  --flow-card-angle: -18deg;
}

.is-tarot-flow .tarot-flow-card--tower {
  --flow-card-x: 91%;
  --flow-card-y: 91%;
  --flow-card-angle: 15deg;
}

.is-tarot-flow .tarot-flow-card--lovers {
  --flow-card-x: 47%;
  --flow-card-y: 33%;
  --flow-card-angle: -17deg;
}

.is-tarot-flow .tarot-flow-card--hermit {
  --flow-card-x: 76%;
  --flow-card-y: 9%;
  --flow-card-angle: 9deg;
}

.is-tarot-flow .tarot-flow-card--chariot {
  --flow-card-x: 29%;
  --flow-card-y: 50%;
  --flow-card-angle: 16deg;
}

.is-tarot-flow .tarot-flow-card--judgement {
  --flow-card-x: 69%;
  --flow-card-y: 43%;
  --flow-card-angle: -12deg;
}

.is-tarot-flow .tarot-flow-card--strength {
  --flow-card-x: 24%;
  --flow-card-y: 77%;
  --flow-card-angle: -10deg;
}

.is-tarot-flow .tarot-flow-card--temperance {
  --flow-card-x: 66%;
  --flow-card-y: 68%;
  --flow-card-angle: 18deg;
}

.is-tarot-flow .tarot-flow-card--wheel {
  --flow-card-x: 36%;
  --flow-card-y: 92%;
  --flow-card-angle: -15deg;
}

.is-tarot-flow .tarot-flow-card--hierophant {
  --flow-card-x: 76%;
  --flow-card-y: 87%;
  --flow-card-angle: 11deg;
}

.is-tarot-flow .tarot-flow-card--emperor {
  --flow-card-x: 48%;
  --flow-card-y: 60%;
  --flow-card-angle: 11deg;
}

.is-tarot-flow .tarot-flow-card--hanged-man {
  --flow-card-x: 53%;
  --flow-card-y: 87%;
  --flow-card-angle: -12deg;
}

.is-tarot-flow .tarot-flow-card--justice {
  --flow-card-x: 22%;
  --flow-card-y: 29%;
  --flow-card-angle: -9deg;
}

.is-tarot-flow .tarot-flow-card--devil {
  --flow-card-x: 79%;
  --flow-card-y: 59%;
  --flow-card-angle: -18deg;
}

@media (max-width: 768px) {
  .is-tarot-flow .tarot-landing-hero {
    --flow-header: 200px;
    min-height: max(560px, calc(100svh - var(--flow-header)));
  }

  .is-tarot-flow .tarot-landing-worldview__axis {
    display: block;
    position: absolute;
    top: -22px;
    left: 50%;
    width: 7px;
    height: 7px;
    min-height: 0;
    transform: translateX(-50%);
  }

  .is-tarot-flow .tarot-landing-worldview__axis-line {
    display: none;
  }

  .is-tarot-flow .tarot-landing-worldview__axis-point {
    position: static;
    display: block;
    width: 7px;
    height: 7px;
    margin: 0;
  }

  .is-tarot-flow .tarot-flow-card {
    width: clamp(92px, 27vw, 116px);
  }

  .is-tarot-flow .tarot-flow-card--high-priestess {
    --flow-card-x: 10%;
    --flow-card-y: 15%;
  }

  .is-tarot-flow .tarot-flow-card--star {
    --flow-card-x: 37%;
    --flow-card-y: 10%;
  }

  .is-tarot-flow .tarot-flow-card--moon {
    --flow-card-x: 63%;
    --flow-card-y: 19%;
  }

  .is-tarot-flow .tarot-flow-card--fool {
    --flow-card-x: 90%;
    --flow-card-y: 14%;
  }

  .is-tarot-flow .tarot-flow-card--empress {
    --flow-card-x: 8%;
    --flow-card-y: 39%;
  }

  .is-tarot-flow .tarot-flow-card--world {
    --flow-card-x: 94%;
    --flow-card-y: 40%;
  }

  .is-tarot-flow .tarot-flow-card--sun {
    --flow-card-x: 10%;
    --flow-card-y: 63%;
  }

  .is-tarot-flow .tarot-flow-card--magician {
    --flow-card-x: 91%;
    --flow-card-y: 64%;
  }

  .is-tarot-flow .tarot-flow-card--death {
    --flow-card-x: 9%;
    --flow-card-y: 88%;
  }

  .is-tarot-flow .tarot-flow-card--tower {
    --flow-card-x: 93%;
    --flow-card-y: 88%;
  }

  .is-tarot-flow .tarot-flow-card--lovers {
    --flow-card-x: 47%;
    --flow-card-y: 33%;
  }

  .is-tarot-flow .tarot-flow-card--hermit {
    --flow-card-x: 77%;
    --flow-card-y: 8%;
  }

  .is-tarot-flow .tarot-flow-card--chariot {
    --flow-card-x: 29%;
    --flow-card-y: 49%;
  }

  .is-tarot-flow .tarot-flow-card--judgement {
    --flow-card-x: 69%;
    --flow-card-y: 44%;
  }

  .is-tarot-flow .tarot-flow-card--strength {
    --flow-card-x: 27%;
    --flow-card-y: 72%;
  }

  .is-tarot-flow .tarot-flow-card--temperance {
    --flow-card-x: 65%;
    --flow-card-y: 69%;
  }

  .is-tarot-flow .tarot-flow-card--wheel {
    --flow-card-x: 35%;
    --flow-card-y: 91%;
  }

  .is-tarot-flow .tarot-flow-card--hierophant {
    --flow-card-x: 77%;
    --flow-card-y: 88%;
  }

  .is-tarot-flow .tarot-flow-card--emperor {
    --flow-card-x: 47%;
    --flow-card-y: 58%;
  }

  .is-tarot-flow .tarot-flow-card--hanged-man {
    --flow-card-x: 55%;
    --flow-card-y: 87%;
  }

  .is-tarot-flow .tarot-flow-card--justice {
    --flow-card-x: 21%;
    --flow-card-y: 28%;
  }

  .is-tarot-flow .tarot-flow-card--devil {
    --flow-card-x: 80%;
    --flow-card-y: 57%;
  }
}

/* The rose drop and every stroke live in ONE fixed SVG (tarot-flow.js, Line). The old
   axis point stays in the DOM as a hook only. */
.is-tarot-flow.is-flow-drop .tarot-landing-worldview__axis-point { display: none; }

.tarot-line-svg {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.is-tarot-flow.is-flow-drop .tarot-landing-worldview__axis-line,
.is-tarot-flow.is-flow-drop .tarot-landing-hero__line {
  visibility: hidden;
}

/* The services axis is an SVG ink line owned by the sequence, behind the copy. */
.is-tarot-flow.is-flow-drop .tarot-landing-worldview__grid {
  isolation: isolate;
}

.tarot-seq-svg {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .is-tarot-flow .tarot-flow-scene {
    display: none;
  }
}

/* The bundle card lets the watercolour pool show through behind its text. */
.is-tarot-flow.is-flow-drop .tarot-landing-worldview__entry--bundle { background: transparent; }

/* Mobile: room above the bundle so the line can curve in to the pool entry without touching the entry above. */
@media (max-width: 768px) {
  .is-tarot-flow.is-flow-drop .tarot-landing-worldview__entry--bundle { margin-top: 104px; }
}
