/* ==== Paleta de EDUCATION ==== */
:root {
  --bg: #fff7f9;
  --text: #091a28;
  --rose: #db4a70;
  --pink: #f42959;
  --sun: #f5e560;
  --orange: #ff5225;
  --navy: #004a67;

  --muted: #2745541a;
  --ring-w: 6px; /* grosor de la franja LED */
  --angle: 0deg;
}

/* registra la propiedad para animación del ángulo */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ==== Reset base ==== */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial;
}
body {
  background: var(--bg);
  color: var(--text);
}
a {
  color: var(--navy);
  text-decoration: none;
}

/* ==== Header ==== */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
header.nav img {
  height: 28px;
}
.desktop-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-weight: 700;
}
.desktop-nav a.active {
  background: rgba(244, 41, 89, 0.12);
  color: var(--rose);
}

.menu-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
}
.menu-toggle .bar {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: transform 0.35s, opacity 0.25s, top 0.35s;
}
.menu-toggle .bar:nth-child(1) {
  top: 12px;
}
.menu-toggle .bar:nth-child(2) {
  top: 19px;
}
.menu-toggle .bar:nth-child(3) {
  top: 26px;
}
.menu-toggle.is-open .bar:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.menu-toggle.is-open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .bar:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
    z-index: 1100;
  }
  .menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    background: linear-gradient(
      180deg,
      rgba(255, 247, 249, 0.9),
      rgba(255, 247, 249, 0.96)
    );
    padding: 88px 24px 24px;
  }
  .menu-overlay.open {
    display: block;
    animation: revealPanel 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .menu-overlay__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
  }
  .menu-overlay__list a {
    display: block;
    background: rgba(219, 74, 112, 0.12);
    border: 1px solid rgba(219, 74, 112, 0.3);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    color: var(--text);
    font-weight: 700;
  }
  @keyframes revealPanel {
    0% {
      opacity: 0;
      transform: scaleY(0.86);
    }
    60% {
      opacity: 1;
      transform: scaleY(1.03);
    }
    100% {
      opacity: 1;
      transform: scaleY(1);
    }
  }
}

/* ==== HERO ==== */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.06;
  margin: 0.5rem 0;
  background: linear-gradient(90deg, var(--text), var(--rose));
  -webkit-background-clip: text;
  color: transparent;
}
.hero p {
  color: #365665;
}
.logo-education {
  display: block;
  height: 64px;
  margin: 1rem 0 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(
    90deg,
    rgba(244, 41, 89, 0.18),
    rgba(0, 0, 0, 0.03)
  );
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 800;
  color: var(--text);
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.75rem;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: white;
  box-shadow: 0 10px 24px rgba(244, 41, 89, 0.25);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(244, 41, 89, 0.35);
}

/* ==== Video 9:16 + aro LED ==== */
.video-wrap.vertical {
  aspect-ratio: 9/16;
  max-height: 90vh;
}

.video-inner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: var(--ring-w) solid transparent;
  background: linear-gradient(#0000, #0000) padding-box,
    conic-gradient(
        from var(--angle),
        var(--pink),
        var(--orange),
        var(--sun),
        var(--rose),
        var(--navy),
        var(--pink)
      )
      border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  animation: spin-angle 6s linear infinite;
}

@keyframes spin-angle {
  to {
    --angle: 360deg;
  }
}

.video-inner video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(18px - var(--ring-w));
  position: relative;
  z-index: 1;
}

/* Botón de audio */
.audio-toggle {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s;
  z-index: 5;
}
.audio-toggle .ico {
  display: none;
}
.audio-toggle[data-state="muted"] .ico-off {
  display: block;
}
.audio-toggle[data-state="unmuted"] .ico-on {
  display: block;
}
.audio-toggle.attention {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.audio-hint {
  position: absolute;
  bottom: 60px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  font-weight: 800;
  color: var(--navy);
  z-index: 4;
}

/* ==== Secciones ==== */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}
.section.colored {
  background: radial-gradient(
      1200px 600px at 80% -20%,
      rgba(244, 41, 89, 0.15),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 247, 249, 1) 0%,
      rgba(255, 247, 249, 0.6) 100%
    );
}
.section .inner {
  width: min(1100px, 92%);
  margin-inline: auto;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
}
@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: white;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 18px 45px rgba(244, 41, 89, 0.08);
}

