/* =========================
   HEADER
========================= */

header {
  position: relative;
  padding: 60px 20px 50px;
  text-align: center;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.header-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: var(--accent-color);
  animation: fadeIn 0.6s ease-out;
}

/* Animated grid background */
.header-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
  animation: gridMove 20s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(50px, 50px);
  }
}

/* Gradient glow */
header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 150%;
  background: radial-gradient(
    ellipse at center,
    var(--hero-glow) 0%,
    transparent 60%
  );
  opacity: 0.8;
  z-index: 1;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.05);
  }
}

header h1 {
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.04em;
  text-transform: none;
  margin-bottom: 20px;
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent-color) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleSlide 0.8s ease-out;
}

@keyframes titleSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-line-1 {
  color: var(--text-primary);
  margin-top: 16px;
  font-weight: 600;
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.3s forwards;
}

header .muted {
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.5s forwards;
}

.header-actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.7s forwards;
}

/* =========================
   STATS BAR
========================= */

.stats-bar {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: -40px auto 0;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  position: relative;
  z-index: 5;
}

.stats-bar .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.stat {
  text-align: center;
  padding: 20px;
}

.stat-value {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================
   MAIN CONTENT
========================= */

main {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 24px;
}

section { 
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
  letter-spacing: -0.03em;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-color) 0%,
    transparent 100%
  );
  border-radius: 2px;
  animation: underlineGrow 0.6s ease-out;
}

@keyframes underlineGrow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 60%;
    opacity: 1;
  }
}

.card h2 { 
  margin-bottom: 18px;
}

ul {
  margin-top: 12px;
  padding-left: 24px;
}

li {
  margin-bottom: 10px;
}

/* =========================
   SERVICE GRID
========================= */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.service-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.service-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.service-item h3,
.service-item-title {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.service-item p {
  margin: 0;
  line-height: 1.6;
}

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

/* =========================
   PROCESS
========================= */

.process-spacing {
  margin-top: 32px;
}

.process-timeline {
  margin-top: 4px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.process-cta {
  margin-top: 24px;
}

/* =========================
   WORK/PROJECTS
========================= */

.project-spacing {
  margin-top: 32px;
}

.work-cta {
  margin-top: 24px;
}

/* =========================
   TESTIMONIALS
========================= */

.testimonial-placeholder {
  margin-top: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

/* =========================
   PORTFOLIO GRID
========================= */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.portfolio-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.portfolio-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.portfolio-card:hover .portfolio-card-glow {
  opacity: 1;
}

.portfolio-header {
  margin-bottom: 16px;
}

.portfolio-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text-primary);
}

.industry-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-color);
}

.portfolio-summary {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 15px;
}

.portfolio-features {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}

.portfolio-features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.5;
}

.portfolio-features li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--accent-color);
  font-weight: bold;
}

.portfolio-cta {
  margin-top: auto;
}

.portfolio-cta .btn {
  width: 100%;
  justify-content: center;
}

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

  .portfolio-card {
    padding: 24px;
  }

  .portfolio-title {
    font-size: 20px;
  }
}

/* =========================
   FOOTER
========================= */

footer {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(
    180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-color),
    transparent
  );
}

.footer-content p {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 4px 0;
}

.footer-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--accent-color);
}

.footer-legal {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--accent-color);
}

/* =========================
   CONTACT FORM
========================= */

.contact-form {
  margin-top: 20px;
}

.contact-form textarea.input {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
}

.contact-form .btn {
  width: 100%;
  margin-top: 20px;
  font-size: 16px;
  padding: 16px 24px;
}

/* =========================
   QUOTE ACTIONS
========================= */

.quote-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.quote-actions .btn {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  header {
    padding: 50px 20px 40px;
  }
  
  main {
    margin: 40px auto;
    padding: 0 16px;
  }
  
  .stats-bar .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .stats-bar {
    padding: 30px 16px;
  }
  
  .quote-actions {
    flex-direction: column;
  }
  
  .quote-actions .btn {
    width: 100%;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  #pricing {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  header {
    padding: 40px 16px 32px;
  }
  
  .header-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .header-actions .btn,
  .header-actions .chip {
    width: 100%;
    justify-content: center;
  }
  
  .chips {
    width: 100%;
    flex-direction: column;
  }
  
  .stats-bar .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}
