:root {
  --verde: #0F6E56;
  --verde-medio: #1D9E75;
  --verde-claro: #9FE1CB;
  --dorado: #BA7517;
  --dorado-claro: #EF9F27;
  --fondo: #F5F3EE;
  --fondo2: #ECEAE4;
  --texto: #2C2C2A;
  --texto-sec: #5F5E5A;
  --blanco: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hanken Grotesk', sans-serif !important;
  background: var(--fondo);
  color: var(--texto);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 6vw;
  background: rgba(245, 243, 238, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 110, 86, 0.08);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.scrolled {
  padding: 0.8rem 6vw;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 30px rgba(15, 110, 86, 0.05);
}

.nav-logo {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-weight: 800;
  font-size: 22px;
  color: var(--verde);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--texto-sec);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.2px;
}

.nav-links a:hover {
  color: var(--verde);
}

.nav-cta {
  background: var(--verde);
  color: var(--blanco) !important;
  padding: 10px 22px;
  border-radius: 99px;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--verde-medio) !important;
  color: var(--blanco) !important;
}

.nav-toggle {
  display: none;
}

.nav-mobile {
  display: none;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 6vw 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--fondo);
}

/* Circuit pattern background */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 50%, rgba(29, 158, 117, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(186, 117, 23, 0.06) 0%, transparent 40%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 110, 86, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 110, 86, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  animation: fadeUp 0.9s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(29, 158, 117, 0.12);
  border: 1px solid rgba(29, 158, 117, 0.25);
  color: var(--verde);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--verde-medio);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: clamp(2.5rem, 8vw, 5.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--texto);
  margin-bottom: 1.5rem;
}

.hero h1 span.verde {
  color: var(--verde);
}

.hero h1 span.dorado {
  color: var(--dorado);
}

.hero p {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  line-height: 1.7;
  color: var(--texto-sec);
  margin-bottom: 2.5rem;
  font-weight: 400;
  max-width: 34rem;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--verde);
  color: var(--blanco);
  padding: 15px 32px;
  border-radius: 99px;
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(15, 110, 86, 0.3);
}

.btn-primary:hover {
  background: var(--verde-medio);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(15, 110, 86, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--verde);
  padding: 15px 28px;
  border-radius: 99px;
  border: 1.5px solid rgba(15, 110, 86, 0.35);
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
}

.btn-secondary:hover {
  border-color: var(--verde);
  background: rgba(15, 110, 86, 0.06);
  transform: translateY(-2px);
}

.hero-visual {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(520px, 45vw);
  animation: fadeIn 1.2s ease both 0.3s;
  z-index: 1;
}

.portfolio-browser {
  width: 100%;
  background: var(--blanco);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(15, 110, 86, 0.15);
  border: 1px solid rgba(15, 110, 86, 0.08);
  position: relative;
}

.browser-header {
  height: 28px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  border-bottom: 1px solid #eee;
}

.browser-header span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.slider-container {
  width: 100%;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  position: relative;
}

.slider-track {
  display: flex;
  width: 600%;
  height: 100%;
  animation: infiniteSlide 24s infinite cubic-bezier(0.85, 0, 0.15, 1);
}

.slider-track img {
  width: 16.666%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: #fdfdfd;
}

.slider-track img.mobile-slide {
  object-fit: contain;
  background: #111;
  padding: 0;
  object-position: center;
}

@keyframes infiniteSlide {
  0% {
    transform: translateX(0);
  }

  14% {
    transform: translateX(0);
  }

  16.666% {
    transform: translateX(-16.666%);
  }

  30.666% {
    transform: translateX(-16.666%);
  }

  33.333% {
    transform: translateX(-33.333%);
  }

  47.333% {
    transform: translateX(-33.333%);
  }

  50% {
    transform: translateX(-50%);
  }

  64% {
    transform: translateX(-50%);
  }

  66.666% {
    transform: translateX(-66.666%);
  }

  80.666% {
    transform: translateX(-66.666%);
  }

  83.333% {
    transform: translateX(-83.333%);
  }

  97.333% {
    transform: translateX(-83.333%);
  }

  100% {
    transform: translateX(0);
  }
}

/* Floating stats cards */
.stats-row {
  display: flex;
  gap: 16px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--blanco);
  border: 1px solid rgba(15, 110, 86, 0.12);
  border-radius: 16px;
  padding: 18px 24px;
  min-width: 130px;
  box-shadow: 0 2px 16px rgba(44, 44, 42, 0.06);
  animation: fadeUp 0.9s ease both;
}

.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.2s;
}

.stat-num {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 28px;
  font-weight: 800;
  color: var(--verde);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-num span {
  color: var(--dorado);
}

.stat-label {
  font-size: 12px;
  color: var(--texto-sec);
  font-weight: 400;
}

/* SERVICIOS */
.servicios {
  padding: 100px 6vw;
  background: var(--blanco);
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--verde);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding: 5px 14px;
  background: rgba(15, 110, 86, 0.08);
  border-radius: 99px;
}

.section-title {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--texto);
}

.section-sub {
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  color: var(--texto-sec);
  font-weight: 400;
  line-height: 1.7;
  max-width: 32rem;
  margin-bottom: 4rem;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.servicio-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 110, 86, 0.08);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.servicio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--verde), var(--verde-medio));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.servicio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 110, 86, 0.12);
  border-color: rgba(15, 110, 86, 0.2);
}

