/* ============================================================
   Campaign — Van Spaendonck × Conmoji on RTL 7 (autumn 2026)

   A co-branded announcement bar above the nav that opens a card
   with the Van Spaendonck offer. Markup is injected by
   js/campaign-rtl7.js; nothing here applies until that script
   adds .rtl7-on to <body>.

   The palette is Van Spaendonck's, not Conmoji's. Every token is
   namespaced --rtl7-* and every selector .rtl7-* so the co-brand
   cannot leak into the Conmoji design system (see /DESIGN.md).

   Retiring the campaign = delete this file, js/campaign-rtl7.js
   and the three tags in index.html, then regenerate nl/ and es/.
   ============================================================ */

:root {
  /* Van Spaendonck brand — verbatim from their design system */
  --rtl7-purple:     #263272;
  --rtl7-magenta:    #e0336e;
  --rtl7-magenta-aa: #bc346e;  /* WCAG-proof magenta, for text and CTA */
  --rtl7-blue-aa:    #06699e;  /* focus ring */
  --rtl7-grey-100:   #f0eeed;
  --rtl7-grey-200:   #e2dfdc;
  --rtl7-grey-300:   #c8c4c0;
  --rtl7-grey-700:   #4a4744;
  --rtl7-grey-900:   #1c1b1a;
  --rtl7-muted:      #6f6b68;
  --rtl7-gradient:   linear-gradient(135deg, #2b1f6b 0%, #00ace2 55%, #e0336e 100%);
  --rtl7-sans:       "Sofia Sans", "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  --rtl7-cond:       "Sofia Sans Condensed", "Sofia Sans", "Nunito", sans-serif;
  --rtl7-h:          0px;      /* bar height, measured by the script */
}

/* ── Page offset: the bar pushes the page down, it never covers it ─────────
   body has overflow-x:hidden (css/landing.css), which breaks position:sticky,
   so the bar is fixed and the page is padded by its measured height. */
body.rtl7-on { padding-top: var(--rtl7-h); transition: padding-top .3s ease; }
body.rtl7-on .nav { padding-top: calc(20px + var(--rtl7-h)); }
/* The skip link keeps its own offset: it is translated out of view by its own
   height, so moving it down would leave a sliver of it on screen. Its z-index
   (1100) already puts it above the bar when it takes focus. */

/* ══ Announcement bar ══════════════════════════════════════════════════ */
.rtl7-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
  background: var(--rtl7-gradient); color: #fff;
  font-family: var(--rtl7-sans);
  transform: translateY(-100%); transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.rtl7-bar[data-open="true"] { transform: none; }
.rtl7-bar[hidden] { display: none; }
/* The full-screen mobile menu owns the viewport while it is open. */
body.nav-locked .rtl7-bar { display: none; }

.rtl7-bar-inner {
  max-width: 1180px; margin: 0 auto; padding: 11px 52px 11px 20px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.rtl7-bar-text { font-size: 14.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.rtl7-bar-text b { font-weight: 800; }
.rtl7-live {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 3px 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.rtl7-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: rtl7Pulse 2s infinite; }
.rtl7-bar-open {
  flex: none; background: #fff; color: var(--rtl7-purple); border: none; border-radius: 999px;
  padding: 8px 16px; font: 800 13.5px/1 var(--rtl7-sans); cursor: pointer; white-space: nowrap;
}
.rtl7-bar-open:hover { background: var(--rtl7-grey-100); }
.rtl7-bar-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; padding: 0;
}
.rtl7-bar-close:hover { background: rgba(255,255,255,.3); }

/* ══ Header pill — stays after dismissal so the card is always reopenable ══ */
.rtl7-pill {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  background: var(--rtl7-purple); color: #fff; border: none; border-radius: 999px;
  padding: 9px 15px; font: 800 12.5px/1 var(--rtl7-sans); cursor: pointer; white-space: nowrap;
}
.rtl7-pill[hidden], .rtl7-pill.rtl7-pill-nofit { display: none; }
.rtl7-pill:hover { background: #1c2757; }
.rtl7-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rtl7-magenta); flex: none; animation: rtl7Pulse 2.4s infinite; }
@keyframes rtl7Pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,51,110,.7); }
  50%      { box-shadow: 0 0 0 7px rgba(224,51,110,0); }
}

