/* ==========================================================================
   Chimera — Cybersecurity Operations
   ========================================================================== */

:root {
  --white: #ffffff;
  --pink: #f79f9f;
  --red: #ef4040;
  --purple: #711db0;
  --deep-purple: #26004f;
  --black: #000000;
  --gray-card: #d0d0d0;
  --text-dark: #16101c;
  --text-muted: #5c5568;
  --coral-grad: linear-gradient(135deg, #ef4040 0%, #a3216f 100%);
  --tag-grad: linear-gradient(90deg, rgba(113, 29, 176, 0.9) 0%, rgba(239, 64, 64, 0.87) 100%);

  /* Exact 5-stop gradient sampled from the Desktop-1 frame fill in Figma */
  --hero-grad: linear-gradient(
    180deg,
    rgba(38, 0, 79, 0.94) 0%,
    rgba(113, 29, 176, 0.9) 25%,
    rgba(239, 64, 64, 0.87) 52%,
    rgba(247, 159, 159, 0.97) 75%,
    rgba(255, 255, 255, 0.96) 100%
  );

  --font: "Poppins", sans-serif;

  --container-w: 1200px;
  --radius-lg: 48px;
  --radius-md: 28px;
  --radius-pill: 999px;

  --header-h: 84px;
}

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

html {
  scroll-behavior: smooth;
}

#inicio,
#servicios,
#capacitaciones,
#contacto,
#observatorio {
  scroll-margin-top: var(--header-h);
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-bleed {
  max-width: 1360px;
}

.fw-medium { font-weight: 500; }
.fw-bold { font-weight: 700; }

.text-purple { color: var(--purple); }
.text-coral { color: var(--red); }

/* ------------------------------ Buttons ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--deep-purple);
}

.btn-white:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-coral {
  background: var(--coral-grad);
  color: var(--white);
}

.btn-coral:hover {
  box-shadow: 0 8px 24px rgba(239, 64, 64, 0.4);
}

.btn-sm {
  padding: 11px 24px;
  font-size: 14px;
}

/* ------------------------------- Badges -------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge-purple {
  background: var(--deep-purple);
  color: var(--white);
}

.badge-white {
  background: var(--white);
  color: var(--deep-purple);
}

/* ------------------------------- Header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}

/* El fondo difuminado va en una capa aparte: si se aplica al header mismo, el menú
   de celular (position: fixed) queda atrapado dentro del header al bajar por la página */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
  transition: background-color 0.25s ease;
  pointer-events: none;
}

.site-header.is-scrolled::before {
  background: rgba(16, 3, 28, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--white);
}

.logo img {
  width: 36px;
  height: auto;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 36px;
}

.nav-link {
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
}

.header-cta {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + 100px);
  padding-bottom: 140px;
}

