/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */
:root {
  --primary-color: #1a1a1a;
  --accent-color: #00e676;
  /* Vibrant Green */
  --bg-color: #f5f5f7;
  --text-color: #555;
  --heading-color: #111;
  --border-color: #e5e5e5;

  --font-family-base: 'Work Sans', sans-serif;
  --font-family-headings: 'Playfair Display', serif;

  --container-width: 1280px;
  --header-height: 90px;
  --border-radius: 8px;
  --transition-speed: 0.4s;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@800&family=Work+Sans:wght@400;500&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  cursor: none;
}

/* ==========================================================================
   2. Custom Cursor
   ========================================================================== */
#custom-cursor,
#custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

#custom-cursor {
  width: 30px;
  height: 30px;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
}

#custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

body.cursor-hover #custom-cursor {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 230, 118, 0.2);
  border-color: transparent;
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition-speed);
}

.site-header.scrolled {
  background-color: rgba(245, 245, 247, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  max-height: 75px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: width var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger-bar {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--primary-color);
  margin: 6px 0;
  transition: transform 0.3s;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
  transition: all var(--transition-speed);
  position: relative;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-link {
  font-weight: 500;
  color: var(--primary-color);
  display: inline-block;
  margin-top: 20px;
}

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
}

.hero-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--heading-color);
}

/* Split text animation styles */
.hero-title .word {
  display: inline-block;
  overflow: hidden;
}

.hero-title .char {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
  transition-delay: calc(0.02s * var(--char-index));
}

.hero-title.revealed .char {
  transform: translateY(0);
}

.hero-subtitle {
  max-width: 500px;
  font-size: 1.2rem;
  margin-top: 30px;
}

/* ==========================================================================
   6. Services Section (Accordion)
   ========================================================================== */
.services-accordion {
  border-top: 1px solid var(--border-color);
}

.service-item {
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.service-header {
  display: flex;
  align-items: center;
  padding: 40px 0;
  cursor: none;
}

.service-number {
  font-size: 0.9rem;
  margin-right: 40px;
}

.service-title {
  font-family: var(--font-family-base);
  font-weight: 500;
  font-size: 2.5rem;
  margin: 0;
  flex-grow: 1;
}

.service-arrow {
  font-size: 2.5rem;
  transition: transform var(--transition-speed);
}

.service-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.service-details p {
  max-width: 400px;
  padding-bottom: 40px;
}

.service-image {
  width: 300px;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--border-radius);
  opacity: 0;
  transition: opacity 0.5s;
}

.service-item.active .service-arrow {
  transform: rotate(45deg);
}

.service-item.active .service-details {
  max-height: 300px;
}

.service-item.active .service-image {
  opacity: 1;
}

/* ==========================================================================
   7. Horizontal Scroll Section
   ========================================================================== */
.horizontal-scroll-section {
  position: relative;
}

.scroll-pinner {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.scroll-track-wrapper {
  height: 100%;
}

.scroll-track {
  display: flex;
  height: 100%;
  align-items: center;
  padding-left: 10vw;
  padding-right: 10vw;
  will-change: transform;
}

.scroll-card {
  flex-shrink: 0;
  width: 400px;
  padding: 40px;
  margin-right: 40px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.card-number {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-color);
}

.scroll-card h3 {
  margin-top: 10px;
  font-size: 1.8rem;
}

/* ==========================================================================
   8. Why Us Section
   ========================================================================== */
.why-us-section {
  background-color: #fff;
}

.why-us-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.why-us-image {
  overflow: hidden;
  border-radius: var(--border-radius);
}

.why-us-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s;
}

.why-us-image.revealed img {
  transform: scale(1);
}

/* Image reveal mask */
[data-reveal="mask"] {
  position: relative;
}

[data-reveal="mask"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}

[data-reveal="mask"].revealed::after {
  transform: scaleX(0);
}

.why-us-content .section-title {
  font-size: 2.5rem;
}

/* ==========================================================================
   9. Testimonials Section
   ========================================================================== */