.servicio-card:hover::before {
  transform: scaleX(1);
}

.servicio-icon {
  width: 52px;
  height: 52px;
  background: rgba(15, 110, 86, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 24px;
}

.servicio-card h3 {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--texto);
  letter-spacing: -0.03em;
}

.servicio-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--texto-sec);
  font-weight: 300;
}

.servicio-card ul {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.servicio-card ul li {
  font-size: 13px;
  color: var(--texto-sec);
  display: flex;
  align-items: center;
  gap: 8px;
}

.servicio-card ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--verde-medio);
  border-radius: 50%;
  flex-shrink: 0;
}

/* POR QUÉ NOSOTROS banner */
.porque {
  background: var(--verde);
  padding: 80px 6vw;
  position: relative;
  overflow: hidden;
}

.porque::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
}

.porque-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.porque-texto .section-tag {
  background: rgba(255, 255, 255, 0.15);
  color: var(--verde-claro);
}

.porque-texto .section-title {
  color: var(--blanco);
}

.porque-texto .section-sub {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

.porque-lista {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.porque-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.porque-num {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 13px;
  font-weight: 700;
  color: var(--dorado-claro);
  background: rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.porque-item-texto h4 {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 16px;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 4px;
}

.porque-item-texto p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  font-weight: 300;
}

/* CONTACTO */
.contacto {
  padding: 100px 6vw;
  background: var(--fondo);
}

.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
  align-items: start;
}

.contacto-form {
  background: var(--blanco);
  border-radius: 24px;
  padding: 44px;
  border: 1px solid rgba(15, 110, 86, 0.1);
  box-shadow: 0 4px 40px rgba(44, 44, 42, 0.06);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--texto-sec);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(15, 110, 86, 0.15);
  border-radius: 12px;
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 14px;
  color: var(--texto);
  background: var(--fondo);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--verde-medio);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
  background: var(--blanco);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--verde);
  color: var(--blanco);
  border: none;
  border-radius: 12px;
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(15, 110, 86, 0.25);
}

.btn-submit:hover {
  background: var(--verde-medio);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 110, 86, 0.3);
}

.contacto-info h3 {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--texto);
}

.contacto-info p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--texto-sec);
  font-weight: 300;
  margin-bottom: 36px;
}

.contacto-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contacto-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--blanco);
  border-radius: 14px;
  border: 1px solid rgba(15, 110, 86, 0.1);
  font-size: 14px;
  color: var(--texto);
  text-decoration: none;
  transition: all 0.2s;
}

.contacto-item:hover {
  border-color: var(--verde);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(15, 110, 86, 0.1);
}

.contacto-item-icon {
  width: 40px;
  height: 40px;
  background: rgba(15, 110, 86, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.contacto-item span {
  font-weight: 400;
  color: var(--texto-sec);
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: all 0.25s;
  animation: fadeIn 1s ease both 1s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: white;
}

/* FOOTER */
footer {
  background: var(--texto);
  padding: 48px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-weight: 800;
  font-size: 20px;
  color: var(--blanco);
  text-decoration: none;
}

.footer-logo span {
  color: var(--blanco);
}

.footer-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

/* ANIMACIONES */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero {
    padding-top: 140px;
  }

  .contacto-inner {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 5vw;
  }

  .hero {
    min-height: auto !important;
    padding: 140px 5vw 60px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .hero-content {
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .hero .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero p {
    margin-inline: auto;
  }

  .hero-btns {
    justify-content: center;
  }

  .stats-row {
    justify-content: center;
  }

  .hero-visual {
    display: block;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 480px;
    margin: 60px auto 0;
    z-index: 1;
  }

  /* Eliminar cualquier sombra o borde que lo haga parecer 'al lado' */
  .portfolio-browser {
    box-shadow: 0 20px 50px rgba(15, 110, 86, 0.1);
  }

  .porque-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contacto-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .contacto-form {
    padding: 2rem 1.5rem;
  }

  .section-title {
    text-align: center;
  }

  .section-sub {
    text-align: center;
    margin-inline: auto;
  }

  .reveal {
    text-align: center;
  }

  /* Estilos específicos para el nuevo menú móvil */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    color: var(--verde);
  }

  .nav-toggle svg {
    transition: transform 0.3s ease;
  }

  .nav-toggle.active svg {
    transform: rotate(90deg);
  }

  .nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--fondo);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-mobile.active {
    transform: translateX(0);
  }

  .nav-mobile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .nav-mobile-link {
    font-size: 24px;
    font-weight: 700;
    color: var(--texto);
    text-decoration: none;
    transition: color 0.3s;
  }

  .nav-mobile-link:hover {
    color: var(--verde);
  }

  .nav-mobile-cta {
    background: var(--verde);
    color: var(--blanco);
    padding: 12px 32px;
    border-radius: 99px;
  }

  /* Ajuste Hero Stats en Móvil */
  .stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 40px;
  }

  .stat-card {
    min-width: 0;
    padding: 14px;
  }

  .stat-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .stat-num {
    font-size: 22px;
  }
}
