/* ============================================================
   ASSESSMENT STORY
   The 60-second "assessment stages" film, told on scroll.
   Markup and motion: app/assessment-story.jsx.

   Every length below is in the film's own pixels, on a 1920x1080
   frame. Nothing here is responsive on its own: the component
   scales whole blocks to fit (the pinned frame on wide screens,
   each block separately when the story is laid out as a page).
   ============================================================ */

/* The story's palette. It is its own class so that the homepage cards
   that follow the story (at the end of this file) can be drawn from it. */
.as-tokens {
  /* The film's palette, mapped onto the site's tokens where the site already
     has a token for the same job. Slate is the film's second colour and has
     no site token yet. */
  --as-ground: #FFFFFF;
  --as-ink: var(--ink-900);
  --as-slate: #4A6076;
  --as-display: "EB Garamond", Garamond, Georgia, serif;
  --as-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --as-measured: color-mix(in srgb, var(--as-slate) 34%, var(--as-ground));
  --as-assumed: color-mix(in srgb, var(--as-slate) 50%, var(--as-ground));
  --as-track: color-mix(in srgb, var(--as-slate) 14%, var(--as-ground));
  /* The height of the sticky site header (.site-header .row), which the
     pinned frame sits under. */
  --as-header: 64px;
}
.as-root { position: relative; }

/* ---------- Grounds: paper, dark, slate, amber ---------- */
.as-scene {
  position: relative;
  overflow: hidden;
  background: var(--bg-page);
  color: var(--as-ink);
  --as-dim: color-mix(in srgb, var(--as-ink) 62%, var(--as-ground));
  --as-rule: color-mix(in srgb, var(--as-ink) 16%, transparent);
  --as-tone: var(--as-slate);
  --as-bar: var(--accent);
}
.as-scene.as-dark {
  background: var(--as-ink);
  color: var(--as-ground);
  --as-dim: color-mix(in srgb, var(--as-ground) 72%, var(--as-ink));
  --as-rule: color-mix(in srgb, var(--as-ground) 24%, transparent);
  --as-tone: var(--accent);
}
.as-scene.as-slate {
  background: color-mix(in srgb, var(--as-slate) 72%, var(--as-ink));
  color: var(--as-ground);
  --as-dim: color-mix(in srgb, var(--as-ground) 78%, var(--as-slate));
  --as-rule: color-mix(in srgb, var(--as-ground) 26%, transparent);
  --as-tone: var(--accent);
}
.as-scene.as-amber {
  background: var(--accent);
  --as-dim: color-mix(in srgb, var(--as-ink) 80%, var(--accent));
  --as-rule: color-mix(in srgb, var(--as-ink) 26%, transparent);
  --as-tone: var(--as-ink);
  --as-bar: var(--as-ink);
}

/* ---------- Type ---------- */
.as-display {
  font-family: var(--as-display);
  font-weight: 500;
  font-feature-settings: "lnum";
}
.as-h { margin: 0; font-size: 80px; line-height: 1.05; letter-spacing: -0.005em; }
.as-h.as-big { font-size: 104px; }
.as-line { display: block; }
.as-w { display: inline-block; }
.as-tone { color: var(--as-tone); }
/* On amber both lines are ink, so the second is told apart by weight. */
.as-amber .as-tone { font-weight: 400; }
.as-sub { margin: 0; font-size: 36px; line-height: 1.35; }
.as-dim { color: var(--as-dim); }
.as-mono {
  font-family: var(--as-mono);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--as-dim);
}
.as-rule { width: 120px; height: 6px; border-radius: 3px; background: var(--as-bar); flex: none; }
.as-words { display: flex; flex-direction: column; }
.as-words > * { margin: 0; }

/* ---------- Cards ---------- */
.as-pcard,
.as-soft {
  background: var(--as-ground);
  color: var(--as-ink);
  box-sizing: border-box;
  --as-dim: color-mix(in srgb, var(--as-ink) 62%, var(--as-ground));
  --as-rule: color-mix(in srgb, var(--as-ink) 16%, transparent);
}
.as-pcard { border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.14); }
.as-soft {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 34px;
  line-height: 1.2;
}
.as-stack { display: flex; flex-direction: column; gap: 14px; }

/* One visual code: solid for measured, hatched for assumed, dashed for not
   yet known, amber for over the screening threshold. */
