/* ============================================
   CSS Variables (Custom Properties)
   ============================================ */
:root {
  /* Colors */
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --muted: #64748b;
  --text: #1e293b;
  --text-light: #475569;
  
  /* Brand Colors */
  --brand: #22c55e;
  --brand-dark: #16a34a;
  --brand-light: #dcfce7;
  --brand-lighter: #f0fdf4;
  --accent: #059669;
  --danger: #ef4444;
  
  /* Shadows */
  --shadow: 0 4px 16px rgba(34, 197, 94, 0.08);
  --shadow-strong: 0 8px 25px rgba(34, 197, 94, 0.12);
  
  /* Border Radius */
  --radius: 16px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

p {
  margin: 0 0 0.8rem;
}

/* Focus states for accessibility */
.btn:focus,
.btn-top:focus{
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

section {
  padding: 3.5rem 0;
}

/* ============================================
   Typography
   ============================================ */
.section-title {
  font-size: 2rem;
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-bottom: 0.5rem;
  animation: slideIn 0.6s ease-out;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 2px;
}

.muted {
  color: var(--muted);
}

/* ============================================
   Buttons & Interactive Elements
   ============================================ */
.btn,
.btn-top {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow:hidden;
}

.btn {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  color: var(--bg);
  box-shadow: var(--shadow-strong);
}

.btn-top {
  background: var(--bg);
  color: var(--accent);
}

.btn:hover:before, .btn-top:hover:before{
  left: 100%;
}

.btn:hover,
.btn-top:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn:after, .btn-top:after{
  content: '';
  position: absolute;
  top:0; left:-100%;
  width:100%; height:100%;
  background: rgba(255,255,255,0.1);
  transform: skewX(-20deg);
  transition: all 0.5s;
}

.btn:hover:after, .btn-top:hover:after {
  left:100%;
}

.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--brand-light);
  border: 1px solid var(--brand);
  border-radius: 9999px;
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 600;
  .badge-br {
    display: none;
  }
}
.card:hover, .work-card:hover, .step:hover {
  box-shadow: 0 12px 35px rgba(34,197,94,0.25)!important;
  transform: translateY(-5px) scale(1.02);
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(12px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 20px rgba(34, 197, 94, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

nav a {
  padding: 0.7rem 1rem;
  color: var(--text-light);
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

nav .nav-item:hover {
  font-weight: 700;
  color: var(--text);
  background: var(--brand-lighter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  .logo img {
    height: 30px;
    width: auto;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero-wrapper {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  padding: 5rem 0 4rem;
}

.hero-wrapper{
  .hero {
    padding: 0;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    min-height: 400px;
    h1 {
      color: var(--bg);
      line-height: 1.15;
      margin: 0.5rem 0 1.2rem;
      font-weight: 800;
      position: relative;
      z-index: 2;
      .title {
          display: block;
          font-size: 100px;
          .title-small {
              font-size: 50px;
          }
      }
    }
    .hero-image {
      position: absolute;
      top:50%;
      right: 0;
      transform: translateY(-50%);
      max-width: 70%;
      height: auto;
      z-index: 1;
      opacity: 0.8;
    }
  }
}

/* ============================================
   Services Section
   ============================================ */
.services {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  .card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out both;
    will-change: transform, opacity;
    h3 {
      margin: 0.3rem 0 0.8rem;
      color: var(--text);
      font-size: 1.1rem;
      font-weight: 600;
    }
    p {
      color: var(--text-light);
    }
  }
  .card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
  }
}

/* ============================================
   Works Section
   ============================================ */
.works {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  .work-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out both;
    will-change: transform, opacity;
    h3 {
      margin: 0.3rem 0 0.8rem;
      color: var(--text);
      font-size: 1.1rem;
      font-weight: 600;
      border-bottom: var(--brand-dark) 2px solid;
    }
    p {
      color: var(--text-light);
    }
    strong {
      color: var(--brand-dark);
    }
  }
}

/* ============================================
   Process Steps
   ============================================ */
.steps {
  counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 2rem;
  .step {
    position: relative;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out both;
    will-change: transform, opacity;
    h3 {
      color: var(--text);
      margin: 0.3rem 0 0.8rem;
    }
    p {
      color: var(--text-light);
    }
  }
  .step:before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -20px;
    left: 1.5rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: white;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
  }
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
  background: linear-gradient(135deg, var(--brand-light), var(--brand-lighter));
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  strong {
    color: var(--brand-dark);
  }
}

.cta: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;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq {
  max-width: 900px;
  details {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
    .muted {
      margin-top: 0.5rem;
    }
  }
  details + details {
    margin-top: 1rem;
  }
  details[open] summary {
    color: var(--brand-dark);
  }
  summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    padding: 0.2rem 0;
  }
  summary:hover {
    color: var(--brand-dark);
  }
}

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--muted);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation delays for staggered effect */
.card:nth-child(2),
.step:nth-child(2),
.work-card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3),
.step:nth-child(3),
.work-card:nth-child(3) {
  animation-delay: 0.2s;
}

.card:nth-child(4),
.step:nth-child(4),
.work-card:nth-child(4) {
  animation-delay: 0.3s;
}

.card:nth-child(5),
.step:nth-child(5),
.work-card:nth-child(5) {
  animation-delay: 0.4s;
}

.card:nth-child(5),
.step:nth-child(5),
.work-card:nth-child(5) {
  animation-delay: 0.5s;
}

.card:nth-child(6),
.step:nth-child(6),
.work-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* ============================================
   Responsive Design - Tablet
   ============================================ */
@media (max-width: 820px) {
  .nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    a {
      font-size: 0.9rem;
      padding: 0.5rem 0.8rem;
    }
  }

  .hero-wrapper {
    padding: 5rem 0 4rem;
    .hero{
      .hero-image {
        max-width: 80%;
        opacity: 0.4;
      }
      .badge{
        .badge-br {
          display: inline;
        }
      }
    }
  }

 .btn, .btn-top {
    justify-content: center;
    width: 100%;
  }
  
  .cta {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   Responsive Design - Mobile
   ============================================ */
@media (max-width: 640px) {


  .hero {
    padding-top: 3.5rem;
    h1 {
      font-size: 100px;
    }
    .hero-image {
      max-width: 80%;
      opacity: 0.4;
    }
    .hero-cta {
      flex-direction: column;
      width: 100%;
    }
  }

  .section-title {
    font-size: 1.6rem;
  }
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}