/**
 * AnimateBox.dev — Block Reveal
 * https://animatebox.dev
 *
 * Vertical block columns + corner odometer counter.
 * Theme via --ab-br-* or factory options. Solid backgrounds only.
 */

.ab-block-reveal {
  --ab-br-bar: #0b0b0c;
  --ab-br-fg: #bcbcc4;
  --ab-br-font: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --ab-br-bar-count: 10;
  --ab-br-counter-size: 20vw;

  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--ab-br-fg);
  font-family: var(--ab-br-font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}

.ab-block-reveal.is-fading {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ab-block-reveal.is-snap,
.ab-block-reveal.is-snap * {
  transition: none !important;
}

.ab-block-reveal__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end; /* anchor columns to bottom so height→0 peels top→bottom */
  width: 100%;
  height: 100%;
}

.ab-block-reveal__bar {
  flex: 1 1 0;
  align-self: flex-end;
  width: calc(100% / var(--ab-br-bar-count));
  height: 105vh;
  background: var(--ab-br-bar);
  transform-origin: bottom center;
  will-change: height;
}

.ab-block-reveal__counter {
  position: absolute;
  right: 0.2em;
  bottom: 0.12em;
  z-index: 3;
  display: flex;
  height: var(--ab-br-counter-size);
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: var(--ab-br-counter-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ab-br-fg);
  user-select: none;
  clip-path: inset(0 0 0 0);
  will-change: opacity;
}

.ab-block-reveal__digit {
  position: relative;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.ab-block-reveal__num {
  display: block;
  flex: 0 0 auto;
  height: 1em;
  line-height: 1em;
}

.ab-block-reveal__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ab-block-reveal:not([data-force-motion="true"]) .ab-block-reveal__bar,
  .ab-block-reveal:not([data-force-motion="true"]) .ab-block-reveal__counter,
  .ab-block-reveal:not([data-force-motion="true"]) .ab-block-reveal__digit {
    transition: none !important;
  }
}
