/* ============================================================
   HERO BLACK — KrownCode
   Performance strategy:
     Mobile  (≤768px)  → static CSS hero, canvas hidden, ZERO JS
     Tablet  (≤1024px) → canvas shown but lite animation (JS handles)
     Desktop           → full canvas animation
   ============================================================ */

:root {
  --purple:      #7c3aed;
  --purple-l:    #a855f7;
  --purple-glow: rgba(124,58,237,.35);
  --hero-white:  #ffffff;
  --hero-gray:   #9ca3af;
}

/* ── SECTION ── */
.hero-black {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}

/* Subtle grain */
.hero-black::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: .03;
  pointer-events: none;
  z-index: 1;
}

/* Left glow bleed — desktop only */
.hero-black::after {
  content: '';
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ── INNER GRID ── */
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 110px 60px 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Vertical divider */
.hero-line {
  position: absolute;
  left: 50%;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent,
    rgba(124,58,237,.3) 30%,
    rgba(124,58,237,.3) 70%,
    transparent);
  z-index: 2;
}

/* ── LEFT: CONTENT ── */
.hero-content { text-align: left; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--purple-l);
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  opacity: 0;
  animation: heroFadeUp .7s ease forwards .2s;
  white-space: nowrap;
}
.hero-badge::before {
  content: '';
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple-l);
  box-shadow: 0 0 8px var(--purple-l);
  animation: heroPulse 2s ease infinite;
}

.hero-content h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 3.8vw, 62px);
  font-weight: 800;
  color: var(--hero-white);
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -.02em;
  opacity: 0;
  animation: heroFadeUp .8s ease forwards .4s;
}
.hero-content h1 .highlight {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-l) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--hero-gray);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 480px;
  font-weight: 300;
  opacity: 0;
  animation: heroFadeUp .8s ease forwards .6s;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeUp .8s ease forwards .8s;
}

.btn-hero-primary {
  background: var(--purple);
  color: #fff;
  padding: 14px 30px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  transition: all .3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(124,58,237,.4);
  display: inline-block;
  white-space: nowrap;
}
.btn-hero-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
  border-radius: inherit;
}
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 40px rgba(124,58,237,.6); background: #6d28d9; color: #fff; text-decoration: none; }

.btn-hero-outline {
  border: 1.5px solid rgba(124,58,237,.5);
  color: #c4b5fd;
  padding: 14px 30px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  transition: all .3s ease;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.btn-hero-outline:hover { background: rgba(124,58,237,.15); border-color: var(--purple); color: #fff; transform: translateY(-3px); text-decoration: none; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeUp .8s ease forwards 1s;
}
.hero-stat {
  border-left: 1px solid rgba(124,58,237,.3);
  padding-left: 18px;
}
.hero-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--hero-white);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.hero-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--hero-gray);
  margin-top: 3px;
  letter-spacing: .04em;
}

/* ── RIGHT: CANVAS ── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: heroFadeIn 1.2s ease forwards .5s;
}
#hero-canvas {
  width: 100%;
  height: 560px;
  display: block;
}
.canvas-glow {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.2) 0%, transparent 70%);
  pointer-events: none;
  animation: heroBreathe 4s ease-in-out infinite;
}

/* ── KEYFRAMES ── */
@keyframes heroFadeUp  { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes heroFadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes heroPulse   { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.5; transform:scale(.8); } }
@keyframes heroBreathe { 0%,100% { transform:scale(1);    opacity:.7; } 50% { transform:scale(1.08); opacity:1; } }


/* ══════════════════════════════════════════════════════
   RESPONSIVIDADE
══════════════════════════════════════════════════════ */

/* ── WIDESCREEN 1440px+ ── */
@media (min-width: 1440px) {
  .hero-inner   { max-width:1400px; padding:110px 80px 70px; gap:80px; }
  .hero-content h1 { font-size:68px; }
  #hero-canvas  { height:640px; }
  .canvas-glow  { width:480px; height:480px; }
}

/* ── DESKTOP 1200–1439px ── */
@media (min-width:1200px) and (max-width:1439px) {
  .hero-inner { padding:110px 60px 70px; gap:60px; }
  #hero-canvas { height:580px; }
}

/* ── TABLET LANDSCAPE 1025–1199px ── */
@media (min-width:1025px) and (max-width:1199px) {
  .hero-inner { padding:100px 40px 60px; gap:36px; }
  .hero-content h1 { font-size:clamp(28px,3.2vw,46px); }
  .hero-content p  { font-size:15px; max-width:400px; }
  #hero-canvas  { height:460px; }
  .canvas-glow  { width:300px; height:300px; }
  .hero-stat-num { font-size:22px; }
  .btn-hero-primary, .btn-hero-outline { padding:12px 22px; font-size:14px; }
}

