/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--dark);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1525 60%, #0a1a2e 100%);
}
.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(0,174,239,0.14) 0%, transparent 65%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 120px 0 80px;
}
.hero__content .section-label { color: rgba(0,174,239,0.8); }
.hero__content h1 {
  color: var(--white);
  margin: 0.8rem 0 1.2rem;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.1;
}
.text-primary { color: var(--primary); }
.hero__content > p {
  color: rgba(255,255,255,0.55);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.8;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.3);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 1;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(0,174,239,0.5), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%,100% { opacity: 0.5; height: 40px; }
  50%      { opacity: 1;   height: 60px; }
}

/* ── Testimonial Card ──────────────────────────────────────── */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.testimonial-card__quote {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.12;
  line-height: 1;
  font-family: Georgia, serif;
}
.testimonial-card__text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-card__avatar {
  width: 40px; height: 40px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}
.testimonial-card__author strong { display: block; font-size: 0.88rem; color: var(--text); }
.testimonial-card__author span   { font-size: 0.75rem; color: var(--muted); }

/* ── Tech Grid ─────────────────────────────────────────────── */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 2.5rem;
}
.tech-badge {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.83rem;
  color: var(--text-light);
  transition: all var(--transition);
}
.tech-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── Process Grid ──────────────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.process-step {
  padding: 2.5rem 1.8rem;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background var(--transition);
}
.process-step:last-child { border-right: none; }
.process-step:hover { background: var(--light); }
.process-step__num {
  font-size: 2.2rem;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 1rem;
}
.process-step h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.process-step p  { font-size: 0.82rem; line-height: 1.7; }

@media (max-width: 1024px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-step { border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .process-grid { grid-template-columns: 1fr; }
  .hero__content { padding: 100px 0 60px; }
}

/* ── Alternating dark section overrides ─────────────────── */

/* Tech badges on dark bg */
.section--dark .tech-badge {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}
.section--dark .tech-badge:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Process steps on dark bg */
.section--dark .process-step {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}
.section--dark .process-step h3 {
  color: #fff;
}
.section--dark .process-step p {
  color: rgba(255,255,255,0.55);
}
.section--dark .process-step__num {
  color: var(--primary);
  opacity: 0.7;
}

/* Portfolio cards on white bg */
#works .card {
  background: var(--light);
  border: 1px solid #e5e7eb;
}

/* Testimonial cards on white bg */
#testimonials .testimonial-card {
  background: var(--light);
  border: 1px solid #e5e7eb;
}

/* Section label on dark sections */
.section--dark .section-label {
  color: rgba(255,255,255,0.5);
}
.section--dark .section-label::before {
  background: var(--primary);
}

/* ── Mobile fixes ────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Fix about/stats section two-column overlap */
  #about .container > div {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* Hero content padding fix */
  .hero__content {
    padding: 80px 0 60px;
  }

  /* Scroll indicator hidden on mobile */
  .hero__scroll { display: none; }

  /* Stats grid on mobile — 2 cols instead of auto */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Process grid single column */
  .process-grid {
    grid-template-columns: 1fr !important;
  }

  /* Section headings scale down */
  .section__header h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  /* Tech grid wraps naturally */
  .tech-grid {
    justify-content: center;
  }
}

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

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

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ── Dark Home Page Theme ────────────────────────────────────── */
/* Applied when body.dark-page is set */

body.dark-page {
  background: #0d1117;
  color: rgba(255,255,255,0.75);
}

/* All light sections go dark */
body.dark-page .section:not(.section--dark) {
  background: #0d1117;
}

/* Alternate sections slightly different shade for rhythm */
body.dark-page #services  { background: #0d1117; }
body.dark-page #works     { background: #090e1a; }
body.dark-page #testimonials { background: #0d1117; }
body.dark-page #blog      { background: #090e1a; }

/* Section headings */
body.dark-page .section__header h2,
body.dark-page .section h2 {
  color: #fff;
}
body.dark-page .section__header p,
body.dark-page .section p {
  color: rgba(255,255,255,0.55);
}
body.dark-page .section-label {
  color: rgba(255,255,255,0.4);
}
body.dark-page .section-label::before {
  background: var(--primary);
}

/* Service cards */
body.dark-page .card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}
body.dark-page .card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(0,174,239,0.3);
}
body.dark-page .card h3,
body.dark-page .card h4 {
  color: #fff;
}
body.dark-page .card p {
  color: rgba(255,255,255,0.55);
}

/* Works/Portfolio cards — !important needed to beat #works .card specificity */
body.dark-page #works .card {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
}
body.dark-page #works .card:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(0,174,239,0.3) !important;
}
body.dark-page #works .card h3,
body.dark-page #works .card h4,
body.dark-page #works .card p,
body.dark-page #works .card a:not(.btn) {
  color: rgba(255,255,255,0.75) !important;
}
body.dark-page #works .card .card__title,
body.dark-page #works .card [class*="title"] {
  color: #fff !important;
}

/* Testimonial cards — !important needed to beat #testimonials .testimonial-card */
body.dark-page #testimonials .testimonial-card,
body.dark-page #testimonials .testimonial {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.75) !important;
}
body.dark-page #testimonials .testimonial-card h4,
body.dark-page #testimonials .testimonial h4,
body.dark-page #testimonials .testimonial-card h3,
body.dark-page #testimonials strong {
  color: #fff !important;
}
body.dark-page #testimonials .testimonial-card p,
body.dark-page #testimonials .testimonial p,
body.dark-page #testimonials blockquote {
  color: rgba(255,255,255,0.6) !important;
}
body.dark-page #testimonials .testimonial-card cite,
body.dark-page #testimonials cite {
  color: rgba(255,255,255,0.4) !important;
}

/* Blog cards */
body.dark-page .blog-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
}
body.dark-page .blog-card:hover {
  border-color: rgba(0,174,239,0.2);
}
body.dark-page .blog-card h3,
body.dark-page .blog-card h4,
body.dark-page .blog-title {
  color: #fff;
}
body.dark-page .blog-date,
body.dark-page .blog-excerpt {
  color: rgba(255,255,255,0.45);
}
body.dark-page .blog-card p {
  color: rgba(255,255,255,0.5);
}

/* Outline buttons on dark bg */
body.dark-page .btn-outline {
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.2);
}
body.dark-page .btn-outline:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

/* Icons in cards */
body.dark-page .card__icon svg {
  stroke: var(--primary);
}

/* Dividers and borders */
body.dark-page hr {
  border-color: rgba(255,255,255,0.07);
}
