/* --- MODERN DESIGN SYSTEM --- */

/* 1. Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;600&display=swap');

/* 2. CSS Variables (Root) */
:root {
  --primary-color: #00e676;
  --primary-hover: #00ff84;
  --bg-color: #0a0a0a;
  --surface-color: #1a1a1a;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-color: #e0e0e0;
  --heading-color: #ffffff;
  --subtle-text: #a0a0a0;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --primary-gradient: linear-gradient(90deg, var(--primary-color) 0%, #00d4ff 100%);
  --glow-color: rgba(0, 230, 118, 0.5);
}

/* 3. Global Styles & Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  background-image: linear-gradient(330deg, var(--bg-color) 0%, #111827 50%, #32184a 100%);
  animation: gradient-animation 20s ease infinite;
  margin: 0;
}

@keyframes gradient-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body, html {
  background-size: 200% 200%;
}

/* 4. Typography */
h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--heading-color);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.5px;
  z-index: 5;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
p { margin-bottom: 1rem; max-width: 65ch; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-hover); }

/* 5. Header & Navigation */
#header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(10, 10, 10, 0.5);
  margin: 0;
  padding: 0;
}

#header.scrolled {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 2.2rem;
  min-height: 48px;
  border-radius: 1.2rem;
  margin: 0 auto;
  max-width: 1200px;
  position: relative;
  z-index: 10;
}

.site-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
}

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

.nav-links a {
  color: var(--text-color);
  font-weight: 600;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  position: relative;
  transition: color 0.25s cubic-bezier(.4,2,.6,1), text-shadow 0.25s cubic-bezier(.4,2,.6,1);
  outline: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #00d4ff 100%);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s cubic-bezier(.4,2,.6,1), opacity 0.22s;
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--primary-color);
  /* text-shadow: 0 0 8px var(--primary-color), 0 0 18px #00d4ff; */
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-links a:active {
  color: var(--primary-hover);
  text-shadow: 0 0 12px var(--primary-hover), 0 0 24px #00d4ff;
}

/* 6. Buttons */
.btn {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: #000;
  background: var(--primary-gradient);
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background-size: 200% 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-position 0.4s ease;
}

.btn:hover {
  color: #000;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 230, 118, 0.25);
  background-position: -100% 0;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
}

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

/* 7. Main Content & Sections */
main {
  padding: 0 2rem;
}

.section {
  max-width: 1200px;
  /* margin: 6rem auto; */
  justify-self: center;
  text-align: center;
}

.section h2 {
  margin-bottom: 3rem;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 2rem;
}

.hero .sub-headline {
  font-size: 1.25rem;
  color: var(--subtle-text);
  max-width: 600px;
  margin: 1rem 0 2rem;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  text-align: left;
}

.about-text { flex: 1; }
.about-media { flex: 1; }
.about-media img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 20px 40px var(--shadow-color);
  transition: transform 0.3s ease;
}

.about-media img:hover {
  transform: scale(1.05);
}

.primary-color {
  color: var(--primary-color);
}

/* Services Section */
.carousel {
  position: relative;
}

.carousel-track-container {
  width: 100%;
  overflow: hidden;
  --carousel-gap: 2rem;
  touch-action: pan-y;
  cursor: grab;
}

.carousel-track-container.is-dragging {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  transition: transform 0.5s ease-in-out;
  align-items: stretch;
  padding-top: 10px;
}

.carousel-slide {
  flex: 0 0 calc((100% - (2 * var(--carousel-gap))) / 3);
  width: calc((100% - (2 * var(--carousel-gap))) / 3);
  display: flex;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 1rem;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* @media (max-width: 1024px) {
  .carousel-slide {
    flex: 0 0 calc((100% - var(--carousel-gap)) / 2);
    width: calc((100% - var(--carousel-gap)) / 2);
  }
} */

@media (max-width: 768px) {
  .carousel-slide {
    flex: 0 0 100%;
    width: 100%;
  }
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.7);
  border: 0;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 2.5rem;
  padding: 0.75rem 1.25rem;
  z-index: 2;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  overflow: visible;
}

.carousel-button:focus {
  outline: none;
}

.carousel-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg-color), 0 0 0 5px var(--primary-color);
}

.carousel-button__ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  background: rgba(0, 230, 118, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: ripple-fade 0.6s ease-out forwards;
}

@keyframes ripple-fade {
  from {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

.carousel-button--left {
  left: -80px;
}

.carousel-button--right {
  right: -80px;
}

@media (max-width: 1200px) {
  .carousel-button--left { left: -40px; }
  .carousel-button--right { right: -40px; }
}

@media (max-width: 768px) {
  .carousel-button--left { left: -15px; }
  .carousel-button--right { right: -15px; }
  .carousel-track-container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.carousel-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #222;
  border: 2px solid var(--primary-color);
  opacity: 0.45;
  transition: background 0.25s, opacity 0.25s, transform 0.25s;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(0,230,118,0.08);
}

.carousel-dot.active {
  background: var(--primary-color);
  opacity: 1;
  transform: scale(1.18);
  box-shadow: 0 0 8px 2px var(--primary-color);
}

@media (max-width: 768px) {
  .carousel-pagination {
    margin-top: 0.7rem;
    margin-bottom: 0.2rem;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px) saturate(1.2);
  padding: 2rem;
  border-radius: 16px;
  border: 1.5px solid var(--surface-border);
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--x) var(--y), var(--glow-color), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px var(--shadow-color);
  border-color: rgba(255, 255, 255, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card .icon {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  transition: transform 0.3s cubic-bezier(.4,2,.6,1), filter 0.3s;
}

.service-card:hover .icon {
  transform: scale(1.15) rotate(-6deg);
  filter: drop-shadow(0 0 8px var(--primary-color));
}

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

/* Contact Section */
#contact p {
  margin: 0 auto;
}

/* 8. Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 6rem;
  border-top: 1px solid var(--surface-border);
  color: var(--subtle-text);
}

/* 9. Responsive Design */
@media (max-width: 880px) {
  .nav-links {
    display: none; /* Basic responsive: hide for now, would need JS for a hamburger menu */
  }
  .about-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  .about-text {
    order: 2;
  }
  .about-media {
    order: 1;
  }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }
  .auth-buttons {
    display: flex !important;
    gap: 0.7rem;
    align-items: center;
    margin-left: auto;
  }
  .auth-buttons .btn {
    font-size: 0.98rem;
    padding: 0.38em 1.1em;
    min-width: 0;
    white-space: nowrap;
  }
  .hidden-mobile {
    display: none;
  }
  .carousel-button {
    display: none;
  }
  .hero-particles {
    display: none; 
  }
}

/* 10. Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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