/* ── TABLET 769–1024px ── */
@media (min-width:769px) and (max-width:1024px) {
  .hero-black   { min-height:100dvh; }
  .hero-inner   {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    padding: 110px 48px 64px;
    gap: 0;
    align-content: center;
  }
  .hero-line         { display:none; }
  .hero-black::after { display:none; }

  .hero-visual { order:-1; height:280px; margin-bottom:28px; }
  #hero-canvas { height:260px; }
  .canvas-glow { width:200px; height:200px; }

  .hero-content   { text-align:center; }
  .hero-content h1 { font-size:clamp(30px,5vw,46px); margin-bottom:18px; }
  .hero-content p  { max-width:560px; margin-left:auto; margin-right:auto; }
  .hero-buttons    { justify-content:center; }
  .hero-stats      { justify-content:center; gap:28px; margin-top:36px; }
}

/* ══════════════════════════════════════════════════════
   MOBILE ≤768px
   Canvas is HIDDEN and JS never runs.
   Hero uses a pure CSS gradient + floating orbs.
   Zero canvas overhead. Silky smooth.
══════════════════════════════════════════════════════ */
@media (max-width:768px) {
  .hero-black {
    min-height: 100dvh;
    /* Beautiful static purple gradient replacing the canvas */
    background:
      radial-gradient(ellipse 60% 50% at 80% 30%, rgba(124,58,237,.28) 0%, transparent 65%),
      radial-gradient(ellipse 50% 40% at 20% 70%, rgba(168,85,247,.15) 0%, transparent 60%),
      radial-gradient(ellipse 80% 60% at 50% 100%, rgba(109,40,217,.18) 0%, transparent 70%),
      #000;
  }

  /* Hide canvas entirely — no paint, no JS loop */
  .hero-visual { display: none !important; }
  .hero-line   { display: none !important; }
  .hero-black::after { display: none; }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    padding: 90px 24px 52px;
    gap: 0;
    align-content: center;
    justify-items: center;
  }

  .hero-content { text-align: center; }

  .hero-badge { margin-bottom: 20px; font-size: 10px; }

  .hero-content h1 {
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.12;
    margin-bottom: 16px;
  }
  .hero-content h1 br { display: none; }

  .hero-content p {
    font-size: 15px;
    max-width: 100%;
    margin-bottom: 32px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .btn-hero-primary,
  .btn-hero-outline {
    width: 100%;
    max-width: 320px;
    text-align: center;
    padding: 14px 24px;
  }

  .hero-stats {
    justify-content: center;
    gap: 0;
    margin-top: 36px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-stat {
    border-left: 1px solid rgba(124,58,237,.25);
    padding-left: 10px;
  }
  .hero-stat:first-child { border-left: none; padding-left: 0; }
  .hero-stat-num   { font-size: 20px; }
  .hero-stat-label { font-size: 10px; letter-spacing: 0; }
}

/* ── MOBILE PEQUENO ≤479px ── */
@media (max-width:479px) {
  .hero-inner { padding: 80px 18px 44px; }
  .hero-content h1 { font-size: clamp(24px, 8.5vw, 34px); }
  .hero-stat-num   { font-size: 17px; }
  .hero-stat-label { font-size: 9px; }
  .btn-hero-primary, .btn-hero-outline { padding: 13px 18px; font-size: 14px; }
  .hero-badge { font-size: 9px; padding: 5px 12px; }
}

/* ── LANDSCAPE MOBILE ── */
@media (max-width:768px) and (orientation:landscape) {
  .hero-black { min-height: unset; }
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: unset;
    padding: 70px 28px 40px;
    align-content: center;
  }
  .hero-content h1 { font-size: clamp(20px,4vw,32px); }
  .hero-content p  { font-size: 13px; margin-bottom: 20px; }
  .btn-hero-primary, .btn-hero-outline { padding: 10px 18px; font-size: 13px; }
  .hero-stats { margin-top: 20px; }
}

/* ── Telas muito altas em mobile ── */
@media (max-width:768px) and (min-height:800px) {
  .hero-inner { padding-top: 100px; padding-bottom: 64px; }
}

/* ── Acessibilidade: reduzir movimento ── */
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-content h1, .hero-content p,
  .hero-buttons, .hero-stats, .hero-visual {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .canvas-glow, .hero-badge::before { animation: none; }
}