/* ============================================================
   ARIA guide  -  the mascot who hands a visitor to the right tool.

   People kept saying they read the four descriptions and still did not
   know which one they needed. The descriptions were not the problem: the
   mapping was, and it was being left to the reader. ARIA does it instead.

   This file styles the entry point, the overlay, the click-through
   bubbles and the tile rows. The hands-on "how to use" walkthroughs are
   a separate piece and are not built yet.
   ============================================================ */

/* ── Entry points ───────────────────────────────────────────────────────── */
.aria-launch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--text-soft);
  -webkit-tap-highlight-color: transparent;
}

.aria-launch-fig {
  display: block;
  width: auto;
  object-fit: contain;
  /* The figure is art, not a control surface: it must not grab the pointer
     away from the label or blow up the button's hit box on mobile. */
  pointer-events: none;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}

.aria-launch-label {
  position: relative;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.82);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.aria-launch:hover .aria-launch-label,
.aria-launch:focus-visible .aria-launch-label {
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.55);
  transform: translateY(-1px);
}

.aria-launch:focus-visible {
  outline: 2px solid var(--c2);
  outline-offset: 6px;
  border-radius: 14px;
}

/* Floating, bottom right of the homepage. */
.aria-launch--float {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 60;
  flex-direction: column;
  gap: 2px;
  /* Off until the page has settled, so it does not fight the hero for
     attention in the first second. JS adds .is-in. */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.aria-launch--float.is-in {
  opacity: 1;
  transform: none;
}

.aria-launch--float .aria-launch-fig {
  height: 148px;
}

/* Her hoodie is black and the page is #050507, so on the hero her whole body
   disappeared and only the face and hair read. A soft lift behind her separates
   the silhouette without putting a box around it. */
.aria-launch--float::before,
.aria-fig::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 116%;
  height: 78%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(167, 139, 250, 0.2),
    rgba(94, 155, 255, 0.09) 45%,
    transparent 72%
  );
  pointer-events: none;
  z-index: -1;
}

.aria-launch--float {
  isolation: isolate;
}

/* ── Overlay ────────────────────────────────────────────────────────────── */
.aria-ov {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.aria-ov[hidden] {
  display: none;
}

.aria-ov-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.82);
  opacity: 0;
  transition: opacity 0.32s ease;
}

/* The brief says the page dims AND blurs. Blurring the page itself would mean
   putting a filter on a wrapper, and a filtered ancestor becomes the containing
   block for position:fixed - which would break the nav, the cursor layer and the
   constellation canvas. backdrop-filter blurs what is behind the scrim without
   touching the page's own layout. */
@supports (backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px)) {
  .aria-ov-scrim {
    background: rgba(5, 5, 7, 0.58);
    -webkit-backdrop-filter: blur(13px) saturate(0.85);
    backdrop-filter: blur(13px) saturate(0.85);
  }
}

.aria-ov.is-open .aria-ov-scrim {
  opacity: 1;
}

.aria-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 900px;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.36s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.aria-ov.is-open .aria-stage {
  opacity: 1;
  transform: none;
}

.aria-fig {
  flex: 0 0 auto;
  margin: 0;
  position: relative;
  isolation: isolate;
}

.aria-fig img {
  display: block;
  height: clamp(240px, 52vh, 460px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 26px 60px rgba(0, 0, 0, 0.7));
  /* Pose swaps should read as the same character moving, not as a new image
     appearing, so only the opacity crossfades. */
  transition: opacity 0.2s ease;
}

.aria-fig img.is-swapping {
  opacity: 0;
}

/* "there" points left in the file, which in this layout is away from the
   bubble she is talking in. Mirrored, she points at her own words. */
.aria-fig img.is-flipped {
  transform: scaleX(-1);
}

/* A small hop on every new pose. Without it a pose change reads as the page
   swapping a picture; with it, as the same character moving. Animated on the
   figure, not the img, so it cannot fight the img's mirroring transform. */