.as-c-m { background: var(--as-measured); }
.as-c-f { background: var(--accent); }
.as-c-u { border: 3px dashed color-mix(in srgb, var(--as-slate) 60%, var(--as-ground)); }
.as-c-a {
  border: 2px solid var(--as-assumed);
  background: repeating-linear-gradient(135deg, var(--as-assumed) 0 7px, transparent 7px 16px);
}

/* ---------- The assessment card ---------- */
.as-card { width: 100%; padding: 48px; display: flex; flex-direction: column; gap: 26px; }
.as-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; height: 52px; }
.as-card-head > * { white-space: nowrap; }
.as-card-name { font-size: 44px; line-height: 1; }

.as-mk { position: relative; height: 390px; }
.as-mk-bound {
  position: absolute; left: 20px; top: 22px; height: 356px; width: 450px;
  border: 3px solid var(--as-ink); border-radius: 28px; box-sizing: border-box;
}
.as-mk-label { position: absolute; left: 46px; top: 6px; background: var(--as-ground); padding: 0 12px; }
.as-bub {
  position: absolute; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600; color: var(--as-ground);
  background: var(--as-measured);
}
.as-bub > i { position: absolute; inset: 0; border-radius: 50%; box-sizing: border-box; }
.as-bub-party { background: var(--as-ink); }
.as-bub-target { background: var(--as-slate); }

.as-share { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.as-share-left { display: flex; flex-direction: column; gap: 8px; }
.as-share-fig { display: flex; align-items: baseline; gap: 22px; }
.as-share-num { font-size: 104px; line-height: 0.9; min-width: 180px; transform-origin: 0 100%; }
.as-share-tags { display: grid; }
.as-share-tags > * { grid-area: 1 / 1; }
.as-bar { width: 380px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 10px; }
.as-bar-track { position: relative; height: 30px; border-radius: 15px; background: var(--as-track); }
.as-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 15px; width: 50%; }
.as-bar-mark { position: absolute; left: 50%; top: -10px; bottom: -10px; width: 3px; margin-left: -1.5px; background: var(--as-ink); }
.as-bar-label { text-align: center; white-space: nowrap; }

