/* ==========================================================================
   serviceR Layout & Structure
   Responsive, modular CSS tailored for the landing page (320px - 1440px+)
   ========================================================================== */

/* Base Reset & Utilities */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll on small devices */
}

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

@media (min-width: 1440px) {
  .container {
    max-width: 1320px; /* Expand for ultrawide screens */
  }
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-large { margin-bottom: 2rem; }
.mt-large { margin-top: 2rem; }
.mt-small { margin-top: 1rem; }

@media (min-width: 768px) {
  .mb-large { margin-bottom: 3rem; }
  .mt-large { margin-top: 3rem; }
}

/* Spacing System */
.section {
  padding: 4rem 0; /* Mobile padding */
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 0; /* Tablet/Desktop padding */
  }
}

@media (min-width: 1440px) {
  .section {
    padding: 8rem 0; /* Ultrawide padding */
  }
}

/* Backgrounds */
.section-dark {
  background-color: var(--color-bg-secondary);
}

.section-light-alt {
  background-color: var(--color-bg-tertiary);
}

/* ---------------------------------------------------------
   NAVBAR
   --------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

@media (prefers-color-scheme: dark) {
  .navbar {
    background-color: rgba(2, 6, 23, 0.9); /* Slate 950 with opacity */
  }
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Wrap on mobile so links can stack */
  gap: 1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
  width: 100%;
  order: 3; /* Push navigation below logo/cta on mobile */
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  transition: color 0.2s ease;
  font-size: 0.875rem; /* Slightly smaller on mobile */
}

.nav-links a:hover {
  color: var(--color-accent-bg); /* Fixed missing variable reference */
}

@media (min-width: 768px) {
  .nav-container {
    flex-wrap: nowrap;
  }
  .nav-links {
    width: auto;
    order: 0; /* Restore visual order between logo and CTA */
    gap: 2rem;
  }
  .nav-links a {
    font-size: 1rem;
  }
}

/* Navbar Logo Constraint for mobile */
.nav-logo {
  max-width: 140px;
  height: auto;
}
@media (min-width: 768px) {
  .nav-logo {
    max-width: 200px;
  }
}

/* ---------------------------------------------------------
   HERO SECTION
   --------------------------------------------------------- */
.hero {
  padding: 4rem 0 3rem; /* Compact mobile padding */
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero { padding: 6rem 0 4rem; }
}

@media (min-width: 1440px) {
  .hero { padding: 10rem 0 8rem; }
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  text-align: center; /* Center layout on mobile */
}

@media (min-width: 992px) {
  .hero-container {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    text-align: left; /* Left align on desktop */
  }
}

.hero-subtitle {
  color: var(--color-text-secondary);
  margin: 0 auto 2rem;
  font-size: 1rem;
  max-width: 600px;
}

@media (min-width: 768px) {
  .hero-subtitle { font-size: 1.125rem; }
}

@media (min-width: 992px) {
  .hero-subtitle { margin: 0 0 2.5rem 0; }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center; /* Center on mobile */
}

@media (min-width: 992px) {
  .hero-actions { justify-content: flex-start; }
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.hero-graphic {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(0, 229, 255, 0.2));
}

/* Scale animation slightly down on tiny screens (320px) so the hit anim isn't clipped by viewport edges */
@media (max-width: 380px) {
  .hero-graphic { transform: scale(0.85); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); } /* Reduced float distance for mobile safety */
  100% { transform: translateY(0px); }
}

@media (min-width: 768px) {
  @keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
  }
}

/* ---------------------------------------------------------
   SECTIONS & GRIDS
   --------------------------------------------------------- */
.section-subtitle {
  color: var(--color-text-secondary);
  max-width: 700px;
  font-size: 1rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .section-subtitle { font-size: 1.125rem; }
}

.grid {
  display: grid;
  gap: 1.5rem; /* Tighter grid gaps for mobile */
}
@media (min-width: 768px) {
  .grid { gap: 2rem; }
}

/* Feature Grid Scaling */
.features-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  }
}

/* Proof Grid Scaling */
.proof-grid {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .proof-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on larger screens */
  }
}

/* ---------------------------------------------------------
   CARDS
   --------------------------------------------------------- */
.feature-card {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem 1.5rem; /* Slightly smaller padding on mobile */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
  .feature-card { padding: 2.5rem 2rem; }
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent-bg); /* Fixed missing variable reference */
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.testimonial-card {
  background-color: var(--color-bg-primary);
  border-left: 4px solid var(--color-accent-bg);
  padding: 1.5rem; /* Smaller padding on mobile */
  margin: 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .testimonial-card { padding: 2rem; }
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 3rem 0 1.5rem; /* Compact mobile padding */
  margin-top: auto;
}

@media (min-width: 768px) {
  .footer { padding: 4rem 0 2rem; }
}

.footer .text-small, .footer .text-caption, .footer a {
  color: var(--color-footer-text);
}

.footer a:hover {
  color: #FFFFFF;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    gap: 2rem;
  }
}