.title-with-bg {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.subtitle {
  color: #365665;
  margin-top: 0.25rem;
}

/* Collage */
.img-stack {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}
.img-stack .stack {
  position: absolute;
  width: clamp(220px, 32vw, 360px);
  height: auto;
  border-radius: 16px;
  border: 2px solid rgba(219, 74, 112, 0.45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  opacity: 0.9;
  transition: transform 0.6s, opacity 0.6s;
}
.img-stack .one {
  transform: rotate(-6deg) translate(-6%, -6%);
  z-index: 3;
}
.img-stack .two {
  transform: rotate(3deg) translate(6%, 2%);
  z-index: 2;
}
.img-stack .three {
  transform: rotate(-2deg) translate(4%, 10%);
  z-index: 1;
}
.img-stack:hover .stack {
  opacity: 1;
}
@media (max-width: 900px) {
  .img-stack .stack {
    width: clamp(200px, 44vw, 320px);
  }
}

/* Grid tipo “pilares/proyectos” */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
  margin-top: clamp(1rem, 2.5vw, 2rem);
}
@media (max-width: 1100px) {
  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 820px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

.pillar-card {
  position: relative;
  aspect-ratio: 1/1;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.9s, opacity 0.9s, border-color 0.3s, box-shadow 0.3s;
}
.pillars-grid.in .pillar-card {
  opacity: 1;
  transform: none;
}
.pillar-card:hover {
  border-color: rgba(219, 74, 112, 0.45);
  box-shadow: 0 22px 48px rgba(244, 41, 89, 0.15);
}
.pillar-card .pc-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.55rem;
  padding: clamp(16px, 2.5vw, 22px);
}
.pillar-card h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
}
.pillar-card p {
  margin: 0;
  color: #365665;
}
.pc-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(219, 74, 112, 0.12);
  border: 1px solid rgba(219, 74, 112, 0.35);
}
.pc-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--rose);
}
.pillar-card[data-tilt] {
  transform-style: preserve-3d;
}
.pillar-card[data-tilt].tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
}

/* Projects grid */
.projects-grid.center {
  width: min(1100px, 92%);
  margin: clamp(1rem, 2.5vw, 2rem) auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  place-content: center;
  justify-items: center;
  gap: clamp(12px, 2vw, 18px);
}
.project-card {
  position: relative;
  width: 100%;
  text-align: center;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: clamp(18px, 2.4vw, 24px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  opacity: 0;
  transform: translateY(22px) scale(0.96);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.projects-grid.in .project-card {
  animation: card-pop 0.85s cubic-bezier(0.2, 0.8, 0.16, 1) forwards;
}
.projects-grid.in .project-card:nth-child(2) {
  animation-delay: 0.08s;
}
.projects-grid.in .project-card:nth-child(3) {
  animation-delay: 0.16s;
}
@keyframes card-pop {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.project-card:hover {
  border-color: rgba(219, 74, 112, 0.45);
  box-shadow: 0 22px 48px rgba(244, 41, 89, 0.15);
}
.project-card h4 {
  margin: 0.15rem 0 0.35rem;
  color: var(--text);
  font-weight: 900;
}
.project-card p {
  margin: 0;
  color: #365665;
}

/* Modal */
.modal[aria-hidden="true"] {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 26, 40, 0.4);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 92%);
  background: white;
  color: var(--text);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  animation: panelPop 0.35s ease;
}
@keyframes panelPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 18px);
  margin-top: 1.25rem;
}
.team-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}
.team-card img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.5rem;
}
.team-card h4 {
  margin: 0.25rem 0 0;
  font-weight: 900;
}
.team-card small {
  color: #365665;
}

/* Testimonios */
.ts-wrap {
  position: relative;
  width: min(1100px, 92%);
  margin: 1rem auto 0;
  overflow: hidden;
}
.ts-track {
  display: flex;
  gap: 14px;
  scroll-behavior: smooth;
  padding: 6px;
}
.ts-card {
  flex: 0 0 320px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}
.ts-quote {
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.ts-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ts-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(219, 74, 112, 0.14);
  border: 1px solid rgba(219, 74, 112, 0.35);
  color: var(--rose);
  font-weight: 900;
}
.ts-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: white;
  color: var(--navy);
  cursor: pointer;
}
.ts-arrow.left {
  left: 0;
}
.ts-arrow.right {
  right: 0;
}

/* Footer */
.footer {
  padding: 2rem 1.25rem;
  text-align: center;
  color: #365665;
}

/* ==== Animaciones on-scroll ==== */
[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s, transform 0.8s;
}
.in [data-animate],
[data-animate].in {
  opacity: 1;
  transform: none;
}
