/* =============================================================================
   Banners — the Learntec/BETT event blocks and the site-wide CTA band.
   Docs: sections.md § Head-up (CTA banner), page-guidelines.md § Section
   Backgrounds, footer.md, badge.md, motion.md.

   Both event blocks ship with style="display:none" in every page and stay
   hidden — the event has passed but the markup is kept for the next one, so
   they are restyled here rather than deleted. Toggle `display` in DevTools to
   inspect them; the HTML must not be changed to unhide them.

   Tone: .bett-banner and .cta-section are dark surfaces. They declare the
   --section-fg / --section-fg-muted / --section-kicker custom properties that
   W3.2's data-tone="dark" mechanism sets, so descendants that read those
   properties inherit the right colours. W4 should also put the literal
   data-tone="dark" attribute on these sections — .btn--ghost switches to its
   outline-white form on an attribute selector, which CSS here cannot fake.
   ============================================================================= */

/* ===========================================================================
   BETT / Learntec mini banner — slim full-width strip above the nav content
   =========================================================================== */
.bett-mini-banner {
  background-color: var(--color-division-brand);
  color: var(--color-white);
  padding-block: var(--space-3);
}

.bett-mini-banner__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--color-white);
  text-decoration: none;
}

.bett-mini-banner__icon,
.bett-mini-banner__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Graphic-only, so 3:1 is the bar: #b6ffff on #268279 is 4.1:1. */
  color: var(--color-division-highlight);
}

.bett-mini-banner__arrow {
  transition: transform var(--duration-base) var(--ease-standard);
}

.bett-mini-banner__link:hover .bett-mini-banner__arrow {
  transform: translateX(var(--nudge));
}

.bett-mini-banner__text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
}

.bett-mini-banner__text strong {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 160%;
}

.bett-mini-banner__subtext {
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 160%;
}

.bett-mini-banner__subtext::before {
  content: '—';
  margin-right: var(--space-2);
}

/* ===========================================================================
   BETT / Learntec banner — full CTA block with badge, title, copy and button
   =========================================================================== */
.bett-banner {
  --section-fg: var(--color-white);
  --section-fg-muted: var(--color-white);
  --section-kicker: var(--color-accent);

  position: relative;
  overflow: hidden;
  background-color: var(--color-primary);
  color: var(--section-fg);
  padding-block: var(--section-padding-y-compact);
}

/* Event branding: a soft EdTech wash over the primary ground. No rgba token
   exists for these opacities, so they are mixed from the division tokens. */
.bett-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 80%, color-mix(in srgb, var(--color-division-brand) 45%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--color-accent) 18%, transparent) 0%, transparent 55%);
}

.bett-banner__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-two-column);
}

.bett-banner__info {
  flex: 1;
  max-width: 920px;
}

/* badge.md § edtech variant — accent fill with --color-primary-darkest text.
   The icon inherits that colour through currentColor (contracts.md §4), so no
   descendant svg rule is needed. */
.bett-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-pill);
  background-color: var(--color-accent);
  color: var(--color-primary-darkest);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 16px;
  text-transform: uppercase;
}

.bett-banner__title {
  margin-bottom: var(--gap-title-description);
  color: var(--section-fg);
}

.bett-banner__text {
  margin-bottom: 0;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 160%;
  color: var(--section-fg-muted);
}

.bett-banner__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
  text-align: right;
}

/* Lift, glow and fill come from .btn--white in button.css. */
.bett-banner__btn {
  white-space: nowrap;
}

.bett-banner__note {
  margin-bottom: 0;
  max-width: 24ch;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 160%;
  color: var(--section-fg-muted);
}

/* ===========================================================================
   CTA section — the site's call-to-action band (sections.md § Head-up)

   Background is --color-primary, NOT --color-primary-dark: the footer is
   --color-primary-dark and the CTA band sits directly above it on every page
   that has one, and footer.md / page-guidelines.md forbid two adjacent
   sections sharing a background.
   =========================================================================== */
.cta-section {
  --section-fg: var(--color-white);
  --section-fg-muted: var(--color-white);
  --section-kicker: var(--color-accent);
  /* Declared here as well as via data-tone="dark", the same way the three
     tone colours above are, so a CTA band is never a navy ring on navy. */
  --focus-ring: var(--color-accent-cyan);

  background-color: var(--color-primary);
  color: var(--section-fg);
  padding-block: var(--section-padding-y-compact);
  text-align: center;
}

.cta-section h2 {
  margin-bottom: var(--gap-title-description);
  color: var(--section-fg);
}

.cta-section p {
  max-width: 920px;
  margin-inline: auto;
  margin-bottom: var(--gap-content-block);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 160%;
  color: var(--section-fg-muted);
}

.cta-section__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

/* ===========================================================================
   HEAD-UP CTA BANNER — sections.md § Head-up (CTA banner). A compact navy band
   between two light sections: one inline sentence on the left, one outline
   button on the right. No reveal and no parallax — sections.md § Motion gives
   the CTA banners none.
   =========================================================================== */
.cta-banner {
  --section-fg: var(--color-white);
  --section-fg-muted: var(--color-white);
  --section-kicker: var(--color-accent);
  --focus-ring: var(--color-accent-cyan);

  background-color: var(--color-primary);
  color: var(--section-fg);
  padding-block: var(--section-padding-y-compact);
}

.cta-banner > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-content-block);
}

/* typographyH3 for both halves; only the weight differs, so the sentence reads
   as one line (page-guidelines.md § Visual Consistency). */
.cta-banner__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 120%;
  color: var(--section-fg);
}

.cta-banner__text strong {
  font-weight: 700;
}

.cta-banner__text span {
  font-weight: 400;
}

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 1200px) {
  .bett-banner__text,
  .cta-section p {
    font-size: 1rem;
  }

  .cta-banner__text {
    font-size: 1.75rem;
  }
}

@media (max-width: 900px) {
  .bett-banner__content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-content-block);
  }

  .bett-banner__cta {
    align-items: flex-start;
    text-align: left;
  }

  .cta-banner > .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .bett-mini-banner__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .bett-mini-banner__subtext::before {
    content: none;
  }

  .bett-banner__note {
    max-width: none;
  }

  .cta-section p {
    font-size: 0.9375rem;
  }

  .cta-section__buttons .btn {
    width: 100%;
  }

  .cta-banner__text {
    font-size: 1.375rem;
    gap: var(--space-2);
  }

  .cta-banner > .container .btn {
    width: 100%;
  }
}
