/* =============================================================
   JAF Accounting Services — Stylesheet
   =============================================================
   Table of Contents
   1.  Reset & CSS Variables
   2.  Base & Typography
   3.  Utilities (container, section, buttons, tags)
   4.  Dot Navigation
   5.  Header / Navbar
   6.  Hero
   7.  About
   8.  Services
   9.  Why Choose Us
   10. Process
   11. Testimonials
   12. Contact
   13. Footer
   14. Back to Top
   15. Scroll-Reveal Animations
   16. Responsive — Tablet
   17. Responsive — Mobile
   18. Responsive — Small Mobile
   ============================================================= */

/* ============================
   1. RESET & CSS VARIABLES
   ============================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy:       #0b3c5d;
  --navy-dark:  #072c44;
  --green:      #2ca24c;
  --green-light:#e8f5e9;
  --green-dark: #1e7e34;
  --white:      #ffffff;
  --off-white:  #f8fafb;
  --gray-100:   #f1f3f5;
  --gray-200:   #e9ecef;
  --gray-500:   #6c757d;
  --gray-700:   #495057;
  --gray-900:   #212529;

  --font: 'Poppins', system-ui, -apple-system, sans-serif;
  --section-pad: 100px 0;
  --transition: 0.3s ease;

  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:  0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ============================
   2. BASE & TYPOGRAPHY
   ============================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--gray-700);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ============================
   3. UTILITIES
   ============================ */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: var(--section-pad);
  position: relative;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green);
  margin-bottom: 10px;
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 15px;
}

.section-header p {
  font-size: 17px;
  color: var(--gray-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(44, 162, 76, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  margin-top: 20px;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

/* ============================
   4. DOT NAVIGATION
   ============================ */
.dot-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 999;
}

.dot-nav .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(11, 60, 93, 0.25);
  border: 1.5px solid rgba(11, 60, 93, 0.4);
  transition: var(--transition);
}

.dot-nav .dot:hover {
  background: var(--green);
  border-color: var(--green);
}

.dot-nav .dot.active {
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.4);
}

/* ============================
   5. HEADER / NAVBAR
   ============================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 5%;
  transition: padding 0.3s ease;
}

.header .logo img {
  height: 160px;
  transition: height 0.3s ease;
}

/* Scrolled state */
.header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.header.scrolled .navbar {
  padding: 4px 5%;
}

.header.scrolled .logo img {
  height: 80px;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  transition: var(--transition);
}

.header.scrolled .nav-link {
  color: var(--navy);
}

.nav-link:hover,
.nav-link.active {
  color: var(--green);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
  color: var(--green);
}

/* CTA link in nav */
.nav-link.cta-link {
  background: var(--green);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 50px;
  margin-left: 6px;
}

.nav-link.cta-link:hover {
  background: var(--green-dark);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 3px;
  transition: var(--transition);
}

.header.scrolled .hamburger span {
  background: var(--navy);
}

