:root {
  --bg: #f4f7f1;
  --bg-2: #e8f0e3;
  --surface: #ffffff;
  --surface-2: #f8fbf5;
  --primary: #29df11;
  --primary-2: #03b900;
  --primary-rgb: 41, 223, 17;
  --accent: #f0a431;
  --text: #1f2b24;
  --muted: #65736a;
  --line: rgba(var(--primary-rgb), 0.22);
  --radius: 18px;
  --shadow: 0 18px 46px rgba(42, 73, 52, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(244,247,241,.88)),
    radial-gradient(circle at 84% 8%, rgba(var(--primary-rgb), 0.09), transparent 30vw),
    linear-gradient(135deg, var(--bg) 0%, #ffffff 48%, var(--bg-2) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(var(--primary-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.026) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.08));
}

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

.container {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(38, 67, 48, 0.08);
}

.site-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(var(--primary-rgb), 0.16));
}

.brand span {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #3f4f45;
}

.nav-links a {
  position: relative;
  border-radius: 999px;
  padding: 10px 12px;
  transition: color .22s ease, background .22s ease, transform .22s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.2);
  transform: translateY(-1px);
}

.site-menu-toggle { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  font-weight: 800;
  min-height: 44px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(var(--primary-rgb), 0.3);
}

.hero { padding: 0 0 46px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding-top: clamp(28px, 5vw, 72px);
}

.hero-card,
.panel,
.card {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,251,245,.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-content {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
  min-height: clamp(330px, 31vw, 460px);
}

.hero-content::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(var(--primary-rgb),.08) 48%, transparent 55%);
  opacity: 0;
  transform: translateX(-45%);
  transition: opacity .3s ease, transform .8s ease;
}

.hero-content:hover::after,
.card:hover::after {
  opacity: 1;
  transform: translateX(45%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1,
.hero-simple h1 {
  margin: 14px 0;
  font-size: clamp(2rem, 5.8vw, 4.9rem);
  line-height: .96;
  max-width: 760px;
}

.hero h1::first-line { color: var(--text); }

.hero-content h1 {
  font-size: clamp(2rem, min(var(--hero-title-size, 4.9rem), 12vw), var(--hero-title-size, 4.9rem));
}

.hero-content > :not(.hero-service-orb) {
  position: relative;
  z-index: 2;
}

.hero-service-orb {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 1;
  width: min(42vw, 520px);
  height: min(42vw, 520px);
  border-radius: 0 0 0 100%;
  overflow: hidden;
  opacity: .58;
  box-shadow:
    0 0 0 1px rgba(var(--primary-rgb),.2),
    -28px 28px 90px rgba(var(--primary-rgb),.16),
    -42px 42px 120px rgba(37,67,47,.22);
}

.hero-service-orb::before {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 26px -26px 62px rgba(255,255,255,.88), inset 0 0 52px rgba(var(--primary-rgb),.16);
}

.hero-service-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(244,247,241,.74));
}

.hero-service-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.68;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats .panel {
  padding: 14px;
  text-align: center;
  background: rgba(var(--primary-rgb), 0.08);
}

.stats strong {
  display: block;
  color: var(--primary);
  font-size: 1.45rem;
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100vw;
  aspect-ratio: 16 / 6;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1);
  transition: opacity .7s ease, transform 6s ease;
}

.slide.active {
  opacity: 1;
  transform: scale(1.04);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.05) brightness(.9);
}

.slide-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  color: #fff;
  background: transparent;
}

.slide-overlay h3,
.slide-overlay p {
  margin: 0;
  opacity: 0;
  transform: translateY(18px);
}

.slide-overlay h3 {
  margin-bottom: 7px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .52);
}

.slide-overlay p {
  color: rgba(255, 255, 255, .94);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .52);
}

.slide.active .slide-overlay h3 { animation: bannerTextIn .55s ease-out forwards; }
.slide.active .slide-overlay p { animation: bannerTextIn .55s ease-out .16s forwards; }

@keyframes bannerTextIn {
  to { opacity: 1; transform: translateY(0); }
}

section { padding: clamp(30px, 6vw, 70px) 0; }

.section-title {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 3.4vw, 2.7rem);
  line-height: 1.05;
}

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.about-intro-card { grid-column: span 3; }

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 3vw, 28px);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.card.reveal-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .62s ease, transform .62s ease, box-shadow .24s ease;
}

.card.reveal-card.revealed { opacity: 1; transform: translateY(0); }

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), 0.34);
  box-shadow: 0 24px 52px rgba(42, 73, 52, 0.18);
}

