/* =====================================================================
   Kopou v2 — Home hero A "the Kopou Loop" (dark)
   Locked 24 Oct 2026 · v3 (original motion on a fixed centre, Elementor wrapper fix, button fixes).
   Do not edit values without a design-thread change.
   Upload to: /wp-content/uploads/kopou-hero-a/kopou-hero-a.css
   Every rule is scoped under .kp-hero-a so nothing leaks to other pages.
   ===================================================================== */

/* ---------- 1. Section ---------- */
body .kp-hero-a {
  --kp-carbon: #0F1417;
  --kp-purple: #6045F4;
  --kp-mint: #53E6D4;
  --kp-glow: #1B1640;
  --kp-head: 'Switzer', 'Inter Tight', system-ui, sans-serif;
  --kp-body: 'Quicksand', system-ui, sans-serif;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  padding: 120px 24px 32px;
  background: radial-gradient(ellipse 70% 60% at 50% 52%, var(--kp-glow) 0%, var(--kp-carbon) 70%);
  color: #FFFFFF;
  text-align: center;
}

/* ---------- 2. The loop (HTML widget) ---------- */
.kp-hero-a .kp-hero-a__media {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  pointer-events: none;
  mix-blend-mode: screen;               /* the video's black disappears into the hero ground.
                                           Needs this widget to be a DIRECT child of .kp-hero-a */
}
/* v2 fix: Elementor wraps the HTML widget in its own boxes (position: relative),
   which made the loop position itself inside a small box at the top of the hero.
   Every wrapper between the media layer and .kp-loop now fills the whole hero. */
.kp-hero-a .kp-hero-a__media > :not(.kp-loop):not(script),
.kp-hero-a .kp-hero-a__media .elementor-element,
.kp-hero-a .kp-hero-a__media .elementor-widget,
.kp-hero-a .kp-hero-a__media .elementor-widget-container,
.kp-hero-a .kp-hero-a__media .e-con,
.kp-hero-a .kp-hero-a__media .e-con-inner {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
.kp-hero-a .kp-loop {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(1180px, 82vw);
  aspect-ratio: 1920 / 1460;
  transform: translate(-50%, -50%) rotate(-6deg);
  animation: kpLoopIn 1.8s cubic-bezier(.2, .7, .2, 1) both;
}
.kp-hero-a .kp-loop__poster,
.kp-hero-a .kp-loop__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 0;
}
.kp-hero-a .kp-loop__video { opacity: 0; transition: opacity .8s ease; }
.kp-hero-a .kp-loop.is-playing .kp-loop__video { opacity: 1; }

