/* ==========================================================================
   evem-shell.css — lenguaje visual de las páginas internas de EVEM
   (inscripción, cursos, conferencias, alojamiento).
   Uso: añadir class="evem-page" al <body> y enlazar este archivo DESPUÉS de
   responsive.css. Requiere las fuentes Outfit + DM Sans (ver guía en
   docs/guia-diseno-evem.md). Todo lo de aquí es estático, sin animación.
   ========================================================================== */

:root {
  --evem-accent: #ffd166; /* color de acentuación de las páginas EVEM */
}

/* ---------- Detalles del navegador, con la paleta ---------- */
.evem-page ::selection {
  background: color-mix(in srgb, var(--color-primary) 22%, white);
  color: var(--color-text-primary);
}
.evem-page input,
.evem-page textarea,
.evem-page select {
  caret-color: var(--color-primary);
}
.evem-page input[type="radio"],
.evem-page input[type="checkbox"] {
  accent-color: var(--color-primary);
}

/* ---------- Cabecera: sube hasta la barra, el logo flota sobre el azul ---------- */
@media (min-width: 769px) {
  .evem-page .nav-spacer {
    display: none;
  }
}
.evem-hero {
  --evem-next: #fff; /* color de lo que viene debajo: la diagonal se funde con él */
  position: relative;
  overflow: hidden;
  padding: 3rem 0 7rem;
  text-align: left;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
@media (min-width: 769px) {
  .evem-hero {
    padding: 6.25rem 0 5.5rem;
  }
}
.evem-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(28px, 4vw, 56px);
  background: var(--evem-next);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}
/* Efecto del banner: una trama de rombos se despliega desde la izquierda, una sola vez */
@property --evem-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 54%;
}
.evem-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M22 11 33 22 22 33 11 22Z' fill='white' fill-opacity='.12'/%3E%3C/svg%3E") 0 0 / 44px 44px;
  /* Se despliega desde el borde izquierdo y sube desde abajo; termina antes de la figura */
  -webkit-mask-image:
    linear-gradient(90deg, #000 0, #000 var(--evem-x), transparent calc(var(--evem-x) + 14%)),
    linear-gradient(0deg, #000 0, #000 22%, transparent 80%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, #000 0, #000 var(--evem-x), transparent calc(var(--evem-x) + 14%)),
    linear-gradient(0deg, #000 0, #000 22%, transparent 80%);
  mask-composite: intersect;
  animation: evemSweep 3.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
@keyframes evemSweep {
  from { --evem-x: -14%; }
  to { --evem-x: 54%; }
}
@media (prefers-reduced-motion: reduce) {
  .evem-hero::before { animation: none; }
}

.evem-hero-content {
  position: relative;
  z-index: 2;
  max-width: 38rem;
}
.evem-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  text-shadow: none;
  text-wrap: balance;
}
.evem-hero-sub {
  max-width: 34ch;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}
.evem-hero-tag {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.6rem 0 0;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--evem-accent);
}
.evem-hero-tag::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  background: var(--evem-accent);
}

/* Figura: tres rombos concéntricos + un símbolo matemático centrado */
.evem-hero-fig {
  z-index: 1;
  /* Colores de la figura: rombo central y símbolo. Se cambian aquí. */
  --fig-bg: #ffd166;
  --fig-ink: #4267b2; /* azul principal de la marca (--color-primary) */
  position: absolute;
  right: max(1vw, 8px);
  top: 50%;
  width: min(46vw, 470px);
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: visible;
}
.evem-hero-fig .r1 { fill: #fff; opacity: 0.05; }
.evem-hero-fig .r2 { fill: #fff; opacity: 0.08; }
.evem-hero-fig .r3 { fill: var(--fig-bg); opacity: 1; }
.evem-hero-fig .sym {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  fill: var(--fig-ink);
}
.evem-hero-fig .sym-icon {
  color: var(--fig-ink); /* los símbolos del sprite dibujan con currentColor */
}
.evem-hero-fig .sym-fill { fill: var(--fig-ink); }
.evem-hero-fig .sym-cut { fill: var(--fig-bg); }
.evem-hero-fig .sym-line {
  fill: none;
  stroke: var(--fig-ink);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.evem-hero-fig .sym-line-cut {
  fill: none;
  stroke: var(--fig-bg);
  stroke-width: 1.3;
  stroke-linecap: round;
}
/* Tableta: más pequeño y centrado a la derecha, sin tocar el texto */
@media (min-width: 769px) and (max-width: 900px) {
  .evem-hero-fig {
    width: 15rem;
    right: -1.5rem;
  }
  .evem-hero-content { max-width: calc(100% - 12rem); }
}
/* Móvil: arriba a la derecha, junto al título y entero. Antes iba abajo,
   sobre el corte diagonal, y quedaba recortado o tapado por lo que sigue. */
@media (max-width: 768px) {
  .evem-hero-fig {
    width: 10rem;
    right: -2.1rem;
    top: 0.6rem;
    bottom: auto;
    transform: none;
  }
  .evem-hero h1 { padding-right: 5.25rem; }
  /* El espacio inferior era para el rombo; ahora solo deja sitio al corte */
  .evem-hero { padding-bottom: 4.5rem; }
}

/* ---------- Fondos con continuidad (clases para <section>) ---------- */
.evem-surface-paper {
  background:
    radial-gradient(820px 460px at 6% -4%, rgba(66, 103, 178, 0.11), transparent 62%),
    radial-gradient(680px 440px at 100% 38%, rgba(244, 162, 97, 0.12), transparent 62%),
    radial-gradient(rgba(30, 58, 138, 0.11) 1px, transparent 1.3px) 0 0 / 24px 24px,
    #f3f6fb;
}
.evem-surface-lattice {
  background:
    repeating-linear-gradient(45deg, rgba(30, 58, 138, 0.045) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-45deg, rgba(30, 58, 138, 0.045) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, #e9effa 0%, #f6f9fd 55%, #f8fafc 100%);
}
.evem-surface-fade {
  background: linear-gradient(180deg, #f1f5fb 0%, #ffffff 160px);
}

/* ---------- Tarjetas y botones ---------- */
.evem-card {
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.05);
}
.evem-page .btn-primary {
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(45, 74, 140, 0.28);
}
.evem-page .btn-primary:hover {
  background: #243d78;
  color: #fff;
  box-shadow: 0 10px 24px rgba(45, 74, 140, 0.36);
}
.evem-page .btn-outline {
  background: transparent;
  border: 1.5px solid #cbd5e1;
  color: #1e3a8a;
  box-shadow: none;
}
.evem-page .btn-outline:hover {
  background: #eef2f9;
  border-color: #94a3b8;
  color: #1e3a8a;
}
.evem-page .btn-primary:focus-visible,
.evem-page .btn-outline:focus-visible {
  outline: 3px solid rgba(66, 103, 178, 0.45);
  outline-offset: 2px;
}

/* ---------- Texto de apoyo con contraste suficiente ---------- */
.evem-page ::placeholder {
  color: #64748b;
  opacity: 1;
}
