/* ─── HERO SECTION ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + 40px + var(--space-12));
  padding-bottom: var(--space-16);
}

/* Diagonal background texture */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(200,150,62,0.03) 0px,
      rgba(200,150,62,0.03) 1px,
      transparent 1px,
      transparent 24px
    );
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-12);
  align-items: center;
  width: 100%;
}

/* ─── LEFT COLUMN ─── */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-eyebrow {
  align-self: flex-start;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.0;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
}

.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: heroLineIn 0.7s var(--transition-slow) forwards;
  animation-delay: var(--delay, 0s);
}

.hero-highlight {
  color: var(--color-gold);
  font-style: italic;
}

@keyframes heroLineIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.8;
  max-width: 52ch;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.avatar-stack {
  display: flex;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-blue));
  border: 2px solid var(--color-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }

.social-proof-text {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-ink);
}

.social-proof-stars {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-ink);
}
.social-proof-stars .stars { color: var(--color-gold); }
.muted { color: var(--color-muted); }

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
}

.hero-trust {
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  font-size: 0.72rem;
}

/* ─── RIGHT COLUMN ─── */
.hero-visual {
  position: relative;
  height: 520px;
}

/* Primary Card */
.hero-card {
  position: absolute;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  transition: transform var(--transition-slow);
}

.hero-card--primary {
  width: 280px;
  padding: var(--space-6);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-cream);
  border: 2px solid var(--color-gold);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  animation: floatPrimary 6s ease-in-out infinite;
  z-index: 3;
}
.hero-card-icon { font-size: 2.5rem; flex-shrink: 0; }
.hero-card-body { flex: 1; }
.hero-card-body h3 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: var(--space-1);
}
.hero-card-body p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}
.hero-card-price {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.price {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-gold);
}

.hero-card--secondary {
  width: 200px;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 2;
}
.hero-card-icon-sm { font-size: 1.5rem; flex-shrink: 0; }
.hero-card--secondary h4 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: var(--space-1);
}
.hero-card-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.price-sm {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-gold);
  font-size: var(--text-md);
}
.hero-card-detail {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Card positions */
.hero-card--tr {
  top: 10%;
  right: 0;
  animation: floatTR 5s ease-in-out infinite;
  animation-delay: 0.5s;
}
.hero-card--bl {
  bottom: 22%;
  left: 0;
  animation: floatBL 7s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes floatPrimary {
  0%,100% { transform: translate(-50%,-50%) translateY(0); }
  50%      { transform: translate(-50%,-50%) translateY(-12px); }
}
@keyframes floatTR {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes floatBL {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Stats — the markup lives in the products context (#np-ctx-bp), not the
   hero-visual. It must stay in normal flow: an earlier absolute/bottom:0
   rule (offsetParent = body) floated it up over the headline on laptop
   heights (<~1080px tall). Compact, centered bar in flow at all widths. */
.hero-stats {
  position: static;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: var(--space-6) auto 0;
  gap: var(--space-8);
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-8);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hero-stat-number {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}
.hero-stat-plus {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-gold);
}
.hero-stat-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── AS SEEN ON ─── */
.as-seen-on {
  background: var(--color-cream);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}
.as-seen-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  overflow: hidden;
}
.as-seen-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
  flex-shrink: 0;
}
.as-seen-logos {
  display: flex;
  gap: var(--space-8);
  animation: scrollLogos 20s linear infinite;
}
.as-seen-logos span {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-muted);
  white-space: nowrap;
  opacity: 0.5;
  letter-spacing: 0.05em;
}
@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  /* Both grid items must have min-width:0. Without it the CSS Grid algorithm
     uses each item's content-based minimum size (min-content ≈ 510px from flex
     children in hero-content) as the track floor, expanding the 1fr column
     from the available 364px to 510px and clipping the right 122px of every
     hero element at hero's overflow:hidden boundary. */
  .hero-content,
  .hero-visual { min-width: 0; }
  .hero-eyebrow, .hero-ctas { align-self: center; }
  .hero-ctas { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-social-proof { justify-content: center; }
  .hero-sub { margin: 0 auto; }
  /* Hide decorative card graphics but keep stats visible */
  .hero-visual { display: block; height: auto; min-height: 0; }
  .hero-card { display: none; }
  .hero-stats {
    position: static;
    transform: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-6);
    margin: var(--space-6) auto 0;
    white-space: normal;
    padding: var(--space-4) var(--space-5);
    width: auto;
  }
  .hero { padding-top: var(--space-8); min-height: auto; padding-bottom: var(--space-12); }
}

