:root {
  --bg-main: #ffffff;
  --bg-soft: #f4f8f7;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-soft: #5f6b6a;
  --primary: #006b5b;
  --primary-light: #0f8f7b;
  --border: #dce7e4;
  --shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

body.dark-mode {
  --bg-main: #07110f;
  --bg-soft: #0d1b18;
  --bg-card: #10231f;
  --text-main: #f5f5f5;
  --text-soft: #b7c7c3;
  --primary: #19b89d;
  --primary-light: #42d6c0;
  --border: #1f3a35;
  --shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  transition: background 0.3s ease, color 0.3s ease;
}

/* NAVBAR */

.custom-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  z-index: 999;
}

body.dark-mode .custom-navbar {
  background: rgba(7, 17, 15, 0.94);
}

.navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  height: 95px;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}

.navbar-logo {
  height: 88px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  display: block;
  border: none;
  box-shadow: none;
}

.logo-dark {
  display: none;
}

body.dark-mode .logo-light {
  display: none;
}

body.dark-mode .logo-dark {
  display: block;
}

.nav-link {
  color: var(--text-main);
  font-weight: 600;
  margin: 0 10px;
  font-size: 1.05rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

body.dark-mode .nav-link {
  color: #ffffff;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
  color: var(--primary-light);
}

.navbar-toggler {
  border: none;
  box-shadow: none;
  padding: 8px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

body.dark-mode .navbar-toggler-icon {
  filter: invert(1);
}

/* BOTONES */

.btn-main {
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  border: 1px solid var(--primary);
  box-shadow: 0 10px 25px rgba(0, 107, 91, 0.25);
  transition: 0.3s ease;
}

.btn-main:hover {
  background: var(--primary-light);
  color: #ffffff;
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-outline-main {
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  transition: 0.3s ease;
}

.btn-outline-main:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-theme {
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
}

.btn-theme:hover {
  color: var(--primary);
  border-color: var(--primary);
}

body.dark-mode .btn-theme {
  color: #ffffff;
}

/* HERO */

.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: 120px;
  background:
    radial-gradient(circle at 85% 12%, rgba(0, 107, 91, 0.16), transparent 22%),
    radial-gradient(circle at 16% 82%, rgba(15, 143, 123, 0.10), transparent 25%),
    linear-gradient(135deg, rgba(0, 107, 91, 0.035), transparent 45%),
    var(--bg-main);
}

/* Textura sutil con el patrón Aztlán */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/patron-aztlan.png");
  background-repeat: repeat;
  background-size: 620px auto;
  background-position: center;
  opacity: 0.025;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Degradado para que el patrón no compita con el texto */
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, var(--bg-main) 0%, rgba(255,255,255,0.88) 36%, rgba(255,255,255,0.72) 100%),
    linear-gradient(to bottom, transparent 0%, var(--bg-main) 100%);
  pointer-events: none;
}

body.dark-mode .hero-section {
  background:
    radial-gradient(circle at 85% 12%, rgba(25, 184, 157, 0.20), transparent 22%),
    radial-gradient(circle at 16% 82%, rgba(66, 214, 192, 0.10), transparent 25%),
    linear-gradient(135deg, rgba(25, 184, 157, 0.05), transparent 45%),
    var(--bg-main);
}

body.dark-mode .hero-section::before {
  opacity: 0.13;
  mix-blend-mode: screen;
  filter: none;
}

body.dark-mode .hero-section::after {
  background:
    linear-gradient(to right, var(--bg-main) 0%, rgba(7,17,15,0.86) 38%, rgba(7,17,15,0.62) 100%),
    linear-gradient(to bottom, transparent 0%, var(--bg-main) 100%);
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section .row {
  position: relative;
}

.hero-section .col-lg-6:first-child {
  position: relative;
}

.hero-section .col-lg-6:first-child::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 25px;
  width: 130px;
  height: 210px;
  background-image: url("../img/patron-aztlan.png");
  background-size: 470px auto;
  background-position: left center;
  opacity: 0.045;
  border-radius: 24px;
  transform: rotate(-4deg);
  pointer-events: none;
  mix-blend-mode: multiply;
}

body.dark-mode .hero-section .col-lg-6:first-child::before {
  opacity: 0.10;
  mix-blend-mode: screen;
}

