/* ============================================
   RIBANIER.COM — ENHANCEMENT STYLES
   ============================================ */

/* ── 2. Particle Canvas ── */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── 3. Counter Animation ── */
.counter-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── 4. Process / How We Work Section ── */
.process-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.process-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--border-color) 15%, var(--border-color) 85%, transparent);
  display: none;
}

.process-header {
  text-align: center;
  margin-bottom: 80px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.process-step {
  position: relative;
  padding: 40px 30px;
  text-align: center;
  border-right: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step:last-child {
  border-right: none;
}

.process-step:hover {
  background: rgba(79, 70, 229, 0.03);
}

.process-step-number {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}

.process-step-icon {
  width: 72px;
  height: 72px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 1.6rem;
  color: var(--text-muted);
  position: relative;
  transition: all 0.4s ease;
  background: var(--bg-color);
}

.process-step:hover .process-step-icon {
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.15);
}

.process-step-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.process-step:hover .process-step-icon::after {
  opacity: 0.2;
}

.process-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.process-step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 240px;
  margin: 0 auto;
}

/* Connector arrows between steps */
.process-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
  z-index: 1;
  opacity: 0.4;
}

/* ── 5. Tech Stack Icon Grid ── */
.tech-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.tech-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.tech-icon-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(79, 70, 229, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tech-icon-item:hover::before {
  opacity: 1;
}

.tech-icon-item:hover {
  border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.1);
}

.tech-icon-svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.6;
  transition: all 0.3s ease;
  filter: grayscale(100%) brightness(1.5);
}

.tech-icon-item:hover .tech-icon-svg {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
  transform: scale(1.1);
}

.tech-icon-label {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.tech-icon-item:hover .tech-icon-label {
  color: var(--text-main);
}

/* ── 6. Navbar Scroll Effect ── */
.navbar {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.95) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-bottom-color: rgba(79, 70, 229, 0.2) !important;
}

.nav-link.active-section {
  color: #fff !important;
  position: relative;
}

.nav-link.active-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
}

/* ── 7. Micro-animations & Polish ── */

/* Button Shimmer */
.btn-brutal {
  position: relative;
  overflow: hidden;
}

.btn-brutal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transition: none;
}

.btn-brutal:hover::before {
  animation: shimmer 0.8s ease;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Service List Row — Accent Line */
.list-row {
  position: relative;
  border-left: 3px solid transparent;
  padding-left: 20px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.list-row:hover {
  border-left-color: #4f46e5;
  padding-left: 30px;
  background: rgba(79, 70, 229, 0.02);
}

/* Bento Box Hover Glow */
.bento-box {
  position: relative;
  overflow: hidden;
}

.bento-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.4s ease;
  pointer-events: none;
}

.bento-box:hover::after {
  border-color: rgba(79, 70, 229, 0.15);
}

/* Footer Typing Cursor */
.typing-cursor::after {
  content: '|';
  animation: blink-cursor 1s step-end infinite;
  color: #4f46e5;
  font-weight: 100;
  margin-left: 2px;
}

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

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Section label styling enhancement */
.section-label-enhanced {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.section-label-enhanced::before {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, #4f46e5, transparent);
}

/* Why Ribanier — Full-Width Advantages Section */
.why-ribanier-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.why-ribanier-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.why-ribanier-header {
  text-align: center;
  margin-bottom: 80px;
}

.why-ribanier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.why-ribanier-card {
  position: relative;
  padding: 48px 36px;
  text-align: center;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Remove right border on last column */
.why-ribanier-card:nth-child(3n) {
  border-right: none;
}

/* Remove bottom border on last row */
.why-ribanier-card:nth-child(n+4) {
  border-bottom: none;
}

.why-ribanier-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(79, 70, 229, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.why-ribanier-card:hover::before {
  opacity: 1;
}

.why-ribanier-card:hover {
  background: rgba(79, 70, 229, 0.02);
}

.why-ribanier-card-inner {
  position: relative;
  z-index: 1;
}

.why-ribanier-icon {
  width: 72px;
  height: 72px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 1.6rem;
  color: #818cf8;
  position: relative;
  transition: all 0.4s ease;
  background: var(--bg-color);
}

.why-ribanier-card:hover .why-ribanier-icon {
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.15);
}

.why-ribanier-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.why-ribanier-card:hover .why-ribanier-icon::after {
  opacity: 0.2;
}

.why-ribanier-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.why-ribanier-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* Gradient text utility */
.gradient-text-accent {
  background: linear-gradient(135deg, #4f46e5, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Responsive ── */
@media (max-width: 992px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .process-step {
    border-bottom: 1px solid var(--border-color);
  }

  .process-step:nth-child(2) {
    border-right: none;
  }

  .process-step:nth-child(3),
  .process-step:nth-child(4) {
    border-bottom: none;
  }

  .process-step:nth-child(4) {
    border-right: none;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }

  .tech-icon-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .why-ribanier-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-ribanier-card:nth-child(3n) {
    border-right: 1px solid var(--border-color);
  }

  .why-ribanier-card:nth-child(2n) {
    border-right: none;
  }

  .why-ribanier-card:nth-child(n+4) {
    border-bottom: 1px solid var(--border-color);
  }

  .why-ribanier-card:nth-child(n+5) {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-step {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    padding: 24px 16px;
  }

  .process-step:last-child {
    border-bottom: none;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }

  .process-section {
    padding: 48px 0;
  }

  .process-header {
    margin-bottom: 32px;
  }

  .process-header .display-5 {
    font-size: 1.6rem !important;
  }

  .process-step-icon {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .process-step-title {
    font-size: 1.1rem;
  }

  .process-step-desc {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .tech-icon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tech-icon-item {
    padding: 16px 12px;
  }

  .tech-icon-svg {
    width: 32px;
    height: 32px;
  }

  /* Disable particle canvas on mobile for performance */
  #particle-canvas {
    display: none;
  }

  .why-ribanier-section {
    padding: 48px 0;
  }

  .why-ribanier-header {
    margin-bottom: 32px;
  }

  .why-ribanier-header .display-5 {
    font-size: 1.6rem !important;
  }

  .why-ribanier-grid {
    grid-template-columns: 1fr;
  }

  .why-ribanier-card {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    padding: 28px 20px;
  }

  .why-ribanier-card:last-child {
    border-bottom: none;
  }

  .why-ribanier-icon {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .why-ribanier-title {
    font-size: 1.1rem;
  }

  .why-ribanier-desc {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .section-label-enhanced {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }
}
