/* ==========================================================================
   Astriva Technologies — Responsive Stylesheet
   Mobile-first: base styles are for mobile, media queries ADD desktop layout
   All class names verified against index.html
   ========================================================================== */


/* ==========================================================================
   GLOBAL — Overflow guard (all screen sizes)
   ========================================================================== */

/* Images and media must never overflow their container */
img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Sections and major layout containers must not bleed */
.navbar,
.hero,
.stats-bar,
.services,
.why-us,
.how-we-work,
.technologies,
.cta-banner,
.footer {
  overflow-x: hidden;
}

/* Container must never exceed viewport */
.container,
.nav-container {
  max-width: 100%;
}


/* ==========================================================================
   BASE — Mobile (all screens, no @media wrapper)
   ========================================================================== */

/* ── Navbar ── */
.navbar { height: 76px; }
/* Logo: smaller on mobile, transparent state glow still applies */
.navbar:not(.scrolled) .nav-logo-img { height: 48px; max-width: 190px; }
.navbar.scrolled .nav-logo-img       { height: 42px; max-width: 170px; }

/* Desktop nav hidden on mobile */
.nav-links { display: none; }
.nav-cta   { display: none; }

/* Hamburger always visible on mobile */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Mobile menu hidden on desktop — overridden above 1024px */


/* ── Hero ── */
.hero {
  min-height: 100svh;
  /* No padding-top — transparent navbar floats on top */
  padding-bottom: 48px;
  align-items: center;
}

.hero-content {
  /* Top: navbar height (76px mobile) + 36px breathing room */
  padding: calc(76px + 36px) 20px 36px;
}

.hero-headline {
  font-size: clamp(2rem, 8vw, 2.75rem);
  letter-spacing: -0.5px;
}

.hero-accent { font-size: 1rem; }

.hero-description {
  font-size: 0.9375rem;
  margin-bottom: 32px;
}

.hero-badge { font-size: 12px; padding: 6px 14px; }