.hero-section .col-lg-6:first-child::after {
  content: "";
  position: absolute;
  right: 50px;
  bottom: 20px;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(0, 107, 91, 0.16);
  border-radius: 18px;
  transform: rotate(45deg);
  pointer-events: none;
}

body.dark-mode .hero-section .col-lg-6:first-child::after {
  border-color: rgba(66, 214, 192, 0.20);
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
}

.tagline::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
}

.hero-section h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-main);
}

.hero-section h1 span {
  color: var(--primary);
  position: relative;
}

.hero-section h1 span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 100%;
  height: 12px;
  background: rgba(0, 107, 91, 0.13);
  border-radius: 999px;
  z-index: -1;
}

body.dark-mode .hero-section h1 span::after {
  background: rgba(66, 214, 192, 0.16);
}

.hero-text {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 650px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* MOCKUP */

.hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardFloat 5.5s ease-in-out infinite;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 107, 91, 0.08), transparent 36%),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(0, 107, 91, 0.035) 20px 24px, transparent 24px 44px);
  pointer-events: none;
}

body.dark-mode .hero-card::before {
  background:
    linear-gradient(135deg, rgba(66, 214, 192, 0.10), transparent 36%),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(66, 214, 192, 0.04) 20px 24px, transparent 24px 44px);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 22px;
  width: 78px;
  height: 78px;
  border: 2px solid rgba(0, 107, 91, 0.12);
  border-radius: 16px;
  transform: rotate(45deg);
  pointer-events: none;
}

body.dark-mode .hero-card::after {
  border-color: rgba(66, 214, 192, 0.16);
}

.browser-bar {
  height: 45px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
}

.browser-bar span {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.8;
}

.mockup-content {
  position: relative;
  padding: 35px;
}

.mockup-content::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 160px;
  height: 90px;
  opacity: 0.045;
  background-image: url("../img/patron-aztlan.png");
  background-size: 420px auto;
  background-position: center 45%;
  pointer-events: none;
  mix-blend-mode: multiply;
}

body.dark-mode .mockup-content::after {
  opacity: 0.11;
  mix-blend-mode: screen;
}

.mockup-content h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.mockup-content p {
  color: var(--text-soft);
  margin-bottom: 25px;
}

.mockup-box {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 15px;
  transition: 0.3s ease;
}

.mockup-box:hover {
  transform: translateX(6px);
  border-color: var(--primary);
}

.mockup-box i {
  font-size: 2rem;
  color: var(--primary);
}

.mockup-box strong {
  display: block;
  font-size: 1rem;
}

.mockup-box small {
  color: var(--text-soft);
}

/* SECCIONES */

.section-padding {
  padding: 90px 0;
}

.bg-soft {
  background: var(--bg-soft);
}

.section-title {
  margin-bottom: 45px;
}

.section-title span {
  color: var(--primary);
  font-weight: 700;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-main);
  margin-top: 8px;
}

.section-text {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* NOSOTROS */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 25px;
  box-shadow: var(--shadow);
}

.feature-item i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 700;
}

/* SERVICIOS */

.service-card {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 22px 50px rgba(0, 107, 91, 0.16);
}

body.dark-mode .service-card:hover {
  box-shadow: 0 22px 50px rgba(25, 184, 157, 0.14);
}

.service-card i {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 18px;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

/* PROYECTOS */

.coming-card {
  max-width: 750px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 45px;
  text-align: center;
  box-shadow: var(--shadow);
}

.coming-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 18px;
}

.coming-card h3 {
  font-weight: 800;
  margin-bottom: 12px;
}

.coming-card p {
  color: var(--text-soft);
}

/* PROCESO */

.process-card {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
  position: relative;
  transition: 0.3s ease;
}

.process-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
}

.process-card span {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(0, 107, 91, 0.15);
}

.process-card i {
  font-size: 2.3rem;
  color: var(--primary);
  margin-bottom: 18px;
}

.process-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.process-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

/* CONTACTO */

.contact-section {
  padding: 80px 0;
  background: var(--bg-main);
}