.card h3 { color: var(--text); }
.card p, .card small { color: var(--muted); line-height: 1.62; }

.contact-social-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--primary);
}

.contact-social-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-mask: var(--social-icon) center / contain no-repeat;
  mask: var(--social-icon) center / contain no-repeat;
}

.btn-svg-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: currentColor;
  -webkit-mask: var(--btn-icon) center / contain no-repeat;
  mask: var(--btn-icon) center / contain no-repeat;
}

.icon-wrap {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb),.22);
  background: rgba(var(--primary-rgb),.08);
  color: var(--primary);
  margin-bottom: 12px;
  box-shadow: inset 0 0 18px rgba(var(--primary-rgb),.08);
}

.clients-marquee {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  background: transparent;
  padding: 18px 0;
}

.clients-track {
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
  transition: transform 1.5s cubic-bezier(.22, .8, .3, 1);
}

.client-item {
  flex: 0 0 220px;
  border: 0;
  border-radius: 0;
  padding: 14px;
  text-align: center;
  background: transparent;
}

.client-logo {
  width: 100%;
  height: 78px;
  object-fit: contain;
}

.client-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.cta {
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb),.1), rgba(240,164,49,.08)),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,251,245,.96));
  color: var(--text);
  border: 1px solid rgba(var(--primary-rgb),.22);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow);
}

.cta-social {
  justify-content: center;
  text-align: center;
}

.cta-social-content {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.cta-social h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.cta-social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.cta-social-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--primary-rgb),.24);
  border-radius: 999px;
  background: rgba(var(--primary-rgb),.08);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.cta-social-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb),.42);
  background: rgba(var(--primary-rgb),.13);
}

.cta-social-icon span {
  width: 27px;
  height: 27px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-mask: var(--social-icon) center / contain no-repeat;
  mask: var(--social-icon) center / contain no-repeat;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.site-footer .dev-credit { margin: 0; }
.site-footer .dev-credit a { color: var(--primary); font-weight: 800; }

.whatsapp-float {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(var(--primary-rgb),.24);
  box-shadow: 0 18px 44px rgba(42, 73, 52, .18);
  transition: transform .22s ease, box-shadow .22s ease;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(var(--primary-rgb),.18);
  animation: whatsappPulse 1.9s ease-out infinite;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 22px 54px rgba(42,73,52,.22);
}

.whatsapp-float img {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.theme-color-lab {
  position: fixed;
  display: none;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 92;
  gap: 8px;
  width: min(260px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(var(--primary-rgb), .22);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 44px rgba(42, 73, 52, .18);
}

.theme-color-lab strong {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.theme-color-lab-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
}

.theme-color-lab input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
}

.theme-color-lab-code {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(var(--primary-rgb), .08);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
  text-align: center;
}

.theme-color-lab button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 800;
  cursor: pointer;
}

@keyframes whatsappPulse {
  0% { opacity: .8; transform: scale(.86); }
  100% { opacity: 0; transform: scale(1.28); }
}

.hero-simple {
  padding: clamp(44px, 8vw, 84px) 0 24px;
  background: linear-gradient(180deg, rgba(var(--primary-rgb),.08), transparent);
}

.hero-simple p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.7;
}

.media-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb),.12);
}

.team-photo {
  width: min(220px, 70vw);
  height: min(220px, 70vw);
  margin: 0 auto 12px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

label { font-size: .92rem; color: var(--muted); }

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid rgba(var(--primary-rgb),.18);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.11);
}

textarea { resize: vertical; min-height: 130px; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.alert-success { color: #135f2d; background: rgba(var(--primary-rgb),.1); border-color: rgba(var(--primary-rgb),.24); }
.alert-error { color: #8b1d33; background: rgba(196,42,73,.1); border-color: rgba(196,42,73,.2); }

@media (max-width: 980px) {
  .site-nav > .btn-primary { display: none; }
  .site-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    background: rgba(var(--primary-rgb),.08);
  }

  .nav-links {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 82px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }

  body.site-menu-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-intro-card { grid-column: auto; }
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-3 { grid-template-columns: 1fr; }
  .hero-service-orb { display: none; }
  .hero-content { min-height: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .cta-social { align-items: center; }
  .client-item { flex-basis: 170px; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 22px, 1180px); }
  .brand span { max-width: 190px; font-size: .92rem; }
  .brand img { width: 46px; height: 46px; }
  .site-nav { min-height: 66px; }
  .nav-links { top: 74px; }
  .hero-content { padding: 22px; }
  .stats { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .carousel { aspect-ratio: 16 / 6; }
  .whatsapp-float {
    width: 58px;
    height: 58px;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .whatsapp-float img {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
