/* The offer band at the bottom of every demo.
 *
 * SELF-CONTAINED ON PURPOSE. Every demo has its own palette and its own
 * variables; this file uses none of them. That is the point — this band is
 * ours, it sits underneath somebody else's website, and it should look the
 * same on all eleven of them rather than dissolving into whichever one it
 * happens to be on. Every class here is prefixed `fdx-` so it cannot collide
 * with a demo's own stylesheet.
 *
 * Loaded after the demo's stylesheet in every base template.
 *
 * Constraints, as everywhere: CSP `default-src 'none'; style-src 'self';
 * font-src 'self'`. No inline styles, no CDN, no external font, no
 * JavaScript. The animation is therefore CSS only, and all of it stops under
 * prefers-reduced-motion.
 */

.fdx {
  --fdx-ink: #0c1020;
  --fdx-ink-2: #151b33;
  --fdx-text: #f2f4fb;
  --fdx-mute: #a6aec9;
  --fdx-acc: #ffc93c;
  --fdx-acc-d: #e2ac16;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 44px 0 34px;
  background: var(--fdx-ink);
  color: var(--fdx-text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-align: left;
}

/* A soft glow behind the actions, so the eye lands on the right half. */
.fdx::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -60%;
  width: 60%;
  height: 220%;
  background: radial-gradient(closest-side, rgba(255, 201, 60, 0.16), transparent 70%);
  pointer-events: none;
}

/* The sheen. A single pass every nine seconds — slow enough to register as
   movement in peripheral vision and not fast enough to be irritating on a
   page somebody is trying to read. */
.fdx::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 38%, rgba(255, 255, 255, 0.10) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: fdx-sheen 9s ease-in-out 2s infinite;
}
@keyframes fdx-sheen {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.fdx.is-personal { background: linear-gradient(180deg, #131a36 0%, var(--fdx-ink) 70%); }

.fdx-in {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 34px;
  align-items: center;
}

.fdx-copy { min-width: 0; }
.fdx-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fdx-acc);
}
/* A slow blink on the marker rather than on anything containing words. */
.fdx-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fdx-acc);
  box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.6);
  animation: fdx-blip 2.8s ease-out infinite;
}
@keyframes fdx-blip {
  0%   { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 201, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0); }
}

.fdx-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.18;
  color: #fff;
}
.fdx-body {
  margin: 0;
  font-size: 0.98rem;
  color: var(--fdx-mute);
  max-width: 56ch;
}

.fdx-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.fdx-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.fdx-primary {
  background: var(--fdx-acc);
  color: #1a1400;
  border-color: var(--fdx-acc);
  animation: fdx-pulse 3.2s ease-out 1s infinite;
}
.fdx-primary:hover,
.fdx-primary:focus-visible {
  background: var(--fdx-acc-d);
  border-color: var(--fdx-acc-d);
  color: #1a1400;
  animation-play-state: paused;
}
@keyframes fdx-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.45); }
  60%  { box-shadow: 0 0 0 16px rgba(255, 201, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0); }
}
/* The arrow nudges rather than the button moving — a moving button is a
   button people misclick. */
.fdx-arrow { display: inline-block; animation: fdx-nudge 2.2s ease-in-out infinite; }
@keyframes fdx-nudge {
  0%, 60%, 100% { transform: translateX(0); }
  75%           { transform: translateX(5px); }
}

.fdx-secondary {
  background: transparent;
  color: var(--fdx-text);
  border-color: rgba(255, 255, 255, 0.28);
}
.fdx-secondary:hover,
.fdx-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.fdx-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.fdx-note {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--fdx-mute);
  text-align: center;
}

.fdx-pitch {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
}
.fdx-pitch a { color: var(--fdx-mute); text-decoration: none; font-weight: 600; }
.fdx-pitch a:hover, .fdx-pitch a:focus-visible { color: #fff; text-decoration: underline; }

@media (max-width: 860px) {
  .fdx-in { grid-template-columns: 1fr; gap: 22px; }
  .fdx::before { display: none; }
}
/* The demos with a fixed mobile dock need the band to clear it. */
@media (max-width: 720px) {
  .fdx { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .fdx::after,
  .fdx-dot,
  .fdx-primary,
  .fdx-arrow { animation: none; }
  .fdx::after { display: none; }
  .fdx-btn { transition: none; }
}