/* ══ Card ══════════════════════════════════════════════════════════════ */
.rtl7-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(20,26,58,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px;
  opacity: 0; transition: opacity .25s ease;
  /* Lifted clear of the cookie banner while that is still showing. */
  padding-bottom: calc(24px + var(--rtl7-consent-h, 0px));
}
.rtl7-overlay[hidden] { display: none; }
.rtl7-overlay[data-open="true"] { opacity: 1; }

.rtl7-dialog {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto;
  background: #fff; border-radius: 22px; border: 1px solid var(--rtl7-grey-200);
  box-shadow: 0 28px 70px rgba(20,26,58,.42);
  padding: 34px 34px 28px;
  font-family: var(--rtl7-sans); color: var(--rtl7-grey-900); text-align: left;
  transform: translateY(14px) scale(.985); transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.rtl7-overlay[data-open="true"] .rtl7-dialog { transform: none; }
.rtl7-close {
  position: absolute; right: 14px; top: 14px; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--rtl7-grey-200); background: #fff;
  color: var(--rtl7-grey-700); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.rtl7-close:hover { background: var(--rtl7-grey-100); }

.rtl7-stack { display: grid; gap: 16px; }
.rtl7-stack > .rtl7-tv { justify-self: start; }

/* Broadcaster marks — set as type, so no third-party logo files are shipped */
.rtl7-tv {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: #fff; border: 1px solid var(--rtl7-grey-200); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--rtl7-purple);
}
a.rtl7-tv:hover { border-color: var(--rtl7-grey-300); }
.rtl7-marks { display: inline-flex; align-items: center; gap: 2px; }
.rtl7-marks i {
  font-style: normal; font-family: var(--rtl7-cond); font-weight: 600; font-size: 11px;
  color: #fff; border-radius: 2px; padding: 1px 4px; line-height: 1;
}
.rtl7-marks .rtl7-r { background: #009b96; }
.rtl7-marks .rtl7-t { background: #1fae3a; }
.rtl7-marks .rtl7-l { background: #efc50e; }
.rtl7-marks .rtl7-7 { color: #111; font-family: var(--rtl7-cond); font-weight: 600; font-size: 12px; margin-left: 2px; line-height: 1; }
.rtl7-sep { width: 1px; height: 13px; background: var(--rtl7-grey-200); margin: 0 7px; }
.rtl7-vl { font-weight: 800; font-size: 12.5px; letter-spacing: -.02em; color: #111; line-height: 1; }
.rtl7-nl { font-family: var(--rtl7-cond); font-weight: 600; font-size: 13px; letter-spacing: .02em; color: var(--rtl7-magenta); line-height: 1; }

.rtl7-eyebrow {
  font-size: 15px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rtl7-magenta-aa); margin-bottom: 10px;
}
.rtl7-title {
  font-family: var(--rtl7-cond); font-weight: 600; font-size: 40px; line-height: .96;
  letter-spacing: -.02em; color: var(--rtl7-purple); margin: 0;
}
.rtl7-body { font-size: 16.5px; line-height: 1.55; color: var(--rtl7-grey-700); margin: 0; }
.rtl7-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rtl7-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--rtl7-grey-100);
  border-radius: 999px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; color: var(--rtl7-purple);
}
.rtl7-cta {
  display: block; text-align: center; text-decoration: none;
  background: var(--rtl7-magenta-aa); color: #fff; border: none; border-radius: 8px;
  padding: 16px 20px; font-family: var(--rtl7-sans); font-weight: 700; font-size: 17px;
  cursor: pointer; box-shadow: 0 8px 32px rgba(224,51,110,.30);
}
.rtl7-cta:hover { background: #a82c61; color: #fff; }
.rtl7-trust {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 14px; font-size: 13.5px; color: var(--rtl7-muted);
}
.rtl7-trust strong { color: var(--rtl7-purple); }
.rtl7-secondary {
  display: block; width: 100%; text-align: center; background: none; border: none;
  font: 600 14px/1 var(--rtl7-sans); color: var(--rtl7-muted); cursor: pointer;
  padding: 12px; text-decoration: underline; text-underline-offset: 3px;
}
.rtl7-secondary:hover { color: var(--rtl7-purple); }

/* One focus style for every interactive part (WCAG 2.4.7) */
.rtl7-bar a:focus-visible, .rtl7-bar button:focus-visible,
.rtl7-dialog a:focus-visible, .rtl7-dialog button:focus-visible,
.rtl7-pill:focus-visible {
  outline: 3px solid var(--rtl7-blue-aa); outline-offset: 3px; border-radius: 6px;
}
.rtl7-bar button:focus-visible { outline-color: #fff; }

/* ══ Tablet: the bar keeps to one line by dropping secondary marks first ══ */
@media (max-width: 880px) {
  .rtl7-live .rtl7-long { display: none; }
  .rtl7-bar-tv .rtl7-vl, .rtl7-bar-tv .rtl7-nl, .rtl7-bar-tv .rtl7-sep { display: none; }
}

/* ══ Phone: compact bar, and the card becomes a bottom sheet ═══════════════
   A sheet that covers part of the screen and is easy to dismiss stays clear
   of Google's intrusive-interstitial rules, unlike a full-screen takeover. */
@media (max-width: 640px) {
  .rtl7-bar-inner { padding: 9px 44px 9px 12px; gap: 9px; justify-content: flex-start; }
  .rtl7-bar-text { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rtl7-long { display: none; }
  .rtl7-live { display: none; }          /* the RTL 7 mark carries the message */
  .rtl7-bar-tv { order: -1; padding: 5px 8px; }
  .rtl7-bar-open { padding: 7px 12px; font-size: 12.5px; }
  .rtl7-bar-close { right: 6px; width: 32px; height: 32px; }

  /* keep the consent offset: the banner is tall on a phone */
  .rtl7-overlay { padding: 0 0 var(--rtl7-consent-h, 0px); align-items: end; }
  .rtl7-dialog {
    width: 100%; max-height: 92%; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px max(18px, env(safe-area-inset-bottom));
    transform: translateY(100%); transition: transform .32s cubic-bezier(.22,1,.36,1);
  }
  .rtl7-overlay[data-open="true"] .rtl7-dialog { transform: none; }
  .rtl7-dialog::before {
    content: ""; position: absolute; left: 50%; top: 9px; transform: translateX(-50%);
    width: 44px; height: 4px; border-radius: 999px; background: var(--rtl7-grey-300);
  }
  .rtl7-close { width: 36px; height: 36px; right: 12px; top: 14px; }

  /* Fill the width instead of wrapping ragged, and keep the action in reach:
     the card scrolls, the CTA block stays put. */
  .rtl7-stack { gap: 14px; }
  .rtl7-title { font-size: 33px; line-height: .95; }
  .rtl7-body { font-size: 15.5px; }
  .rtl7-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .rtl7-chip { justify-content: center; padding: 10px 8px; border-radius: 12px; }
  .rtl7-chip:nth-child(3) { grid-column: 1 / -1; }
  .rtl7-actions {
    position: sticky; bottom: -1px; background: #fff; padding-top: 8px;
    box-shadow: 0 -14px 20px -14px rgba(28,27,26,.28);
  }
  .rtl7-secondary { padding: 10px; }
}

.rtl7-pill-short { display: none; }
@media (max-width: 400px) {
  .rtl7-pill .rtl7-pill-label { display: none; }
  .rtl7-pill .rtl7-pill-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .rtl7-bar, .rtl7-dialog, .rtl7-overlay, body.rtl7-on { transition: none !important; }
  .rtl7-dot, .rtl7-pill-dot { animation: none !important; }
}
