:root {
  --cp-color-ink: #17312d;
  --cp-color-teal: #267a7d;
  --cp-color-teal-700: #1f6668;
  --cp-color-text: #44525f;
  --cp-color-muted: #5e6b76;
  --cp-color-orange: #cc5331;
  --cp-color-gold: #f59e1d;
  --cp-color-bg: #faf8f4;
  --cp-color-surface: #ffffff;

  --cp-radius-sm: 14px;
  --cp-radius-md: 22px;
  --cp-radius-lg: 30px;

  --cp-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
  --cp-shadow-md: 0 18px 36px rgba(15, 23, 42, 0.10);
  --cp-shadow-lg: 0 24px 54px rgba(15, 23, 42, 0.12);

  --cp-transition-base: 0.28s ease;
  --cp-container: 1320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cp-color-text);
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.cp-container,
.cp-section-container {
  width: min(var(--cp-container), calc(100% - 72px));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .cp-container,
  .cp-section-container {
    width: min(var(--cp-container), calc(100% - 28px));
  }
}

/* Tipografía básica */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--cp-color-ink);
}

p {
  margin-top: 0;
}

/* Botones */
.cp-btn,
a.cp-btn,
button.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--cp-transition-base),
    color var(--cp-transition-base),
    border-color var(--cp-transition-base),
    transform var(--cp-transition-base),
    box-shadow var(--cp-transition-base);
}

.cp-btn:hover,
a.cp-btn:hover,
button.cp-btn:hover {
  transform: translateY(-2px);
}

.cp-btn--primary {
  background: var(--cp-color-teal);
  color: #fff;
  box-shadow: var(--cp-shadow-md);
}

.cp-btn--primary:hover {
  background: var(--cp-color-teal-700);
  color: #fff;
}

.cp-btn--secondary {
  background: #fff;
  color: var(--cp-color-teal);
  border: 1px solid rgba(38, 122, 125, 0.24);
}

.cp-btn--secondary:hover {
  color: var(--cp-color-teal-700);
  border-color: rgba(38, 122, 125, 0.38);
}

