/* VYMIRY — the entrance of the home page.
   Rule: every dimension adds an axis — point → timeline → frame → space (7 faces = 7 directions);
   the initials VY open the «MIRY». Prototype: lab/vymiry/. */

/* like the old hero: the entrance holds still while «Що я роблю» slides over it (.fm has margin-top: -100vh) */
.vy-wrap { position: relative; height: 200vh; height: 200svh; }
.vy { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--text);
  background: radial-gradient(120% 90% at 62% 45%, #161619 0%, #0c0c0e 55%, #070708 100%); isolation: isolate; }
.vy-mono { font-family: var(--f-mono); }

/* 3D object */
.vy-scene { position: absolute; left: 50%; top: 50%; width: 0; height: 0; perspective: 2200px; }
.vy-world { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.vy-face {
  --W: 560px; --H: 315px;
  position: absolute; left: calc(var(--W) / -2); top: calc(var(--H) / -2); width: var(--W); height: var(--H); margin: 0;
  border-radius: 10px; overflow: hidden; background: #111; transform-style: preserve-3d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07); cursor: pointer;
}
.vy-face video, .vy-face img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; pointer-events: none; }
.vy-face figcaption {
  position: absolute; left: 12px; bottom: 10px; z-index: 1; font: 500 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); display: flex; gap: 8px; align-items: center;
}
.vy-face figcaption i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.vy-face::after { content: ''; position: absolute; inset: 0; background: rgba(5, 5, 6, var(--dim, 0)); pointer-events: none; transition: background 0.3s; }

/* point & timeline: 2D, on top of face 0's slot */
.vy-flat { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.vy-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 24px rgba(255, 69, 58, 0.55); }
.vy-tl { position: absolute; top: -1px; height: 2px; background: var(--text); border-radius: 2px; opacity: 0; }
.vy-tl-clips { position: absolute; left: 0; right: 0; bottom: 8px; height: 12px; display: flex; gap: 3px; }
.vy-tl-clips b { flex: var(--w) 1 0; border-radius: 3px; background: var(--c); transform-origin: left center; }
.vy-tl-ph { position: absolute; top: -26px; width: 2px; height: 52px; background: var(--rec); }
.vy-tl-ph::before { content: ''; position: absolute; left: -5px; top: -2px; border: 6px solid transparent; border-top: 8px solid var(--rec); }
.vy-dimtag { position: absolute; left: 0; top: 0; transform: translate(-50%, 0); white-space: nowrap; font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.vy-dimtag b { color: var(--text); font-weight: 500; margin-right: 10px; }

/* wordmark + the seven dimensions */
.vy-brand { position: absolute; left: calc(var(--gutter) + 2vw); top: 50%; transform: translateY(-50%); width: min(46vw, 640px); z-index: 2; }
.vy-wm { margin: 0; font-family: var(--f-display); font-size: clamp(64px, 8.6vw, 156px); line-height: 0.9; letter-spacing: -0.03em;
  display: flex; align-items: flex-end; position: relative; white-space: nowrap; font-weight: 300; font-variation-settings: normal; text-wrap: nowrap; }
.vy-wm > * { flex: none; }
.vy-wm .vy-i { font-weight: 700; display: inline-block; position: relative; will-change: transform; opacity: 0; }
.vy-wm .vy-ph { display: inline-block; width: 0.055em; align-self: stretch; margin: -0.06em 0.1em -0.04em; background: var(--rec); position: relative; transform-origin: top; transform: scaleY(0); }
.vy-wm .vy-ph::before { content: ''; position: absolute; left: 50%; top: -0.02em; transform: translate(-50%, -100%);
  border: 0.06em solid transparent; border-top: 0.08em solid var(--rec); border-bottom: 0; }
.vy-wm .vy-miry { display: inline-block; }
.vy-wm .vy-miry span { display: inline-block; opacity: 0; }

.vy-dims { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid transparent; }
.vy-dims li { border-bottom: 1px solid var(--line); opacity: 0; }
.vy-dims a { display: grid; grid-template-columns: 52px 30px 1fr auto; align-items: center; gap: 12px; padding: 11px 4px; color: inherit; text-decoration: none;
  transition: background 0.25s, padding 0.35s var(--ease-out); }
.vy-dims .n { font: 500 12px/1 var(--f-mono); color: var(--muted); letter-spacing: 0.08em; }
.vy-dims .c { width: 10px; height: 10px; border-radius: 3px; background: var(--c); transition: width 0.45s var(--ease-out); }
.vy-dims .t { font: 500 17px/1.2 var(--f-ui); }
.vy-dims .go { font: 500 12px/1 var(--f-mono); color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.vy-dims a:hover, .vy-dims a.on, .vy-dims a:focus-visible { background: rgba(241, 239, 234, 0.04); padding-left: 12px; }
.vy-dims a:hover .c, .vy-dims a.on .c { width: 26px; }
.vy-dims a:hover .go, .vy-dims a.on .go { opacity: 1; }

.vy-skip { position: absolute; right: calc(var(--gutter) + var(--tsb-right)); bottom: calc(22px + var(--tsb-bottom)); z-index: 3;
  font: 500 12px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: none; cursor: pointer; transition: opacity 0.4s; }
.vy-skip:hover { color: var(--text); border-color: var(--text); }
.vy-skip[hidden] { display: none; }

/* while the entrance plays, the site chrome waits */
html.vy-intro .topbar, html.vy-intro .tsb { opacity: 0; pointer-events: none; }
.topbar, .tsb { transition: opacity 0.8s ease; }

@media (max-width: 900px) {
  .vy-brand { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: calc(24px + var(--tsb-bottom)); transform: none; }
  .vy-dims .t { font-size: 15px; }
  .vy-dims a { padding: 9px 4px; }
}
