/* ─────────────────────────────────────────────────────────────────────────
   "Follow us" pop-up (Dec 2026). Behaviour: assets/js/follow-dialog.js.
   A centred glass card on computers, a sheet from the bottom on phones.
   ───────────────────────────────────────────────────────────────────────── */
html.fd-lock { overflow: hidden; }

.fd {
  border: 0; padding: 0; margin: auto;
  background: transparent;
  max-width: calc(100vw - 32px); width: 420px;
  max-height: calc(100dvh - 32px);
  color: #1a293f;
  font-family: 'Inter', sans-serif;
  overflow: visible;
}
.fd::backdrop { background: rgba(13, 26, 48, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fd[open] .fd-card { animation: fd-in .42s cubic-bezier(0.32, 0.72, 0, 1) both; }
.fd[open]::backdrop { animation: fd-fade .3s ease both; }
@keyframes fd-in   { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fd-fade { from { opacity: 0; } to { opacity: 1; } }

.fd-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 32px 24px 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 0%, rgba(71, 145, 254, 0.22), transparent 55%),
    radial-gradient(circle at 100% 30%, rgba(140, 120, 255, 0.14), transparent 50%),
    #f7faff;
  box-shadow: 0 24px 60px rgba(13, 26, 48, 0.3);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.fd-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(26, 41, 63, 0.06); color: #1a293f;
  display: grid; place-items: center; cursor: pointer;
  transition: background-color .2s ease;
}
.fd-close:hover { background: rgba(26, 41, 63, 0.12); }
.fd-close svg { width: 18px; height: 18px; }
.fd-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(21, 52, 97, .12);
  margin-bottom: 14px;
}
.fd-avatar img { width: 28px; height: 28px; display: block; }
.fd-title { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; line-height: 30px; margin: 0; }
.fd-desc { font-size: 15px; line-height: 22px; color: #52637d; margin: 6px 0 20px; text-wrap: balance; }

.fd-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.fd-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e6edf8;
  color: #1a293f; text-decoration: none; text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fd-row:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(21, 52, 97, .1); }
.fd-row:focus-visible, .fd-more:focus-visible, .fd-close:focus-visible { outline: 3px solid #4791fe; outline-offset: 2px; }
.fd-ico {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: #153461; color: #fff;
}
.fd-ico svg { width: 19px; height: 19px; }
.fd-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fd-text b { font-size: 15px; font-weight: 600; line-height: 20px; }
.fd-text small { font-size: 13px; line-height: 18px; color: #52637d; }
.fd-pill {
  background: #4791fe; color: #fff;
  font-size: 13px; font-weight: 600; line-height: 18px;
  padding: 7px 14px; border-radius: 100px;
}
.fd-row:hover .fd-pill { background: #2f7cf0; }

.fd-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 8px 12px; border-radius: 100px;
  font-size: 14px; font-weight: 600; color: #4791fe; text-decoration: none;
}
.fd-more svg { width: 16px; height: 16px; transition: transform .2s ease; }
.fd-more:hover svg { transform: translateX(3px); }

/* ── "Hear from us" email sign-up (pop-up and /follow) ─────────────────── */
.sub { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.sub[hidden] { display: none; }
.sub-label { font-size: 15px; font-weight: 600; line-height: 20px; color: #1a293f; }
.sub-row { display: flex; gap: 8px; }
.sub-row input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 16px; line-height: 22px; color: #1a293f;   /* 16px stops phones zooming in */
  padding: 11px 16px; border-radius: 100px;
  border: 1.5px solid #cad6e9; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.sub-row input::placeholder { color: #8b9ebb; }
.sub-row input:focus { outline: none; border-color: #4791fe; box-shadow: 0 0 0 3px rgba(71, 145, 254, .2); }
.sub-row input[aria-invalid="true"] { border-color: #d14343; }
.sub-row button {
  flex-shrink: 0; border: 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 22px;
  padding: 11px 20px; border-radius: 100px;
  background: #153461; color: #fff;
  transition: background-color .2s ease;
}
.sub-row button:hover { background: #1d4377; }
.sub-row button:focus-visible { outline: 3px solid #4791fe; outline-offset: 2px; }
.sub-row button:disabled { opacity: .6; cursor: progress; }
.sub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sub-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 18px; color: #1a293f; cursor: pointer; }
.sub-consent input { width: 16px; height: 16px; margin: 1px 0 0; flex-shrink: 0; accent-color: #153461; cursor: pointer; }
.sub-consent input:focus-visible { outline: 3px solid #4791fe; outline-offset: 2px; }
.sub.is-done .sub-consent { display: none; }
.sub-note { font-size: 12px; line-height: 17px; color: #52637d; margin: 0; }
.sub-note a { color: inherit; text-decoration: underline; }
.sub-msg { font-size: 13px; line-height: 18px; font-weight: 500; color: #52637d; margin: 0; min-height: 0; }
.sub-msg:empty { display: none; }
.sub-msg.is-ok  { color: #3c6e28; }
.sub-msg.is-err { color: #c0392b; }
.sub.is-done .sub-row { display: none; }

/* In the pop-up: a divider above it */
.fd-sub { width: 100%; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e6edf8; }
@media (max-width: 360px) {
  .sub-row { flex-direction: column; }
}

/* Phones: a sheet that rises from the bottom */
@media (max-width: 640px) {
  .fd { width: 100%; max-width: 100%; margin: auto 0 0; }
  .fd-card {
    border-radius: 28px 28px 0 0;
    padding: 28px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .fd[open] .fd-card { animation-name: fd-up; }
  @keyframes fd-up { from { transform: translateY(100%); } to { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .fd[open] .fd-card, .fd[open]::backdrop { animation: none; }
  .fd-row, .fd-more svg { transition: none; }
}
