/* ==========================================================================
   Медіа Тиражу: результат в опуклій заокругленій рамці, плеєр музики з хвилею, порівняння «до / після».
   Спільне для головної (landing.css) і кабінету (tools.css); поведінка — public/js/media.js.
   ========================================================================== */

/* ---------- Результат: медіа з м'якою тінню й підпис ---------- */

.proof { position: relative; display: grid; align-content: start; gap: 12px; margin: 0; min-width: 0; }
.proof__media {
  position: relative;
  aspect-ratio: var(--ar, 1);
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper-2);
  box-shadow: var(--lift-s);
}
.proof__media > img,
.proof__media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proof__cap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.proof__cap .swatch { width: 10px; height: 10px; transform: translateY(1px); }
.proof__prompt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proof__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(43, 47, 69, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.proof__sound {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(232, 236, 244, 0.94);
  color: var(--ink);
  box-shadow: 3px 3px 8px rgba(43, 47, 69, 0.3), inset 1px 1px 2px #fff;
}
.proof__sound:active { box-shadow: inset 2px 2px 5px rgba(43, 47, 69, 0.3); }
.proof__sound svg { width: 20px; height: 20px; }
.proof__sound .on,
.proof__sound[aria-pressed='true'] .off { display: none; }
.proof__sound[aria-pressed='true'] .on { display: inline; }
@media (pointer: coarse) { .proof__sound { width: 44px; height: 44px; } }

/* Плеєр музики: жовта пластилінова кнопка, хвиля з піків */
.player { display: grid; gap: 12px; }
.player__row { display: flex; align-items: center; gap: 14px; }
.player__play {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--clay), 0 10px 20px -8px rgba(255, 190, 70, 0.8);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.player__play:active { transform: scale(0.94); box-shadow: var(--clay-down); }
.player__play svg { width: 22px; height: 22px; }
.player__play .i-pause,
.player[data-playing] .player__play .i-play { display: none; }
.player[data-playing] .player__play .i-pause { display: block; }
.player__meta { min-width: 0; }
.player__title { font-weight: 800; font-size: 16px; line-height: 1.3; }
.player__time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.player__wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 52px;
  cursor: pointer;
}
.player__wave > i {
  flex: 1 1 0;
  min-width: 1px;
  height: calc(var(--h, 0.4) * 100%);
  border-radius: 4px;
  background: #c9cfdc;
}
.player__wave > i.is-played { background: var(--blue); }

/* Порівняння до й після */
.compare {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper-2);
  box-shadow: var(--lift-s);
  touch-action: pan-y;
}
.compare > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(43, 47, 69, 0.2);
  pointer-events: none;
}
.compare::before {
  content: '';
  position: absolute;
  top: 50%;
  left: var(--pos);
  z-index: 2;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b2f45' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") no-repeat center / 22px;
  box-shadow: 3px 3px 8px rgba(43, 47, 69, 0.35), inset 1px 1px 2px #fff;
  pointer-events: none;
}
.compare:has(.compare__range:focus-visible)::before { outline: 3px solid var(--focus); outline-offset: 2px; }
.compare__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare__label {
  position: absolute;
  top: 10px;
  z-index: 1;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(43, 47, 69, 0.72);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  pointer-events: none;
}
.compare__label--before { left: 10px; }
.compare__label--after { right: 10px; }

/* Блок коду: головна (API), документація, кабінет («API і ключі») */
/* Темна вдавлена ямка — і на світлій поверхні, і на темній плиті API */
.code {
  min-width: 0;
  border-radius: 24px;
  background: #1f2235;
  color: #eceef8;
  box-shadow: inset 6px 6px 14px rgba(0, 0, 0, 0.35), inset -4px -4px 12px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #a9adc6;
  font-size: 13.5px;
  font-weight: 700;
}
.code__copy {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: #eceef8;
  font-size: 13.5px;
  font-weight: 800;
}
.code__copy:hover { background: rgba(255, 255, 255, 0.1); }
.code__status { color: #7ee0a8; font-family: var(--font-code); font-stretch: 87.5%; font-size: 13px; }
.code pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}
.code code { font-family: var(--font-code); font-stretch: 87.5%; }
.c-cmd { color: #fff; font-weight: 700; }
.c-str { color: #ffe86b; }
.c-key { color: #ff9ad2; }
.c-num { color: #8fd0ff; }
.c-com { color: #8e8c96; }

/* ---------- Приклади коду вісьмома мовами (public/js/snippets.js) ---------- */

.snip__caption { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.snip__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.snip__tabs { display: flex; flex: 1; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.snip__tabs::-webkit-scrollbar { display: none; }
.snip__tab {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: #a9adc6;
  font: 700 13px/1 var(--font-text);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.snip__tab:hover { color: #fff; }
.snip__tab[aria-selected='true'] { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.snip__tab:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.snip pre { max-height: 480px; overflow: auto; }
.snip { min-width: 0; max-width: 100%; }

