/* ============================================
   ModForge Hub — Home Page Styles
   Hero · Featured · How It Works · CTA
   ============================================ */

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--topbar-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 20, 0.3) 0%,
    rgba(7, 11, 20, 0.6) 40%,
    rgba(7, 11, 20, 0.95) 85%,
    var(--bg-primary) 100%
  );
}

.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-10);
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.hero-overline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.hero-overline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple);
}

.hero h1 {
  font-size: clamp(48px, 5.4vw, 86px);
  line-height: 1.03;
  letter-spacing: -0.055em;
  margin: 22px 0 24px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

/* Ponto colorido no fim dos títulos (estilo Craftify) */
.accent-dot {
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 560px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

.hero-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ── Métricas (contam de 0 até o valor) ── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: 34px;
  max-width: 600px;
}

.hero-stat-item {
  padding: 14px 16px;
  background: rgba(7, 11, 20, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition-base);
}

.hero-stat-item:hover {
  border-color: var(--purple-border);
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: clamp(26px, 2vw, 34px);
  font-weight: var(--weight-bold);
  letter-spacing: -0.05em;
  color: var(--purple-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-stat-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ── Camadas de fundo do hero ── */
.hero-mesh {
  position: absolute;
  inset: -10%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-mesh span {
  position: absolute;
  width: 52vw;
  height: 52vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  filter: blur(70px) saturate(1.2);
  will-change: transform;
}

.hero-mesh span:nth-child(1) {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.75), transparent 65%);
  top: -6%;
  right: -4%;
  animation: meshDrift1 32s ease-in-out infinite alternate;
}

.hero-mesh span:nth-child(2) {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.45), transparent 65%);
  bottom: -18%;
  left: -8%;
  animation: meshDrift2 38s ease-in-out infinite alternate;
}

.hero-mesh span:nth-child(3) {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 65%);
  top: 28%;
  left: 38%;
  width: 32vw;
  height: 32vw;
  animation: meshDrift3 28s ease-in-out infinite alternate;
}

@keyframes meshDrift1 { to { transform: translate(-18vw, 14vh) scale(1.15); } }
@keyframes meshDrift2 { to { transform: translate(22vw, -12vh) scale(0.9); } }
@keyframes meshDrift3 { to { transform: translate(-16vw, 10vh) scale(1.25); } }

/* Granulação de filme */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Bordas superior/inferior desfocadas */
.hero-edge {
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-edge-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(7, 11, 20, 0.85), rgba(7, 11, 20, 0.1));
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 10%, transparent 100%);
}

.hero-edge-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(7, 11, 20, 0.96), rgba(7, 11, 20, 0.1));
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 100%);
  mask-image: linear-gradient(to top, #000 10%, transparent 100%);
}

/* ── Visual do hero: "CI" em pixel com extrusão 3D ── */
.hero-visual {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(236, 72, 153, 0.12) 45%, transparent 70%);
  filter: blur(24px);
}

.hero-orbit {
  position: absolute;
  width: 96%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(196, 181, 253, 0.28);
  transform: rotate(-20deg) scaleX(0.82);
  pointer-events: none;
}

.hero-orbit--two {
  width: 118%;
  border-color: rgba(196, 181, 253, 0.14);
  transform: rotate(36deg) scaleX(0.85);
}

.hero-logo3d {
  position: relative;
  z-index: 2;
  perspective: 520px;
}

.logo-inset {
  display: inline-block;
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: clamp(150px, 16vw, 260px);
  line-height: 0.85;
  color: #F5F3FF;
  transform: rotateX(var(--rx, 18deg)) rotateY(var(--ry, -26deg));
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: logoIdle 7.5s ease-in-out infinite;
  /* Extrusão em degraus: cada sombra é uma "camada" do bloco */
  /* Extrusão em degraus (em "em" para acompanhar o tamanho da fonte):
     cada sombra é uma camada do bloco, clareando na frente e escurecendo no fundo */
  text-shadow:
    0.0075em 0.0075em 0 #EDE4FF,
    0.0150em 0.0150em 0 #E2D4FE,
    0.0225em 0.0225em 0 #D8B4FE,
    0.0300em 0.0300em 0 #C9A7FC,
    0.0375em 0.0375em 0 #B794F6,
    0.0450em 0.0450em 0 #A78BFA,
    0.0525em 0.0525em 0 #9A7CF5,
    0.0600em 0.0600em 0 #8B5CF6,
    0.0675em 0.0675em 0 #7F4CEF,
    0.0750em 0.0750em 0 #7C3AED,
    0.0825em 0.0825em 0 #7133E0,
    0.0900em 0.0900em 0 #6D28D9,
    0.0975em 0.0975em 0 #6222C9,
    0.1050em 0.1050em 0 #5B21B6,
    0.1125em 0.1125em 0 #521CA5,
    0.1200em 0.1200em 0 #4C1D95,
    0.1275em 0.1275em 0 #431884,
    0.1350em 0.1350em 0 #3B0F7A,
    0.1425em 0.1425em 0 #341070,
    0.1500em 0.1500em 0 #2E1065,
    0.2em 0.24em 0.18em rgba(0, 0, 0, 0.65),
    0 0 0.2em rgba(139, 92, 246, 0.5);
  will-change: transform;
}

.hero-logo3d.is-tilt .logo-inset {
  animation: none;
}

/* Emblema em imagem (render 3D): inclinação mais suave que a das letras,
   para não distorcer o cubo que já vem em perspectiva */
