/*
 * Global Styles for LAPA2AI website
 *
 * Inspired by the minimalist, refined aesthetic of Apple, this stylesheet
 * defines a clean light theme with plenty of white space and subtle
 * gradients. Accent colors are drawn from the neon gradient in the LAPA2AI
 * logo. Typography uses system fonts for better performance and familiarity.
 */

/* CSS variables for easy colour management */
:root {
  --bg-color: #f5f5f7; /* page background */
  --content-bg: #ffffff; /* card and section backgrounds */
  --text-color: #1c1c1e; /* primary text */
  --secondary-text: #6d6d72; /* secondary text */
  --border-color: #e5e5ea; /* subtle borders */
  --primary-start: #00a3e0; /* gradient start (blue) */
  --primary-end: #8b3aed;   /* gradient end (purple) */
  --gradient: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
}

/* Reset some default styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  /* Use the Inter font for a modern, premium feel with system fallbacks */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.5;
}

/* Navigation bar */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--content-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 40px;
  width: auto;
}

.logo-text {
  margin-left: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-end);
}

/* Hero section */
.hero {
  /* Use an abstract gradient image for the hero background */
  background: var(--bg-color);
  background-image: url('assets/hero-bg.png');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80vh;
  padding: 4rem 1rem;
}

/* Add a translucent overlay on the hero background for readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.65);
  z-index: 1;
}

/* Animated gradient overlay on hero for a premium feel */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* repeating gradient that shifts over time */
  background: linear-gradient(45deg, var(--primary-start), var(--primary-end), var(--primary-start));
  background-size: 200% 200%;
  opacity: 0.2;
  z-index: 0;
  animation: gradientShift 10s ease infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--secondary-text);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--gradient);
  color: #ffffff;
  border: none;
}

.btn-primary:hover {
  opacity: 0.9;
}

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

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

/* Solutions section */
.solutions {
  padding: 4rem 1rem;
  background: var(--content-bg);
}

.solutions h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.cards-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.solution-card {
  background: var(--bg-color);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.07);
}

.card-icon {
  height: 80px;
  width: 80px;
  margin: 0 auto 1rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Larger icons inside hero areas on solution pages */
.hero .card-icon {
  height: 120px;
  width: 120px;
}

/* Icon assignments */
.car-icon {
  background-image: url('assets/icons/car.png');
}

.retail-icon {
  background-image: url('assets/icons/basket.png');
}

.manufacturing-icon {
  background-image: url('assets/icons/factory.png');
}

.healthcare-icon {
  background-image: url('assets/icons/dna.png');
}

.media-icon {
  background-image: url('assets/icons/film.png');
}

.custom-icon {
  background-image: url('assets/icons/puzzle.png');
}

.solution-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.solution-card p {
  font-size: 1rem;
  color: var(--secondary-text);
  margin: 0;
}

/* Service cards on Services page */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 300px;
  border-radius: 16px;
  padding: 1.5rem;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-size: cover;
  background-position: center;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* A slightly lighter overlay to let the abstract background shine through */
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.service-card h3,
.service-card p {
  position: relative;
  z-index: 1;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: #ffffff;
}

.service-card p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* Background assignments for each service card */
/* Assign high-quality abstract backgrounds for each service card */
.automotive-card {
  background-image: url('assets/service-bg/automotive_bg.png');
}

.retail-card {
  background-image: url('assets/service-bg/retail_bg.png');
}

.manufacturing-card {
  background-image: url('assets/service-bg/manufacturing_bg.png');
}

.healthcare-card {
  background-image: url('assets/service-bg/healthcare_bg.png');
}

.media-card {
  background-image: url('assets/service-bg/media_bg.png');
}

.custom-card {
  background-image: url('assets/service-bg/custom_bg.png');
}

/* How it works section */
.how-it-works {
  padding: 4rem 1rem;
  background: var(--bg-color);
}

.how-it-works h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.steps {
  display: grid;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  background: var(--content-bg);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.step-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--text-color);
}

.step p {
  margin: 0;
  color: var(--secondary-text);
  font-size: 0.95rem;
}

/* Contact section */
.contact {
  padding: 4rem 1rem;
  background: var(--content-bg);
}

.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact p {
  text-align: center;
  color: var(--secondary-text);
  max-width: 600px;
  margin: 0 auto 2rem;
}

#contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-color);
  background: var(--bg-color);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-end);
  box-shadow: 0 0 0 2px rgba(139, 58, 237, 0.2);
}

.contact button {
  align-self: flex-start;
}

/* Footer */
.footer {
  background: var(--bg-color);
  padding: 2rem 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

/* Detail page section (used on solution pages) */
.detail {
  padding: 4rem 1rem;
  background: var(--bg-color);
}

.detail-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.detail-container h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.detail-container ul {
  margin: 0 0 2rem 1.5rem;
  padding: 0;
  list-style-type: disc;
  color: var(--secondary-text);
}

.detail-container li {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.4;
}

.detail-container .btn {
  margin-top: 1rem;
}

/* Service hero icons */
.service-hero-icon {
  height: 120px;
  width: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
}

/* About section */
.about {
  padding: 4rem 1rem;
  background: var(--content-bg);
}

.about-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about p {
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  color: var(--secondary-text);
}

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

.feature {
  background: var(--bg-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.07);
}

.feature-img {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.feature p {
  font-size: 1rem;
  color: var(--secondary-text);
  margin: 0;
}

.stats {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-items: center;
}

/* Why Choose section */
.why-choose {
  padding: 4rem 1rem;
  background: var(--bg-color);
}

.why-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.why-intro {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--secondary-text);
  font-size: 1.1rem;
}

.why-items {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}

.why-item {
  background: var(--content-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.why-icon {
  height: 80px;
  width: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.why-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.why-item p {
  font-size: 1rem;
  color: var(--secondary-text);
  margin: 0;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 1rem;
  color: var(--secondary-text);
}

/* Call-to-action section on services page */
.cta-section {
  padding: 4rem 1rem;
  background: var(--content-bg);
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta-section p {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--secondary-text);
  font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  .hero p {
    font-size: 1rem;
  }
}

/* Animation classes for scroll-in effects */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}