/* ---------- 3. Copy ---------- */
.kp-hero-a .kp-hero-a__content {
  position: relative;
  z-index: 2;
  align-self: center;
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 24px;
}
.kp-hero-a .kp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin: 0;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(15, 20, 23, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--kp-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #E6E2FF;
}
.kp-hero-a .kp-eyebrow::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--kp-mint);
}
.kp-hero-a .kp-hero-a__title {
  margin: 26px 0 0;
  font-family: var(--kp-head);
  font-weight: 700;
  font-size: clamp(52px, 7.8vw, 112px);
  line-height: .98;
  letter-spacing: -.045em;
  color: #FFFFFF;
  text-shadow: 0 2px 30px rgba(15, 20, 23, .55);
}
.kp-hero-a .kp-hero-a__accent { color: var(--kp-mint); }
.kp-hero-a .kp-hero-a__lede {
  margin: 28px 0 0;
  max-width: 620px;
  font-family: var(--kp-body);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.55;
  color: #F1EEFF;
  text-shadow: 0 1px 18px rgba(15, 20, 23, .8);
}
.kp-hero-a .kp-hero-a__actions {
  margin-top: 36px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Buttons on dark. The live classes from kopou-ui.css are reused.
   v2: kopou-ui.css sets the secondary button's colours with !important,
   so the dark-glass version needs !important and a more specific selector. */
body .kp-hero-a .kp-hero-a__actions .kp-btn--secondary,
body .kp-hero-a .kp-hero-a__actions .kp-btn--secondary:hover,
body .kp-hero-a .kp-hero-a__actions .kp-btn--secondary:focus-visible {
  background: rgba(255, 255, 255, .10) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  color: #FFFFFF !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
}
body .kp-hero-a .kp-hero-a__actions .kp-btn--secondary:hover { background: rgba(255, 255, 255, .16) !important; }
body .kp-hero-a .kp-hero-a__actions .kp-btn--secondary * { color: inherit !important; }
.kp-hero-a .kp-hero-a__actions .kp-btn--primary,
.kp-hero-a .kp-hero-a__actions .kp-btn--secondary,
.kp-hero-a .kp-hero-a__actions .kp-btn--primary *,
.kp-hero-a .kp-hero-a__actions .kp-btn--secondary * { font-family: var(--kp-body) !important; font-weight: 600 !important; }
.kp-hero-a .kp-btn--primary { box-shadow: 0 10px 30px rgba(96, 69, 244, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }

/* ---------- 4. Stat bar ---------- */
.kp-hero-a .kp-stats {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 20px 8px;
  border-radius: 24px;
  background: rgba(15, 20, 23, .5);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.kp-hero-a .kp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, .12);
}
.kp-hero-a .kp-stat:first-child { border-left: 0; }
.kp-hero-a .kp-stat__num {
  margin: 0;
  font-family: var(--kp-head);
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.03em;
  color: #FFFFFF;
}
.kp-hero-a .kp-stat__plus { color: var(--kp-mint); }
.kp-hero-a .kp-stat__label {
  margin: 0;
  font-family: var(--kp-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #C4BDF0;
}

/* ---------- 5. Load-in ---------- */
@keyframes kpLoopIn {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1); }
}
@keyframes kpRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.kp-hero-a .kp-hero-a__content > * { animation: kpRise .9s cubic-bezier(.2, .7, .2, 1) both; }
.kp-hero-a .kp-hero-a__content > :nth-child(1) { animation-delay: .35s; }
.kp-hero-a .kp-hero-a__content > :nth-child(2) { animation-delay: .50s; }
.kp-hero-a .kp-hero-a__content > :nth-child(3) { animation-delay: .68s; }
.kp-hero-a .kp-hero-a__content > :nth-child(4) { animation-delay: .84s; }
.kp-hero-a .kp-stats { animation: kpRise 1s 1.05s cubic-bezier(.2, .7, .2, 1) both; }

/* Keep everything visible and still while editing in Elementor */
body.elementor-editor-active .kp-hero-a *,
body.elementor-editor-active .kp-hero-a .kp-loop { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  .kp-hero-a .kp-loop,
  .kp-hero-a .kp-hero-a__content > *,
  .kp-hero-a .kp-stats { animation: none !important; }
}

/* ---------- 6. Tablet ---------- */
@media (max-width: 1023px) {
  .kp-hero-a .kp-loop { width: 112vw; top: 46%; }
}

/* ---------- 7. Phone ---------- */
@media (max-width: 767px) {
  body .kp-hero-a { padding: 104px 16px 28px; }
  .kp-hero-a .kp-loop { width: 160vw; top: 34%; }
  .kp-hero-a .kp-eyebrow { font-size: 12px; height: 30px; padding: 0 12px; }
  .kp-hero-a .kp-hero-a__title { margin-top: 22px; }
  .kp-hero-a .kp-hero-a__lede { margin-top: 20px; font-size: 16px; }
  .kp-hero-a .kp-hero-a__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin-top: 28px;
  }
  .kp-hero-a .kp-hero-a__actions > *,
  .kp-hero-a .kp-hero-a__actions a { width: 100%; box-sizing: border-box; justify-content: center; text-align: center; }
  .kp-hero-a .kp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
    margin-top: 40px;
    padding: 22px 4px;
  }
  .kp-hero-a .kp-stat:nth-child(odd) { border-left: 0; }
  .kp-hero-a .kp-stat__num { font-size: 30px; }
  .kp-hero-a .kp-stat__label { font-size: 12px; }
}
