/* ==========================================================================
   Al-Safeer - Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: var(--sp-5);
}

.hero__panel {
  position: relative;
  background: var(--grad-hero);
  isolation: isolate;
}

/* ---------- Decoration ---------- */
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hero__blob--a {
  top: -10%;
  right: -6%;
  width: clamp(260px, 30vw, 480px);
  height: clamp(260px, 30vw, 480px);
  background: var(--c-accent);
  opacity: .22;
}
.hero__blob--b {
  bottom: -14%;
  left: -8%;
  width: clamp(220px, 26vw, 420px);
  height: clamp(220px, 26vw, 420px);
  background: var(--c-teal);
  opacity: .18;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--c-ink) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .02;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.25rem, 1.7rem + 2.4vw, 4rem) clamp(2rem, 1.5rem + 1.6vw, 3rem);
}

/* ---------- Row / columns ---------- */
.hero__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 2rem + 2vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__row {
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 1vw + 2rem, 4rem);
  }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-6);
  text-align: left;
}

@media (max-width: 899px) {
  .hero__copy { text-align: center; align-items: center; }
}

.hero__title {
  /* 10% smaller than the global display size */
  font-size: clamp(2.34rem, 1.215rem + 4.14vw, 4.725rem);
  max-width: 16ch;
}

@media (max-width: 899px) {
  .hero__title { max-width: 100%; }
}

.hero__title em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 46ch;
}

/* Always-on slogan */
.hero__slogan {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: calc(-1 * var(--sp-3));
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-white);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--c-ink);
}

.hero__slogan-pulse {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-teal);
}

.hero__slogan-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--c-teal);
  opacity: .55;
  animation: hero-pulse 2s var(--ease-out) infinite;
}

@keyframes hero-pulse {
  0%   { transform: scale(.5); opacity: .55; }
  100% { transform: scale(1.9); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slogan-pulse::after { animation: none; opacity: .3; }
}

/* Credential badges */
.hero__creds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  margin-top: calc(-1 * var(--sp-3));
}

.hero__creds img {
  display: block;
  height: 54px;
  width: auto;
  opacity: 1;
}

@media (max-width: 480px) {
  .hero__creds img { height: 44px; }
}

.hero__actions { gap: var(--sp-4); }

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-5);
}

.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--c-body);
  position: relative;
}

.hero__trust li svg { color: var(--c-teal); flex: none; }

.hero__trust li + li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-5) / 2 - 1px);
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c-line-strong);
  transform: translate(-50%, -50%);
}

@media (max-width: 480px) {
  .hero__trust li + li::before { display: none; }
}

/* ---------- Visual ---------- */
.hero__visual {
  position: relative;
  max-width: 420px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .hero__visual { max-width: none; margin-inline: 0; }
}

.hero__device {
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-float);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.hero__device img { width: 100%; height: auto; }

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* horizontal offset frames the poster (landscape still); vertical offset
     frames the video (portrait clip) - each axis only crops one of the two,
     so they don't fight each other */
  object-position: 65% 35%;
  background: var(--c-ink);
}

.hero__card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: var(--sp-4) var(--sp-5);
  min-width: 168px;
}

.hero__card--vat {
  top: 8%;
  left: 0;
}

.hero__card--quarter {
  bottom: 8%;
  right: 0;
}

/* Once there is room beside the device, let the cards break out a little -
   the hero panel still clips at its rounded edge, so the offsets stay small */
@media (min-width: 1100px) {
  .hero__card--vat     { left: -6%; }
  .hero__card--quarter { right: -4%; }
}

.hero__card-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--c-muted);
}

.hero__card-figure {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--fw-black);
  color: var(--c-ink);
  letter-spacing: var(--ls-head);
}

.hero__card-sub {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

.hero__card-tick {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-teal-soft);
  color: var(--c-teal);
  flex: none;
}

.hero__card-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin-top: var(--sp-1);
}

.hero__card-spark span {
  display: block;
  width: 6px;
  border-radius: var(--r-pill) var(--r-pill) 2px 2px;
  background: var(--c-accent);
  opacity: .85;
}
.hero__card-spark span:nth-child(1) { height: 40%; }
.hero__card-spark span:nth-child(2) { height: 55%; }
.hero__card-spark span:nth-child(3) { height: 45%; }
.hero__card-spark span:nth-child(4) { height: 70%; }
.hero__card-spark span:nth-child(5) { height: 60%; }
.hero__card-spark span:nth-child(6) { height: 100%; }

@media (max-width: 640px) {
  .hero__card { padding: var(--sp-3) var(--sp-4); min-width: 132px; }
  .hero__card-figure { font-size: 1.15rem; }
  .hero__card--vat { top: 4%; left: -4%; }
  .hero__card--quarter {
    bottom: 4%;
    right: -4%;
    transform: scale(.88);
    transform-origin: bottom right;
  }
}

@media (max-width: 400px) {
  .hero__card--vat { display: none; }
}

/* ---------- Proof strip ---------- */
.hero__proof {
  position: relative;
  z-index: 1;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4.5rem);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.hero__proof-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink);
}
.hero__proof-label svg { color: var(--c-gold); flex: none; }

.hero__badges { overflow: hidden; }

/* Marquee mode - JS adds .is-marquee below 900px and appends one clone of
   the track, so the pair can scroll seamlessly end to end. */
.hero__badges.is-marquee {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero__badges.is-marquee .hero__badges-track {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  padding-right: clamp(var(--sp-6), 4vw, var(--sp-9));
  animation: hero-badges-scroll 26s linear infinite;
}

.hero__badges.is-marquee:hover .hero__badges-track { animation-play-state: paused; }

@keyframes hero-badges-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__badges.is-marquee .hero__badges-track { animation: none; }
}

.hero__badges-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(var(--sp-6), 4vw, var(--sp-9));
}

.hero__badges-track img {
  width: 110px;
  height: auto;
  opacity: .6;
  filter: grayscale(1);
  transition: opacity var(--t-base) var(--ease-out), filter var(--t-base) var(--ease-out);
}

.hero__badges-track img:hover {
  opacity: 1;
  filter: grayscale(0);
}

@media (max-width: 640px) {
  .hero__badges-track { flex-wrap: nowrap; }
  .hero__badges-track img { width: 92px; flex: none; }
}
