/* JANZEN GROUP — motion hero
   White canvas, black artwork, signature red #FF0000 only. */

:root {
  --jz-ink: #000;
  --jz-paper: #fff;
  --jz-red: #ff0000;
  --jz-sans: "Helvetica Neue", "Segoe UI", Arial, system-ui, sans-serif;
}

html,
body {
  margin: 0;
  background: var(--jz-paper);
  color: var(--jz-ink);
}

body {
  font-family: var(--jz-sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */

.jz-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: var(--jz-paper);
  color: var(--jz-ink);
  isolation: isolate;
}

.jz-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}

.jz-comp {
  position: absolute;
}

.jz-brand {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  overflow: visible;
}

.jz-red {
  fill: var(--jz-red);
}

.jz-line {
  fill: none;
  stroke: var(--jz-red);
  stroke-width: 4.96;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}

.jz-units {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
}

.jz-unit {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.jz-unit:disabled {
  cursor: default;
}

.jz-unit:focus {
  outline: none;
}

.jz-unit:focus-visible {
  outline: 2px solid var(--jz-ink);
  outline-offset: 4px;
}

.jz-unit__move {
  position: absolute;
  display: block;
}

.jz-unit__art {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 56%;
}

.jz-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jz-unit__label {
  position: absolute;
  left: 0;
  right: 0;
  display: block;
  overflow: hidden;
  padding-bottom: 7px;
  text-align: center;
  pointer-events: none;
}

.jz-unit__label > span {
  display: inline-block;
  max-width: 100%;
}

/* Selection mark: a short stroke of the signature red under the active area. */
.jz-unit__label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  border-radius: 1px;
  background: var(--jz-red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jz-unit[aria-pressed="true"] .jz-unit__label::after {
  transform: scaleX(1);
}

/* Desktop: the row stays exactly as in the reference; a label appears only for the selected area. */
.jz-hero[data-layout="desktop"] .jz-unit__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: visible;
  left: -40px;
  right: -40px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jz-hero[data-layout="desktop"] .jz-unit[aria-pressed="true"] .jz-unit__label {
  opacity: 1;
  transform: none;
}

/* Mobile: 3 + 2 grid with permanent, readable labels. */
.jz-hero[data-layout="mobile"] .jz-unit__label {
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

/* Skip control: invisible until focused with the keyboard. */
.jz-skip {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--jz-ink);
  border-radius: 999px;
  background: var(--jz-paper);
  color: var(--jz-ink);
  font: 600 13px/1 var(--jz-sans);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.jz-skip:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid var(--jz-red);
  outline-offset: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  .jz-unit__label,
  .jz-unit__label::after {
    transition: none !important;
  }
}