.as-legend { display: flex; gap: 22px; font-size: 28px; }
.as-key { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.as-sw { position: relative; display: inline-block; flex: none; width: 40px; height: 28px; }
.as-sw > i { position: absolute; inset: 0; box-sizing: border-box; border-radius: 7px; }

/* ---------- Scene pieces ---------- */
/* The deal */
.as-deal-card { width: 100%; padding: 44px; display: flex; flex-direction: column; gap: 12px; }
.as-deal-mark { position: relative; height: 104px; margin-bottom: 14px; }
.as-deal-mark > span { position: absolute; border-radius: 50%; }
.as-deal-a { left: 0; top: 0; width: 104px; height: 104px; background: var(--as-ink); }
.as-deal-join { left: 80px; top: 14px; width: 90px; height: 90px; background: var(--as-slate); }
.as-deal-name { font-size: 68px; line-height: 1; }
.as-deal-kind { padding-bottom: 26px; }
.as-deal-got { color: var(--as-slate); padding-bottom: 6px; }
.as-deal-row {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 22px 0; border-top: 2px solid var(--as-rule); font-size: 36px;
}
.as-glyph { width: 120px; height: 44px; flex: none; }

/* Jurisdictions */
.as-places { display: flex; flex-direction: column; gap: 14px; padding-top: 10px; }
.as-place { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 28px; }
.as-place-name { font-size: 64px; line-height: 1.1; white-space: nowrap; }
.as-place-more { font-size: 44px; line-height: 1.2; font-weight: 400; }
.as-defs { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 12px; }
.as-defs > .as-mono { width: 100%; }
.as-chip { font-size: 32px; padding: 10px 22px; border: 2.5px solid var(--accent); border-radius: 16px; }

/* Gaps */
.as-count { display: flex; align-items: center; gap: 30px; }
.as-count-n { font-size: 220px; line-height: 0.85; color: var(--as-slate); min-width: 110px; }
.as-count .as-sub { width: 340px; }

/* What if */
.as-toggle-row { display: flex; align-items: center; gap: 24px; padding-top: 8px; }
.as-toggle {
  position: relative; width: 100px; height: 56px; flex: none;
  border-radius: 28px; box-sizing: border-box; border: 3px solid var(--as-ink);
}
.as-toggle > i { position: absolute; left: 5px; top: 5px; width: 40px; height: 40px; border-radius: 20px; }
.as-cursor { position: absolute; left: 0; top: 0; width: 48px; height: 62px; overflow: visible; }

/* Request and return */
.as-request-item { font-size: 40px; line-height: 1.15; }
.as-request-why { font-size: 28px; }
.as-cells { display: grid; gap: 8px; }
.as-cell { box-sizing: border-box; border-radius: 8px; border: 2.5px solid transparent; background: var(--as-track); }
.as-cell-head { background: color-mix(in srgb, var(--as-slate) 38%, var(--as-ground)); }
.as-swap { display: grid; }
.as-swap > * { grid-area: 1 / 1; }
.as-steps { display: flex; gap: 14px; }
.as-step { flex: 1; align-items: center; gap: 12px; padding: 20px 12px; }
.as-step-pic { width: 120px; height: 61px; display: flex; flex-direction: column; justify-content: center; }

/* Handoff */
.as-handoff { display: flex; flex-direction: column; gap: 22px; }
.as-handoff-item { display: flex; align-items: center; gap: 22px; font-size: 38px; line-height: 1.2; }
.as-handoff-dot { width: 16px; height: 16px; border-radius: 8px; background: var(--accent); flex: none; }

/* The firm's record */
.as-matters { display: flex; align-items: stretch; gap: 32px; }
.as-matters.as-matters-column { flex-direction: column; }
.as-matter { flex: 1; padding: 34px 38px; display: flex; flex-direction: column; gap: 18px; }
.as-matter-name { font-size: 44px; line-height: 1.05; white-space: nowrap; }
.as-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.as-mini > i { display: block; height: 34px; border-radius: 9px; box-sizing: border-box; }

/* End card */
.as-end { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.as-end-logo { height: 300px; width: auto; max-width: none; }
.as-end .as-rule { margin: 64px 0 44px; }
.as-end-h { font-size: 76px; text-align: center; }

/* Decoration: the flowing lines and the globe. */
.as-art { position: absolute; overflow: visible; pointer-events: none; }
.as-globe { position: absolute; max-width: none; pointer-events: none; }

/* ============================================================
   FILM: the frame is pinned under the header and scroll plays it.
   ============================================================ */
.as-stage {
  position: sticky;
  top: var(--as-header);
  height: calc(100vh - var(--as-header));
  overflow: hidden;
  background: var(--as-ink);
}
.as-film .as-scene { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.as-box {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--as-k, 1));
}
.as-film .as-words,
.as-film .as-visual,
.as-alpha { position: absolute; }
.as-alpha { left: 140px; bottom: 56px; }
.as-film .as-art { inset: 0; width: 100%; height: 100%; }
.as-film .as-globe { right: -540px; bottom: -250px; height: 1040px; }

/* ============================================================
   PAGE: small screens and reduced motion. Each scene is a plain
   block showing its finished state; nothing is pinned or moves.
   ============================================================ */
.as-static .as-scene { padding: 80px 0; }
.as-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}
.as-inner.as-layout-stack,
.as-inner.as-layout-center { grid-template-columns: minmax(0, 1fr); }
.as-scaled { position: relative; width: 100%; }
.as-scaled-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.as-static .as-h.as-big { font-size: 80px; }
.as-static .as-alpha { position: static; }
.as-static .as-art { left: 0; right: 0; bottom: 0; width: 100%; aspect-ratio: 16 / 9; }
.as-static .as-globe { right: -14%; bottom: -30%; width: 62%; max-width: 860px; opacity: 0.9; }

@media (max-width: 760px) {
  .as-static .as-scene { padding: 56px 0; }
  .as-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .as-static .as-globe { right: -30%; bottom: -12%; width: 110%; opacity: 0.22; }
}

/* ============================================================
   AFTER THE STORY: the three standards cards on the homepage,
   drawn as the story's white cards. They are ordinary page
   elements, so their lengths are real pixels, not the film's.
   ============================================================ */
.as-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.as-trust-card {
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.as-trust-icon { color: var(--as-slate); }
.as-trust-title { margin: 0; font-size: 30px; line-height: 1.1; }
.as-trust-body { margin: 0; font-size: 15px; line-height: 1.55; color: var(--as-dim); }
@media (max-width: 860px) {
  .as-trust { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .as-trust-card { padding: 28px; }
}
