:root {
  --primary: #0057d1;
  --primary-hover: #71717170;
  --dark-bg: #0f0f0f;
  --card-bg: #1f1f1f;
  --text-light: #eaeaea;
  --text-muted: #a0a0a0;
  --header-bg: #121212;
  --cta-bg: #181818;
  --footer-bg: #141414;
  --hero-bg: linear-gradient(to bottom right, #0f0f0f, #1e1e1e);
  --logo-bg: #0041a3;
  --logo-color: #ffffff;
  --plan-text-color: #ffffff; /* still white for contrast */
  --change-text-color: #ffffff; /* still white for contrast */
  --font-family-base: "Poppins", sans-serif; /* Change to desired font */

  --animation-duration: 3s;
  --animation-easing: cubic-bezier(0.25, 0.8, 0.25, 1); /* ease-out-like */
  --stagger-delay: 3s; /* delay between each letter */
  --initial-offset-y: -350px; /* starting translateY */

  /* Inside :root { ... } */
  --background-alt: #181818; /* a slightly different dark background for sections */
  --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.15);
  --shadow-medium: 0 10px 24px rgba(0, 0, 0, 0.2);
  --on-primary: #ffffff; /* text/icon color when background is var(--primary) */
}

body.light-mode {
  --primary: #0057d1;
  --primary-hover: #71717170;
  --dark-bg: #ffffff;
  --card-bg: #f5f5f5;
  --text-light: #1a1a1a;
  --text-muted: #555;
  --header-bg: #f9f9f9;
  --cta-bg: #f0f0f0;
  --footer-bg: #eaeaea;
  --hero-bg: linear-gradient(to bottom right, #ffffff, #f0f0f0);
  --logo-bg: #e0e0e0;
  --logo-color: #003580;
  --plan-text-color: #ffffff; /* still white for contrast */
  --change-text-color: #141414;
  --font-family-base: "Poppins", sans-serif; /* Change to desired font */
  /* Inside body.light-mode { ... } */
  --background-alt: #f9f9f9; /* a light alternative background for sections */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 6px 18px rgba(0, 0, 0, 0.15);
  --on-primary: #ffffff; /* typically white text on primary color */
}

/* Global deep shadow for content cards */
.shadow-elevated {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Hover-enhanced shadow */
.shadow-elevated-hover:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--dark-bg);
  color: var(--text-light);
  overflow-x: hidden;
}

footer,
section {
  padding: 2rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem;
}

header h1 {
  color: var(--primary);
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.header-btn-primary {
  background: var(--primary);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
  transition: background 0.2s;
}

.header-btn-primary:hover {
  color: var(--text-light);
  background: var(--primary-hover);
}

.header-image {
  max-width: 100px;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  color: var(--text-muted);
  margin: 0 1rem;
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-light);
}

/* Mobile styles */
@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    height: 100vh;
  }

  nav.show {
    display: flex;
  }

  .mobile-toggle {
    display: inline-block;
  }

  nav a {
    padding: 0.5rem;
  }
}

.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-separator {
  width: 1px;
  height: 24px;
  background-color: var(--text-muted);
  opacity: 0.5;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  background-color: var(--card-bg);
  border: 1.5px solid var(--text-light);
  border-radius: 100px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px;
}

.slider .icon {
  background: var(--text-light);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
  line-height: 1; /* ✅ prevent vertical misalignment */
  padding-top: 1px; /* ✅ fine-tune to center emoji like 🌙 or ☀️ */
  padding-left: 1px;
}

input:checked + .slider {
  justify-content: flex-end;
  border-color: var(--primary);
}

input:checked + .slider .icon {
  background: var(--primary);
  color: #fff;
}

/* ========== Container / Hero ========== */
.hero {
  position: relative;
  padding: 6rem 2rem 8rem; /* extra bottom padding so floating image fits */
  text-align: center;
  background: var(--hero-bg);
  font-family: var(--font-family-base);
}

/* Main titles */
.title {
  margin: 0 auto 2rem; /* center and spacing below */
  width: fit-content;
  text-align: center;
  color: var(--primary);
  position: relative;
  overflow: visible;
}

.title .main-title {
  font-size: 3rem;
  font-weight: 600;
  margin: 0;
}

.title .subtitle {
  font-size: 2rem;
  font-weight: 500;
  margin: 0.5rem 0 1.5rem;
}

/* Back-text container: absolute center of the title box */
.back-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap; /* keep letters inline */
  pointer-events: none; /* avoid hover interfering if desired */
}

/* Each letter */
.back-text span {
  display: inline-block;
  font-size: 3rem; /* adjust as needed */
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--primary); /* subtle stroke */
  /* Prepare for animation: start off-screen */
  transform: translateY(var(--initial-offset-y));
  opacity: 0;
  /* We'll assign animation-name and delay via JS or CSS custom prop */
  animation-name: slideInUp;
  animation-duration: var(--animation-duration);
  animation-fill-mode: forwards;
  animation-timing-function: var(--animation-easing);
  /* animation-delay: to be set per-letter */
  --final-offset-y: -100px; /* ending translateY */
}