.cp-btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cp-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cp-site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(38, 122, 125, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.cp-site-header__container {
  width: min(var(--cp-container), calc(100% - 34px));
  margin: 0 auto;
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.cp-site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.cp-site-header__brand-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.cp-site-header__brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-block;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 35%, #f59e1d 0 20%, transparent 21%),
    radial-gradient(circle at 70% 70%, #cc5331 0 18%, transparent 19%),
    linear-gradient(135deg, #267a7d 0%, #1f6668 100%);
  box-shadow: 0 10px 22px rgba(38, 122, 125, 0.18);
}

.cp-site-header__brand-text {
  color: var(--cp-color-ink);
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.cp-site-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: 0;
}

.cp-site-header__link {
  position: relative;
  color: var(--cp-color-ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  transition: color 0.22s ease;
}

.cp-site-header__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
  background: var(--cp-color-teal);
  border-radius: 999px;
}

.cp-site-header__link:hover,
.cp-site-header__link.is-active {
  color: var(--cp-color-teal);
}

.cp-site-header__link:hover::after,
.cp-site-header__link.is-active::after {
  transform: scaleX(1);
}

.cp-site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 15px;
  border: 1.5px solid rgba(38, 122, 125, 0.34);
  background: rgba(255, 255, 255, 0.78);
  color: var(--cp-color-teal);
  text-decoration: none;
  font-weight: 750;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.cp-site-header__cta:hover {
  background: var(--cp-color-teal);
  color: #fff;
  border-color: var(--cp-color-teal);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(38, 122, 125, 0.18);
}

@media (max-width: 1100px) {
  .cp-site-header__container {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    padding: 14px 0 16px;
  }

  .cp-site-header__nav {
    flex-wrap: wrap;
    gap: 16px 22px;
  }
}

@media (max-width: 640px) {
  .cp-site-header__brand-text {
    font-size: 1.45rem;
  }

  .cp-site-header__nav {
    gap: 14px 18px;
  }

  .cp-site-header__link {
    font-size: 0.95rem;
  }

  .cp-site-header__cta {
    width: 100%;
    max-width: 260px;
  }
}

/* =========================================================
   HEADER — versión institucional, limpia y estable
========================================================= */

.cp-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  width: 100%;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(23, 49, 45, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.22s ease, background-color 0.22s ease;
}

body.admin-bar .cp-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .cp-header {
    top: 46px;
  }
}

body.cp-has-scrolled .cp-header {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.98);
}

.cp-header__shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cp-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

.cp-header__logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

.cp-header__logo-fallback {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  display: inline-block;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 28% 32%, #f59e1d 0 18%, transparent 19%),
    radial-gradient(circle at 72% 70%, #cc5331 0 16%, transparent 17%),
    linear-gradient(135deg, #267a7d 0%, #1f6668 100%);
  box-shadow: 0 10px 24px rgba(38, 122, 125, 0.16);
}

.cp-header__brand-text {
  color: var(--cp-color-ink);
  font-size: clamp(1.7rem, 2vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.cp-header__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 0;
}

.cp-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: 0;
  margin-left: auto;
}

.cp-header__link {
  position: relative;
  color: var(--cp-color-ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  transition: color 0.2s ease;
}

.cp-header__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 100%;
  height: 2px;
  background: var(--cp-color-teal);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.cp-header__link:hover,
.cp-header__link.is-active {
  color: var(--cp-color-teal);
}

.cp-header__link:hover::after,
.cp-header__link.is-active::after {
  transform: scaleX(1);
}

.cp-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1.5px solid rgba(38, 122, 125, 0.28);
  background: transparent;
  color: var(--cp-color-teal);
  text-decoration: none;
  font-weight: 750;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.cp-header__cta:hover {
  background: var(--cp-color-teal);
  color: #fff;
  border-color: var(--cp-color-teal);
}

.cp-header__toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(38, 122, 125, 0.18);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.cp-header__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--cp-color-ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.cp-header.is-open .cp-header__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.cp-header.is-open .cp-header__toggle span:nth-child(2) {
  opacity: 0;
}

.cp-header.is-open .cp-header__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
  .cp-header__shell {
    grid-template-columns: auto auto;
    width: min(100% - 24px, 1280px);
    min-height: 76px;
  }

  .cp-header__toggle {
    display: inline-block;
  }

  .cp-header__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px 20px 22px;
    border-top: 1px solid rgba(23, 49, 45, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
  }

  .cp-header.is-open .cp-header__panel {
    display: flex;
  }

  .cp-header__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-left: 0;
  }

  .cp-header__link::after {
    bottom: -6px;
  }

  .cp-header__cta {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .cp-header__shell {
    width: min(100% - 20px, 1280px);
  }

  .cp-header__logo,
  .cp-header__logo-fallback {
    width: 50px;
    height: 50px;
  }

  .cp-header__brand-text {
    font-size: 1.5rem;
  }
}


/* --- SISTEMA DE REVEAL PREMIUM --- */

/* Estado Base: Oculto */
.cp-reveal-soft {
    opacity: 0;
    transform: translateY(40px); /* Variante 'up' por defecto */
    transition: 
        opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1), 
        transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--cp-reveal-delay, 0ms);
    will-change: transform, opacity;
}

/* Variante: Desde la izquierda */
.cp-reveal-soft--left {
    transform: translateX(-30px) translateY(0);
}

/* Variante: Escala (Ideal para cajas de contacto y CTAs) */
.cp-reveal-soft--scale {
    transform: scale(0.96) translateY(20px);
}

/* Estado Final: Visible (Activado por JS) */
.cp-reveal-soft.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Optativo: Desactivar animaciones si el usuario lo prefiere en su sistema */
@media (prefers-reduced-motion: reduce) {
    .cp-reveal-soft {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}