/* ============================================================
   CLEARWAY FORGE — landing scenes.
   The product's own hero artefact and idea scenes; the shared
   grammar (hold/stage, ritual, panels) lives in foundry-scene.css.
   Loaded only on this site's front page (inc/enqueue.php).
   Fail-safe: static markup IS the end state — the scrub in
   assets/js/scenes/clearwayforge.js only replays how it got there.
   ============================================================ */

.cw-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(26px, 4vw, 64px); align-items: center; }
/* ============================================================
   CLEARWAY — «Диспетчерская»: the radar
   ============================================================ */
.cw-radar { position: relative; aspect-ratio: 1; width: min(100%, 560px); margin-inline: auto; color: var(--fdry-ink-soft, #A7AEC8); }
@media (min-width: 1024px) { .cw-radar { width: min(100%, 48vh); } }
.cw-steps { align-content: start; }
.cw-step p { font-size: clamp(.92rem, 1.15vw, 1rem); }
.cw-radar__svg { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }
/* CRT sweep: a conic beam with a phosphor tail, composited rotation only */
.cw-radar__sweep {
  position: absolute; inset: 3.1%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: conic-gradient(from 0deg,
      transparent 0deg 286deg,
      color-mix(in srgb, var(--accent) 5%, transparent) 306deg,
      color-mix(in srgb, var(--accent) 24%, transparent) 344deg,
      color-mix(in srgb, var(--accent-light) 72%, transparent) 358deg,
      transparent 360deg);
  -webkit-mask: radial-gradient(circle, transparent 0 9%, #000 26% 99.5%, transparent 100%);
          mask: radial-gradient(circle, transparent 0 9%, #000 26% 99.5%, transparent 100%);
  transform-origin: 50% 50%; will-change: transform;
}
body.fdry-anim .cw-radar__sweep { display: block; opacity: 1; animation: fgi-turn 20s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  body.fdry-anim .cw-radar__sweep { animation: none; opacity: .3; }
  body.fdry-anim [data-cw-tower] { animation: none; }
}
.cw-bogey {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; z-index: 2;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .78rem;
  color: var(--accent-light, #22D3EE); white-space: nowrap;
}
.cw-bogey i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; position: relative; }
/* approach trail — fades out behind the bogey, away from the tower */
.cw-bogey i::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 2px;
  background: linear-gradient(90deg, currentColor, transparent); opacity: .45;
  transform-origin: 0 50%; transform: rotate(var(--tr, -40deg));
}
.cw-direct {
  position: absolute; right: 0; top: 4%; z-index: 2;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .74rem;
  color: var(--fdry-ink-faint, #6B7299);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 12px;
  background: rgba(255,255,255,.04);
}
.cw-direct b { font-variant-numeric: tabular-nums; color: var(--fdry-ink, #ECEEF7); }
.cw-panel { display: grid; gap: clamp(18px, 2.6vw, 30px); }
.cw-step__k {
  display: inline-block; font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent, #06B6D4); margin-bottom: 8px;
}
.cw-step p { color: var(--fdry-ink-soft, #A7AEC8); font-size: 1rem; line-height: 1.62; margin: 0; max-width: 52ch; }
.cw-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.cw-toggle {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .74rem;
  padding: 5px 12px; border-radius: 999px;
  color: var(--accent-light, #22D3EE);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 18%, transparent);
}
.cw-cash {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 16px;
  background: rgba(255,255,255,.04);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .82rem;
}
.cw-cash__src { color: var(--fdry-ink-faint, #6B7299); }
.cw-cash b { color: var(--accent-light, #22D3EE); font-size: 1.05rem; }
.cw-hold {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 16px;
  background: rgba(255,255,255,.04); margin-bottom: 10px;
}
.cw-hold code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .8rem; color: var(--fdry-ink-soft, #A7AEC8); }
.cw-hold__stamp {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; color: #0C1A3A; padding: 4px 12px; border-radius: 7px;
  background: var(--accent-light, #22D3EE); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent);
}
.cw-journal { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .74rem; color: var(--fdry-ink-soft, #A7AEC8); }
/* Clearway — the monthly letter */
.cw-mail {
  max-width: 620px; margin-inline: auto; border-radius: 18px; overflow: hidden;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1);
}
.cw-mail__chrome {
  display: flex; align-items: center; gap: 7px; padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .85rem; color: var(--fdry-ink, #ECEEF7);
}
.cw-mail__chrome span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); }
.cw-mail__chrome b { margin-left: 8px; font-weight: 600; }
.cw-mail__chrome em { margin-left: auto; font-style: normal; font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--fdry-ink-faint, #6B7299); }
.cw-mail__row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 15px 20px; border-bottom: 1px dashed rgba(255,255,255,.08);
  color: var(--fdry-ink-soft, #A7AEC8); font-size: .95rem;
}
.cw-mail__row b { font-family: "JetBrains Mono", monospace; color: var(--accent-light, #22D3EE); font-size: 1.05rem; }
.cw-mail__foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.cw-mail__cap { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--fdry-ink-faint, #6B7299); }
.cw-mail__seal { color: var(--accent, #06B6D4); opacity: .9; }
/* ── Fixture-driven details (2026-09-02): journal lines, the evidence ledger,
   long evidence notes. Amounts and hashes come from assets/data/scene-fixtures. */
.cw-journal span[data-cw-journal-line] { display: block; }
.cw-hold__why { flex-basis: 100%; font-size: .78rem; color: var(--fdry-ink-faint, #858DB3); margin-top: 6px; }
/* the held action reads as one line where it fits, and the rule explanation always takes its own row */
.cw-hold { flex-wrap: wrap; }
.cw-hold__act { flex: 1 1 0; min-width: 0; }
.cw-hold code { white-space: normal; overflow-wrap: anywhere; }

/* ============================================================
   HERO ARTEFACT — the tower screen (hero-clearwayforge.php)
   ============================================================ */
.cwh { max-width: 460px; margin-inline: auto; overflow: hidden; }
.cwh-live { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-light, #22D3EE); }
.cwh-live i {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
body.fdry-anim .cwh-live i { animation: fgi-breathe 2.4s ease-in-out infinite; }
.cwh-screen {
  position: relative; aspect-ratio: 1; width: 100%;
  color: var(--fdry-ink-soft, #A7AEC8);
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 68%);
}
.cwh-grid { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }
.cwh-sweep {
  position: absolute; inset: 4%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: conic-gradient(from 0deg,
      transparent 0deg 292deg,
      color-mix(in srgb, var(--accent) 6%, transparent) 312deg,
      color-mix(in srgb, var(--accent) 26%, transparent) 346deg,
      color-mix(in srgb, var(--accent-light) 76%, transparent) 358deg,
      transparent 360deg);
  -webkit-mask: radial-gradient(circle, transparent 0 8%, #000 24% 99.5%, transparent 100%);
          mask: radial-gradient(circle, transparent 0 8%, #000 24% 99.5%, transparent 100%);
  transform-origin: 50% 50%; will-change: transform; z-index: 0;
}
body.fdry-anim .cwh-sweep { opacity: 1; animation: fgi-turn 12s linear infinite; }
.cwh-ping { transform-origin: 150px 150px; opacity: .3; }
body.fdry-anim .cwh-ping { animation: fgi-breathe 3s ease-in-out infinite; }
.cwh-bogey {
  position: absolute; z-index: 2; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .7rem;
  color: var(--accent-light, #22D3EE);
}
.cwh-bogey__dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 11px currentColor;
}
.cwh-bogey__trail {
  position: absolute; left: 4px; top: 50%; width: 38px; height: 2px;
  background: linear-gradient(90deg, currentColor, transparent); opacity: .4;
  transform-origin: 0 50%; transform: rotate(var(--tr, -40deg));
}
.cwh-bogey em { font-style: normal; }
.cwh-till {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.08);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .76rem;
}
.cwh-till__src { color: var(--fdry-ink-faint, #6B7299); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cwh-till b { font-size: 1.06rem; white-space: nowrap; }
.cwh-till.is-ringing { background: color-mix(in srgb, var(--accent) 10%, transparent); }
@media (prefers-reduced-motion: reduce) {
  body.fdry-anim .cwh-sweep { animation: none; opacity: .3; }
  body.fdry-anim .cwh-ping, body.fdry-anim .cwh-live i { animation: none; }
}

/* ============================================================
   SCENE 1 additions — the fog of «Direct», the beat rail, the course
   ============================================================ */
/* The grey smear analytics leaves behind when a bogey loses its referrer. */
.cw-radar__fog {
  position: absolute; inset: 3%; border-radius: 50%; z-index: 1; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(150,158,186,.22), rgba(150,158,186,.05) 62%, transparent 74%);
}
[data-cw-course] { opacity: 0; }
body:not(.fdry-anim) [data-cw-course] { opacity: .55; }
[data-cw-tower] { transform-origin: 210px 210px; }
body.fdry-anim [data-cw-tower] { animation: fgi-breathe 3.2s ease-in-out infinite; }
.cw-step .fgi-cap { display: block; margin-top: 9px; }

/* ============================================================
   SCENE 2 «Считает» — the crawler log, the month, what is provable
   ============================================================ */
.cw-counts__grid { grid-template-columns: 1.15fr .85fr; }
.cw-log { padding-bottom: 6px; }
.cw-log__row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) auto auto minmax(58px, auto) auto;
  gap: 12px; align-items: baseline; padding: 9px 16px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  font-size: .84rem; color: var(--fdry-ink-soft, #A7AEC8);
}
.cw-log__row b { font-weight: 600; color: var(--fdry-ink, #ECEEF7); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cw-log__vendor { font-size: .76rem; color: var(--fdry-ink-faint, #6B7299); }
.cw-log__kind { padding: 3px 8px; font-size: .64rem; }
.cw-log__hits { text-align: right; font-size: .82rem; color: var(--fdry-ink, #ECEEF7); }
.cw-log__ver {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .64rem;
  letter-spacing: .06em; color: var(--fdry-ink-faint, #6B7299); text-align: right;
}
/* An assistant is a customer; a training crawler is not. The log is where the
   difference becomes visible, so the difference gets the accent. */
.cw-log__row.is-buyer { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.cw-log__row.is-buyer b { color: var(--accent-light, #22D3EE); }
.cw-log__note {
  margin: 12px 16px 12px; font-size: .78rem; line-height: 1.55;
  color: var(--fdry-ink-faint, #6B7299); max-width: 54ch;
}
.cw-proof { display: grid; gap: 16px; align-content: center; }
.cw-spark { display: grid; gap: 8px; }
.cw-spark svg { display: block; width: 100%; height: clamp(56px, 8vw, 84px); overflow: visible; }
.cw-proof__sum { display: grid; gap: 4px; }
.cw-proof__sum span { font-size: .84rem; color: var(--fdry-ink-soft, #A7AEC8); }
.cw-proof__bar {
  position: relative; height: 9px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.08);
}
.cw-proof__bar i {
  position: absolute; inset: 0 auto 0 0; display: block; width: var(--w, 90%);
  border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform-origin: 0 50%;
}
.cw-proof__legend { margin: 0; font-size: .8rem; line-height: 1.58; color: var(--fdry-ink-faint, #6B7299); }
.cw-proof__key { display: block; color: var(--accent-light, #22D3EE); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .78rem; margin-bottom: 4px; }
.cw-proof__rec { margin: 0; font-size: .8rem; line-height: 1.58; color: var(--fdry-ink-soft, #A7AEC8); }
@media (max-width: 899px) {
  .cw-log__row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .cw-log__vendor, .cw-log__ver { display: none; }
}

/* ============================================================
   SCENE 3 — the culmination console: the queue, the shelf, the chain
   ============================================================ */
.cw-console__body {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(18px, 2.6vw, 34px);
  padding: clamp(18px, 2.4vw, 26px);
}
.cw-act { position: relative; display: grid; gap: 10px; align-content: start; }
.cw-act__who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cw-act__who b { color: var(--fdry-ink, #ECEEF7); font-size: 1rem; }
.cw-act__what {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .92rem;
  color: var(--fdry-ink, #ECEEF7); padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  overflow-wrap: anywhere;
}
.cw-act__why { margin: 0; font-size: .84rem; line-height: 1.55; color: var(--fdry-ink-soft, #A7AEC8); }
.cw-act__why .fgi-num { margin-right: 7px; }
.cw-act__why .fgi-cap { display: block; margin-top: 6px; }
.cw-act__stamp { justify-self: start; }
.cw-shelf { grid-column: 1; display: grid; gap: 4px; margin-top: 4px; }
.cw-shelf__note { font-size: .8rem; color: var(--fdry-ink-soft, #A7AEC8); }
.cw-chain { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 9px; align-content: start; }
.cw-chain .fgi-ledger { max-height: none; }
.cw-console .fgi-ledger li { grid-template-columns: auto minmax(0, 1fr) auto; }
.cw-console .fgi-ledger__what { display: none; }
.cw-reset:not([hidden]) { display: inline-flex; }
@media (max-width: 899px) {
  .cw-console__body { grid-template-columns: 1fr; }
  .cw-shelf, .cw-chain { grid-column: 1; grid-row: auto; }
}

/* The letter's rows carry a note under the label now. */
.cw-mail__row span { display: grid; gap: 3px; min-width: 0; }
.cw-mail__row em { font-style: normal; }

/* Phone: one column. Lives here, not in the shared sheet — this file loads
   after it, so an override up there loses the source-order tie to the base
   rule down here, and the scene stayed two columns on a phone. */
@media (max-width: 899px) {
  .cw-grid { grid-template-columns: 1fr; }
}
