/* Motion direction: woven light, responsive depth, and an expressive local boundary. */
.hero-scene {
  overflow: hidden;
}
.hero-scene::after {
  background:
    linear-gradient(90deg, #fff, transparent 19%, transparent 94%, #fff),
    linear-gradient(0deg, #fff, transparent 14%, transparent 91%, #fff);
}
/* The scene stays hidden until its first frame is drawn, then fades in instead of popping in. */
.hero:not([data-scene="ready"]) :is(.hero-scene, .hero-activate) {
  opacity: 0;
}
body[data-motion="on"]
  .hero[data-scene="ready"]
  :is(.hero-scene, .hero-activate) {
  animation: scene-arrive 1.2s ease backwards;
}
@keyframes scene-arrive {
  from {
    opacity: 0;
  }
}
.orb-caption {
  display: none;
}
.note-thought {
  top: 22%;
  left: 69%;
}
.note-private {
  top: 67%;
  left: 26%;
}
.orbit-note {
  animation: orbit-label 5s ease-in-out infinite;
  box-shadow: 0 8px 28px #5e71aa17;
}
.note-thought {
  animation-delay: -2.5s;
}
@keyframes orbit-label {
  50% {
    transform: translate3d(7px, -19px, 0);
  }
}
.hero-activate {
  position: absolute;
  z-index: 4;
  right: 15%;
  bottom: 85px;
  display: flex;
  align-items: center;
  gap: 10px;
  /* A gradient rim and play disc set the control apart from the static orbit notes. */
  border: 1px solid transparent;
  border-radius: 100px;
  padding: 6px 6px 6px 16px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(115deg, #20bbc7, #7f8fe8 52%, #da7baf) border-box;
  box-shadow: 0 8px 30px #7f8fe833;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1d4d87;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s;
}
.hero-activate .mini-star {
  color: #7f8fe8;
  font-size: 1.25rem;
}
.burst-go {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #20bbc7, #7f8fe8 55%, #b16ea8);
  color: #fff;
  transition: transform 0.35s var(--ease);
}
.burst-go .icon {
  width: 11px;
  height: 11px;
  margin-left: 2px;
  fill: currentColor;
  stroke: none;
}
.hero-activate:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 38px #7f8fe855;
}
.hero-activate:hover .burst-go {
  transform: scale(1.1);
}
/* Until the first run, a soft ring breathes outward to invite the click. */
.hero-activate::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid #7f8fe8;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}
body[data-motion="on"] .hero:not([data-client-phase]) .hero-activate::after {
  animation: burst-invite 2.6s var(--ease) infinite;
}
@keyframes burst-invite {
  0% {
    opacity: 0.75;
    transform: none;
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.08, 1.4);
  }
}
.hero-activate:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
.hero[data-client-phase="crossing"] .hero-activate {
  color: #1d4d87;
  border-color: #20bbc7;
  box-shadow:
    0 0 0 6px #20bbc710,
    0 10px 40px #7f8fe82a;
}
.hero[data-burst-active="true"] .orbit-note {
  animation: burst-label 2.6s var(--ease) both;
}
@keyframes burst-label {
  0% {
    transform: scale(1);
  }
  25% {
    transform: translateY(-18px) scale(1.09);
  }
  100% {
    transform: none;
  }
}
.kinetic-title {
  perspective: 700px;
}
.kinetic-title span {
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: none;
}
.kinetic-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.kinetic-char {
  display: inline-block;
  transform-origin: 50% 100%;
  animation: letter-arrive 1.1s var(--ease) both !important;
  animation-delay: calc(0.09s + var(--glyph) * 0.05s) !important;
}
.kinetic-line-accent .kinetic-char {
  background: linear-gradient(115deg, #1d4d87, #7f8fe8 52%, #b16ea8);
  background-size: 600% 100%;
  background-position: calc(var(--glyph) * 20%) 50%;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Tight tracking pushes each glyph's last stroke past its box, and gradient text only paints inside the box. */
  padding-right: 0.1em;
  margin-right: -0.1em;
  animation-delay: calc(0.23s + var(--glyph) * 0.05s) !important;
}
/* Only transform and opacity animate, so the compositor runs the entrance without per-frame blur passes. */
@keyframes letter-arrive {
  from {
    opacity: 0;
    transform: translateY(115%) rotateX(-65deg) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
body[data-motion="on"] .hero-copy {
  transform: translate3d(0, calc(var(--hero-scroll, 0) * 60px), 0);
}
body[data-motion="on"] .hero-scene {
  transform: translate3d(0, calc(var(--hero-scroll, 0) * 80px), 0);
}
.hero-actions .button-primary {
  position: relative;
  overflow: hidden;
}
.hero-actions .button-primary::after {
  content: "";
  position: absolute;
  inset: -100% -70%;
  background: linear-gradient(
    105deg,
    transparent 42%,
    #ffffff42 49%,
    transparent 57%
  );
  transform: translateX(-65%);
  animation: button-light 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes button-light {
  0%,
  55% {
    transform: translateX(-65%);
  }
  78%,
  100% {
    transform: translateX(65%);
  }
}
[data-reveal-ready] {
  transform: translateY(65px) rotateX(9deg);
  transform-origin: 50% 90%;
}
[data-reveal-ready].is-revealed {
  transform: none;
  transition:
    opacity 0.95s var(--ease),
    transform 1.15s var(--ease);
}
.manifesto [data-reveal-ready].is-revealed {
  animation: manifesto-arrive 1.1s var(--ease) both;
}
@keyframes manifesto-arrive {
  from {
    opacity: 0;
    transform: translateY(60px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
/* Story motion follows the shared, pausable page clock. */
body[data-motion="on"] .privacy-story.is-revealed,
.privacy-story[data-privacy-step] .message-scene {
  transform: none;
}
.privacy-story {
  --guard: 0;
}
.message-scene {
  border: 1px solid #e1e7f2;
  background: linear-gradient(140deg, #fff, #f8faff);
  box-shadow: 0 10px 28px #243a6509;
  transition:
    border-color 0.5s,
    box-shadow 0.5s;
}
.privacy-story[data-privacy-step="1"] .message-scene {
  border-color: #acbee7;
  box-shadow: 0 10px 32px #718ad518;
}
.privacy-story[data-privacy-step="2"] .message-scene,
.privacy-story[data-privacy-step="3"] .message-scene {
  background: #f8fbff;
}
.privacy-story[data-privacy-step="3"] .message-scene {
  border-color: #b4dde2;
}
/* The protected task leaves in the first half of --reply; the AI's reply arrives in the second. */
.privacy-story .message-roles,
.privacy-story .message-pages {
  --reply: 0;
}
.privacy-story .message-role:first-child,
.privacy-story .private-message:first-child {
  opacity: clamp(0, 1 - var(--reply) * 2, 1);
  transform: translateY(calc(var(--reply) * -12px));
}
.privacy-story .message-role + .message-role,
.privacy-story .reply-message {
  opacity: clamp(0, var(--reply) * 2 - 1, 1);
  transform: translateY(calc((1 - var(--reply)) * 12px));
}
.privacy-story .message-heading {
  position: relative;
  z-index: 2;
}
.privacy-story .message-stamp {
  font-size: 0.625rem;
  letter-spacing: 0.08em;
}
.privacy-story .secret-token {
  --found: 0;
  --redact: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 5px;
}
.privacy-story[data-privacy-step] .secret-token {
  background: transparent;
}
.privacy-story .secret-token::after {
  content: "";
  position: absolute;
  inset: 1px 0;
  border: 1px solid #99aecf;
  border-radius: 4px;
  opacity: var(--found);
  transform: scale(calc(1.08 - var(--found) * 0.08));
  pointer-events: none;
}
.privacy-story .secret-token > span {
  transition: none;
}
.privacy-story[data-privacy-step] .original-value {
  opacity: 1;
  filter: none;
  transform: none;
  background: #cbbda41c;
  color: #876442;
  text-decoration: none;
  padding: 0 6px;
  clip-path: inset(0 0 0 calc(var(--redact) * 100%));
}
.privacy-story[data-privacy-step] .protected-value {
  opacity: 1;
  filter: none;
  transform: none;
  padding: 0 6px;
  justify-self: stretch;
  align-self: stretch;
  display: grid;
  place-items: center;
  background: #e8f1fb;
  font-size: 0.84em;
  letter-spacing: 0.02em;
  clip-path: inset(0 calc((1 - var(--redact)) * 100%) 0 0);
}
.token-shutter {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  background: linear-gradient(90deg, transparent, #9cc9e657);
  border-right: 2px solid #65aabc;
  left: calc(var(--redact) * 100%);
  transform: translateX(-100%);
  opacity: var(--redact-flash, 0);
  pointer-events: none;
}
/* Back on the device, each stand-in in the reply turns into the real detail again. */
.privacy-story .reply-message .secret-token {
  --found: 1;
  --restore: 0;
}
.privacy-story .reply-message .secret-token::after {
  border-color: color-mix(
    in srgb,
    #8ccfd5 calc(var(--restore) * 100%),
    #99aecf
  );
}
.privacy-story[data-privacy-step] .reply-message .original-value {
  background: #20bbc714;
  color: #16707a;
  text-align: center;
  clip-path: inset(0 calc((1 - var(--restore)) * 100%) 0 0);
}
.privacy-story[data-privacy-step] .reply-message .protected-value {
  clip-path: inset(0 0 0 calc(var(--restore) * 100%));
}
.reply-message .token-shutter {
  left: calc(var(--restore) * 100%);
  background: linear-gradient(90deg, transparent, #20bbc740);
  border-right-color: #20bbc7;
  opacity: var(--restore-flash, 0);
}
.privacy-story[data-privacy-step] .scan-beam {
  top: 0;
  bottom: 0;
  right: auto;
  left: calc(var(--scan-position, 0) * 100%);
  height: 100%;
  width: 48px;
  transform: translateX(-100%);
  border: 0;
  border-right: 1px solid #7cacc5;
  background: linear-gradient(90deg, transparent, #7f8fe814);
  box-shadow: 10px 0 30px #7f8fe810;
  opacity: var(--scan-opacity, 0);
  animation: none;
}
.message-protection {
  position: relative;
  z-index: 2;
}
.message-protection .icon {
  color: #2456a0;
  transform: scale(calc(1 + var(--guard) * 0.12));
}
.privacy-outcome {
  margin: 22px 0;
}
.privacy-story[data-privacy-step="1"] .outcome-symbol,
.privacy-story[data-privacy-step="2"] .outcome-symbol {
  background: #e8f1fb;
}
.privacy-story[data-privacy-step="3"] .outcome-symbol {
  animation: receipt-seal 0.5s var(--ease) both;
}
@keyframes receipt-seal {
  from {
    transform: scale(0.7);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.journey-card {
  --route-color: #738bd2;
}
.journey-topline {
  background: #fafbfe;
}
.journey-top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.journey-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: #536782;
  font-size: 0.75rem;
}
.journey-replay svg {
  width: 14px;
  height: 14px;
  transition: transform 0.4s;
}
.journey-replay:hover svg {
  transform: rotate(-70deg);
}
.journey-track {
  /* The packet moves in cqw so its route is expressed as a transform, not layout. */
  container-type: inline-size;
  min-height: 154px;
  margin: 36px 0 14px;
}
.journey-stop {
  gap: 0;
  transition:
    opacity 0.4s,
    color 0.4s;
}
.journey-stop > span:last-child {
  order: -1;
  line-height: 20px;
  margin-bottom: 14px;
}
.journey-stop .stop-dot {
  width: 44px;
  height: 44px;
  position: relative;
}
.journey-stop .stop-dot .icon {
  width: 19px;
  height: 19px;
}
.journey-line {
  top: 55px;
  height: 2px;
}
.journey-line > span {
  background: linear-gradient(90deg, #42b5c4, #7f8fe8);
  box-shadow: none;
  transition: none;
}
.journey-line > span::after {
  content: none;
}
.journey-packet {
  position: absolute;
  /* Keep the traveling dot and its trail behind the opaque node discs. */
  z-index: 0;
  top: 55px;
  left: 12.5%;
  width: 13px;
  height: 9px;
  border: 2px solid white;
  border-radius: 8px;
  background: #5c87c2;
  box-shadow:
    0 0 0 1px #88a9d0,
    0 0 15px #7f8fe849;
  transform: translate(
      calc(75cqw * var(--packet-x, 0)),
      calc(var(--packet-y, 0) * 72px)
    )
    translate(-50%, -50%) rotate(var(--packet-angle, 0rad));
  opacity: var(--packet-opacity, 0);
  pointer-events: none;
}
.journey-packet::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: 36px;
  height: 5px;
  background: linear-gradient(90deg, transparent, #a8cde180);
  border-radius: 8px;
}
.journey-detour {
  position: absolute;
  left: 12.5%;
  top: 55px;
  width: 75%;
  height: 72px;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.journey-detour path {
  fill: none;
  stroke: #dbe2f1;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.journey-detour .detour-active {
  stroke: #8594d7;
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--branch-progress, 0));
}
.journey-card[data-scenario="retry"] .journey-detour {
  opacity: 1;
}
.route-note {
  position: absolute;
  top: 120px;
  font-size: 0.6875rem;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 5px);
  transition:
    opacity 0.35s,
    transform 0.35s;
}
.route-note-fallback {
  left: 72%;
  color: #6579b6;
}
.route-note-blocked {
  left: 37.5%;
  color: #2456a0;
}
.journey-card[data-route-state="rerouting"] .route-note-fallback,
.journey-card[data-scenario="retry"][data-route-state="done"]
  .route-note-fallback,
.journey-card[data-route-state="blocked"] .route-note-blocked {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* A single node receives the blocked request; its outline stays circular. */
.journey-card[data-route-state="blocked"] [data-stop="1"] .stop-dot {
  animation: none;
  background: #1d4d87;
  border-color: #1d4d87;
  color: #fff;
  transform: scale(calc(1.04 + var(--block-pulse, 0) * 0.045));
  box-shadow: 0 0 0 6px #e8f1fb;
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s;
}
.journey-card[data-route-state="blocked"] [data-stop="1"] .stop-dot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid #7f8fe8;
  border-radius: 50%;
  pointer-events: none;
  opacity: var(--block-wave-opacity, 0);
  transform: scale(var(--block-wave-scale, 1));
}
.journey-card[data-route-state="blocked"] .route-note-blocked {
  top: 96px;
  opacity: var(--block-label, 1);
  transform: translate(-50%, calc((1 - var(--block-label, 1)) * 5px));
  transition: none;
}
.journey-stop.is-current .stop-dot {
  animation: stop-receive 0.7s var(--ease) both;
}
@keyframes stop-receive {
  0% {
    box-shadow: 0 0 0 1px #8b9be95c;
  }
  55% {
    box-shadow: 0 0 0 12px #8b9be90d;
    transform: scale(1.09);
  }
  100% {
    box-shadow: 0 0 0 6px #8b9be90b;
    transform: scale(1.04);
  }
}
.journey-stop.is-skipped {
  opacity: 0.6;
}
.journey-stop.is-skipped .stop-dot {
  border-style: dashed;
  background: #fafbfe;
  box-shadow: none;
}
.journey-card[data-route-state="busy"] [data-stop="2"] .stop-dot {
  border-color: #c2a483;
  color: #a37a50;
  background: #fcf7ee;
}
.journey-card[data-route-state="busy"] [data-stop="2"] .stop-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid transparent;
  border-top-color: #bba284;
  border-radius: 50%;
  animation: busy-orbit 1.2s linear infinite;
}
@keyframes busy-orbit {
  to {
    transform: rotate(360deg);
  }
}
.journey-card[data-scenario="blocked"] .journey-line {
  background:
    linear-gradient(90deg, #e5e7f0 33.33%, transparent 33.33%),
    repeating-linear-gradient(90deg, #e5e7f0 0 4px, transparent 4px 9px);
}
.journey-card[data-scenario="blocked"] .journey-final-mark {
  color: #3b699b;
}
.journey-card[data-journey-phase="3"] .journey-final-mark .icon {
  animation: receipt-seal 0.55s var(--ease) both;
}
.journey-card[data-journey-phase="3"] .journey-insights strong {
  animation: metric-settle 0.6s var(--ease) both;
}
.journey-insights strong {
  font-variant-numeric: tabular-nums;
}
.journey-insights > div:nth-child(2) strong {
  animation-delay: 0.08s;
}
.journey-insights > div:nth-child(3) strong {
  animation-delay: 0.16s;
}
@keyframes metric-settle {
  from {
    opacity: 0.25;
    transform: translateY(7px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.privacy-story[data-in-view="false"] *,
.journey-card[data-in-view="false"] * {
  animation-play-state: paused !important;
}
body[data-motion="off"] .privacy-story *,
body[data-motion="off"] .journey-card * {
  transition: none !important;
}
@media (max-width: 600px) {
  .journey-top-actions {
    gap: 10px;
  }
  .journey-top-actions .demo-label {
    display: none;
  }
  .journey-track {
    min-height: 144px;
    margin: 30px 0 8px;
  }
  .journey-stop {
    font-size: 0.6875rem;
  }
  .journey-stop > span:last-child {
    line-height: 20px;
    margin-bottom: 14px;
    white-space: nowrap;
  }
  .journey-stop .stop-dot {
    width: 36px;
    height: 36px;
    margin-top: 4px;
  }
  .journey-stop .stop-dot .icon {
    width: 17px;
    height: 17px;
  }
  .route-note {
    font-size: 0.625rem;
  }
  .journey-insights {
    gap: 12px;
  }
}

body[data-motion="off"] .kinetic-char {
  opacity: 1;
  transform: none;
  animation: none !important;
}
body[data-motion="off"] .hero-copy,
body[data-motion="off"] .hero-scene,
body[data-motion="off"] .privacy-story {
  transform: none !important;
}
body[data-motion="off"] .shield-flare,
body[data-motion="off"] .mask-fragment {
  display: none;
}
@media (max-width: 1150px) {
  .hero-activate {
    right: 9%;
    bottom: 90px;
  }
}
@media (max-width: 900px) {
  .note-thought {
    left: 65%;
    top: 22%;
  }
  .note-private {
    left: 41%;
    top: 69%;
  }
  .hero-activate {
    right: 8%;
    bottom: 87px;
    font-size: 0.75rem;
  }
}
@media (max-width: 600px) {
  .hero-scene {
    inset: 355px -27% 10px -27%;
  }
  .note-thought {
    left: 56%;
    top: 23%;
  }
  .note-private {
    left: 23%;
    top: 63%;
  }
  .hero-activate {
    left: 50%;
    right: auto;
    bottom: 76px;
    transform: translateX(-50%);
    padding: 5px 5px 5px 13px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .hero-activate:hover {
    transform: translate(-50%, -3px);
  }
  .hero-activate:disabled {
    transform: translateX(-50%);
  }
  .hero,
  .hero-inner {
    min-height: 900px;
  }
  body[data-motion="on"] .hero-copy {
    transform: none;
  }
  body[data-motion="on"] .hero-scene {
    transform: translateY(calc(var(--hero-scroll, 0) * 30px));
  }
  .shield-flare {
    right: 14px;
    top: 12px;
    width: 38px;
    height: 38px;
  }
  .shield-flare .icon {
    width: 20px;
    height: 20px;
  }
}

.client-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.hero[data-client-phase="crossing"] .orbit-note {
  opacity: 0;
  transition: opacity 0.25s;
}

body[data-motion="off"] .privacy-story .outcome-symbol,
body[data-motion="off"] .journey-card .journey-insights strong,
body[data-motion="off"] .journey-card .journey-final-mark .icon {
  animation: none !important;
  transform: none;
  filter: none;
  opacity: 1;
}
