/* ═══════════════════════════════════════
   HERO — Cinematic, full-canvas
   Isaac Amaral / Grupo Insight
═══════════════════════════════════════ */

.hero {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  /* Compensate for floating nav: top(20) + nav-h(72) + breathing(60) */
  padding: calc(var(--nav-h) + 80px) var(--section-px) 60px;
  overflow: hidden;
  gap: 40px;
}

/* Fireworks canvas */
#fwCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── Ambient orbs — cinematic atmosphere ── */
.hero-orb {
  position: absolute;
  right: 5%;
  top: 10%;
  width: min(700px, 75vw);
  height: min(700px, 80vh);
  background: radial-gradient(circle at 60% 40%,
    rgba(73, 36, 245, 0.28) 0%,
    rgba(73, 36, 245, 0.08) 45%,
    transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(50px);
  animation: orbDrift 12s ease-in-out infinite alternate;
}

.hero-orb-left {
  position: absolute;
  left: -10%;
  bottom: 10%;
  width: min(500px, 60vw);
  height: min(500px, 60vh);
  background: radial-gradient(circle,
    rgba(30, 64, 175, 0.18) 0%,
    transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  animation: orbDrift 16s ease-in-out infinite alternate-reverse;
}

@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.08); }
}

/* ── Content col ── */
.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
}

/* ── Badge ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(73, 36, 245, 0.08);
  border: 1px solid rgba(73, 36, 245, 0.18);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: clamp(20px, 3vw, 36px);
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-badge p {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--purple-light);
}

/* ── Title ── */
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  margin-bottom: clamp(16px, 2.5vw, 28px);
  opacity: 0;
  animation: fadeUp 0.9s 0.35s forwards;
}

.hero-title .line {
  display: block;
  white-space: nowrap;
}

.hero-title .text-purple {
  color: var(--purple);
}

/* ── Subtitle ── */
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
  max-width: min(480px, 100%);
  margin-bottom: clamp(28px, 4vw, 48px);
  opacity: 0;
  animation: fadeUp 0.9s 0.52s forwards;
}

.hero-sub strong {
  color: var(--white);
  font-weight: 600;
}

/* ── CTAs ── */
.hero-actions {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.7s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(11px, 1vw, 12px);
  font-weight: 700;
  padding: clamp(14px, 1.5vw, 18px) clamp(24px, 2.5vw, 36px);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(73, 36, 245, 0.4);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--purple-glow);
}

.btn-arrow {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: transform 0.3s var(--ease);
}

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

/* Ghost button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 500;
  border: none;
  background: none;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease), gap 0.3s var(--ease);
  white-space: nowrap;
}

.btn-ghost:hover {
  opacity: 1;
  gap: 16px;
}

.ghost-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: border-color 0.3s, background 0.3s;
}

.btn-ghost:hover .ghost-icon {
  border-color: var(--purple);
  background: var(--purple-10);
}

/* ── Stats ── */
.hero-stats {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  align-items: flex-end;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.88s forwards;
  margin-top: clamp(32px, 5vw, 52px);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--white);
}

.stat-num .sp {
  color: var(--purple);
}

.stat-lbl {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray);
}

.stat-div {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  align-self: center;
}

/* ── Right visual col ── */
.hero-visual {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating cert card */
.hv-cert-card {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(260px, 22vw, 320px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 20px 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: floatA 7s ease-in-out infinite;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
  opacity: 0;
  animation: cardReveal 0.8s 0.9s forwards, floatA 7s 1.7s ease-in-out infinite;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hv-cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(73, 36, 245, 0.4);
}

.hv-cert-info {
  flex: 1;
  min-width: 0;
}

.hv-cert-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-cert-info span {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 3px;
}

.hv-cert-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  background: rgba(0, 212, 126, 0.1);
  border: 1px solid rgba(0, 212, 126, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  flex-shrink: 0;
}

.hv-cert-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}

/* Approval rate card */
.hv-rate-card {
  position: absolute;
  bottom: 15%;
  right: 0;
  width: clamp(180px, 15vw, 220px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: cardReveal2 0.8s 1.2s forwards, floatB 8s 2s ease-in-out infinite;
}

@keyframes cardReveal2 {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hv-rate-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  line-height: 1;
}

.hv-rate-num span {
  color: var(--purple);
}

.hv-rate-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
  margin-bottom: 14px;
}

.hv-rate-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.hv-rate-fill {
  height: 100%;
  width: 92%;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 2px;
  animation: growBar 1.4s 1.5s ease-out both;
}

@keyframes growBar {
  from { width: 0; }
  to   { width: 92%; }
}

/* Small notification badge */
.hv-notif {
  position: absolute;
  top: 45%;
  left: 2%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 16px;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: cardReveal2 0.8s 1.5s forwards, floatC 9s 2.3s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hv-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(73, 36, 245, 0.8);
  animation: blink 2s ease-in-out infinite;
}

.hv-notif-text {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.hv-notif-text strong {
  color: var(--white);
  font-weight: 600;
}

/* Background ring decoration */
.hv-ring {
  position: absolute;
  width: min(380px, 50vw);
  height: min(380px, 50vw);
  border: 1px solid rgba(73, 36, 245, 0.12);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hv-ring-2 {
  width: min(260px, 35vw);
  height: min(260px, 35vw);
  border-color: rgba(73, 36, 245, 0.08);
  animation: rotateSlow 30s linear infinite;
}

.hv-ring-2::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--purple);
}

@keyframes rotateSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Float keyframes */
@keyframes floatA {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50%       { transform: translateX(-50%) translateY(-12px); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes floatC {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(8px); }
}

/* ── Scroll indicator ── */
.scroll-hint {
  position: absolute;
  right: var(--section-px);
  bottom: clamp(24px, 4vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 0.9s 1.2s forwards;
  z-index: 2;
}

.scroll-hint span {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gray);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, var(--purple) 0%, transparent 100%);
  animation: scrollLine 2.2s ease-in-out infinite;
}

/* ── Ticker ── */
.ticker {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.02);
  mask-image: linear-gradient(90deg, transparent, white 6%, white 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, white 6%, white 94%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: tickerMove 35s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 36px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
}

.ticker-star {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.ticker-star img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.4;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 60px);
    gap: 0;
  }
  .hero-visual { display: none; }
  .hero-orb {
    width: min(300px, 80vw);
    height: min(300px, 80vw);
    right: -60px;
    top: 10%;
    filter: blur(50px);
  }
  .hero-orb-left { display: none; }
  .scroll-hint { display: none; }
  .hero-stats { margin-top: 32px; }
  .stat-div { display: none; }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-primary, .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .hero-stats { gap: 16px; }
}

/* ── Ultra-wide ── */
@media (min-width: 1600px) {
  .hero { gap: 80px; }
  .hero-sub { max-width: 560px; font-size: 17px; }
  .btn-primary { font-size: 13px; padding: 20px 44px; }
  .stat-num { font-size: 48px; }
  .hero-orb { width: min(900px, 60vw); height: min(900px, 60vh); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hv-cert-card, .hv-rate-card, .hv-notif { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hv-ring-2 { animation: none; }
  .hero-orb { animation: none; }
}
