:root {
  --brand: #7a1f35;
  --brand-dark: #5d1428;
  --brand-mid: #8f2c45;
  --brand-soft: #f6ecef;
  --text-main: #1f1f1f;
  --surface: #ffffff;
  --radius-lg: 1rem;
  --shadow-soft: 0 12px 36px rgba(25, 16, 19, 0.1);
  --shadow-card-hover: 0 20px 40px rgba(35, 21, 26, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: #fcfcfc;
  line-height: 1.7;
}

html {
  scroll-padding-top: 60px;
}

section[id] {
  scroll-margin-top: 60px;
}

.navbar {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  background: rgba(255, 255, 255, 0.86);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.navbar {
  backdrop-filter: saturate(1.2) blur(4px);
}

.navbar.nav-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(19, 12, 14, 0.08);
  border-bottom-color: rgba(122, 31, 53, 0.12) !important;
}

.navbar .nav-link {
  position: relative;
  font-weight: 600;
  color: #303030;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--brand);
}

.main-nav-link::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: -0.15rem;
  height: 2px;
  border-radius: 20px;
  background-color: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.main-nav-link:hover::after,
.main-nav-link:focus-visible::after,
.main-nav-link.is-active::after {
  transform: scaleX(1);
}

.main-nav-link.is-active {
  color: var(--brand) !important;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
}

.brand-logo-nav {
  height: 62px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  transition: box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-focus-shadow-rgb: 122, 31, 53;
  box-shadow: 0 10px 24px rgba(122, 31, 53, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 12px 26px rgba(122, 31, 53, 0.26);
}

.hero-section {
  position: relative;
  padding: 6rem 0 5.25rem;
  background-image: url("../assets/hero-bg.svg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(122, 31, 53, 0.12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(19, 12, 14, 0.78) 0%, rgba(19, 12, 14, 0.66) 45%, rgba(28, 15, 20, 0.56) 100%),
    linear-gradient(180deg, rgba(122, 31, 53, 0.25) 0%, rgba(122, 31, 53, 0.35) 100%);
}

.hero-section::after {
  content: none;
}

.hero-section .container {
  z-index: 1;
}

.hero-section h1,
.hero-section .hero-eyebrow,
.hero-section .hero-lead {
  color: #ffffff;
}

.hero-section h1 {
  font-size: clamp(2rem, 4vw, 3.05rem);
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.24rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.96);
}

.hero-lead {
  max-width: 58ch;
  color: #eef0f1;
}

.hero-card {
  position: relative;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(12, 8, 10, 0.22);
  padding: 1.7rem;
}

.section-space {
  padding: 5.25rem 0;
  position: relative;
}

#desafios.section-space {
  padding-top: 4.4rem;
}

.section-space::before {
  content: none;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 2.4rem;
}

.section-heading h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid));
}

.section-heading p {
  font-size: 1.04rem;
  max-width: 60ch;
}

.bg-soft {
  background-color: #faf6f7;
  background-image: none;
}

/* Alternancia homogénea entre secciones */
#desafios,
#diferenciales,
#contacto {
  background-color: #fcfcfc;
  background-image: none;
}

#servicios,
#metodologia {
  background-color: #faf6f7;
  background-image: none;
}

.site-footer {
  position: relative;
  background-color: #ffffff;
  border-top: 1px solid #efe8ea;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(122, 31, 53, 0.1) 0%, rgba(122, 31, 53, 0.45) 35%, rgba(122, 31, 53, 0.1) 100%);
}

.footer-brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--brand);
}

.footer-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #5a5960;
}

.footer-links li + li {
  margin-top: 0.55rem;
}

.footer-links a {
  color: #4f5763;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--brand);
}

.social-nav {
  gap: 0.45rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.social-links-mobile {
  justify-content: flex-start;
}

.social-links-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-right: 0.25rem;
}

.social-icon-link {
  width: 2.3rem;
  height: 2.3rem;
  font-size: 1.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e6d3d8;
  background: #fff;
  color: var(--brand);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-icon-link:hover,
.social-icon-link:focus-visible {
  color: var(--brand-dark);
  border-color: #d2a6b3;
  box-shadow: 0 8px 20px rgba(122, 31, 53, 0.18);
  transform: translateY(-2px);
}

.social-links-light .social-icon-link {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.social-links-light .social-icon-link:hover,
.social-links-light .social-icon-link:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.site-footer .social-icon-link {
  width: 3.15rem;
  height: 3.15rem;
  font-size: 1.48rem;
}

.footer-bottom {
  border-top: 1px solid #efe8ea;
}

.feature-card,
.service-card,
.contact-card,
.method-card {
  background: var(--surface);
  border: 1px solid #eee;
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover,
.service-card:hover,
.contact-card:hover,
.method-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: #e7d3d8;
}

.card-icon {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--brand);
  text-align: center;
  margin: 0 auto 0.85rem;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f9f0f2 0%, #f4e4e8 100%);
  border: 1px solid #edd8dd;
}

.service-card h3,
.feature-card h3 {
  text-align: center;
  margin-bottom: 0.65rem;
}

.service-card p,
.feature-card p {
  text-align: center;
}

.form-label {
  font-weight: 600;
}

.form-control {
  border-radius: 0.7rem;
  padding: 0.72rem 0.85rem;
}

.form-control:focus {
  border-color: #c98a99;
  box-shadow: 0 0 0 0.25rem rgba(122, 31, 53, 0.15);
}

.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: #1fae4b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(12, 82, 34, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1050;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus {
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(12, 82, 34, 0.4);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 42px;
  }

  section[id] {
    scroll-margin-top: 42px;
  }

  #mainNav.collapsing {
    transition: none !important;
  }

  .navbar {
    backdrop-filter: none;
  }

  .main-nav-link::after {
    display: none;
  }

  .navbar-toggler {
    margin-left: auto;
  }

  .social-nav {
    display: none !important;
  }

  .hero-section {
    padding: 4.25rem 0 3.9rem;
    background-position: 62% center;
  }

  .section-heading p {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .brand-logo-nav {
    height: 50px;
  }

  .section-space {
    padding: 4rem 0;
  }

  .hero-section {
    padding-top: 1.4rem;
  }

  .social-links-label {
    font-size: 0.88rem;
  }

  .social-icon-link {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1.02rem;
  }

  .site-footer .social-icon-link {
    width: 3.15rem;
    height: 3.15rem;
    font-size: 1.48rem;
  }

  .whatsapp-fab {
    right: 0.9rem;
    bottom: 0.9rem;
  }
}