.logo-inset--img {
  width: clamp(220px, 22vw, 340px);
  height: auto;
  text-shadow: none;
  transform: rotateX(calc(var(--rx, 16deg) * 0.4)) rotateY(calc(var(--ry, -22deg) * 0.4));
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 36px rgba(139, 92, 246, 0.45));
  animation-name: emblemIdle;
}

.hero-logo3d.is-tilt .logo-inset--img {
  filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 48px rgba(168, 85, 247, 0.65));
}

@keyframes emblemIdle {
  0%, 100% { transform: rotateX(6deg) rotateY(-9deg) translateY(0); }
  50% { transform: rotateX(3deg) rotateY(-3deg) translateY(-14px); }
}

@keyframes logoIdle {
  0%, 100% { transform: rotateX(18deg) rotateY(-26deg) translateY(0); }
  50% { transform: rotateX(10deg) rotateY(-12deg) translateY(-10px); }
}

.hero-visual-tag {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-light);
  opacity: 0.75;
  z-index: 2;
}

.hero-visual-caption {
  position: relative;
  z-index: 2;
  margin-top: 30px; /* espaço para a extrusão do bloco */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.hero-visual-caption strong {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.24em;
  color: var(--purple-light);
}

.hero-visual-caption span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--cyan);
}

.hero-note {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .logo-inset,
  .hero-mesh span { animation: none; }
}

@media (max-width: 640px) {
  .hero-mesh span { filter: blur(50px); }
}

/* Hero floating panels */
.hero-panels {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  pointer-events: none;
}

.hero-floating-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  animation: float-slow 6s ease-in-out infinite;
  min-width: 240px;
}

.hero-floating-card:nth-child(2) {
  animation-delay: -2s;
  margin-left: 40px;
}

.hero-floating-card:nth-child(3) {
  animation-delay: -4s;
  margin-left: 20px;
}

/* ── Featured Mods Section ── */
.featured-section {
  padding: var(--space-24) 0;
  position: relative;
}

/* ── How It Works ── */
.how-it-works {
  padding: var(--space-24) 0;
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.step-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: var(--glass-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--glass-radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all var(--transition-base);
  position: relative;
}

.step-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px);
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-white);
  margin: 0 auto var(--space-5);
  box-shadow: var(--glow-purple);
}

.step-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.step-card p {
  font-size: var(--text-sm);
}

/* ── Custom Mods CTA Section ── */
.custom-cta-section {
  padding: var(--space-24) 0;
}

.custom-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.custom-cta-content h2 {
  margin-bottom: var(--space-5);
}

.custom-cta-content p {
  font-size: var(--text-md);
  margin-bottom: var(--space-6);
}

.custom-cta-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.custom-cta-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.custom-cta-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 14px;
  flex-shrink: 0;
}

/* Status Tracking Preview */
.status-preview {
  background: var(--glass-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--glass-radius);
  padding: var(--space-8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* ── Teaser Grid (responsive 2→1 col) ── */
.teaser-grid {
  padding: var(--space-12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 968px) {
  .teaser-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-6);
  }
}

@media (max-width: 640px) {
  .teaser-grid {
    padding: var(--space-6) var(--space-4);
    gap: var(--space-4);
  }
}

/* ── CTA Final ── */
.final-cta {
  padding: var(--space-24) 0;
  text-align: center;
}

.final-cta-box {
  background: var(--glass-bg);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glow-purple);
  position: relative;
  overflow: hidden;
}

.final-cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at center,
    rgba(139, 92, 246, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.final-cta-box h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-5);
  position: relative;
}

.final-cta-box p {
  font-size: var(--text-md);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  position: relative;
}

.final-cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  position: relative;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — App-Like Mobile Experience
   ══════════════════════════════════════════════ */

@media (max-width: 968px) {
  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: var(--space-12);
  }

  .hero h1 {
    font-size: clamp(40px, 8vw, 60px);
  }

  .hero-panels {
    display: none;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-visual {
    width: min(100%, 340px);
    margin: 0 auto;
  }

  .logo-inset {
    font-size: 140px;
  }

  .logo-inset--img {
    width: 220px;
  }

  .hero-note {
    display: none;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .custom-cta {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-stats {
    max-width: 100%;
  }

  .featured-section,
  .how-it-works,
  .custom-cta-section,
  .final-cta {
    padding: var(--space-12) 0;
  }

  .hero-floating-card {
    min-width: unset;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 100px;
    padding-bottom: var(--space-8);
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 52px);
    line-height: 1.05;
  }

  .hero-subtitle {
    font-size: var(--text-sm);
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-stats {
    gap: var(--space-2);
    margin-top: var(--space-6);
  }

  .hero-stat-item {
    padding: 10px 10px;
    text-align: center;
  }

  .hero-overline {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .step-card {
    padding: var(--space-6) var(--space-4);
  }

  .featured-section,
  .how-it-works,
  .custom-cta-section,
  .final-cta {
    padding: var(--space-8) 0;
  }

  .final-cta-box {
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-xl);
  }

  .final-cta-box h2 {
    font-size: var(--text-xl);
  }

  .final-cta-box p {
    font-size: var(--text-sm);
  }

  .final-cta-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .final-cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .section-header {
    margin-bottom: var(--space-6);
  }

  .section-header h2 {
    font-size: var(--text-xl);
  }

  .section-header p {
    font-size: var(--text-sm);
  }

  .status-preview {
    padding: var(--space-4);
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero-stat-value {
    font-size: var(--text-xl);
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }
}
