/* piracy.brionpc.be — builds on site.css tokens, mobile first. */

.pir-hero .h1 { max-width: 16ch; text-wrap: balance; }
.pir-hero .ribbon-text { display: block; }

.pir-grid { display: grid; gap: 16px; align-items: start; padding-bottom: var(--section); }

.pir-tool { display: grid; gap: 20px; align-content: start; }
.pir-tool > .h3 { margin-bottom: 0; }

.pir-scan { display: grid; gap: 16px; }
.pir-scan__row { display: grid; gap: 12px; }
.pir-scan__row input { font-size: 1.0625rem; }
.pir-scan__go { width: 100%; }
.pir-scan__go:disabled { opacity: 0.6; cursor: progress; transform: none; }
.pir-scan__legal { margin: 0; color: var(--grey); font-size: var(--step-small); line-height: 1.5; }
.pir-scan__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pir-progress__title.is-done .pir-dots { display: none; }
.bot-check:empty { display: none; }
.bot-check { max-width: 100%; overflow: hidden; }

.pir-tool__note { color: var(--grey); font-size: var(--step-small); line-height: 1.5; }

/* Progress */

.pir-progress { padding: 20px; border-radius: var(--radius); background: var(--mist); box-shadow: inset 0 0 0 1.5px var(--line); }
.pir-progress__title { margin-bottom: 16px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }

.pir-dots { display: inline-flex; gap: 4px; margin-left: 6px; }
.pir-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c2); opacity: 0.25; }

.pir-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pir-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--grey); transition: color 300ms ease; }
.pir-steps li > span:last-child { line-height: 1.4; }
.pir-steps small { display: block; margin-top: 2px; color: var(--grey); font-size: var(--step-small); font-weight: 400; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pir-steps small:empty { display: none; }

.pir-steps__mark { position: relative; width: 22px; height: 22px; margin-top: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); transition: background-color 300ms ease, box-shadow 300ms ease; }
.pir-steps [data-state="active"] { color: var(--ink); font-weight: 600; }
.pir-steps [data-state="active"] .pir-steps__mark { box-shadow: inset 0 0 0 2px var(--line); }
.pir-steps [data-state="active"] .pir-steps__mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--c2);
  border-right-color: var(--c2);
}
.pir-steps [data-state="done"] { color: var(--ink); }
.pir-steps [data-state="done"] .pir-steps__mark { background: var(--c2); box-shadow: none; }
.pir-steps [data-state="done"] .pir-steps__mark::after {
  content: "";
  position: absolute;
  left: 7px; top: 4px;
  width: 6px; height: 11px;
  border: solid var(--night);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .pir-dots i { animation: pir-dot 1.2s ease-in-out infinite; }
  .pir-dots i:nth-child(2) { animation-delay: 0.2s; }
  .pir-dots i:nth-child(3) { animation-delay: 0.4s; }
  .pir-steps [data-state="active"] .pir-steps__mark::before { animation: pir-spin 0.9s linear infinite; }
  .pir-steps [data-state="done"] .pir-steps__mark::after { animation: pir-tick 320ms var(--ease-out) both; }
}

@keyframes pir-dot { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes pir-spin { to { transform: rotate(360deg); } }
@keyframes pir-tick { from { opacity: 0; transform: rotate(45deg) scale(0.4); } to { opacity: 1; transform: rotate(45deg) scale(1); } }

/* Side */

.pir-side { align-content: start; }
.pir-first { padding: 22px; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-soft); }
.pir-first .h3 { margin-bottom: 12px; font-size: 1.125rem; }
.pir-first ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pir-first li { position: relative; padding-left: 20px; color: var(--grey); line-height: 1.5; }
.pir-first li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--c2); }

/* Result */

.pir-result, .pir-empty { padding-top: var(--section); scroll-margin-top: calc(var(--bar-h) + 12px); }
.pir-result:focus, .pir-empty:focus { outline: none; }
.pir-result__head { margin-bottom: 20px; }
.pir-result__head .h2 { margin-bottom: 8px; }
.pir-result__notice { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--mist); box-shadow: inset 3px 0 0 var(--c2); font-size: var(--step-small); line-height: 1.5; }
.pir-empty .h2 { margin-bottom: 16px; overflow-wrap: anywhere; }

.pir-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pir-view__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; flex: 1 1 220px; max-width: 320px; }
.pir-view__modes .chip span { min-height: 44px; justify-content: center; gap: 8px; }
.pir-view__modes .chip svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pir-frame { overflow: hidden; border-radius: var(--radius-lg); background: var(--night); box-shadow: var(--shadow-lift); }
.pir-frame__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--night-line); }
.pir-frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--night-line); }
.pir-frame__bar span {
  flex: 1;
  min-width: 0;
  margin-left: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--on-night-soft);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pir-frame__view { position: relative; height: 480px; overflow: hidden; background: #FFFFFF; }
.pir-frame__view[data-mode="mobile"] { background: var(--mist); }
.pir-frame__view iframe { position: absolute; top: 0; left: 0; border: 0; background: #FFFFFF; transform-origin: 0 0; }
.pir-frame__view[data-mode="mobile"] iframe { box-shadow: 0 0 0 1px var(--line); }

.pir-note { display: grid; gap: 14px; justify-items: start; margin-top: 20px; padding: 22px; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-soft); }
.pir-note .h3 { font-size: 1.125rem; }
.pir-note ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pir-note li { position: relative; padding-left: 20px; color: var(--grey); line-height: 1.55; }
.pir-note li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--c2); }

/* Lead */

.pir-lead { padding-top: 24px; padding-bottom: var(--section); }
.pir-lead__intro { margin: -8px 0 20px; color: var(--grey); }

/* How */

.pir-how { padding-top: var(--section); padding-bottom: var(--section); }
.pir-how .h2 { margin-bottom: 28px; }
.pir-how__steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: pir; }
.pir-how__steps li { position: relative; padding: 22px 22px 22px 70px; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-soft); counter-increment: pir; }
.pir-how__steps li::before {
  content: counter(pir);
  position: absolute;
  left: 22px; top: 20px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ribbon);
  color: var(--night);
  font-family: var(--font-display);
  font-weight: 800;
}
.pir-how__steps .h3 { margin-bottom: 6px; font-size: 1.125rem; }
.pir-how__steps p { color: var(--grey); line-height: 1.55; }

@media (min-width: 768px) {
  .pir-scan__row { grid-template-columns: 1fr auto; }
  .pir-scan__go { width: auto; }
  .pir-tool { padding: 32px; }
  .pir-side { grid-template-columns: 1fr 1fr; }
  .pir-frame__view { height: 640px; }
  .pir-how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pir-how__steps li { padding: 76px 24px 24px; }
}

@media (min-width: 1024px) {
  .pir-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
  .pir-side { grid-template-columns: 1fr; }
  .pir-note { grid-template-columns: 1fr auto; align-items: end; }
  .pir-note .h3, .pir-note ul { grid-column: 1; }
  .pir-note .btn { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}
