/* ===== Blog dwell popup — появляется через 2 мин на странице блога =====
   Дизайн копирует dwell-popup с index.html. Используются классы с префиксом bdwell-,
   чтобы не конфликтовать с потенциальным восстановлением .dwell-* на главной. */

.bdwell-overlay{position:fixed;inset:0;background:rgba(6,22,51,0.7);backdrop-filter:blur(4px);z-index:250;opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s}
.bdwell-overlay.open{opacity:1;visibility:visible}
.bdwell-dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,calc(-50% + 20px)) scale(.95);max-width:460px;width:calc(100% - 32px);max-height:calc(100vh - 32px);background:var(--paper);border-radius:16px;box-shadow:0 20px 60px rgba(6,22,51,.3);z-index:251;opacity:0;visibility:hidden;transition:opacity .3s ease,transform .3s ease,visibility .3s;overflow-y:auto;display:flex;flex-direction:column}
.bdwell-dialog.open{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible}
.bdwell-header{background:linear-gradient(135deg,var(--navy-800),var(--navy-900));padding:28px 28px 24px;color:#fff;position:relative}
.bdwell-header-badge{
  display:inline-flex;align-items:center;gap:6px;
  font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;
  color:var(--gold-400);padding:4px 10px;border:1px solid rgba(214,162,58,0.35);
  border-radius:4px;margin-bottom:14px;
}
.bdwell-identity{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.bdwell-avatar{
  width:52px;height:52px;border-radius:50%;flex-shrink:0;overflow:hidden;
  background:linear-gradient(135deg,var(--gold-500),var(--gold-400));
  color:var(--navy-900);display:grid;place-items:center;
  font-family:'Playfair Display',serif;font-size:20px;font-weight:500;letter-spacing:0.02em;
  box-shadow:0 4px 12px rgba(214,162,58,0.3);
}
.bdwell-avatar img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.bdwell-avatar picture{display:contents}
.bdwell-name{font-family:'Playfair Display',serif;font-size:17px;font-weight:500;color:#fff;line-height:1.2}
.bdwell-role{font-size:12px;color:rgba(255,255,255,.7);margin-top:3px;letter-spacing:0.01em}
.bdwell-header h2{font-family:'Playfair Display',serif;font-weight:500;font-size:24px;line-height:1.25;margin:0 0 8px;color:#fff}
.bdwell-header p{font-size:14px;color:rgba(255,255,255,.82);margin:0;line-height:1.5}
.bdwell-close{position:absolute;top:12px;right:12px;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;border:none;cursor:pointer;font-size:18px;line-height:1;transition:background .2s;display:flex;align-items:center;justify-content:center;padding:0}
.bdwell-close:hover{background:rgba(255,255,255,.22)}
.bdwell-close:focus-visible{outline:2px solid var(--gold-400);outline-offset:2px}
.bdwell-body{padding:22px 28px 26px}
.bdwell-benefits{list-style:none;padding:0;margin:0 0 18px;display:flex;flex-direction:column;gap:8px}
.bdwell-benefits li{
  position:relative;padding-left:26px;font-size:14px;line-height:1.5;color:var(--ink);
}
.bdwell-benefits li::before{
  content:'';position:absolute;left:0;top:4px;width:16px;height:16px;
  background:var(--gold-500);color:var(--navy-900);
  clip-path:polygon(14% 44%, 0 60%, 40% 100%, 100% 20%, 84% 10%, 40% 72%);
}
.bdwell-body input[type="email"]{width:100%;padding:12px 14px;font-size:15px;border:1px solid var(--line);border-radius:8px;font-family:inherit;margin-bottom:14px;background:#fff;color:var(--ink)}
.bdwell-body input[type="email"]:focus{outline:2px solid var(--gold-500);outline-offset:-1px;border-color:transparent}
.bdwell-consent{display:flex;gap:10px;align-items:flex-start;font-size:12px;color:var(--muted);line-height:1.5;margin-bottom:16px;cursor:pointer}
.bdwell-consent input{margin-top:2px;flex-shrink:0;accent-color:var(--navy-800)}
.bdwell-consent a{color:var(--navy-800);text-decoration:underline;text-decoration-color:var(--gold-500)}
.bdwell-consent a:hover{color:var(--gold-500)}
.bdwell-submit{width:100%;padding:14px;font-size:15px;font-weight:600;background:var(--gold-500);color:var(--navy-900);border:none;border-radius:8px;cursor:pointer;transition:background .2s;font-family:inherit;letter-spacing:.02em}
.bdwell-submit:hover{background:var(--gold-400)}
.bdwell-submit:disabled{opacity:.5;cursor:not-allowed}
.bdwell-submit:focus-visible{outline:2px solid var(--gold-400);outline-offset:2px}
.bdwell-error{color:#C0392B;font-size:13px;margin-top:10px;line-height:1.4}
@media (max-width:600px){
  .bdwell-dialog{width:calc(100% - 24px);max-width:none}
  .bdwell-header{padding:22px 20px 20px}
  .bdwell-header h2{font-size:21px}
  .bdwell-body{padding:18px 20px 22px}
}
@media (prefers-reduced-motion:reduce){
  .bdwell-overlay,.bdwell-dialog{transition:none}
}

/* article a получает gold-underline на блоге — отменяем для попапа */
article .bdwell-dialog a, article .bdwell-overlay a{text-decoration:underline}
