/* ============================================
   TaskThread - Homepage Styles
   ============================================ */

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1a1a2e;
}

/* Animated gradient background inspired by leftclick */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 60%, rgba(59, 92, 255, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(99, 60, 255, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 80%, rgba(30, 60, 180, 0.15) 0%, transparent 50%);
  animation: heroShift 12s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(59, 92, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(120, 80, 255, 0.06) 0%, transparent 35%);
}

@keyframes heroShift {
  0% {
    filter: hue-rotate(0deg);
    transform: scale(1);
  }
  100% {
    filter: hue-rotate(15deg);
    transform: scale(1.05);
  }
}

/* Floating geometric grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(80px, 80px); }
}

/* Floating abstract shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: float 8s ease-in-out infinite;
}

.hero-shape:nth-child(1) {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -50px;
  animation-delay: 0s;
  border: 1px solid rgba(59, 92, 255, 0.15);
}

.hero-shape:nth-child(2) {
  width: 250px;
  height: 250px;
  bottom: 10%;
  left: 5%;
  animation-delay: -3s;
  background: radial-gradient(circle, rgba(59, 92, 255, 0.05), transparent);
}

.hero-shape:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 30%;
  right: 20%;
  animation-delay: -5s;
  border: 1px solid rgba(99, 60, 255, 0.12);
}

.hero-shape:nth-child(4) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 15%;
  animation-delay: -2s;
  background: rgba(59, 92, 255, 0.08);
}

/* Glowing accent orb */
.hero-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 92, 255, 0.12) 0%, transparent 70%);
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  z-index: 1;
  animation: pulse-glow 6s ease-in-out infinite, float 10s ease-in-out infinite;
  filter: blur(40px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  animation: fadeInUp 1s cubic-bezier(0.65, 0.05, 0.36, 1) forwards;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(59, 92, 255, 0.3);
  background: rgba(59, 92, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(10px);
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero h1 {
  color: var(--color-text-light);
  margin-bottom: 1.75rem;
  font-weight: 700;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 560px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: var(--color-accent);
}

.hero .btn-primary:hover {
  background: #4d6bff;
  box-shadow: 0 12px 40px rgba(59, 92, 255, 0.3);
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.hero .btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-text-light);
}

/* Make nav visible on dark hero */
body:has(.hero) .nav .nav-logo,
body:has(.hero) .nav .nav-links a:not(.btn) {
  color: var(--color-text-light);
}

/* Revert to dark text once nav has scrolled background */
body:has(.hero) .nav.scrolled .nav-logo {
  color: var(--color-text);
}

body:has(.hero) .nav.scrolled .nav-links a:not(.btn) {
  color: var(--color-text-muted);
}

body:has(.hero) .nav.scrolled .nav-links a:not(.btn):hover {
  color: var(--color-accent);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* --- Intro / Stats Section --- */
.intro {
  background: var(--color-bg);
  position: relative;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.intro-text h2 {
  margin-bottom: 1.5rem;
}

.intro-text p {
  margin-bottom: 2rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat {
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-card-bg);
  transition: all var(--transition-fast);
}

.stat:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Geometric Visual Block (Model Workshop inspired) --- */
.geo-visual {
  position: relative;
  width: 100%;
  height: 400px;
}

.geo-visual .geo-piece {
  position: absolute;
  overflow: hidden;
  transition: transform var(--transition-smooth);
}

.geo-visual .geo-piece:hover {
  transform: scale(1.05);
}

.geo-piece-1 {
  width: 180px;
  height: 180px;
  top: 0;
  right: 20%;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
}

.geo-piece-2 {
  width: 140px;
  height: 140px;
  top: 30%;
  right: 5%;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: linear-gradient(135deg, #1a1a1a, #333);
}

.geo-piece-3 {
  width: 200px;
  height: 200px;
  bottom: 0;
  right: 30%;
  clip-path: polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%);
  background: linear-gradient(135deg, var(--color-accent), #4d6bff);
  opacity: 0.8;
}

.geo-piece-4 {
  width: 120px;
  height: 120px;
  top: 15%;
  right: 45%;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: rgba(59, 92, 255, 0.1);
  border: 2px solid var(--color-accent);
}

/* --- Services Preview Section --- */
.services-preview {
  background: var(--color-bg);
}

.services-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.services-header h2 {
  margin-bottom: 1rem;
}

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

.service-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 3rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.service-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.service-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.service-link:hover {
  gap: 0.75rem;
}

/* --- Process Section --- */
.process {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.process-header {
  max-width: 640px;
  margin-bottom: 4rem;
}

.process-header .section-number {
  color: rgba(59, 92, 255, 0.7);
}

.process-header h2 {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.process-header p {
  color: rgba(255, 255, 255, 0.5);
}

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

.process-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 92, 255, 0.3), transparent);
}

.process-step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(59, 92, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(59, 92, 255, 0.05);
  position: relative;
  z-index: 1;
  transition: all var(--transition-fast);
}

.process-step:hover .step-number {
  background: rgba(59, 92, 255, 0.15);
  border-color: var(--color-accent);
  transform: scale(1.1);
}

.process-step h3 {
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.process-step p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9375rem;
}

/* --- Testimonial Section --- */
.testimonial {
  background: var(--color-bg);
}

.testimonial-card {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 2.5rem;
  position: relative;
}

.testimonial-quote::before {
  content: '\201C';
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6rem;
  color: var(--color-accent);
  opacity: 0.15;
  line-height: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.testimonial-info strong {
  display: block;
  font-size: 1rem;
  color: var(--color-text);
}

.testimonial-info span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* --- CTA Section --- */
.cta {
  background: var(--color-bg);
  padding-bottom: 6rem;
}

.cta-box {
  background: var(--color-bg-dark);
  border-radius: 24px;
  padding: 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(59, 92, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.cta-box h2 {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.5);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  position: relative;
  z-index: 1;
}

.cta-box .btn {
  position: relative;
  z-index: 1;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .geo-visual {
    display: none;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }

  .process-steps::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding-top: 6rem;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 8vw, 3.5rem);
  }

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

  .process-steps {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 3rem 2rem;
  }
}
