:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.12);
  --bg-card-active: rgba(255, 255, 255, 0.16);
  --text-primary: #f0f0f7;
  --text-secondary: #8a8a9c;
  --text-tertiary: #5a5a6a;
  --accent-primary: #00d4ff;
  --accent-secondary: #0088cc;
  --accent-glow: rgba(0, 212, 255, 0.1);
  --border-primary: #2a2a3a;
  --border-accent: #00d4ff;
  --success: #00cc88;
  --warning: #ffaa00;
  --grid-color: rgba(0, 212, 255, 0.03);

  --section-padding: 6rem 2rem;
  --container-max: 1200px;
  --border-radius: 4px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  /* height: 100%; */
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  overflow-x: hidden; /* you already have */
  overflow-y: auto; /* optional, explicitly allow vertical scroll */
}

body.modal-open {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Background Grid */
.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 10px 10px;
  background-position: center center;
  pointer-events: none;
  z-index: -20;
  opacity: 0.5;
}

/* Particles Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -10;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
}

h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent-primary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
}

.mono {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-primary);
  font-weight: 500;
}

.lead {
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* Layout */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
}

section {
  padding: var(--section-padding);
  position: relative;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-primary);
  z-index: 1000;
  padding: 1rem 2rem;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo img {
  width: 2rem;
  margin-right: 0.5rem;
}

.logo span:nth-child(2) {
  color: var(--accent-primary);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-links a.btn {
  margin-top: 0;
}


@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
    font-size: 0.95rem;
  }
}


.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.lang-switch {
  white-space: nowrap;
  font-weight: 500;
}

@media (max-width: 480px) {
  .logo span {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: 1rem;
  }

  .lang-switch {
    margin-left: auto;
  }
}


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

#domain-text {
  display: inline-block;
  min-width: 20ch;
  text-align: center;
}

@media (max-width: 480px) {
  #domain-text {
    min-width: 14ch; /* prevents overflow */
    display: block; /* forces clean line break */
    margin: 0.5rem auto 0;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  padding-top: 6rem;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}

.hero {
  display: flex;
  align-items: center;
  padding-top: 6rem;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}
.hero-cta a.btn {
  margin: 0;
  height: min-content;
}

/* Branches*/
.branches-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}
.branches-grid,
.problem-grid {
  overflow: hidden; /* optional */
}

.branch-card {
  background: var(--bg-card); /* existing semi-transparent dark card */
  backdrop-filter: blur(12px); /* frosted glass effect */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08); /* subtle glassy border */
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  font-weight: 600;
  color: var(--text-primary); /* text stands out on glass */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
  cursor: default;
}

.branch-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.3); /* subtle accent glow on hover */
  background: var(--bg-card-hover); /* slightly brighter glass effect */
  border-color: var(--accent-primary);
}

@media (max-width: 600px) {
  .branches-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 1rem;
  }

  .branch-card {
    padding: 1.2rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 360px) {
  .branches-grid {
    grid-template-columns: 1fr;
  }
}

/* Problem Cards */
.problem-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
}

.problem-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
}

.problem-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-5px);
}

.problem-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.problem-card:hover::before {
  transform: scaleX(1);
}

.problem-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
}

/* Solution Section */
.solution-visual {
  width: 100%;
  height: 400px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.05),
    rgba(0, 136, 204, 0.05)
  );
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  margin: 3rem 0;
  position: relative;
  /* overflow: hidden; */
}

.solution-highlights {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
}

.highlight {
  text-align: center;
  flex: 1;
  /* padding: 2rem; */
}

.highlight-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Process Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 4rem auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--accent-primary),
    transparent
  );
  transform: translateX(-50%);
}

.timeline-step {
  position: relative;
  margin-bottom: 4rem;
  width: 50%;
  padding: 2rem;
  z-index: 10;
}

.timeline-step:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-step:nth-child(even) {
  left: 50%;
}

.step-number {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-primary);
  top: 2rem;
}

.timeline-step:nth-child(odd) .step-number {
  right: -20px;
}

.timeline-step:nth-child(even) .step-number {
  left: -20px;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .nav-links {
    display: none;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-step {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 80px;
  }

  .timeline-step:nth-child(odd) .step-number,
  .timeline-step:nth-child(even) .step-number {
    left: 20px;
    right: auto;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Why Us Section */
.why-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
}

.why-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  position: relative;
}

.why-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent,
    rgba(0, 212, 255, 0.05),
    transparent
  );
  opacity: 0;
  transition: var(--transition);
}

.why-card:hover::after {
  opacity: 1;
}

/* CTA Section */
.cta-section {
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 15, 0.9),
    rgba(18, 18, 26, 0.9)
  );
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
}

.cta-title {
  /* font-size: 2.5rem; */
  margin-bottom: 1rem;
}

.cta-subtitle {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  padding: 4rem 2rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.brand-statement {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 1rem 0 2rem;
}

.copyright {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* Base fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0s,
    /* slower, smooth ease-out */ transform 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0s;
  will-change: opacity, transform; /* GPU optimization */
  visibility: hidden; /* prevent tab focus on invisible elements */
}

/* Visible state */
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Optional: staggered delays */
.fade-in[data-delay="1"] {
  transition-delay: 0.2s;
}
.fade-in[data-delay="2"] {
  transition-delay: 0.4s;
}
.fade-in[data-delay="3"] {
  transition-delay: 0.6s;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
