/* ============================================================
   WEBLABS — home.css
   Homepage-specific styles + Aether Flow Particle Hero
   ============================================================ */

/* ── Hero Particle Section ───────────────────────────────── */
#hero.hero-particle {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  padding-top: 76px;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
  z-index: 2;
  pointer-events: none;
}

#hero.hero-particle .container {
  position: relative;
  z-index: 3;
}

#hero.hero-particle .hero-inner {
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.badge-icon {
  width: 16px;
  height: 16px;
  color: #a78bfa;
}

.hero-badge span {
  font-size: 14px;
  font-weight: 500;
  color: #e5e7eb;
}

/* Title */
.hero-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(to bottom, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* Description */
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #9ca3af;
  max-width: 672px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 300;
}

/* Actions */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #fff;
  color: #000;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.hero-actions .btn-primary:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

.hero-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: #fff;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.hero-actions .btn-ghost:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 3;
}

.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, #a78bfa, transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* Fade-up animations */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.3s; }
.fade-up.delay-2 { animation-delay: 0.5s; }
.fade-up.delay-3 { animation-delay: 0.7s; }
.fade-up.delay-4 { animation-delay: 0.9s; }

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

/* ── Hero (Original - kept for fallback/other pages) ─────── */
#hero:not(.hero-particle) {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 76px;
}

#hero:not(.hero-particle)::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(41,121,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41,121,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

#hero:not(.hero-particle)::after {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(41,121,255,0.1) 0%, transparent 65%);
  pointer-events: none;
}

#hero:not(.hero-particle) .hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

#hero:not(.hero-particle) .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease 0.2s forwards;
}

#hero:not(.hero-particle) .hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--blue);
}

#hero:not(.hero-particle) .hero-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--white);
  opacity: 0;
  animation: fadeSlideUp 0.7s ease 0.4s forwards;
  min-height: 1.1em;
}

#hero:not(.hero-particle) .hero-heading::after {
  content: '|';
  color: var(--blue);
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}

#hero:not(.hero-particle) .hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  font-weight: 300;
  max-width: 560px;
  margin-top: 24px;
  line-height: 1.75;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease 0.6s forwards;
}

#hero:not(.hero-particle) .hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 44px;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease 0.8s forwards;
  flex-wrap: wrap;
}

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

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Clients / Trust strip ────────────────────────────────── */
#clients {
  padding: 60px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  overflow: hidden;
}

.clients-label {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}

.clients-track {
  display: flex;
  gap: 72px;
  align-items: center;
  animation: scrollTrack 22s linear infinite;
  width: max-content;
}

.clients-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--faint);
  white-space: nowrap;
  letter-spacing: -0.02em;
  transition: color var(--transition);
}

.clients-track span:hover {
  color: var(--muted);
}

@keyframes scrollTrack {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Services ─────────────────────────────────────────────── */
#services {
  padding: 140px 0;
}

.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 80px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card {
  background: var(--bg-card);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: none;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.service-card:hover::before {
  opacity: 1;
}

.service-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 24px;
  opacity: 0.8;
}

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--blue);
  margin-bottom: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-width: 1.5;
}

.service-card:hover .service-icon {
  transform: translateY(-4px);
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.3;
}

.service-desc {
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 32px;
  flex-grow: 1;
}

.service-arrow {
  position: relative;
  align-self: flex-start;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.3s ease;
  margin-top: auto;
}

.service-card:hover .service-arrow {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateX(4px);
  box-shadow: 0 0 0 4px rgba(41, 121, 255, 0.1);
}

.service-card:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.service-card:nth-child(1),
.service-card:nth-child(2) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* ── Stats ────────────────────────────────────────────────── */
#stats {
  padding: 80px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--faint);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  background: var(--bg-card);
  padding: 52px 48px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
}

.stat-number span {
  color: var(--blue);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ── Portfolio ────────────────────────────────────────────── */
#portfolio {
  padding: 140px 0;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 60px;
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: none;
}

.project-card:hover {
  border-color: var(--blue-border);
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(41,121,255,0.15);
}

.project-thumb {
  aspect-ratio: 16/10;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

.project-thumb-1 { background: linear-gradient(135deg, #0d1b3e 0%, #1a3a6e 100%); }
.project-thumb-2 { background: linear-gradient(135deg, #0e2a1f 0%, #1a5a3c 100%); }
.project-thumb-3 { background: linear-gradient(135deg, #2a0d2a 0%, #5a1a5a 100%); }

.project-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22,22,42,0.8) 0%, transparent 50%);
}

.project-thumb-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(13,13,20,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--faint);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-info {
  padding: 28px 28px 32px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--blue);
  margin-top: 20px;
  transition: gap var(--transition);
}

.project-link:hover {
  gap: 10px;
}

/* ── Testimonials ─────────────────────────────────────────── */
#testimonials {
  padding: 140px 0;
  background: var(--bg-surface);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 64px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--faint);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  transition: border-color var(--transition), transform var(--transition);
}

.testimonial-card:hover {
  border-color: var(--blue-border);
  transform: translateY(-4px);
}

.testimonial-stars {
  color: var(--blue);
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.testimonial-quote {
  font-size: 0.95rem;
  color: var(--white);
  font-weight: 300;
  line-height: 1.75;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--faint);
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}

.testimonial-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── CTA Banner ───────────────────────────────────────────── */
#cta-banner {
  padding: 140px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#cta-banner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(41,121,255,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.cta-banner-inner {
  position: relative;
  z-index: 2;
}

.cta-banner-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1.05;
  max-width: 700px;
  margin: 0 auto 20px;
}

.cta-banner-title span {
  color: var(--blue);
}

.cta-banner-sub {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto 44px;
}

.cta-banner-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .services-header { grid-template-columns: 1fr; }
  .services-grid   { grid-template-columns: 1fr; }
  .stats-grid      { grid-template-columns: 1fr; }
  .portfolio-grid  { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .portfolio-header { flex-direction: column; align-items: flex-start; gap: 20px; }

  .service-card { padding: 36px 28px; }
  #services, #portfolio, #testimonials, #cta-banner { padding: 80px 0; }
  
  #hero.hero-particle .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 640px) {
  #hero:not(.hero-particle) .hero-heading { font-size: 2.6rem; }
  #hero:not(.hero-particle) .hero-actions { flex-direction: column; align-items: flex-start; }
  
  #hero.hero-particle .hero-heading {
    font-size: 2.5rem;
  }
  
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}