/* ============================================================
   04 — HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + 48px) 90px;
  overflow: hidden;
}

/* ---- Fundo: grid + brilhos ---- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
  opacity: 0.55;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.hero-glow-1 {
  width: 560px;
  height: 560px;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--blue-glow), transparent 70%);
}

.hero-glow-2 {
  width: 480px;
  height: 480px;
  bottom: -220px;
  left: -160px;
  background: radial-gradient(circle, rgba(61, 125, 255, 0.12), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Título ---- */
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin-top: 24px;
  max-width: 640px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--text-muted);
  line-height: 1.75;
}

/* ---- Ações ---- */
.hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.hero-note {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.hero-note::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 12px var(--blue-glow);
  margin-right: 10px;
  vertical-align: 1px;
}

/* ---- Visual técnico: janela de código ---- */
.hero-visual {
  position: relative;
  width: min(860px, 100%);
  margin-top: 64px;
}

.window {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(61, 125, 255, 0.06), 0 30px 90px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-align: left;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2c3242;
}

.window-dots i:first-child {
  background: #ff5f57;
}

.window-dots i:nth-child(2) {
  background: #febc2e;
}

.window-dots i:nth-child(3) {
  background: #28c840;
}

.window-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.window-body {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 300px;
}

.window-files {
  border-right: 1px solid var(--line);
  padding: 16px 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.file-row {
  display: block;
  padding: 8px 18px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
}

.file-row-active {
  color: var(--text-soft);
  background: rgba(61, 125, 255, 0.08);
  border-left-color: var(--blue);
}

.window-code {
  padding: 22px 24px;
  font-family: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  font-size: 0.84rem;
  line-height: 2.05;
}

.code-line {
  opacity: 0;
  transform: translateY(10px);
  animation: codeIn 0.5s var(--ease) forwards;
}

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

.code-line-indent {
  padding-left: 22px;
}

.code-cursor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.code-cursor::after {
  content: "";
  width: 9px;
  height: 20px;
  background: var(--blue-bright);
  box-shadow: 0 0 12px var(--blue-glow);
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Cores do código */
.c-comment { color: var(--text-muted); }
.c-k       { color: var(--blue-bright); }
.c-v       { color: var(--text); }
.c-op      { color: var(--text-muted); }
.c-f       { color: var(--blue); }
.c-prop    { color: #93b8ff; }
.c-str     { color: #7cd8a8; }

/* ---- Cartões flutuantes ---- */
.hero-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 15, 23, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  font-size: 0.85rem;
  color: var(--text-soft);
  animation: float 5s ease-in-out infinite;
}

.hero-badge .icon {
  color: var(--blue-bright);
}

.hero-badge strong {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 600;
}

.hero-badge-1 {
  top: -22px;
  left: -24px;
}

.hero-badge-2 {
  bottom: -20px;
  right: -24px;
  animation-delay: 1.2s;
}

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


/* ---- Estatísticas ---- */
.hero-stats {
  margin-top: 72px;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ---- Estatísticas no mobile ---- */
@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
    padding-top: 32px;
  }

  .hero-stats .stat:last-child {
    grid-column: 1 / -1;
  }
}