.hero-ctas {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.hero-ctas .btn {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  font-size: 1rem;
}


/* ── Stats ── */
.stats-bar .stats-grid {
  flex-wrap: wrap;
  padding: 0 16px;
}

.stat-item {
  flex: 1 1 45%;
  min-width: 130px;
  padding: 24px 12px;
}

.stat-number { font-size: 2rem; }

/* Hide vertical dividers — don't make sense in wrapping layout */
.stat-divider { display: none; }


/* ── Services ── */
.services { padding: 64px 0; }

.services-grid {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.service-card { padding: 20px !important; }

/* AI card stacks vertically */
.service-card-ai {
  flex-direction: column !important;
  padding: 20px !important;
  gap: 16px !important;
  align-items: flex-start !important;
}

.service-ai-arrow { display: none; }

.section-header { margin-bottom: 36px; }


/* ── Why Choose Us ── */
.why-us { padding: 64px 0; }

.why-us-grid {
  grid-template-columns: 1fr;
  gap: 36px;
}

.why-us-image { order: -1; } /* image first on mobile */

.why-us-img-wrapper img {
  height: 240px;
  object-fit: cover;
}

.img-placeholder { height: 240px; }


/* ── How We Work ── */
.how-we-work { padding: 64px 0; }

.steps-grid {
  flex-direction: column;
  gap: 16px;
}

.step-connector { display: none; } /* hide arrows on mobile */

.step-card { padding: 20px !important; }


/* ── Technologies ── */
.technologies { padding: 64px 0; }

.tech-grid {
  gap: 10px;
  justify-content: center;
}

.tech-tile {
  min-width: 80px;
  padding: 16px 12px;
}

.tech-tile i  { width: 24px; height: 24px; }
.tech-tile span { font-size: 11px; }


/* ── CTA Banner ── */
.cta-banner { padding: 64px 0; }

.cta-title { font-size: clamp(1.625rem, 6vw, 2rem); }

.cta-desc { font-size: 15px; }

.cta-actions {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}

.cta-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  font-size: 0.9375rem;
  text-align: center;
}

/* Scale down rings on mobile */
.cta-ring--1 { width: 160px; height: 160px; }
.cta-ring--2 { width: 260px; height: 260px; }
.cta-ring--3 { width: 360px; height: 360px; }


/* ── Footer ── */
.footer-main {
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 48px 20px;
}

.footer-desc { max-width: 100%; }

.footer-bottom {
  flex-direction: column;
  text-align: center;
  padding: 20px 20px;
  gap: 12px;
}

.footer-legal { justify-content: center; }


/* ==========================================================================
   480px — Mobile Landscape / Large Phones
   ========================================================================== */
@media (min-width: 480px) {

  .hero-headline { font-size: clamp(2.25rem, 7vw, 3rem); }

  .hero-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

  .hero-ctas .btn { width: auto; min-width: 160px; }

  .stat-item { flex: 1 1 40%; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .service-card-ai { flex-direction: row; }
  .service-ai-arrow { display: flex; }

  .cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-width: none;
  }

  .cta-actions .btn { width: auto; }
}


/* ==========================================================================
   768px — Tablet
   ========================================================================== */
@media (min-width: 768px) {

  /* Navbar */
  .navbar { height: 84px; }

  /* Hero — no padding-top, navbar is transparent overlay */
  .hero { min-height: 85vh; align-items: center; }
  .hero-content { padding: calc(84px + 52px) 32px 52px; }
  .hero-headline { font-size: clamp(2.75rem, 5.5vw, 3.5rem); }
  .hero-accent { font-size: 1.125rem; }
  .hero-description { font-size: 1rem; }

  /* Stats */
  .stat-item { flex: 1 1 auto; }
  .stat-divider { display: block; }
  .stat-number { font-size: 2.5rem; }

  /* Services */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  /* Why Us */
  .why-us-grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .why-us-image { order: 0; }
  .why-us-img-wrapper img { height: 380px; }
  .img-placeholder { height: 380px; }

  /* Steps */
  .steps-grid { flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .step-card { flex: 1 1 calc(50% - 10px); min-width: 200px; }
  .step-connector { display: none; }

  /* Tech */
  .tech-tile { min-width: 100px; padding: 18px 16px; }
  .tech-tile i { width: 28px; height: 28px; }
  .tech-tile span { font-size: 12px; }

  /* CTA */
  .cta-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .cta-actions .btn { width: auto; }

  /* Footer */
  .footer-main { grid-template-columns: repeat(2, 1fr); gap: 40px; padding: 56px 32px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; padding: 24px 32px; }
  .footer-legal { justify-content: flex-end; }
}


/* ==========================================================================
   1024px — Laptop / Desktop Nav breakpoint
   ========================================================================== */
@media (min-width: 1024px) {

  /* Show desktop nav, hide hamburger + mobile menu */
  .nav-hamburger { display: none; }

  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 40px;
    flex: 1;
    justify-content: center;
    align-items: center;
    list-style: none;
  }

  .nav-cta { display: inline-flex; }

  /* Force hide mobile menu on desktop regardless of JS state */
  .mobile-menu,
  .mobile-menu.is-open {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Navbar — desktop gets full 96px height from CSS token */
  .navbar { height: 96px; }
  /* Logo size controlled by main.css .navbar:not(.scrolled) / .navbar.scrolled states */

  /* Hero — transparent navbar overlays, no padding-top needed */
  .hero { min-height: 90vh; }
  .hero-content { padding: calc(96px + 64px) 40px 64px; }
  .hero-headline { font-size: clamp(3rem, 4.5vw, 4rem); }
  .hero-accent { font-size: 1.25rem; }
  .hero-description { font-size: 1.0625rem; }

  /* Services */
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  /* Steps — horizontal row with connectors */
  .steps-grid { flex-direction: row; flex-wrap: nowrap; gap: 0; align-items: stretch; }
  .step-card { flex: 1; }
  .step-connector { display: flex; align-items: center; padding: 0 4px; flex-shrink: 0; }

  /* Tech */
  .tech-tile { min-width: 110px; padding: 20px 24px; }
  .tech-tile span { font-size: 12px; }

  /* Footer */
  .footer-main { grid-template-columns: 280px 1fr 1fr 1fr; gap: 60px; padding: 72px clamp(40px, 6vw, 120px); }
  .footer-bottom { padding: 24px clamp(40px, 6vw, 120px); }

  /* Sections */
  .services,
  .why-us,
  .how-we-work,
  .technologies,
  .cta-banner { padding: 100px 0; }

  .section-header { margin-bottom: 56px; }
}


/* ==========================================================================
   1280px — Desktop
   ========================================================================== */
@media (min-width: 1280px) {
  .hero-headline { font-size: clamp(3.5rem, 4vw, 4.5rem); }
  /* Large desktop logo sizes — transparent vs scrolled states */
  .navbar:not(.scrolled) .nav-logo-img { height: 76px; max-width: 320px; }
  .navbar.scrolled .nav-logo-img       { height: 60px; max-width: 280px; }
  .why-us-grid { gap: 80px; }
  .why-us-img-wrapper img { height: 480px; }
  .img-placeholder { height: 480px; }
}


/* ==========================================================================
   Touch device — disable stuck hover states on iOS
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {

  .service-card:hover,
  .service-card-ai:hover,
  .tech-tile:hover,
  .step-card:hover {
    transform: none;
    box-shadow: none;
  }

  .btn:hover { transform: none; }

  /* Larger tap targets */
  .footer-link,
  .nav-link,
  .mobile-link,
  .social-btn { min-height: 44px; }
}


/* ==========================================================================
   Accessibility — Prefers Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

  html { scroll-behavior: auto; }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .mobile-menu {
    transition: none !important;
  }

  .cta-ring { animation: none !important; }

  .hero-badge,
  .stat-number,
  .btn-primary { animation: none !important; }
}
