/* GDPR Engineering Playbook — flow (scrollytelling) styles.
   The two-pane sticky-graphic + stepped-narrative set-piece and its bespoke
   graphics (deletion fan-out, 72h clock). Loaded by flow pages alongside
   bulma.min.css + site.css; driven by scrolly.js. Tokens come from site.css. */

/* the two-pane scrolly: sticky graphic + stepped narrative */
.scrolly {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}
.scrolly-graphic {
  position: sticky;
  top: 18px;
  align-self: start;
  background: var(--gray);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  min-height: 360px;
}
.scrolly-steps { display: grid; gap: 14px; padding-bottom: 30vh; }
.step {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
  padding: 16px 18px;
  opacity: 1; /* visible by default; JS dims inactive ones once enhanced */
  transition: opacity .25s, box-shadow .25s, border-color .25s, transform .25s;
}
.scrolly.enhanced .step:not(.active) { opacity: .5; }
.step.active { opacity: 1; border-color: var(--brand); box-shadow: -4px 0 0 var(--brand), 0 6px 18px rgba(10, 12, 14, .06); }
.step .sn { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-d); }
.step h3 { margin: 5px 0 6px; font-size: 17px; font-weight: 800; }
.step p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink); }
.step p + p { margin-top: 8px; }
.step code { background: var(--gray); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }
.step.active code { background: var(--white); }

/* mobile: graphic stops being sticky, sits inline above steps */
@media (max-width: 820px) {
  .scrolly { grid-template-columns: 1fr; gap: 16px; }
  .scrolly-graphic { position: static; min-height: 0; }
  .scrolly-steps { padding-bottom: 0; }
  .scrolly.enhanced .step:not(.active) { opacity: 1; }
}

/* ----- graphic: deletion fan-out ----- */
.fan { display: grid; gap: 10px; font-size: 12.5px; }
.fan .node {
  border: 1px solid var(--line); background: var(--white);
  border-radius: 10px; padding: 9px 11px;
  transition: border-color .25s, background .25s, box-shadow .25s, opacity .25s;
}
.fan .node .nh { font-weight: 800; font-size: 12.5px; }
.fan .node .nd { font-size: 11px; color: var(--muted); margin-top: 1px; }
.fan .node code { background: var(--gray); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 11px; }
.fan .bus { text-align: center; font-weight: 800; background: var(--metal); }
.fan .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fan .row.two { grid-template-columns: repeat(2, 1fr); }
.fan .mini { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 7px 8px; font-size: 11px; text-align: center; transition: all .25s; }
.fan .arrow { text-align: center; color: var(--brand); font-size: 16px; line-height: .7; }
.fan .saga { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fan .saga .pill { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--gray); border: 1px solid var(--line); }
.fan[data-stage] .node, .fan[data-stage] .mini { opacity: .42; }
.fan[data-stage="0"] .s0, .fan[data-stage="1"] .s0, .fan[data-stage="1"] .s1,
.fan[data-stage="2"] .s2, .fan[data-stage="3"] .s3, .fan[data-stage="4"] .s4 { opacity: 1; }
.fan .lit { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 15%, transparent); opacity: 1 !important; }
.fan .hot { border-color: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 17%, transparent); opacity: 1 !important; }
.fan .ok { background: var(--metal); border-color: var(--ok-line); opacity: 1 !important; }

/* ----- graphic: 72h clock ----- */
.clockwrap { display: grid; gap: 18px; place-items: center; }
.dial {
  --p: 0;
  width: 168px; height: 168px; border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--p) * 1%), var(--line) 0);
  display: grid; place-items: center;
  transition: --p .4s, background .4s;
}
.dial .face {
  width: 132px; height: 132px; border-radius: 50%;
  background: var(--white); display: grid; place-items: center; text-align: center;
}
.dial .face b { font-size: 34px; font-weight: 800; line-height: 1; }
.dial .face span { font-size: 11px; color: var(--muted); display: block; margin-top: 3px; }
.timeline { display: grid; gap: 0; width: 100%; }
.tl {
  display: grid; grid-template-columns: 26px 1fr; gap: 11px;
  padding-bottom: 14px; position: relative;
}
.tl:not(:last-child)::before {
  content: ""; position: absolute; left: 12px; top: 24px; bottom: 0;
  width: 2px; background: var(--line);
}
.tl .mk {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--white);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  z-index: 1; transition: all .25s;
}
.tl .tx b { font-size: 13px; font-weight: 800; display: block; }
.tl .tx span { font-size: 11.5px; color: var(--muted); }
.timeline[data-stage] .tl { opacity: .4; transition: opacity .25s; }
.tl.lit { opacity: 1 !important; }
.tl.lit .mk { border-color: var(--brand); background: var(--brand); color: var(--on-accent); }
.tl.hot .mk { border-color: var(--red); background: var(--red); color: var(--on-accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
