/* ============================================================
   MEROVANTIX — HOME PAGE STYLES
   home.css
   ============================================================ */

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 30% 50%, rgba(139,92,246,0.12) 0%, transparent 70%),
              radial-gradient(ellipse 50% 50% at 70% 70%, rgba(245,158,11,0.06) 0%, transparent 60%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-badge {
  margin-bottom: 1.5rem;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
  50%       { box-shadow: 0 0 20px 4px rgba(139,92,246,0.15); }
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-title .line-1 {
  display: block;
  color: var(--color-text);
}

.hero-title .line-2 {
  display: block;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2.25rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  margin-top: 0.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   SIGNAL GRID WIDGET (SVG interactive)
   ============================================================ */
.signal-grid-widget {
  position: relative;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.signal-grid-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.signal-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  z-index: 2;
  position: relative;
}

.signal-grid-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.signal-grid-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: #22c55e;
  font-family: 'Orbitron', monospace;
  letter-spacing: 0.08em;
}

.signal-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

#signal-svg {
  flex: 1;
  width: 100%;
  cursor: crosshair;
}

.signal-node {
  cursor: pointer;
  transition: r 0.2s ease;
}

.signal-node:hover circle {
  r: 8;
}

.signal-node.active circle {
  filter: url(#glow-filter);
}

.signal-grid-footer {
  font-size: 0.72rem;
  color: var(--color-text-faint);
  margin-top: 0.75rem;
  text-align: center;
  font-family: 'Orbitron', monospace;
  letter-spacing: 0.06em;
}

/* ============================================================
   DAILY BONUS — ENERGY CORE
   ============================================================ */
.daily-bonus {
  background: var(--color-surface-alt);
  position: relative;
  overflow: hidden;
}

.daily-bonus::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.bonus-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.bonus-text .section-title {
  margin-bottom: 1rem;
}

.bonus-text p {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Hexagonal Cells */
.hex-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hex-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 80px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--color-surface-2);
  border: none;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hex-cell::before {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--color-surface);
  z-index: 0;
}

.hex-cell-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hex-cell-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
}

.hex-cell-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.hex-cell.completed {
  background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(139,92,246,0.2));
}

.hex-cell.completed .hex-cell-label {
  color: var(--color-primary);
}

.hex-cell.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  animation: hex-pulse 2s ease-in-out infinite;
}

.hex-cell.active::before {
  background: transparent;
}

.hex-cell.active .hex-cell-label {
  color: #0a0808;
  font-weight: 800;
}

.hex-cell.active .hex-cell-icon {
  filter: brightness(0) invert(0.1);
}

@keyframes hex-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.6); }
  50%       { box-shadow: 0 0 20px 6px rgba(245,158,11,0.25); }
}

/* Bonus Mini Cards */
.bonus-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.bonus-mini-card {
  padding: 1rem;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--border-subtle);
}

.bonus-mini-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  line-height: 1;
}

.bonus-mini-card-value {
  font-family: 'Orbitron', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.2rem;
}

.bonus-mini-card-label {
  font-size: 0.68rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   REVIEWS SECTION
   ============================================================ */
.reviews {
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

.reviews::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  padding: 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition-base);
}

.review-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-purple);
  transform: translateY(-4px);
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  line-height: 1;
  font-family: 'Orbitron', monospace;
  color: rgba(139, 92, 246, 0.15);
  font-weight: 900;
}

.review-stars {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}

.review-stars span {
  color: var(--color-secondary);
  font-size: 1rem;
}

.review-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.review-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
  display: block;
}

.review-location {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================
   MOBILE PWA SECTION
   ============================================================ */
.mobile-pwa {
  background: var(--color-surface-alt);
  position: relative;
  overflow: hidden;
}

.pwa-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.pwa-text .section-title {
  margin-bottom: 1rem;
}

.pwa-text p {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.pwa-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pwa-bullet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.pwa-bullet-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* Phone Mockup */
.phone-mockup {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-frame {
  width: 220px;
  height: 440px;
  border-radius: 36px;
  border: 3px solid var(--color-primary);
  background: var(--color-surface);
  position: relative;
  box-shadow: 0 0 40px rgba(139,92,246,0.4), 0 0 80px rgba(139,92,246,0.2), inset 0 0 20px rgba(139,92,246,0.05);
  overflow: hidden;
  animation: float-phone 4s ease-in-out infinite;
}

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

.phone-notch {
  width: 80px;
  height: 22px;
  background: var(--color-bg);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0d0d22 0%, #141428 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  gap: 0.75rem;
}

.phone-screen-logo {
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.1em;
  margin-top: 1.5rem;
}

.phone-game-preview {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--border-purple);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.phone-glow-ring {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(139,92,246,0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ring-pulse 3s ease-in-out infinite;
}

.phone-glow-ring:nth-child(2) {
  width: 380px;
  height: 380px;
  border-color: rgba(139,92,246,0.08);
  animation-delay: 1s;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.5; transform: translate(-50%, -50%) scale(1.05); }
}

/* ============================================================
   VALUES SECTION
   ============================================================ */
.values {
  background: var(--color-bg);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.value-card {
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.value-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-purple);
}

.value-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-purple-amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.value-card:hover::after {
  transform: scaleX(1);
}

.value-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--border-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.value-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.6rem;
  font-family: 'Orbitron', monospace;
  letter-spacing: 0.04em;
}

.value-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================================
   GAMES PREVIEW
   ============================================================ */
.games-preview {
  background: var(--color-surface-alt);
}

.games-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.preview-game-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  group: '';
}

.preview-game-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-purple);
}

.preview-game-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.preview-game-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,16,0.95) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.preview-game-card:hover .preview-game-overlay {
  opacity: 1;
}

.preview-game-name {
  font-size: 0.7rem;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.preview-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: var(--color-secondary);
  color: #0a0808;
  border-radius: var(--radius-sm);
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}

.games-preview-cta {
  text-align: center;
  margin-top: 1rem;
}

/* ============================================================
   RESPONSIVE — HOME
   ============================================================ */
@media (max-width: 1200px) {
  .games-preview-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .signal-grid-widget {
    display: none;
  }

  .bonus-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pwa-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .phone-mockup {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .games-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .bonus-cards {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .hex-grid {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .games-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