.contact-box {
  background: linear-gradient(135deg, var(--primary), #063c35);
  color: #ffffff;
  border-radius: 28px;
  padding: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  box-shadow: var(--shadow);
}

.contact-box h2 {
  font-weight: 800;
  margin-bottom: 10px;
}

.contact-box p {
  margin-bottom: 0;
  opacity: 0.9;
}

.contact-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-box .btn-main {
  background: #ffffff;
  color: var(--primary);
  border-color: #ffffff;
}

.contact-box .btn-outline-main {
  color: #ffffff;
  border-color: #ffffff;
}

.contact-box .btn-outline-main:hover {
  background: #ffffff;
  color: var(--primary);
}

/* FOOTER PREMIUM */

.footer-premium {
  background:
    radial-gradient(circle at top left, rgba(25, 184, 157, 0.16), transparent 35%),
    #06100e;
  color: #ffffff;
  padding: 70px 0 25px;
  position: relative;
  overflow: hidden;
}

.footer-premium::before {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(25, 184, 157, 0.18);
  border-radius: 50%;
}

.footer-brand,
.footer-links,
.footer-contact {
  position: relative;
  z-index: 1;
}

.footer-logo {
  width: 145px;
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
  max-width: 430px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.3s ease;
}

.footer-social a:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-4px);
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  margin-bottom: 10px;
  transition: 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-light);
  transform: translateX(4px);
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-contact i {
  color: var(--primary-light);
  font-size: 1.1rem;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  transition: 0.3s ease;
}

.footer-contact a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  margin-top: 45px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-bottom p,
.footer-bottom span {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

/* ANIMACIONES */

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* RESPONSIVE */

@media (max-width: 991px) {
  .custom-navbar {
    padding: 8px 0;
  }

  .navbar-brand {
    height: 76px;
  }

  .navbar-logo {
    height: 70px;
    max-width: 220px;
  }

  .navbar-collapse {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 22px;
    margin-top: 8px;
    box-shadow: var(--shadow);
  }

  body.dark-mode .navbar-collapse {
    background: rgba(13, 27, 24, 0.98);
  }

  .navbar-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 6px 0;
    font-size: 0.95rem;
  }

  .navbar-collapse .d-flex {
    margin-top: 8px;
  }

  .navbar-collapse .btn-main,
  .navbar-collapse .btn-theme {
    padding: 10px 18px;
  }

  .hero-section {
    padding-top: 125px;
  }

  .hero-section::before {
    opacity: 0.018;
    background-size: 520px auto;
  }

  body.dark-mode .hero-section::before {
    opacity: 0.08;
  }

  .hero-section .col-lg-6:first-child::before,
  .hero-section .col-lg-6:first-child::after,
  .mockup-content::after,
  .hero-card::after {
    display: none;
  }

  .contact-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-premium {
    padding: 60px 0 25px;
  }
}

@media (max-width: 575px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .custom-navbar {
    padding: 6px 0;
  }

  .navbar-brand {
    height: 66px;
  }

  .navbar-logo {
    height: 62px;
    max-width: 190px;
  }

  .navbar-collapse {
    padding: 14px 18px;
    margin-top: 4px;
    max-height: 260px;
    overflow-y: auto;
  }

  .nav-link {
    padding: 4px 0;
    font-size: 0.92rem;
  }

  .navbar-collapse .d-flex {
    margin-top: 6px;
  }

  .navbar-collapse .btn-main,
  .navbar-collapse .btn-theme {
    padding: 9px 16px;
  }

  .hero-section {
    padding-top: 115px;
  }

  .hero-section::before {
    opacity: 0.014;
    background-size: 430px auto;
  }

  body.dark-mode .hero-section::before {
    opacity: 0.055;
  }

  .hero-section h1 {
    font-size: 2.35rem;
  }

  .hero-section h1 span::after {
    height: 10px;
    bottom: 3px;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-buttons,
  .contact-buttons {
    width: 100%;
  }

  .hero-buttons .btn,
  .contact-buttons .btn {
    width: 100%;
  }

  .mockup-content {
    padding: 25px;
  }

  .mockup-content h3 {
    font-size: 1.55rem;
  }

  .hero-card {
    animation: none;
  }

  .mockup-box:hover {
    transform: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .section-padding {
    padding: 70px 0;
  }

  .coming-card,
  .contact-box {
    padding: 30px;
  }

  .contact-section {
    padding: 70px 0;
  }

  .footer-premium {
    padding: 55px 0 25px;
  }

  .footer-logo {
    width: 125px;
  }

  .footer-bottom {
    margin-top: 35px;
  }

  .footer-bottom p,
  .footer-bottom span {
    font-size: 0.85rem;
  }
}