/* css/chorna-pyatnytsia.css — DSTR-134 · сторінка розпродажу /chorna-pyatnytsia (24–30.11).
 * Ескіз — _specs/destroy/dstr134/eskiz-storinky-chorna-pyatnytsia.png: лого → червона плашка «Чорна пʼятниця · 24–30.11»
 * → відкритий серт «MiX посуду ×50 для двох» (вигляд сторінки купівлі: назва, гості, лот, рядок ціни, «КУПИТИ») →
 * два запечатані серти. Вигляд серта й печатки — копія cert.html (ті самі токени, класи з префіксом bfp-), щоб не
 * чіпати живу сторінку сертифіката. Рядок ціни й плашки — css/bf20.css. Лайм — лише контур «КУПИТИ» (як «Оплатити»). */

:root {
  --bg: #0a0a0a;
  --r: #E63946;
  --g: #00FF00;
  --g-deep:#00C400;--g-fill:linear-gradient(120deg,var(--g) 0%,var(--g-deep) 45%,var(--g) 100%);--g-text:color-mix(in srgb,var(--g) 94%,black);
  --ink: #fff;
  --muted: #9a9a9a;
  --glass-line: rgba(215, 232, 248, .85);
  --font-display: 'Alumni Sans', 'Alumni Fallback', sans-serif;
  --font-gothic: 'UnifrakturMaguntia', serif;
  --font-body: 'Montserrat', 'Montserrat Fallback', sans-serif;
  --col: min(430px, calc(100vw - 32px));
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(env(safe-area-inset-top), 18px) 16px max(env(safe-area-inset-bottom), 28px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.bfp { width: var(--col); display: flex; flex-direction: column; align-items: center; text-align: center; }
.bfp-logo { display: block; line-height: 0; margin-bottom: 18px; }
.bfp-logo img { width: 210px; height: auto; display: block; filter: drop-shadow(0 0 14px rgba(200, 16, 46, .28)); }
@media (min-width: 768px) { .bfp-logo img { width: 260px; } }
.bfp-head { margin-bottom: 30px; font-size: 26px; padding: 10px 22px 9px; }

/* ── Відкритий сертифікат (вигляд сторінки купівлі) ───────────────────────────────────── */
.bfp-cert { width: 100%; display: flex; flex-direction: column; align-items: center; animation: bfpRise .55s cubic-bezier(.2, .7, .3, 1) both; }
.bfp-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .32em; text-indent: .32em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.bfp-name {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(46px, 13vw, 64px); line-height: .95;
  text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 0 60px rgba(230, 57, 70, .35);
  margin-bottom: 12px; overflow-wrap: anywhere;
}
.bfp-guests {
  display: inline-block; margin-bottom: 16px; padding: 5px 14px; border: 1px solid rgba(230, 57, 70, .45);
  border-radius: 100px; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: .18em;
  text-indent: .18em; text-transform: uppercase; color: var(--r);
}
.bfp-hero { width: 100%; display: flex; justify-content: center; align-items: flex-end; margin: 2px 0 6px; min-height: 192px; }
.bfp-hero .isc { width: min(100%, 330px, calc(236px * var(--r, 1))); }
.bfp-hero .isc img { width: 100%; height: 100%; filter: none; }
.bfp-buy {
  display: block; min-width: min(100%, 300px); max-width: 100%; text-align: center; cursor: pointer; background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--g) 52%, transparent); border-radius: 0; color: var(--g-text);
  font-family: var(--font-body); font-size: 17px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase;
  text-decoration: none; padding: 11px 20px; animation: btnGhTremble 3.4s cubic-bezier(.4, 0, .2, 1) infinite;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
/* канон 30.10: контурний неон без заливки — на наведенні лише яскравіший контур */
.bfp-buy:hover, .bfp-buy:focus-visible { border-color: var(--g); color: var(--g); outline: none; }
@keyframes btnGhTremble{0%,56%,100%{transform:translate3d(0,0,0) rotate(0) scale(1)}28%{transform:translate3d(0,0,0) rotate(0) scale(1.016)}60%{transform:translate3d(-1.5px,.4px,0) rotate(-.6deg) scale(1.02)}65%{transform:translate3d(1.3px,-.3px,0) rotate(.48deg) scale(1.02)}70%{transform:translate3d(-.95px,.2px,0) rotate(-.32deg) scale(1.012)}76%{transform:translate3d(.6px,-.1px,0) rotate(.18deg) scale(1.006)}83%{transform:translate3d(-.28px,0,0) rotate(-.08deg) scale(1.002)}91%{transform:translate3d(.1px,0,0) rotate(.02deg) scale(1)}}
.bfp-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.bfp-tips .pay-chip {
  display: inline-flex; align-items: center; justify-content: center; height: 28px; min-width: 52px; padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .75); background: transparent;
}
.bfp-tips .pay-chip img { display: block; }
.bfp-cert + .bfp-cert, .bfp-seals + .bfp-cert, .bfp-cert + .bfp-seals, .bfp-cert + div { margin-top: 44px; }
.bfp-list > div:empty { display: none; }
.bfp-cert.bfp-opened { padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .1); }
@keyframes bfpRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Запечатані сертифікати (копія печатки cert.html, 3 тапи) ─────────────────────────── */
.bfp-seals { width: calc(100vw - 32px); max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bfp-seal {
  position: relative; width: 100%; height: clamp(300px, 62vw, 460px); border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(230, 57, 70, .05) 0%, transparent 55%),
    linear-gradient(160deg, #121216 0%, #0b0b0e 45%, #08080a 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 -30px 60px rgba(0, 0, 0, .5), 0 20px 60px rgba(0, 0, 0, .6);
  overflow: hidden; cursor: pointer; user-select: none; touch-action: manipulation;
}
.bfp-seal:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.bfp-seal .s-sheen {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; transform: translateX(-70%);
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.045) 42%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.045) 58%, transparent 70%);
  animation: bfpSheen 5.5s ease-in-out infinite;
}
@keyframes bfpSheen { 0%, 100% { transform: translateX(-70%); } 50% { transform: translateX(70%); } }
.bfp-seal .s-inner {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 22px 10px 18px;
  transition: opacity .7s ease, filter .7s ease, transform .8s cubic-bezier(.25, .46, .45, .94);
}
.bfp-seal .s-status {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; color: var(--r);
}
.bfp-seal .s-status::before, .bfp-seal .s-hint::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--r); animation: bfpDot 2.2s ease-in-out infinite;
}
@keyframes bfpDot { 0%, 100% { opacity: .55; } 50% { opacity: 1; box-shadow: 0 0 10px 1px currentColor; } }
.bfp-seal .s-logo img { width: 92%; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 0 20px rgba(230, 57, 70, .3)); animation: bfpTremble .9s linear infinite; }
@keyframes bfpTremble { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(.6px,-.8px) rotate(-.5deg); } 50% { transform: translate(-.7px,.5px) rotate(.4deg); } 75% { transform: translate(.5px,.6px) rotate(-.3deg); } }
.bfp-seal .s-gothic { margin-top: 10px; font-family: var(--font-gothic); font-size: clamp(14px, 4vw, 20px); color: var(--r); }
.bfp-seal .s-foot { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.bfp-seal .s-hint {
  display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 600; letter-spacing: .12em;
  text-indent: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.bfp-seal .s-ticks { display: flex; gap: 6px; }
.bfp-seal .s-ticks i { width: 14px; height: 2px; background: rgba(255, 255, 255, .14); transition: background .25s ease, box-shadow .25s ease; }
.bfp-seal[data-tap="1"] .s-ticks i:nth-child(-n+1),
.bfp-seal[data-tap="2"] .s-ticks i:nth-child(-n+2),
.bfp-seal[data-tap="3"] .s-ticks i { background: var(--r); box-shadow: 0 0 8px rgba(230, 57, 70, .7); }
.bfp-seal .s-glow {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(ellipse 75% 55% at 52% 49%, rgba(230,57,70,.5) 0%, rgba(200,16,46,.18) 45%, transparent 70%);
}
.bfp-seal[data-tap="1"] .s-glow { opacity: .22; }
.bfp-seal[data-tap="2"] .s-glow { opacity: .55; }
.bfp-seal[data-tap="3"] .s-glow { opacity: .95; }
.bfp-seal .s-cracks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.bfp-seal .s-cracks path {
  fill: none; stroke: var(--glass-line); stroke-width: 1.05; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; stroke-dasharray: 300; stroke-dashoffset: 300; opacity: 0;
  filter: drop-shadow(0 0 1.5px rgba(200, 225, 255, .6));
}
.bfp-seal .s-cracks g.on path { opacity: .92; stroke-dashoffset: 0; transition: stroke-dashoffset .25s ease-out, opacity .1s ease-out; }
.bfp-seal .s-shards { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; overflow: visible; }
.bfp-seal .s-shards polygon { fill: rgba(205,225,245,.13); stroke: rgba(230,242,255,.55); stroke-width: .35; transform-box: fill-box; transform-origin: center; }
.bfp-seal .s-flash {
  position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 52% 49%, rgba(255,235,235,.9) 0%, rgba(230,57,70,.45) 35%, transparent 70%);
}
.bfp-seal.exploding .s-flash { animation: bfpFlash .8s ease-out both; }
@keyframes bfpFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.bfp-seal.exploding .s-inner { opacity: 0; filter: blur(10px) brightness(2.2); transform: scale(1.12); }
.bfp-seal.exploding { pointer-events: none; }
.bfp-seal.shake-1 { animation: bfpShake1 .3s ease; }
.bfp-seal.shake-2 { animation: bfpShake2 .36s ease; }
@keyframes bfpShake1 { 0%,100%{transform:translate3d(0,0,0)} 25%{transform:translate3d(2px,-1px,0)} 50%{transform:translate3d(-2px,1px,0)} 75%{transform:translate3d(1px,1px,0)} }
@keyframes bfpShake2 { 0%,100%{transform:translate3d(0,0,0)} 18%{transform:translate3d(-4px,2px,0) rotate(-.4deg)} 40%{transform:translate3d(4px,-3px,0) rotate(.4deg)} 62%{transform:translate3d(-3px,-2px,0)} 84%{transform:translate3d(2px,3px,0)} }
.bfp-seal.gone { animation: bfpGone .45s ease .55s both; }
@keyframes bfpGone { to { opacity: 0; transform: scale(.97); } }
/* одна печатка лишилась — на всю ширину сітки */
.bfp-seals.one { grid-template-columns: 1fr; max-width: 320px; }

.bfp-note { margin-top: 40px; max-width: 340px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.bfp-note a { color: #fff; }
.bfp-loader { margin: 80px auto; width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--r); border-radius: 50%; animation: bfpSpin .85s linear infinite; }
@keyframes bfpSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .bfp-buy, .bfp-seal .s-sheen, .bfp-seal .s-logo img, .bfp-cert { animation: none !important; }
}

/* відкритий серт стоїть між першим і печатками — відступ печаток завжди */
.bfp-seals { margin-top: 44px; }
