/* ============================================================
   CJ HOMEPAGE HERO (Prompt 4) — cinematic, content-first.
   Slides under the transparent sticky header (negative margin).
   Mobile: content → CTAs → visual → values. No-JS safe.
   ============================================================ */

.hero {
  position: relative;
  /* The transparent header is position:fixed (header-fix.css), so it takes no
     space in the flow: the hero already starts at the top of the page. A
     negative margin here pulled the copy 72px up under the header. */
  margin-top: 0;
  padding-top: calc(var(--cj-header-h) + env(safe-area-inset-top));
  background: var(--cj-navy-deep);
  color: var(--cj-text-inverse);
  overflow: clip;
}
@supports not (overflow: clip) { .hero { overflow: hidden; } }

/* Branded fallback when no CMS/bundled image is available. */
.hero-noimg {
  background:
    radial-gradient(700px 380px at 18% 18%, rgba(18, 151, 254, 0.22) 0%, transparent 60%),
    radial-gradient(1000px 600px at 85% 90%, rgba(18, 151, 254, 0.10) 0%, transparent 55%),
    var(--cj-navy-deep);
}

.hero-grid {
  position: relative; z-index: 2;
  display: grid; gap: var(--cj-space-8);
  padding-block: var(--cj-space-12) var(--cj-space-8);
}

.hero-copy { max-width: 600px; display: grid; gap: var(--cj-space-4); align-content: start; }
.hero .cj-eyebrow { color: var(--cj-primary); margin-bottom: 0; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 11vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  text-wrap: balance;
}
.hero-title .cj-mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-hl { color: var(--cj-primary); }

.hero-intro {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  line-height: 1.65;
  color: #D5E2F0;
  max-width: 560px;
  margin: 0;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--cj-space-3); }
.hero-ctas .btn { flex: 1 1 auto; }
.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: rgba(4, 11, 20, 0.35);
}
.hero .btn-ghost:hover {
  border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
}
.hero .btn-ghost svg { width: 20px; height: 20px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: var(--cj-space-2) var(--cj-space-6); list-style: none; padding: 0; margin: var(--cj-space-2) 0 0; }
.hero-trust li { display: inline-flex; align-items: center; gap: var(--cj-space-2); font-weight: 600; font-size: 0.9375rem; color: #EAF2FA; }
.hero-trust svg { width: 18px; height: 18px; color: var(--cj-primary); flex-shrink: 0; }

/* Cinematic visual. */
.hero-media { position: relative; z-index: 1; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: #0A1626; }
.hero-media picture, .hero-media img { display: block; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; }
html.cj-js .hero-media img { transform: scale(1.02); transition: transform 1.4s var(--ease-out); }
html.cj-js .hero-media.is-in img { transform: scale(1); }

/* Cinematic overlays. */
.hero-shade { position: absolute; inset: 0; z-index: 1; background: #040B14; opacity: var(--hero-shade, 0.55); pointer-events: none; }
.hero-grade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(560px 340px at 16% 22%, rgba(18, 151, 254, 0.16) 0%, transparent 62%),
    linear-gradient(180deg, rgba(4, 11, 20, 0.55) 0%, transparent 22%, transparent 62%, rgba(4, 11, 20, 0.92) 100%);
}

/* Decorative side note (desktop only, never competes with H1). */
.hero-side { display: none; }
.hero-decorative { font-style: italic; font-size: 1.375rem; color: #EAF2FA; opacity: 0.9; }

/* Value strip. */
.hero-strip {
  position: relative; z-index: 2;
  background: rgba(4, 11, 20, 0.92);
  border-top: 1px solid var(--cj-border-dark);
  padding-block: var(--cj-space-6);
  /* The next section (.discover) overlaps the hero by --cj-section-overlap for
     its rounded top; reserve that space so the value labels are never covered. */
  padding-bottom: calc(var(--cj-space-6) + var(--cj-section-overlap, 28px) + env(safe-area-inset-bottom));
}
.hero-values { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--cj-space-4) var(--cj-space-3); list-style: none; padding: 0; margin: 0; }
.hero-values li { display: flex; align-items: center; gap: var(--cj-space-3); min-height: 48px; }
.hero-values .hv-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius-md);
  display: grid; place-items: center;
  background: rgba(18, 151, 254, 0.14); color: var(--cj-primary);
}
.hero-values .hv-icon svg { width: 22px; height: 22px; }
.hero-values span:last-child { font-weight: 600; font-size: 0.875rem; line-height: 1.35; color: #EAF2FA; }

/* ---------- Desktop cinematic composition (≥1024) ---------- */
@media (min-width: 1024px) {
  .hero { min-height: clamp(680px, 88vh, 1020px); display: flex; flex-direction: column; }
  .hero-grid {
    flex: 1; align-items: center;
    grid-template-columns: minmax(0, 47%) 1fr;
    padding-block: var(--cj-space-16) var(--cj-space-12);
  }
  .hero-media { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
  .hero-title { font-size: clamp(3.5rem, 6.2vw, 5.5rem); }
  .hero-ctas .btn { flex: 0 0 auto; }
  .hero-side {
    display: flex; flex-direction: column; align-items: flex-end; gap: var(--cj-space-3);
    align-self: end; justify-self: end; text-align: right;
  }
  .hero-grade {
    background:
      radial-gradient(560px 340px at 16% 22%, rgba(18, 151, 254, 0.16) 0%, transparent 62%),
      linear-gradient(90deg, rgba(4, 11, 20, 0.95) 0%, rgba(4, 11, 20, 0.82) 34%, rgba(4, 11, 20, 0.30) 62%, rgba(4, 11, 20, 0.12) 100%),
      linear-gradient(180deg, rgba(4, 11, 20, 0.55) 0%, transparent 24%, transparent 60%, rgba(4, 11, 20, 0.92) 100%);
  }
  .hero-values { grid-template-columns: repeat(6, 1fr); }
  .hero-values li { flex-direction: column; align-items: flex-start; gap: var(--cj-space-2); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-values { grid-template-columns: repeat(3, 1fr); }
  .hero-media { aspect-ratio: 16 / 8; }
}
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
}

/* PWA standalone: honour top status area + bottom indicator. */
.cj-standalone .hero { padding-top: calc(var(--cj-header-h) + env(safe-area-inset-top)); }

@media (prefers-reduced-motion: reduce) {
  html.cj-js .hero-media img { transform: none; transition: none; }
}