.testimonials-section {
  background-color: var(--primary-color);
  color: var(--bg-color);
}

.testimonials-section .section-title {
  color: var(--bg-color);
}

.testimonial-slider-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slider {
  height: 150px;
  position: relative;
  overflow: hidden;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.testimonial-slide.active {
  opacity: 1;
}

.testimonial-quote {
  font-family: var(--font-family-headings);
  font-size: 2.2rem;
  line-height: 1.3;
}

.testimonial-author {
  margin-top: 20px;
  text-align: right;
}

.slider-nav {
  text-align: right;
  margin-top: 30px;
}

.slider-btn {
  background: none;
  border: 1px solid var(--bg-color);
  color: var(--bg-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  margin-left: 10px;
}

.slider-btn:hover {
  background: var(--bg-color);
  color: var(--primary-color);
}

/* ==========================================================================
   10. CTA & Contact Form
   ========================================================================== */
.cta-section {
  background-color: var(--accent-color);
  text-align: center;
}

.cta-title {
  font-size: 3rem;
  color: var(--primary-color);
}

.cta-text {
  font-size: 1.2rem;
  color: var(--primary-color);
  opacity: 0.8;
  margin: 20px 0 30px;
}

.contact-page-section {
  background-color: var(--primary-color);
  color: var(--bg-color);
}

.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 80px;
}

.contact-info-wrapper {
  border-left: 1px solid rgba(245, 245, 247, 0.2);
  padding-left: 40px;
}

.contact-info-wrapper h3 {
  color: var(--bg-color);
}

.contact-info-wrapper ul {
  margin-top: 20px;
}

.contact-info-wrapper li {
  margin-bottom: 10px;
}

.contact-info-wrapper strong {
  color: var(--accent-color);
}

.form-group {
  position: relative;
  margin-bottom: 40px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 245, 247, 0.3);
  color: var(--bg-color);
  padding: 10px 0;
  font-size: 1.2rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--accent-color);
}

.form-group label {
  position: absolute;
  top: 10px;
  left: 0;
  color: rgba(245, 245, 247, 0.7);
  transition: all 0.3s;
  pointer-events: none;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
  top: -20px;
  font-size: 0.9rem;
  color: var(--accent-color);
}

.error-message {
  color: #ff9a9e;
  font-size: 0.9rem;
  margin-top: 5px;
}

.form-success-message {
  color: var(--accent-color);
  margin-top: 20px;
  display: none;
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
  padding: 80px 0;
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-column-main h3 {
  font-family: var(--font-family-base);
  font-size: 1.5rem;
}

.footer-column h4 {
  margin-bottom: 20px;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  padding-top: 30px;
  text-align: center;
  font-size: 0.9rem;
}

/* ==========================================================================
   12. Legal Pages
   ========================================================================== */
.page-header-section {
  padding: 180px 0 100px;
  text-align: left;
}

.legal-page-section {
  background: #fff;
}

.legal-content {
  max-width: 800px;
  margin: auto;
}

.legal-content h2,
.legal-content h3 {
  margin-top: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
  font-size: 1.1rem;
}

/* ==========================================================================
   13. Animations & Responsiveness
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s, transform 0.8s;
  transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  .nav-menu {
    gap: 30px;
  }

  .horizontal-scroll-section {
    display: none;
  }

  /* Hide complex animation on tablet */
  .why-us-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .why-us-image {
    margin-bottom: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  #custom-cursor,
  #custom-cursor-dot {
    display: none;
  }

  .container {
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.5s;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active .hamburger-bar:nth-child(2) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .service-header {
    flex-wrap: wrap;
  }

  .service-title {
    font-size: 1.5rem;
    width: 100%;
    order: 1;
    margin-top: 10px;
  }

  .service-number {
    order: 0;
  }

  .service-arrow {
    order: 2;
    margin-left: auto;
  }

  .service-details {
    flex-direction: column;
  }

  .service-image {
    width: 100%;
    margin-top: 20px;
  }

  .testimonial-quote {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}