/* On hover (if you want a hover effect to change stroke color) */
.back-text:hover span {
  -webkit-text-stroke-color: rgb(255, 255, 255);
}

/* Keyframes for sliding in from below and fading in */
@keyframes slideInUp {
  from {
    transform: translateY(var(--initial-offset-y));
    opacity: 0;
  }
  to {
    transform: translateY(var(--final-offset-y));
    opacity: 1;
  }
}

/* Paragraph under hero */
.hero p {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
}

/* Button */
.btn-primary {
  background: var(--primary);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  font-family: var(--font-family-base);
}

.btn-primary:hover {
  color: var(--text-light);
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Curved floating image */
.curved-floating-image {
  position: absolute;
  bottom: -20px;
  left: 70%;
  transform: translateY(30%);
  width: 320px;
  max-width: 90%;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, left 0.3s ease;
  z-index: 2;
}

.curved-floating-image:hover {
  left: 69%;
  transform: translateY(40%) scale(1.05);
}

@media (max-width: 1200px) {
  .curved-floating-image {
    display: none;
  }
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}
.section-title-under {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-box {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.3s;
  line-height: 1.6;
}

.feature-box:hover {
  transform: translateY(-8px);
}

.feature-box i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Workflow Steps */
.workflow-steps {
  max-width: 1000px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.workflow-step {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.3s;
}

.workflow-step:hover {
  transform: translateY(-5px);
}

.workflow-step .step-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Screenshots */
.screenshots {
  max-width: 1200px;
  margin: auto;
  padding: 4rem 2rem;
}

.screenshots .screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.screenshots img {
  width: 100%;
  border-radius: 1rem;
  transition: transform 0.3s;
}

.screenshots img:hover {
  transform: scale(1.03);
}

/* Testimonials */
.testimonial-box {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.3s;
  line-height: 1.6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2); /* deep hover */
}

.testimonial-box:hover {
  transform: translateY(-5px);
}

/* Example additions to index.css */
.resources {
  padding: 4rem 1rem;
  background-color: var(
    --background-alt
  ); /* e.g., a slightly different background */
}
.resources .section-title {
  text-align: center;
}
.resources-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  /* For responsiveness: 1 column on small, 2 on medium, 3 on large */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.resource-box {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}
.resource-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}
.resource-box h4 {
  margin-bottom: 0.5rem;
}
.resource-box p {
  flex-grow: 1;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.btn-secondary {
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 2px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--on-primary);
}
/* deployment */
.deployment .plan-box {
  width: 85%;
  background: var(--primary-hover);
  color: var(--change-text-color);
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 1.1;
}

.deployment .plan-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 87, 209, 0.4),
    /* soft primary shadow */ 0 4px 8px rgba(0, 0, 0, 0.2); /* natural depth */
}

.deployment .plan-box h4 {
  margin-bottom: 0.5rem;
  color: var(--change-text-color);
}

.deployment .plan-features {
  text-align: left;
}

.deployment .plan-features li {
  color: var(--change-text-color);
  margin-bottom: 0.5rem;
}

/* FAQ */
.faq .faq-box {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* or add .shadow-elevated class in HTML */
}

.faq .faq-box h5 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

/* Call to Action */
.cta {
  background: var(--cta-bg);
  border-radius: 1rem;
  margin-top: 4rem;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cta p {
  max-width: 700px;
  margin: auto;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Smooth back-and-forth animation */
@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0%);
  }
}

.company-logos-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.company-logos {
  display: flex;
  width: fit-content;
  animation: scroll-right 60s linear infinite;
}

.company-logos:hover {
  animation-play-state: paused;
}

.logo {
  flex: 0 0 auto;
  width: 180px;
  height: 100px;
  margin: 0 0.75rem;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.logo img {
  max-width: 100%;
  max-height: 80px;
  filter: grayscale(100%) opacity(0.85);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

/* Invert black logos on dark mode */
body:not(.light-mode) .logo img {
  filter: invert(1) grayscale(100%) opacity(0.9);
}

body:not(.light-mode) .logo:hover img {
  filter: invert(0.9) grayscale(0%) opacity(1);
}

@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0%);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #main-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: var(--header-bg);
    width: 100%;
    position: absolute;
    top: 64px;
    left: 0;
    padding: 1rem 0;
    z-index: 99;
  }

  #main-nav.show {
    display: flex;
  }

  .get-started-btn {
    order: 1;
    margin: 1.2rem 0 0;
  }

  .theme-toggle-container {
    order: 2;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    margin-left: 0;
  }

  .nav-separator {
    width: 40px;
    height: 1px;
    margin: 0.6rem auto;
  }

  .logo {
    width: 140px;
    font-size: 0.8rem;
  }

  .back-text span {
    --final-offset-y: -150px; /* ending translateY */
    font-size: 1.5rem; /* adjust as needed */
  }
}

footer {
  text-align: center;
  background: var(--footer-bg);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Back to Top button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 999; /* ensure above most content */
}
#back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* When visible, add a class to fade in: */
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Optional: adjust size or position on smaller screens */
@media (max-width: 480px) {
  #back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  #back-to-top i {
    font-size: 0.9rem;
  }
}
