/*
 * Landing hero color lock.
 * The original WebGL scene remains transparent above these background layers.
 */
body[data-page="home"] .background,
body[data-page="home"] [data-background="hero"],
body[data-page="home"] [data-background="hero-fade"] {
  background-color: #075df5 !important;
}

/*
 * Hardware-safe hero fallback.
 * Chrome can refuse a WebGL context when GPU acceleration is unavailable or
 * its context budget is exhausted. Keep the complete page usable and preserve
 * the blue/black/acid visual language without relying on a canvas.
 */
html.bbc-no-webgl,
html.bbc-no-webgl body {
  width: 100%;
  min-height: 100%;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html.bbc-no-webgl .loader,
html.bbc-no-webgl #webgl,
html.bbc-no-webgl .background,
html.bbc-no-webgl .header__canvas-wrap,
html.bbc-no-webgl .footer__webgl-button,
html.bbc-no-webgl [dom2webgl] {
  display: none !important;
}

html.bbc-no-webgl .asscroll-container,
html.bbc-no-webgl .asscroll-wrapper {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  transform: none !important;
}

html.bbc-no-webgl.bbc-no-webgl-panel-open {
  overflow: hidden !important;
}

html.bbc-no-webgl body[data-page="home"] .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 0 !important;
  color: #fff;
  background:
    radial-gradient(circle at 82% 24%, rgba(216, 255, 36, 0.12), transparent 17%),
    linear-gradient(135deg, #075df5 0%, #0a58e3 54%, #0749c3 100%) !important;
}

html.bbc-no-webgl body[data-page="home"] .hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14%;
  right: -8%;
  width: min(54vw, 820px);
  aspect-ratio: 1.32;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%),
    #070a12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16% 4% 24% 7%;
  box-shadow: 0 44px 90px rgba(1, 8, 24, 0.38);
  transform: rotate(-11deg);
}

html.bbc-no-webgl body[data-page="home"] .hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 8%;
  bottom: 9%;
  width: min(22vw, 330px);
  aspect-ratio: 1;
  border: 1px solid rgba(216, 255, 36, 0.56);
  border-radius: 50%;
  box-shadow: inset 0 0 0 22px rgba(7, 93, 245, 0.22);
}

html.bbc-no-webgl body[data-page="home"] .hero__message,
html.bbc-no-webgl body[data-page="home"] .hero__scroll {
  z-index: 2;
}

html.bbc-no-webgl body[data-page="home"] .hero__tagline,
html.bbc-no-webgl body[data-page="home"] .hero__supporting,
html.bbc-no-webgl body[data-page="home"] [data-inview] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

@media (max-width: 767px) {
  html.bbc-no-webgl body[data-page="home"] .hero::before {
    top: 49%;
    right: -30%;
    width: 92vw;
    opacity: 0.48;
  }

  html.bbc-no-webgl body[data-page="home"] .hero::after {
    right: -10%;
    bottom: 6%;
    width: 48vw;
  }
}

/*
 * The original scroll choreography moves the manifesto backdrop upward before
 * its section reaches the viewport. Keep that moving layer blue until the
 * manifesto itself becomes the active section.
 */
body[data-page="home"]:not(.bbc-manifesto-active) [data-background="manifesto"] {
  background-color: #075df5 !important;
}

/*
 * Hero message system.
 * The WebGL sculpture remains the visual anchor, while the copy sits on a
 * restrained editorial surface so the two layers never compete for legibility.
 */
body[data-page="home"] .hero {
  align-items: flex-start;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(13rem, 17vh, 17rem) clamp(3rem, 8vw, 15rem) clamp(10rem, 12vh, 13rem);
}

body[data-page="home"] .hero__message {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(720px, 44vw);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-page="home"] .hero__message::after {
  display: none;
}

body[data-page="home"] .hero__tagline,
body[data-page="home"] .hero__title,
body[data-page="home"] .hero__subtitle,
body[data-page="home"] .hero__supporting {
  position: relative;
  z-index: 1;
  text-align: left;
}

body[data-page="home"] .hero__tagline {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  margin-bottom: clamp(2rem, 1.8vw, 3rem);
  color: #dfff31;
  font-size: clamp(1.05rem, .7vw, 1.35rem);
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.35;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s cubic-bezier(.32,.94,.6,1) .65s,
              transform .65s cubic-bezier(.32,.94,.6,1) .65s;
}

body[data-page="home"] .hero__tagline > span {
  width: clamp(2.6rem, 2.2vw, 4.2rem);
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
}

