/* ===== CSS Variables (from DESIGN.md) ===== */
:root {
  /* Colors */
  --color-primary: #2D5A27;
  --color-primary-light: #4A7C42;
  --color-primary-dark: #1B3A18;
  --color-accent: #8BC34A;
  --color-accent-warm: #C5A55A;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F7F2;
  --color-surface-dark: #1B3A18;
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #5A5A5A;
  --color-text-on-dark: #FFFFFF;
  --color-text-on-dark-muted: #C8D6C0;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1DA851;
  --color-border: #E0E5DC;
  --color-overlay: rgba(27, 58, 24, 0.6);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(139,195,74,0.3);

  /* Motion */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== Typography ===== */
h1, h2 {
  font-family: 'Playfair Display', Georgia, serif;
}

h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.section__title--light {
  color: var(--color-text-on-dark);
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn--whatsapp {
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
}

.btn--whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-normal);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.nav__logo-text {
  font-family: 'Inter', sans-serif;
}

.nav__links {
  display: flex;
  gap: var(--space-xl);
}

.nav__link {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.nav__cta {
  padding: 10px 20px;
  font-size: 14px;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav__hamburger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav__hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.nav__hamburger--active .nav__hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger--active .nav__hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--active .nav__hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2D5A27 0%, #1B3A18 100%);
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,160L48,170.7C96,181,192,203,288,197.3C384,192,480,160,576,154.7C672,149,768,171,864,186.7C960,203,1056,213,1152,202.7C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom center;
  background-size: cover;
  opacity: 0.5;
}

.hero__content {
  position: relative;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text-on-dark);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-on-dark-muted);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Services ===== */
.services {
  padding: var(--space-3xl) 0;
  background: var(--color-surface);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.card__text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

.card__link:hover {
  color: var(--color-primary-light);
}

.card__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== Projects ===== */
.projects {
  padding: var(--space-3xl) 0;
  background: var(--color-surface-alt);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.project {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.project:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project__img-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project__img--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-on-dark-muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.project__caption {
  padding: var(--space-lg);
}

.project__caption h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.project__caption p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== About ===== */
.about {
  padding: var(--space-3xl) 0;
  background: var(--color-surface);
}

.about__content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  max-width: 700px;
}

.about__stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.about__stat {
  text-align: center;
}

.about__stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: 'Playfair Display', serif;
}

.about__stat span {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ===== Testimonials ===== */
.testimonials {
  padding: var(--space-3xl) 0;
  background: var(--color-surface-dark);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.testimonial {
  padding: var(--space-lg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
}

.testimonial__text {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-text-on-dark);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.testimonial__author {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--color-text-on-dark-muted);
}

/* ===== CTA ===== */
.cta {
  padding: var(--space-3xl) 0;
  background: var(--color-surface-alt);
}

.cta__container {
  text-align: center;
}

.cta__text {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 550px;
  margin: 0 auto var(--space-xl);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-primary-dark);
  color: var(--color-text-on-dark);
  padding-top: var(--space-2xl);
}

.footer__container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.footer__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  color: var(--color-text-on-dark-muted);
  font-size: 0.9rem;
}

.footer h3 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  color: var(--color-text-on-dark-muted);
}

.footer__links ul li,
.footer__contact ul li {
  margin-bottom: var(--space-sm);
}

.footer__links a,
.footer__contact a {
  font-size: 0.9rem;
  color: var(--color-text-on-dark);
  transition: color var(--transition-fast);
}

.footer__links a:hover,
.footer__contact a:hover {
  color: var(--color-accent);
}

.footer__links a:focus-visible,
.footer__contact a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--space-lg) 0;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--color-text-on-dark-muted);
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--color-whatsapp);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  animation: pulse 2s ease-in-out 3;
}

.whatsapp-float:hover {
  background: var(--color-whatsapp-hover);
  transform: scale(1.05);
}

.whatsapp-float:focus-visible {
  outline: 2px solid var(--color-whatsapp);
  outline-offset: 4px;
}

@keyframes pulse {
  0%, 100% { box-shadow: var(--shadow-md); }
  50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0.2); }
}

/* ===== Animations ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer__container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .nav__links--open {
    display: flex;
  }

  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero {
    min-height: 70vh;
  }

  .hero__title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .services__grid,
  .projects__grid,
  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  .about__stats {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer__container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .section__title {
    font-size: 1.75rem;
  }

  .whatsapp-float {
    bottom: 16px;
    right: 16px;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .whatsapp-float {
    animation: none;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
