

@property --p { syntax: "<number>"; inherits: true; initial-value: 1; }

[data-hero="frame"] .b-hero {
  position: relative;
  --line: rgb(255 255 255 / .12);   
  --rx: calc(0.5 * (1 - var(--p)) * var(--w, 0px));
  --ry: calc(0.3 * (1 - var(--p)) * var(--h, 0px));
  --l: calc(var(--x, 0px) + var(--rx));
  --r: calc(var(--x, 0px) + var(--w, 0px) - var(--rx));
  --t: calc(var(--y, 0px) + var(--ry));
  --b: calc(var(--y, 0px) + var(--h, 0px) - var(--ry));
}

[data-hero="frame"] .b-hero .b-wrap { border-color: transparent; }
[data-hero="frame"] .b-hero .b-stage { border-top-color: transparent; clip-path: inset(var(--ry) var(--rx)); }

.hf-lines { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hf-lines i { position: absolute; background: var(--line); }
.hf-lines .x { height: 1px; } .hf-lines .y { width: 1px; }
.hf-lines .top-a { left: 0; width: var(--l); top: var(--t); transform-origin: right; }
.hf-lines .top-b { left: var(--l); right: 0; top: var(--t); transform-origin: left; }
.hf-lines .lft-a { left: calc(var(--l) - 1px); top: 0; height: var(--t); transform-origin: bottom; }
.hf-lines .lft-b { left: calc(var(--l) - 1px); top: var(--t); bottom: 0; transform-origin: top; }
.hf-lines .rgt-a { left: var(--r); top: 0; height: var(--b); transform-origin: bottom; }
.hf-lines .rgt-b { left: var(--r); top: var(--b); bottom: 0; transform-origin: top; }


@keyframes hf-open { from { --p: 0; } }
@keyframes hf-draw-x { from { scale: 0 1; } }
@keyframes hf-draw-y { from { scale: 1 0; } }
@keyframes hf-copy { from { opacity: 0; translate: 0 16px; } }

@media (prefers-reduced-motion: no-preference) {
  
  [data-hero="frame"] .b-hero { animation: hf-open 2s cubic-bezier(.87, 0, .13, 1) both; }
  [data-hero="frame"] .hf-lines .x { animation: hf-draw-x .9s cubic-bezier(.16, 1, .3, 1) both; }
  [data-hero="frame"] .hf-lines .y { animation: hf-draw-y .9s cubic-bezier(.16, 1, .3, 1) both; }
  
  [data-hero="frame"] .b-hero h1 { animation: hf-copy .9s cubic-bezier(.16, 1, .3, 1) 1.3s both; }
  [data-hero="frame"] .b-hero .b-wrap > p { animation: hf-copy .9s cubic-bezier(.16, 1, .3, 1) 1.42s both; }
  [data-hero="frame"] .b-hero .b-wrap > .b-btn { animation: hf-copy .9s cubic-bezier(.16, 1, .3, 1) 1.54s both; }
  
  [data-hero="frame"] .b-hero:not([data-started]),
  [data-hero="frame"] .b-hero:not([data-started]) * { animation-play-state: paused; }
}


.hf-switch { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 9999px; background: #fff; box-shadow: 0 0 0 1px rgb(20 28 33 / .1), 0 12px 30px -12px rgb(20 28 33 / .35);
  font-size: 13px; font-weight: 500; color: var(--gray-12); }
.hf-switch > span { padding: 0 8px 0 10px; color: var(--color-text-tertiary); }
.hf-switch a { height: 30px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9999px; }
.hf-switch a[aria-current="true"] { background: var(--gray-12); color: #fff; }


.ha-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; pointer-events: none; }
[data-art]:not([data-art="diagram"]) .b-stage .hx { visibility: hidden; }
[data-art="diagram"] .ha-canvas { display: none; }
.ha-switch { position: fixed; right: 16px; bottom: 64px; z-index: 100; display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 9999px; background: #fff; box-shadow: 0 0 0 1px rgb(20 28 33 / .1), 0 12px 30px -12px rgb(20 28 33 / .35);
  font-size: 13px; font-weight: 500; color: var(--gray-12); }
.ha-switch > span { padding: 0 8px 0 10px; color: var(--color-text-tertiary); }
.ha-switch button { height: 30px; padding: 0 14px; border: 0; border-radius: 9999px; background: none; font: inherit; color: inherit; cursor: pointer; }
.ha-switch button[aria-pressed="true"] { background: var(--gray-12); color: #fff; }
