/* ==========================================================================
   Base & Resets
   ========================================================================== */
:root {
  --bg-dark: #020611;
  --bg-surface: #0a1122;
  --bg-surface-glass: rgba(10, 17, 34, 0.6);
  --text-main: #f0f4fc;
  --text-muted: #8b9bb4;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #a18cd1;
  --neon-glow: 0 0 15px rgba(0, 242, 254, 0.4);
  --neon-glow-strong: 0 0 25px rgba(0, 242, 254, 0.8);
  
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Exo 2', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.dark-section {
  background-color: var(--bg-surface);
}

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--text-main), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  transition: all 0.4s ease;
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .logo,
#navbar.scrolled .nav-links a {
  color: var(--text-main);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #050a14; /* Black on hero */
  text-transform: uppercase;
  transition: color 0.4s ease;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #050a14; /* Black on hero */
  opacity: 0.8;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent-cyan);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: 0.3s;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Spline Viewer Background Setup */
.spline-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

spline-viewer {
  width: 100%;
  height: 100%;
}

/* Overlay UI */
.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  z-index: 10;
  pointer-events: none;
}

.hero-tagline {
  text-align: left;
  max-width: 320px; /* Constrain width to stay inside the dark area */
  font-size: clamp(1.5rem, 3vw, 2.5rem); /* Downsized 1 level */
  margin-bottom: 2rem;
  color: #050a14; /* Solid black */
  text-shadow: none; /* Removed shadow for clean black text */
  pointer-events: auto;
  line-height: 1.3;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: auto;
}

.primary-cta {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.primary-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--neon-glow-strong);
  background: var(--accent-cyan);
}

.cta-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.primary-cta:hover .cta-icon {
  transform: translateX(4px);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background: rgba(10, 17, 34, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.1);
}

.icon-wrapper {
  width: 50px;
  height: 50px;
  background: rgba(0, 242, 254, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
}

.icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.learn-more {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  transition: 0.3s;
}

.learn-more:hover {
  color: var(--accent-blue);
  transform: translateX(5px);
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--neon-glow);
  border-color: rgba(161, 140, 209, 0.3);
}

.portfolio-image {
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 17, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.portfolio-card:hover .portfolio-image {
  transform: scale(1.05);
  transition: transform 0.6s ease;
}

.view-project {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: 0.3s;
}

.view-project:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-content h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.portfolio-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  position: relative;
}

/* Optional connecting line for desktop */
@media (min-width: 900px) {
  .process-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0.3;
    z-index: 0;
  }
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  background: var(--bg-dark);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-number {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: var(--bg-surface);
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.process-step h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-card {
  background: linear-gradient(145deg, rgba(10, 17, 34, 0.8), rgba(2, 6, 17, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  backdrop-filter: blur(15px);
}

.quote-icon {
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(0, 242, 254, 0.1);
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
}

.testimonial-text {
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.client-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-purple);
}

.client-name {
  font-size: 1.1rem;
}

.client-role {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Footer & Contact Section
   ========================================================================== */
.footer {
  background-color: var(--bg-surface);
  padding: 6rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-banner {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(161, 140, 209, 0.1));
  border-radius: 24px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.cta-banner h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h3 {
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.footer-brand p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 400px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.social-links a:hover {
  background: var(--accent-blue);
  transform: translateY(-3px);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.footer-form {
  background: var(--bg-dark);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.05);
}

.submit-btn {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Utils
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .bg-text {
    font-size: clamp(3rem, 10vw, 5rem);
  }
  
  .spacer {
    width: 25vw;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: var(--bg-surface);
    width: 250px;
    height: calc(100vh - 70px);
    padding: 2rem;
    transition: 0.4s ease;
    border-left: 1px solid rgba(255,255,255,0.05);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-tagline {
    font-size: 2rem;
  }
}
