/* ---------------------------------------------------------------
   Animated case-study figures (Mamut).

   Each figure is laid out on the 1280×800 canvas Figma used. The
   wrapper is a container, and every size/offset is expressed in cqw
   (1cqw = 1% of the figure width = 12.8px at full size), so the whole
   composition scales cleanly without media queries.

   Motion mirrors the Figma timelines, but plays ONCE when the figure
   scrolls into view rather than looping.
   --------------------------------------------------------------- */
.fig {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1280 / 800;
  width: 100%;
  background: #fff;
  border: 1px solid #eae8e1;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Animated parts start hidden only when JS is present to reveal them. */
.js .fig [data-anim] {
  opacity: 0;
  transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(var(--from-s, 1));
}
.js .fig.is-playing [data-anim] {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-in, 620ms) cubic-bezier(0.4, 0, 0.2, 1) var(--d, 0ms),
              transform var(--dur-in, 620ms) cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .js .fig [data-anim] { opacity: 1; transform: none; transition: none; }
}

/* --- Colour tokens figure --------------------------------------- */
.fig-brand__card {
  position: absolute;
  left: 32.656cqw;
  top: 13.75cqw;
  width: 30.781cqw;
  height: 30.781cqw;
}
.fig-brand__card img { width: 100%; height: 100%; }

.token {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.938cqw;
  height: 6.25cqw;
  padding: 1.875cqw;
  background: #fff;
  border: 1px solid #eae8e1;
  border-radius: 1.25cqw;
  filter: drop-shadow(0 0.625cqw 0.625cqw rgba(0,0,0,0.12))
          drop-shadow(0 0.313cqw 0.313cqw rgba(0,0,0,0.06));
}
.token__swatch {
  flex-shrink: 0;
  width: 4.375cqw;
  height: 4.375cqw;
  border-radius: 50%;
  background: var(--swatch);
}
/* Name over hex, matching the token cell in Figma. */
.token__text { display: flex; flex-direction: column; min-width: 0; }
.token__name {
  font-weight: 700;
  font-size: 1.25cqw;
  line-height: 1.5;
  color: #1f2727;
  white-space: nowrap;
}
.token__hex {
  font-size: 1.094cqw;
  line-height: 1.43;
  color: #393e3f;
}

/* Positions and widths lifted straight off the 1280px canvas. */
.token--primary { left: 17.891cqw; top: 21.406cqw; width: 21.953cqw; }
.token--accent  { left: 61.641cqw; top: 16.484cqw; width: 21.719cqw; }
.token--pink    { left: 60.859cqw; top: 29.141cqw; width: 25cqw; }

/* --- WCAG before/after figure ------------------------------------ */
/* Laid out in normal flow rather than on the Figma canvas, so the
   numbers stay readable at any width. */
.fig-wcag {
  container-type: inline-size;
  aspect-ratio: auto;
  padding: 3cqw;
  display: grid;
  gap: 3cqw;
}

.wcag__row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
  gap: 2.5cqw;
  align-items: center;
}

.wcag__title {
  font-weight: 600;
  font-size: 1.6cqw;
  line-height: 1.3;
  color: #1a1a1a;
}
.wcag__rule {
  margin-top: 0.5cqw;
  font-weight: 500;
  font-size: 1.35cqw;
  color: #6b6b6b;
}
.wcag__fix {
  margin-top: 0.5cqw;
  font-size: 1.2cqw;
  line-height: 1.45;
  color: #3d3d3d;
}

.wcag__ba {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5cqw;
  align-items: center;
}

.wcag__card {
  padding: 1.5cqw;
  border: 1px solid #e6e6e6;
  border-radius: 1.1cqw;
}
.wcag__label {
  font-weight: 600;
  font-size: 1.05cqw;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.wcag__stage {
  display: grid;
  place-items: center;
  margin-top: 1cqw;
  min-height: 7.5cqw;
  padding: 1.5cqw;
  background: #f5f5f5;
  border-radius: 0.9cqw;
}
.wcag__input {
  width: 100%;
  padding: 1cqw 1.3cqw;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 0.7cqw;
  font-size: 1.35cqw;
}
.wcag__input--before { color: #8c8c8e; }
.wcag__input--after  { color: #6b6b6b; }

.wcag__dots { display: flex; gap: 1cqw; }
.wcag__dots span {
  width: 1.1cqw;
  height: 1.1cqw;
  border-radius: 50%;
  background: var(--dot-idle);
}
.wcag__dots span.is-active { background: #3a3a3a; }
.wcag__dots--before { --dot-idle: #e9e7e2; }
.wcag__dots--after  { --dot-idle: #8a8a8a; }

.wcag__verdict {
  margin-top: 1cqw;
  font-weight: 600;
  font-size: 1.3cqw;
}
.wcag__verdict--fail { color: #c62828; }
.wcag__verdict--pass { color: #1b7a3f; }

.wcag__arrow { font-size: 2cqw; color: #4a4a4a; }

@media (max-width: 700px) {
  .wcag__row { grid-template-columns: 1fr; gap: 2cqw; }
  .wcag__ba { grid-template-columns: 1fr; }
  .wcag__arrow { justify-self: center; transform: rotate(90deg); }
}

/* --- Ceibal: Oferta Ceibal map ----------------------------------- */
/* Canvas is 852 × 512.813 in Figma; 1cqw = 8.52px here. */
.fig-ceibal {
  aspect-ratio: 852 / 512.813;
  border: 0;
  background: #fff;
}
.fig-ceibal > * {
  position: absolute;
  height: auto;
}

.fig-ceibal .ring        { left: 39.561cqw; top: 24.477cqw; width: 12.363cqw; }
.fig-ceibal .hub         { left: 40.833cqw; top: 25.749cqw; width:  9.742cqw; }

.fig-ceibal .line-1      { left: 45.272cqw; top: 20.769cqw; width:  0.978cqw; }
.fig-ceibal .line-5      { left: 35.856cqw; top: 30.075cqw; width:  4.225cqw; }
.fig-ceibal .line-2      { left: 51.448cqw; top: 30.075cqw; width:  4.264cqw; }
.fig-ceibal .line-4      { left: 39.329cqw; top: 35.481cqw; width:  3.795cqw; }
.fig-ceibal .line-3      { left: 48.707cqw; top: 35.481cqw; width:  3.756cqw; }

.fig-ceibal .docente     { left: 41.656cqw; top: 14.370cqw; width: 12.754cqw; }
.fig-ceibal .gestion     { left: 27.896cqw; top: 27.495cqw; width:  7.981cqw; }
.fig-ceibal .tecnologias { left: 56.598cqw; top: 27.495cqw; width: 11.698cqw; }
.fig-ceibal .programas   { left: 32.528cqw; top: 39.798cqw; width:  7.981cqw; }
.fig-ceibal .plataformas { left: 52.139cqw; top: 39.798cqw; width:  7.981cqw; }