.hero-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 92%;
  width: auto;
  max-width: none;
  opacity: 0.55;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 45% at 50% 58%, rgba(255, 255, 255, 0.25) 0%, rgba(247, 159, 159, 0.2) 40%, rgba(38, 0, 79, 0) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-panel {
  position: relative;
  width: 100%;
  max-width: 860px;
  text-align: center;
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  background: rgba(217, 217, 217, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----------------------------- White section ----------------------------- */

.section-white {
  background: var(--white);
  padding-block: 100px 0;
}

.why-block {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 56px;
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.stat-card {
  background: var(--gray-card);
  border-radius: 37px;
  padding: 28px 28px 32px;
}

.stat-tag {
  display: inline-flex;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: var(--tag-grad);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.stat-number {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
}

.stat-desc {
  font-size: 15px;
  color: var(--text-muted);
}

.stat-desc em {
  font-style: italic;
  color: var(--text-dark);
}

.why-paragraph {
  max-width: 900px;
  margin-inline: auto;
  text-align: left;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-dark);
  padding-bottom: 100px;
}

.hl {
  color: var(--red);
  font-weight: 600;
}

/* -------------------------------- Panels --------------------------------- */

.panel {
  position: relative;
  overflow: hidden;
  border-radius: 74px;
  padding: 64px 56px;
  margin-bottom: 100px;
}

.panel-purple {
  background: rgba(38, 0, 79, 0.94);
  color: var(--white);
}

/* Blurred glow ellipses sampled from Figma: #711DB0 @36% opacity, blend "lighten", heavy blur */
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #711db0;
  opacity: 0.36;
  mix-blend-mode: lighten;
  filter: blur(90px);
  pointer-events: none;
}

.panel::before {
  width: 500px;
  height: 440px;
  top: -120px;
  left: -150px;
}

.panel::after {
  width: 400px;
  height: 400px;
  bottom: -140px;
  right: -100px;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-title {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 48px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.service-card {
  position: relative;
  z-index: 1;
  background: rgba(216, 216, 216, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 38px;
  padding: 32px;
}

.tag-gradient {
  display: inline-flex;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: var(--tag-grad);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.service-title {
  font-size: 24px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 16px;
}

.service-desc {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 20px;
}

.service-list {
  margin-bottom: 20px;
}

.service-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink);
}

.service-list em {
  font-style: italic;
}

.service-frameworks-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-list span {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-stat-number {
  font-size: 30px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 10px;
}

.panel-stat-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.panel-stat-source {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

/* ----------------------------- Training block ----------------------------- */

.training-block {
  max-width: 900px;
  margin: 0 auto 100px;
}

.training-paragraph {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: 20px;
  margin-bottom: 48px;
}

.profile-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card {
  border: 1.5px solid var(--purple);
  border-radius: 24px;
  padding: 32px 36px;
}

.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-card-head h3 {
  font-size: 20px;
  font-weight: 700;
}

.profile-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.05em;
}

.profile-card p {
  font-size: 15px;
  color: var(--text-muted);
}

.profile-card p em {
  font-style: italic;
  color: var(--text-dark);
}

/* --------------------------------- CTA ----------------------------------- */

.panel-cta {
  background: var(--deep-purple);
  color: var(--white);
  text-align: left;
  border-radius: 72px;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.cta-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 560px;
}

.cta-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* -------------------------------- Footer ---------------------------------- */

.site-footer {
  background: var(--black);
  color: var(--white);
  padding-block: 72px 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
}

.footer-location {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--red);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.6;
}

.footer-services {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 48px 32px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 16px;
  }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(15, 2, 26, 0.98);
    backdrop-filter: blur(20px);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 32px 24px;
  }

  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .main-nav .nav-link {
    display: block;
    padding: 14px 4px;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 36px;
  }

  .section-title {
    font-size: 28px;
  }

  .panel-title {
    font-size: 30px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .cta-title {
    font-size: 28px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-block: 72px 96px;
  }

  .hero-panel {
    padding: 40px 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section-white {
    padding-block: 64px 0;
  }

  .why-paragraph {
    padding-bottom: 64px;
  }

  .panel {
    border-radius: 28px;
    padding: 36px 22px;
    margin-bottom: 64px;
  }

  .panel-stats {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .training-block {
    margin-bottom: 64px;
  }

  .cta-inner {
    align-items: flex-start;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .cta-actions {
    flex-direction: column;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----------------------------- Observatorio IA ----------------------------- */

.obs-home-intro {
  max-width: 900px;
  margin: 0 auto 32px;
}

.obs-frame {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 0;
  border-radius: 16px;
  background: transparent;
}

.obs-home-link {
  text-align: center;
  margin: 18px 0 100px;
  font-size: 15px;
  font-weight: 500;
}

.obs-home-link a {
  color: var(--purple);
}

@media (max-width: 560px) {
  .obs-frame { border-radius: 12px; }
  .obs-home-link { margin-bottom: 64px; }
}

/* Observatorio destacado en el menú */
.nav-link.nav-highlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f79f9f;
  font-weight: 600;
  opacity: 1;
}
.nav-link.nav-highlight::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4040;
  box-shadow: 0 0 0 3px rgba(239, 64, 64, 0.25);
}
.nav-link.nav-highlight:hover { color: #ffc4c4; }
@media (max-width: 1024px) {
  .main-nav .nav-link.nav-highlight { display: flex; }
}
/* Observatorio justo después del inicio: separación con "Por qué existimos" */
.section-white > #observatorio .obs-home-link { margin-bottom: 88px; }

/* Mientras el menú de celular está abierto, la página de fondo no se desplaza */
html.menu-open body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}
