/* Estilos compartidos para las páginas de sección: edicion.html,
   motion.html, ia.html, direccion.html. Misma paleta que
   fragmentos-cristal.html. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500&family=Inter:wght@300;400;500&family=Quicksand:wght@400;500;600&display=swap');

/* Desactiva el cross-fade automático que algunos navegadores aplican
   por defecto entre dos cargas de página completas (ver el mismo
   comentario en fragmentos-cristal.html). */
@view-transition {
  navigation: none;
}

:root {
  --bg: #080D1A;
  --accent: #3ECFB2;
  --accent-2: #8B7FF5;
  --text: #E8ECF4;
  --text-dim: #6E7A90;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  padding: clamp(1.5rem, 8vh, 3.5rem) clamp(1.2rem, 8vw, 4rem) clamp(2rem, 10vh, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* ---------- fondo de fragmentos de cristal ---------- */
/* Contenedor fijo detrás de todo el contenido. Si se llega desde la
   transición "salir del cristal" de fragmentos-cristal.html, muestra
   exactamente la misma disposición final en la que quedaron los
   fragmentos al terminar esa animación (ver crystal-bg.js). Si se
   entra directo a la página, usa una composición aleatoria de
   respaldo. En ambos casos el fondo es completamente estático (sin
   movimiento ni fade-in), con brillo discreto para no competir con
   el contenido.*/
#crystalBg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-shard {
  position: absolute;
  width: var(--sw, 200px);
  height: var(--sh, 200px);
  margin: calc(var(--sh, 200px) / -2) 0 0 calc(var(--sw, 200px) / -2);
  opacity: var(--target-opacity, 0.35);
  background:
    linear-gradient(135deg, rgba(232, 236, 244, 0.12), rgba(62, 207, 178, 0.07) 45%, rgba(8, 13, 26, 0.96) 85%);
  box-shadow:
    inset 0 0 0 1px rgba(232, 236, 244, 0.3),
    0 0 12px rgba(62, 207, 178, 0.15);
  transform: rotate(var(--base-rot, 0deg));
}

.back-link {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease, gap 0.3s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
  gap: 0.9rem;
}

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

header {
  max-width: 720px;
  width: 100%;
  margin: 3.5rem auto 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  font-weight: 500;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

article {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

article p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

footer {
  margin-top: 4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- separadores de cliente / proyecto ---------- */

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

.group-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  width: 100%;
  max-width: 900px;
  margin: 5.5rem auto 2rem;
}

.group-divider:first-child {
  margin-top: 0;
}

/* Separador de subgrupo (cliente dentro de una agencia): menos
   distancia respecto al separador de agencia que lo precede, y
   tipografía algo más discreta para marcar la jerarquía. */
.group-divider--client {
  margin-top: 2.6rem;
}

.group-divider--client .group-label {
  font-size: 0.95rem;
}

.group-divider .mini-crystal {
  flex: none;
  width: 13px;
  height: 20px;
  overflow: visible;
  filter: drop-shadow(0 0 4px rgba(139, 127, 245, 0.6));
}

.group-divider .mini-crystal .facet-edge {
  fill: none;
  stroke: rgba(232, 236, 244, 0.55);
  stroke-width: 0.6;
}

.group-divider .group-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-dim);
  white-space: nowrap;
  max-width: 100%;
}

.group-divider .group-label strong {
  color: var(--accent-2);
  font-weight: 600;
}

@media (max-width: 640px) {
  body { padding: clamp(1.2rem, 6vh, 2.2rem) clamp(1rem, 7vw, 1.8rem) clamp(1.5rem, 8vh, 2.6rem); overflow-x: hidden; }
  .group-divider { gap: 0.9rem; margin: 3.4rem auto 1.4rem; }
  .group-divider--client { margin-top: 1.8rem; }
  .group-divider:first-child { margin-top: 0; }
  .group-divider .group-label { font-size: 0.9rem; letter-spacing: 0.02em; white-space: normal; text-align: center; }
  .group-divider .mini-crystal { width: 10px; height: 15px; }
}
