/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
}

/* WebGL canvas container (behind content) */
#webgl {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Ensure canvas doesn't create scrollbars */
#webgl canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hero Section */
.header {
  padding: 40px 20px;
  background: transparent;
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.logo {
  height: 130px;
  width: auto;
  margin: 0 auto;
}

.hero-text {
  text-align: center;
  margin-top: 20px;
}

.hero-text h1 {
  font-size: 2.5rem;
  color: #FFD700;
}

.hero-content, .hero-text { position: relative; z-index: 1; }

.hero-text p {
  font-size: 1.2rem;
  margin-top: 10px;
  color: #ccc;
}

/* Sections */
.section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: auto;
}

.section { background: transparent; }

/* Card inner wrapper that receives parallax transforms */
.card-inner {
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(.2,.9,.2,1), opacity 420ms ease;
  will-change: transform, opacity;
  /* start slightly lower and invisible until in-view */
  transform: translateY(18px) translateZ(0px);
  opacity: 0;
}

.card-inner.in-view, .card-inner.in-view * {
  opacity: 1;
}

/* use CSS variables set by JS for continuous parallax */
.card-inner {
  transform: translateY(var(--parallax-y, 0px)) translateZ(var(--parallax-z, 0px));
}

/* Heading animation: each character enters with stagger and moving gradient */
.heading-anim { display: inline-block; overflow: hidden; }
.heading-anim .char { display: inline-block; transition: transform 420ms cubic-bezier(.2,.9,.2,1), opacity 420ms ease; }

/* hidden until observed */
.heading-anim.not-seen .char { transform: translateY(18px); opacity: 0; }
.heading-anim.in-view .char { transform: translateY(0); opacity: 1; }

/* gradient on each character for better compatibility */
.heading-anim .char { background: linear-gradient(90deg, #FFD700, #FF8C00, #00BFFF); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; background-size: 200% 100%; animation: headingShimmer 6s linear infinite; }

@keyframes headingShimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* allow heading parallax via vars too */
.parallax-item { transition: transform 420ms cubic-bezier(.2,.9,.2,1); transform: translateY(var(--parallax-y,0px)) translateZ(var(--parallax-z,0px)); }

/* Ensure hero and headings overlay nicely */
.hero-content, .hero-text { position: relative; z-index: 3; }

/* Force section headings to be centered and use centered transform origin */
.section h2 {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 auto 30px;
  transform-origin: center center;
}

/* Ensure parallax items transform around center so they remain visually centered */
.parallax-item {
  transform-origin: center center;
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #FFD700;
}

/* Larger section headings */
h2 {
  font-size: 2.2rem;
  line-height: 1.05;
  letter-spacing: 0.4px;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.service-card {
  background: #222;
  border: 2px solid #FFD700;
  border-radius: 8px;
  padding: 20px;
}

.service-card h3 {
  color: #FFD700;
  margin-bottom: 10px;
}

/* Slightly larger service card titles for readability */
.service-card h3 {
  font-size: 1.25rem;
}

/* 3D-friendly card styles for tilt and depth */
.service-card {
  transform-origin: center center;
  transition: transform 220ms ease, box-shadow 220ms ease;
  will-change: transform;
  transform-style: preserve-3d;
  position: relative;
  z-index: 2;
}

.hero-content, .hero-text { position: relative; z-index: 1; }

/* Make sure interactive elements have their own stacking context */
.contact-form { position: relative; z-index: 2; }

/* About */
#about p {
  max-width: 800px;
  margin: 0 auto 15px;
  color: #ccc;
  line-height: 1.5;
  font-size: 22px;
  text-align: center;
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 15px;
  max-width: 500px;
  margin: auto;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #444;
  border-radius: 5px;
  background: #111;
  color: #fff;
}

.btn {
  background: #FFD700;
  color: #000;
  padding: 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.contact-info {
  text-align: center;
  font-size: 20px;
  margin-top: 20px;
}

/* Make form inputs slightly larger for readability */
.contact-form input,
.contact-form textarea {
  font-size: 16px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #000;
  color: #aaa;
}

/* MOBILE VIEW */
@media (max-width: 600px) {

  .logo {
    height: 90px;
  }

  .hero-text h1 {
    font-size: 1.6rem;
    max-width: 550px;
  }

  .hero-text p {
    font-size: 1rem;
  }

  #about p {
    font-size: 18px;
    padding: 0 10px;
  }

  /* slightly smaller section headings on mobile */
  h2 {
    font-size: 1.6rem;
  }

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

  .service-card {
    padding: 15px;
  }
  
 
}




/* Center the last service card */
.services-grid .service-card:nth-child(4) {
  grid-column: 1 / -1; /* Make it take the full row */
  max-width: 350px;    /* Optional: limit width */
  margin: 0 auto;      /* Center it */
}


@media (max-width: 600px) {
  /* Center the last service card on mobile */
  .services-grid .service-card:nth-child(4) {
    grid-column: 1 / -1; /* Make it take the full row */
    max-width: 550px;    /* Optional: limit width */
    margin: 0 auto;      /* Center it */
  }
}