.aria-fig.is-popping {
  animation: aria-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aria-pop {
  from { transform: translateY(8px) scale(0.965); }
  to   { transform: none; }
}

.aria-panel {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 460px;
  margin-bottom: 26px;
}

/* ── Speech bubble ──────────────────────────────────────────────────────── */
.aria-bubble {
  position: relative;
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(12, 12, 18, 0.94);
  color: var(--text);
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* The tail. Two triangles: the outer one is the border, the inner one sits a
   pixel in and paints over it, which is how you get a bordered tail without
   drawing an SVG for it. */
.aria-bubble::before,
.aria-bubble::after {
  content: "";
  position: absolute;
  left: -13px;
  /* Centred on the bubble rather than pinned near its floor: pinned low, the
     tail pointed at her boots. */
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 13px 9px 0;
}

.aria-bubble::before {
  border-color: transparent var(--line-strong) transparent transparent;
}

.aria-bubble::after {
  left: -11px;
  border-color: transparent rgba(12, 12, 18, 0.94) transparent transparent;
}

/* ── Advance control ────────────────────────────────────────────────────── */
/* Sits inside the bubble, bottom right, the way a comic panel's "next" marker
   would. On a phone a tap anywhere advances too, so this is the affordance that
   says so rather than the only way through. */
.aria-next {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.14);
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  animation: aria-next-pulse 2.2s ease-in-out 1.2s infinite;
}

.aria-next[hidden] {
  display: none;
}

.aria-next:hover,
.aria-next:focus-visible {
  background: rgba(167, 139, 250, 0.3);
  border-color: rgba(167, 139, 250, 0.7);
  animation: none;
}

.aria-next:focus-visible {
  outline: 2px solid var(--c2);
  outline-offset: 3px;
}

@keyframes aria-next-pulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* A bubble carrying the arrow needs room for it, or the last word runs underneath. */
.aria-bubble.has-next {
  padding-bottom: 46px;
}

/* Phones: a tap anywhere goes on, so the arrow goes. Hidden from sight only, not
   removed - a screen reader user cannot "tap anywhere", and still needs a Next
   button to find. */
.aria-ov.is-touchnav .aria-next {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  animation: none;
}

.aria-ov.is-touchnav .aria-bubble.has-next {
  padding-bottom: 18px;
}

/* ── Tiles ──────────────────────────────────────────────────────────────── */
.aria-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.aria-tiles[hidden] {
  display: none;
}

.aria-tile {
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.aria-tile:hover,
.aria-tile:focus-visible {
  background: var(--surface-2);
  border-color: rgba(167, 139, 250, 0.6);
  transform: translateY(-2px);
}

.aria-tile:focus-visible {
  outline: 2px solid var(--c2);
  outline-offset: 3px;
}

.aria-tile--ghost {
  background: none;
  border-style: dashed;
  color: var(--text-dim);
  font-weight: 500;
}

.aria-tile--ghost:hover,
.aria-tile--ghost:focus-visible {
  color: var(--text-soft);
  background: none;
}

.aria-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(12, 12, 18, 0.7);
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.aria-close:hover,
.aria-close:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
}

/* ── Walkthrough over screenshots ───────────────────────────────────────── */
/* The screenshot sits where the blurred page was; ARIA and her bubble fly over
   it as one unit, positioned by JS. */
.aria-wt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: none;          /* taps fall through to the scrim, which advances */
  opacity: 0;
  transition: opacity 0.35s ease;
}

.aria-wt[hidden] {
  display: none;
}

.aria-ov.is-walk .aria-wt {
  opacity: 1;
}

.aria-wt-frame {
  position: relative;
  width: min(calc(100vw - 56px), calc((100vh - 56px) * 1.6));
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;              /* keeps the spotlight's dimming on the screenshot */
  background: #07070a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--line-strong);
}

.aria-wt-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.22s ease;
}

.aria-wt-shot.is-swapping {
  opacity: 0;
}

/* The cut-out: one element whose enormous shadow is the dimming, so the hole is
   simply the element itself - the same trick Intro.js uses. Clipped by the frame,
   it dims only the screenshot. */
.aria-wt-spot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-radius: 12px;
  box-shadow:
    0 0 0 200vmax rgba(5, 5, 7, 0.66),
    0 0 0 2px rgba(167, 139, 250, 0.95),
    0 0 30px 6px rgba(167, 139, 250, 0.35);
  transition:
    left 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Off means the whole screenshot dims, hole included. Dropping only the ring left
   the hole where the last step had been: the dimming is the shadow AROUND the
   element, and the element itself is see-through, so it has to be filled too. */
.aria-wt-spot.is-off {
  background-color: rgba(5, 5, 7, 0.86);
  box-shadow: 0 0 0 200vmax rgba(5, 5, 7, 0.86);
  border-radius: 0;
}

/* ARIA in flight mode: smaller, pinned to the viewport, moved by transform.
   No CSS transition on transform here - the arc is a Web Animation. */
.aria-ov.is-walk .aria-stage {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  max-width: none;
  z-index: 2;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.aria-stage.is-hop {
  opacity: 0 !important;
}

.aria-ov.is-walk .aria-fig img {
  height: 150px;
}

.aria-ov.is-walk .aria-panel {
  flex: 0 1 300px;
  max-width: 300px;
  margin-bottom: 14px;
}

.aria-ov.is-walk .aria-bubble {
  font-size: 16px;
  padding: 14px 18px;
}

.aria-ov.is-walk .aria-bubble.has-next {
  padding-bottom: 44px;
}

/* Standing to the LEFT of the element she is showing: she swaps sides with her
   bubble so that she, not the bubble, is next to it, and the tail follows her. */
.aria-stage.is-mirror {
  flex-direction: row-reverse;
}

.aria-stage.is-mirror .aria-bubble::before,
.aria-stage.is-mirror .aria-bubble::after {
  left: auto;
  right: -13px;
  border-width: 9px 0 9px 13px;
}

.aria-stage.is-mirror .aria-bubble::before {
  border-color: transparent transparent transparent var(--line-strong);
}

.aria-stage.is-mirror .aria-bubble::after {
  right: -11px;
  border-color: transparent transparent transparent rgba(12, 12, 18, 0.94);
}

.aria-wt-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  /* Its own backing: it sits on the dimmed screenshot, and bare dots over dimmed
     text read as part of the text. */
  background: rgba(12, 12, 18, 0.9);
}