/* Animated X */
.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile overlay (created via JS) */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================
   6. HERO
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: url('https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44, 162, 76, 0.55) 0%,
    rgba(7, 44, 68, 0.88) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 0 20px;
  color: var(--white);
  animation: heroFadeIn 1s ease forwards;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  opacity: 0.92;
  margin-bottom: 35px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* Wave divider */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 3;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   7. ABOUT
   ============================ */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.about-text h2 {
  font-size: 34px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.3;
}

.about-text p {
  font-size: 16px;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.about-stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-200);
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.stat-item span {
  font-size: 13px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-image img {
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

/* ============================
   8. SERVICES
   ============================ */
.services {
  background: var(--off-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-size: 26px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ============================
   9. WHY CHOOSE US
   ============================ */
.why-us {
  background: var(--white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.why-card {
  text-align: center;
  padding: 40px 25px;
  border-radius: 16px;
  transition: var(--transition);
}

.why-card:hover {
  background: var(--off-white);
}

.why-card i {
  font-size: 36px;
  color: var(--green);
  margin-bottom: 20px;
}

.why-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.why-card p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ============================
   10. PROCESS
   ============================ */
.process {
  background: var(--navy);
  color: var(--white);
}

.process .section-tag {
  color: rgba(255, 255, 255, 0.6);
}

.process .section-header h2 {
  color: var(--white);
}

.process .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}

/* Horizontal connector line */
.process-steps::before {
  content: '';
  position: absolute;
  top: 35px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 24px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.step p {
  font-size: 14px;
  opacity: 0.75;
  line-height: 1.7;
}

/* ============================
   11. TESTIMONIALS
   ============================ */
.testimonials {
  background: var(--off-white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial-card {
  background: var(--white);
  padding: 35px 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
}

.stars {
  color: #f5a623;
  margin-bottom: 15px;
  font-size: 14px;
  display: flex;
  gap: 3px;
}

.testimonial-card > p {
  font-size: 15px;
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonial-author strong {
  display: block;
  font-size: 15px;
  color: var(--navy);
}

.testimonial-author span {
  font-size: 13px;
  color: var(--gray-500);
}

/* ============================
   12. CONTACT
   ============================ */
.contact {
  background: var(--white);
}

.contact-info-centered {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-info-centered .info-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  width: 100%;
  background: var(--off-white);
  border-radius: 12px;
  transition: var(--transition);
  margin-bottom: 20px;
}

.contact-info-centered .btn-whatsapp {
  display: inline-flex;
  justify-content: center;
  margin-top: 10px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--off-white);
  border-radius: 12px;
  transition: var(--transition);
}

.info-card:hover {
  background: var(--green-light);
}

.info-card > i {
  font-size: 20px;
  color: var(--green);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.info-card strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 2px;
}

.info-card p {
  font-size: 14px;
  color: var(--gray-500);
  margin: 0;
}

.info-card a {
  color: var(--green);
}

.info-card a:hover {
  text-decoration: underline;
}

/* ============================
   13. FOOTER
   ============================ */
.footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  height: 110px;
  width: 110px;
  margin-bottom: 20px;
  background: var(--white);
  padding: 6px;
  border-radius: 50%;
  object-fit: contain;
}

.footer-about p {
  font-size: 14px;
  line-height: 1.7;
}

.footer h4 {
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  font-size: 14px;
  transition: var(--transition);
}

.footer ul a:hover {
  color: var(--green);
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 16px;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--green);
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
}

/* ============================
   14. BACK TO TOP
   ============================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 997;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--green-dark);
  transform: translateY(-3px);
}

/* ============================
   15. SCROLL-REVEAL ANIMATIONS
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grid sections */
.services-grid .reveal:nth-child(2),
.why-grid .reveal:nth-child(2),
.testimonials-grid .reveal:nth-child(2),
.process-steps .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.services-grid .reveal:nth-child(3),
.why-grid .reveal:nth-child(3),
.testimonials-grid .reveal:nth-child(3),
.process-steps .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.services-grid .reveal:nth-child(4),
.why-grid .reveal:nth-child(4),
.process-steps .reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.services-grid .reveal:nth-child(5) {
  transition-delay: 0.15s;
}

.services-grid .reveal:nth-child(6) {
  transition-delay: 0.25s;
}

/* ============================
   16. RESPONSIVE — TABLET (≤ 1024px)
   ============================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps::before {
    display: none;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================
   17. RESPONSIVE — MOBILE (≤ 768px)
   ============================ */
@media (max-width: 768px) {
  :root {
    --section-pad: 70px 0;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Slide-in mobile nav */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 100px 30px 30px;
    gap: 0;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    color: var(--navy) !important;
    padding: 14px 0;
    width: 100%;
    font-size: 16px;
    border-bottom: 1px solid var(--gray-100);
    text-align: left;
    border-radius: 0;
    background: none;
    margin-left: 0;
  }

  .nav-link.cta-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    border-bottom: none;
    padding: 14px 24px;
    background: var(--green);
    color: var(--white) !important;
    border-radius: 50px;
  }

  /* Grids → single column */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    justify-content: center;
  }

  .services-grid,
  .why-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-about {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    height: 80px;
    padding: 10px 16px;
  }

  .social-icons {
    justify-content: center;
  }

  /* Smaller section headers */
  .section-header h2 {
    font-size: 28px;
  }

  /* Center hero text */
  .hero-content {
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  /* Smaller logo */
  .header .logo img {
    height: 60px;
  }

  .header.scrolled .logo img {
    height: 48px;
  }

  /* Dot nav smaller on mobile */
  .dot-nav {
    right: 12px;
    gap: 12px;
  }

  .dot-nav .dot {
    width: 8px;
    height: 8px;
  }

  /* Back to top adjustment */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* ============================
   18. RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================ */
@media (max-width: 480px) {
  .about-stats {
    flex-direction: column;
    gap: 20px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .about-text h2 {
    font-size: 26px;
  }
}