body[data-page="home"] .hero__title {
  width: 100%;
  margin: 0 0 clamp(2.4rem, 2vw, 3.4rem) !important;
  color: #fff;
  font-size: clamp(4.8rem, 3.9vw, 7.5rem) !important;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .93 !important;
}

body[data-page="home"] .hero__title > span {
  color: #dfff31;
}

body[data-page="home"] .hero__subtitle {
  width: 100%;
  max-width: 64rem;
  margin: 0 0 1.4rem !important;
  color: rgba(255,255,255,.94) !important;
  font-size: clamp(1.45rem, .95vw, 1.85rem) !important;
  font-weight: 400;
  line-height: 1.55 !important;
  text-shadow: none !important;
}

body[data-page="home"] .hero__supporting {
  width: 100%;
  max-width: 60rem;
  margin: 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.72);
  font-size: clamp(1.2rem, .76vw, 1.48rem);
  font-weight: 500;
  letter-spacing: .015em;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s cubic-bezier(.32,.94,.6,1) 1.2s,
              transform .65s cubic-bezier(.32,.94,.6,1) 1.2s;
}

body[data-page="home"] .hero[data-visible="true"] .hero__tagline,
body[data-page="home"] .hero[data-visible="true"] .hero__supporting {
  opacity: 1;
  transform: translateY(0);
}

body[data-page="home"] .hero__scroll {
  position: absolute !important;
  left: auto !important;
  right: clamp(3rem, 8vw, 15rem);
  bottom: clamp(3rem, 5vh, 6rem);
  z-index: 6;
}

@media (max-width: 1180px) {
  body[data-page="home"] .hero {
    padding-left: 4rem;
    padding-right: 4rem;
  }

  body[data-page="home"] .hero__message {
    width: min(650px, 56vw);
  }

  body[data-page="home"] .hero__scroll {
    left: auto !important;
    right: 4rem;
  }
}

@media (max-width: 767px) {
  body[data-page="home"] .hero {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 100svh;
    padding: clamp(10.5rem, 14svh, 12rem) 1.4rem 8rem;
  }

  body[data-page="home"] .hero__message {
    width: 100%;
    max-width: 39rem;
    padding: 0 1rem;
    border-radius: 0;
    background: #075df5;
    box-shadow: 0 2.2rem 1.8rem 1.2rem #075df5;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body[data-page="home"] .hero__message::before {
    display: none;
  }

  body[data-page="home"] .hero__message::after {
    right: -13rem;
    bottom: -17rem;
  }

  body[data-page="home"] .hero__tagline {
    gap: .8rem;
    margin-bottom: 1.6rem;
    font-size: clamp(.82rem, 2.35vw, .98rem);
    letter-spacing: .095em;
  }

  body[data-page="home"] .hero__tagline > span {
    width: 2rem;
  }

  body[data-page="home"] .hero__title {
    max-width: 36rem;
    margin-bottom: 1.75rem !important;
    font-size: clamp(3.35rem, 9.4vw, 4.15rem) !important;
    line-height: .93 !important;
  }

  body[data-page="home"] .hero__subtitle {
    max-width: 31rem;
    margin-bottom: 1.15rem !important;
    font-size: clamp(1.18rem, 3.4vw, 1.38rem) !important;
    line-height: 1.48 !important;
  }

  body[data-page="home"] .hero__supporting {
    max-width: 31rem;
    padding-top: 1.15rem;
    font-size: clamp(.96rem, 2.8vw, 1.12rem);
    line-height: 1.45;
  }

  body[data-page="home"] .hero__scroll {
    left: 50% !important;
    right: auto !important;
    bottom: 2rem;
    transform: translateX(-50%);
  }
}

@media (max-width: 420px) {
  body[data-page="home"] .hero {
    padding-inline: 1.1rem;
  }

  body[data-page="home"] .hero__message {
    padding-inline: .7rem;
  }

  body[data-page="home"] .hero__title {
    font-size: clamp(3rem, 9.5vw, 3.65rem) !important;
  }
}

@media (max-height: 760px) and (min-width: 768px) {
  body[data-page="home"] .hero {
    padding-top: 9rem;
    padding-bottom: 7rem;
  }

  body[data-page="home"] .hero__message {
    width: min(650px, 48vw);
    padding: 0;
  }

  body[data-page="home"] .hero__tagline {
    margin-bottom: 1.4rem;
  }

  body[data-page="home"] .hero__title {
    margin-bottom: 1.7rem !important;
    font-size: clamp(4.3rem, 4vw, 6.8rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero__tagline,
  body[data-page="home"] .hero__supporting {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
