/* Original motion inspired by the public GetLayers previews. No dependencies. */
.page-landing {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-line: color-mix(in srgb, var(--acento-texto) 38%, var(--linea));
}

/* The orbit field frames the real project, without covering copy or controls. */
.page-landing .hero { position: relative; isolation: isolate; }
.page-landing .hero-copy, .page-landing .hero-work { position: relative; z-index: 1; }
.hero-orbits {
  position: absolute;
  z-index: -1;
  width: min(58%, 650px);
  aspect-ratio: 1;
  right: -22px;
  top: 18px;
  color: var(--acento-texto);
  pointer-events: none;
}
.hero-orbits::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--ambar) 12%, transparent), transparent 72%);
}
.hero-orbits svg { width: 100%; height: 100%; overflow: visible; }
.hero-orbits ellipse { stroke: currentColor; stroke-width: 1; opacity: .19; }
.hero-orbits ellipse:nth-child(2) { opacity: .12; }
.hero-orbits ellipse:nth-child(3) { opacity: .09; }
.hero-orbits .orbit-node { fill: var(--acento-texto); opacity: .65; }
.hero-orbits .orbit-node-small { opacity: .38; }
.motion-enhanced .hero-orbits ellipse {
  stroke-dasharray: 1800;
  animation: orbit-trace 1.8s var(--motion-ease) both;
}
.motion-enhanced .hero-orbits ellipse:nth-child(2) { animation-delay: .12s; }
.motion-enhanced .hero-orbits ellipse:nth-child(3) { animation-delay: .24s; }
@keyframes orbit-trace { from { stroke-dashoffset: 1800; } to { stroke-dashoffset: 0; } }

/* Reuse the existing reveal observer and its focus/print fallbacks. */
.motion-ready .page-landing [data-reveal] {
  transition: opacity .62s ease var(--delay, 0ms),
    transform .78s var(--motion-ease) var(--delay, 0ms),
    border-color .28s, background .28s, box-shadow .28s;
}
.page-landing .app-card:nth-child(2n) { --delay: 90ms; }
.motion-ready .page-landing .app-card:not(.is-visible) {
  transform: perspective(1100px) translateY(34px) rotateX(3deg);
  transform-origin: center top;
}
.page-landing .motion-surface { position: relative; isolation: isolate; }
.page-landing .motion-surface::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(350px circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
    color-mix(in srgb, var(--app-color, var(--ambar)) 12%, transparent), transparent 75%);
  transition: opacity .3s ease;
}
.page-landing .app-card > *, .page-landing .hero-work > * { position: relative; z-index: 2; }
@media (hover: hover) and (pointer: fine) {
  .page-landing .motion-surface.is-pointed::after { opacity: 1; }
  .motion-enhanced .page-landing .motion-surface.is-visible.pointer-ready {
    transition: transform .3s var(--motion-ease), border-color .28s, background .28s, box-shadow .28s;
  }
  .motion-enhanced .page-landing .motion-surface.is-visible.is-pointed:not(.abierto) {
    transform: perspective(1100px) translateY(-5px)
      rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform .2s ease-out, border-color .28s, background .28s, box-shadow .28s;
  }
}
.page-landing .motion-surface:focus-within::after {
  opacity: .55;
  background-position: center;
}

/* A spotlight on the visible screenshot, with normal touch scrolling. */
.page-landing .vistazo { padding-block: 14px 32px; scroll-padding-inline: 20px; }
.page-landing .vista {
  scroll-snap-align: start;
  transition: translate .5s var(--motion-ease);
}
.page-landing .vista.is-gallery-current { translate: 0 -8px; }
.page-landing .vista.is-gallery-current .marco {
  box-shadow: 0 28px 44px -25px #000b, 0 0 0 2px var(--motion-line);
}
.page-landing .vista.is-gallery-current figcaption strong { color: var(--acento-texto); }
.page-landing .vistazo-flechas { display: flex; align-items: center; gap: 9px; }
.gallery-index {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-right: 12px;
  font-size: 11px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  color: var(--tinta-3);
}
.gallery-index b { color: var(--tinta); font-size: 17px; font-weight: 650; }
.gallery-track {
  height: 2px;
  margin: 4px 0 18px;
  background: var(--linea);
  overflow: hidden;
  border-radius: 4px;
}
.gallery-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acento-texto);
  transform-origin: left;
  transform: scaleX(var(--gallery-progress, .1));
  transition: transform .35s var(--motion-ease);
}

/* Four readable steps, each with its own advancing line. */
.page-landing .como { gap: 32px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-landing .como > div { position: relative; padding-top: 3px; gap: 14px; }
.process-marker { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.process-number {
  flex: none;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--sup-borde);
  background: var(--vidrio);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--tinta-3);
  transition: color .35s, border-color .35s, box-shadow .35s, background .35s;
}
.process-line { flex: 1; height: 1px; background: var(--linea); overflow: hidden; }
.process-line::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acento-texto);
  transform-origin: left;
  transform: scaleX(var(--step-progress, 0));
  transition: transform .2s ease-out;
}
.page-landing .como .is-process-active .process-number,
.page-landing .como .is-process-complete .process-number {
  color: var(--acento-texto);
  border-color: var(--motion-line);
  background: color-mix(in srgb, var(--ambar) 8%, var(--vidrio-solido));
}
.page-landing .como .is-process-active .process-number {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ambar) 7%, transparent);
}
.page-landing .como h3 { font-size: 21px; line-height: 1.22; max-width: 18ch; }
.page-landing .como p { font-size: 14px; line-height: 1.75; }

/* A quiet reading indicator on the existing sticky navigation. */
.reading-track {
  position: absolute;
  height: 2px;
  bottom: 0;
  left: 26px;
  right: 26px;
  pointer-events: none;
  overflow: hidden;
  border-radius: 2px;
}
.reading-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ambar), var(--coral));
  transform-origin: left;
  transform: scaleX(var(--reading-progress, 0));
}
@media (max-width: 1000px) {
  .page-landing .como { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
}
@media (max-width: 820px) {
  .hero-orbits { width: min(92%, 620px); top: auto; bottom: 22px; right: -4px; }
}
@media (max-width: 620px) {
  .page-landing .como { grid-template-columns: 1fr; gap: 32px; }
  .page-landing .como > div { padding-left: 61px; }
  .process-marker { position: absolute; left: 0; top: 0; bottom: -32px; margin: 0; display: block; width: 43px; }
  .process-line { position: absolute; top: 55px; bottom: 10px; left: 21px; width: 1px; height: auto; }
  .process-line::after { height: 100%; transform-origin: top; transform: scaleY(var(--step-progress, 0)); }
  .page-landing .como > div:last-child .process-line { display: none; }
  .page-landing .como h3 { max-width: none; }
  .page-landing .como p { font-size: 15px; }
  .hero-orbits { opacity: .7; }
}
@media (max-width: 680px) {
  .page-landing .app-card:nth-child(2n) { --delay: 0ms; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-enhanced .hero-orbits ellipse { animation: none; stroke-dasharray: none; }
  .page-landing .motion-surface, .page-landing .motion-surface.is-pointed,
  .page-landing .vista, .page-landing .vista.is-gallery-current { transform: none !important; translate: none !important; }
  .page-landing .motion-surface::after { display: none; }
  .page-landing .process-line::after { transform: none; }
}
@media print {
  .hero-orbits, .reading-track, .gallery-track { display: none; }
  .page-landing .motion-surface::after { display: none; }
  .page-landing .como { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
