/* =============================================
   hero.css — Hero Component (21st.dev-inspired)
   Riparazioni Ricci — Component Library
   ============================================= */

/* ── Layout ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Background image ── */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://live.staticflickr.com/65535/54376140553_ccd24a44c2_h.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.50) saturate(0.85);
}

/* ── Overlay — rich gradient from bottom ── */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(var(--color-primary-rgb, 37, 99, 235), 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(6, 182, 212, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.25) 0%, rgba(2, 6, 23, 0.65) 100%);
}

/* ── Grid pattern texture ── */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  z-index: 1;
}

/* ── Content container ── */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--space-6, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6, 1.5rem);
}

/* ── Badge pill (21st.dev style) ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: default;
  transition: background 300ms ease, border-color 300ms ease;
  opacity: 0;
}

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-badge svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* Pulsing green dot */
.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  animation: hero-dot-pulse 2s ease-in-out infinite;
}

@keyframes hero-dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }
  50%      { opacity: 0.6; box-shadow: 0 0 12px rgba(34, 197, 94, 0.4); }
}

/* ── Brand name ── */
.hero-brand {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(5rem, 14vw, 10rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 0.85;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
}

/* ── Headline ── */
.hero-headline {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  opacity: 0;
}

.hero-headline-accent {
  background: linear-gradient(135deg, var(--color-primary-light, #60a5fa) 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Description ── */
.hero-desc {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  max-width: 520px;
  opacity: 0;
}

/* ── CTA Actions ── */
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-lg, 12px);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

/* Primary: white solid */
.hero-btn--primary {
  background: #fff;
  color: var(--slate-900, #0f172a);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.10),
    0 4px 16px rgba(0, 0, 0, 0.08);
}

.hero-btn--primary:hover {
  background: #f1f5f9;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.hero-btn-arrow {
  transition: transform 250ms ease;
}

.hero-btn--primary:hover .hero-btn-arrow {
  transform: translateX(3px);
}

/* Ghost: transparent outline */
.hero-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-btn--ghost:hover {
  background: rgba(37, 211, 102, 0.10);
  border-color: rgba(37, 211, 102, 0.35);
  color: #25d366;
}

.hero-btn--ghost svg {
  width: 18px;
  height: 18px;
}

/* Secondary: solid green WhatsApp button */
.hero-btn--secondary {
  background: #25d366;
  color: #fff;
  font-weight: 700;
  padding: 14px 32px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(37, 211, 102, 0.25);
}

.hero-btn--secondary:hover {
  background: #20ba5c;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.20),
    0 8px 24px rgba(37, 211, 102, 0.35);
  transform: translateY(-2px);
}

.hero-btn--secondary svg {
  width: 18px;
  height: 18px;
}

/* ── Trust signals ── */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.hero-trust-item svg {
  opacity: 0.5;
  stroke: currentColor;
  fill: none;
}

.hero-trust-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
  flex-shrink: 0;
}

/* ── Scroll indicator — animated vertical line ── */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 2;
}

.scroll-hint-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.scroll-hint-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, #fff, transparent);
  animation: hero-scroll-line 2s ease-in-out infinite;
}

@keyframes hero-scroll-line {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ── Scroll parallax (CSS only, progressive enhancement) ── */
@supports (animation-timeline: scroll()) {
  .hero-bg {
    animation: hero-bg-parallax linear both;
    animation-timeline: scroll();
    animation-range: 0vh 80vh;
  }

  @keyframes hero-bg-parallax {
    from { transform: scale(1); }
    to   { transform: scale(1.06) translateY(-3%); }
  }

  .hero-content {
    animation: hero-text-fade linear both;
    animation-timeline: scroll();
    animation-range: 0vh 50vh;
  }

  @keyframes hero-text-fade {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-15px); }
  }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    gap: var(--space-4, 1rem);
    padding: 0 var(--space-5, 1.25rem);
  }

  .hero-badge {
    font-size: 11px;
    padding: 5px 12px 5px 10px;
  }

  .hero-brand {
    font-size: clamp(3rem, 15vw, 5rem);
    letter-spacing: 0.04em;
  }

  .hero-headline {
    font-size: clamp(1.5rem, 6.5vw, 2.2rem);
    line-height: 1.12;
  }

  .hero-desc {
    font-size: 14px;
    max-width: 90%;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    gap: 10px;
  }

  .hero-btn {
    justify-content: center;
    width: 100%;
    padding: 11px 20px;
    font-size: 14px;
  }

  .hero-trust {
    gap: 8px;
  }

  .hero-trust-item {
    font-size: 11px;
  }

  .hero-trust-sep {
    display: none;
  }

  .scroll-hint {
    display: none;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-badge,
  .hero-brand,
  .hero-headline,
  .hero-desc,
  .hero-actions,
  .hero-trust,
  .scroll-hint {
    opacity: 1 !important;
  }

  .hero-badge-dot {
    animation: none;
  }

  .scroll-hint-line::after {
    animation: none;
  }
}