.aria-wt-nav[hidden] {
  display: none;
}

.aria-wt-dots {
  display: flex;
  gap: 7px;
}

.aria-wt-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}

.aria-wt-dots i.is-on {
  background: var(--c2);
  transform: scale(1.35);
}

a.aria-tile {
  display: inline-block;
  text-decoration: none;
}

/* Over a legible screenshot the see-through tiles let its text through them;
   over the blurred page that never showed. Solid here. */
.aria-ov.is-walk .aria-tile {
  background: rgba(14, 14, 20, 0.96);
}

.aria-ov.is-walk .aria-tile:hover,
.aria-ov.is-walk .aria-tile:focus-visible {
  background: rgba(24, 24, 32, 0.98);
}

/* ── Walkthrough, phone variant ────────────────────────────────────────── */
/* Chosen by JS (portrait screens), not by a media query, because it comes with its
   own screenshots. The phone capture fills the screen at close to its real size,
   so the app's text stays readable; ARIA and her bubble become one strip across it,
   above or below the lit element. */
.aria-ov.is-phone .aria-wt {
  /* The top band belongs to the close button: flush to the top, the capture put it
     right over the app's own header - and over the lit element on step 6. */
  padding: 60px 12px 12px;
}

.aria-ov.is-phone .aria-wt-frame {
  width: min(calc(100vw - 24px), calc((100vh - 72px) * 0.4948));
  width: min(calc(100vw - 24px), calc((100dvh - 72px) * 0.4948));
  aspect-ratio: 1100 / 2223;
  border-radius: 24px;
}

.aria-ov.is-walk.is-phone .aria-stage {
  width: min(calc(100vw - 24px), 440px);
  flex-direction: row;
  align-items: flex-end;
  gap: 4px;
}

.aria-ov.is-walk.is-phone .aria-fig img {
  height: 96px;
}

.aria-ov.is-walk.is-phone .aria-panel {
  flex: 1 1 auto;
  max-width: none;
  margin-bottom: 6px;
}

.aria-ov.is-walk.is-phone .aria-bubble {
  font-size: 15px;
  padding: 12px 14px;
}

.aria-ov.is-walk.is-phone .aria-bubble.has-next {
  padding-bottom: 12px;          /* no arrow on phones, see .is-touchnav */
}

.aria-ov.is-walk.is-phone .aria-wt-nav {
  margin-top: 6px;
}

/* Side by side again, so the tail goes back to the bubble's left edge. The narrow-
   screen rules below put it on top for the stacked, non-walkthrough layout. */
.aria-ov.is-walk.is-phone .aria-bubble::before,
.aria-ov.is-walk.is-phone .aria-bubble::after {
  left: -13px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  border-width: 9px 13px 9px 0;
}

.aria-ov.is-walk.is-phone .aria-bubble::before {
  border-color: transparent var(--line-strong) transparent transparent;
}

.aria-ov.is-walk.is-phone .aria-bubble::after {
  left: -11px;
  border-color: transparent rgba(12, 12, 18, 0.94) transparent transparent;
}

/* ── Narrow screens ─────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .aria-launch--float {
    right: 14px;
    bottom: 14px;
  }

  .aria-launch--float .aria-launch-fig {
    height: 104px;
  }

  .aria-launch--float .aria-launch-label {
    font-size: 12px;
    padding: 6px 12px;
  }

  /* The figure stacks above the bubble, so the tail has to move to the top
     edge and point up at her instead of sideways. */
  .aria-stage {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .aria-fig img {
    height: clamp(170px, 30vh, 240px);
  }

  .aria-panel {
    margin-bottom: 0;
    width: 100%;
    max-width: none;
  }

  .aria-bubble::before,
  .aria-bubble::after {
    left: 50%;
    bottom: auto;
    top: -13px;
    transform: translateX(-50%);
    border-width: 0 9px 13px 9px;
  }

  .aria-bubble::before {
    border-color: transparent transparent var(--line-strong) transparent;
  }

  .aria-bubble::after {
    top: -11px;
    transform: translateX(-50%);
    border-color: transparent transparent rgba(12, 12, 18, 0.94) transparent;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
/* Every other script on this site checks this, so this one does too: the
   entrance, the pose crossfade and the tile lift all become instant. */
@media (prefers-reduced-motion: reduce) {
  .aria-next,
  .aria-fig.is-popping {
    animation: none;
  }

  .aria-wt,
  .aria-wt-shot,
  .aria-wt-spot,
  .aria-wt-dots i {
    transition: none !important;
  }

  .aria-launch--float,
  .aria-ov-scrim,
  .aria-stage,
  .aria-fig img,
  .aria-tile,
  .aria-launch-label {
    transition: none !important;
  }

  .aria-launch--float {
    opacity: 1;
    transform: none;
  }

  .aria-tile:hover,
  .aria-tile:focus-visible,
  .aria-launch:hover .aria-launch-label {
    transform: none;
  }
}