@media (max-width: 640px) {
  /* Headline: slightly tighter at narrow viewport while keeping impact */
  .hero-headline { font-size: clamp(2.25rem, 9.5vw, 3.5rem); line-height: 1.05; }

  /* CTAs: stacked full-width, primary kept at btn--lg size (text-md) */
  .hero-ctas { flex-direction: column; width: 100%; gap: var(--space-3); }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-ctas .btn-primary { font-weight: 700; padding: 1em 1.5em; }

  /* Trust pills: dark-glass style for legibility on photo background */
  .hero-trust { gap: var(--space-2) var(--space-3); justify-content: flex-start; }
  .hero-trust .trust-item {
    background: rgba(5,15,32,0.52);
    border: 1px solid rgba(200,150,62,0.55);
    border-radius: 99px;
    padding: 0.4em 1em;
    color: rgba(255,255,255,0.92);
    font-weight: 700;
    font-size: var(--text-sm);
    gap: var(--space-1);
  }
  .hero-trust .trust-item::before { color: var(--color-gold); }

  /* Stats bar: dark-glass on photo background */
  .hero-stats {
    background: rgba(5,15,32,0.65);
    border-color: rgba(200,150,62,0.35);
  }
  .hero-stat-number { font-size: 2.25rem; }
  .hero-stat-plus   { font-size: 1.25rem; }
  .hero-stat-label  { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; color: rgba(255,255,255,0.7); }

  /* As Seen On: stop scroll animation, wrap to 2 rows on mobile */
  .as-seen-inner { flex-direction: column; gap: var(--space-3); align-items: flex-start; }
  .as-seen-logos { animation: none; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }
}

/* ─── HERO ENTRANCE ANIMATIONS ──────────────────────────────── */
/* Non-headline hero elements: gentle fade+rise on load.
   Wrapped in no-preference so reduced-motion users see them instantly. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
  .hero-eyebrow        { animation: heroFadeUp 0.45s ease 0.05s both; }
  .hero-sub            { animation: heroFadeUp 0.45s ease 0.42s both; }
  .hero-social-proof   { animation: heroFadeUp 0.45s ease 0.5s  both; }
  .hero-ctas           { animation: heroFadeUp 0.45s ease 0.55s both; }
  .hero-trust          { animation: heroFadeUp 0.45s ease 0.6s  both; }
}

/* Prefers-reduced-motion: kill ALL hero motion, ensure everything visible */
@media (prefers-reduced-motion: reduce) {
  .hero-line           { opacity: 1 !important; transform: none !important; animation: none; }
  .hero-eyebrow,
  .hero-sub,
  .hero-social-proof,
  .hero-ctas,
  .hero-trust          { animation: none; opacity: 1; transform: none; }
  .as-seen-logos       { animation: none; }
  .hero-card           { animation: none; }
}

/* Night city photo background + dark navy overlay */
.hero {
  background-image:
    linear-gradient(180deg,
      rgba(5,15,32,.90)  0%,
      rgba(8,24,48,.78) 30%,
      rgba(8,24,48,.68) 55%,
      rgba(5,15,32,.93) 100%),
    url('../images/brand/hero-city-night.jpg');
  background-size: auto, cover;
  background-position: center, center 30%;
  background-color: #0A1D3A; /* load-time fallback — prevents white flash */
}

/* Text color overrides for dark photo background */
.hero-headline {
  color: #FFFFFF;
  text-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.4);
}
.hero-sub {
  color: rgba(230, 240, 255, 0.97);
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.social-proof-text,
.social-proof-stars { color: rgba(255, 255, 255, 0.92); }

/* Stat: keep number and plus inline */
.hero-stat {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: baseline;
  column-gap: 1px;
}
.hero-stat-number { grid-column: 1; }
.hero-stat-plus   { grid-column: 2; }
.hero-stat-label  { grid-column: 1 / -1; }
