
@layer motion {
  .boot-sequence {
    position: fixed;
    z-index: 999;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    background: #070c0e;
    color: #f1f4f1;
    transition: opacity 600ms var(--ease-ceremonial), visibility 600ms;
  }

  .boot-sequence.is-finished {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .boot-mark {
    position: relative;
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
  }

  .boot-mark__ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(241, 244, 241, 0.28);
    border-top-color: #e8f10c;
    border-right-color: #e8f10c;
    border-radius: 50%;
    animation: boot-spin 1.1s cubic-bezier(0.65, 0, 0.35, 1) both;
  }

  .boot-mark__line {
    width: 1px;
    height: 42px;
    background: #e8f10c;
    box-shadow: 0 0 14px rgba(232, 241, 12, 0.45);
    transform-origin: bottom;
    animation: boot-line 800ms var(--ease-ceremonial) 150ms both;
  }

  .boot-word {
    margin-top: 25px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-indent: 0.32em;
  }

  .boot-track {
    width: 220px;
    height: 2px;
    margin-top: 18px;
    overflow: hidden;
    background: rgba(241, 244, 241, 0.12);
  }

  .boot-track span {
    display: block;
    width: 100%;
    height: 100%;
    background: #e8f10c;
    transform-origin: left;
    animation: boot-progress 1.1s var(--ease-ceremonial) both;
  }

  .boot-status {
    margin-top: 11px;
    color: rgba(241, 244, 241, 0.42);
    font-family: var(--font-data);
    font-size: 6px;
    letter-spacing: 0.17em;
  }

  .boot-sequence.is-recoverable .boot-mark__ring,
  .boot-sequence.is-recoverable .boot-mark__line,
  .boot-sequence.is-recoverable .boot-track span {
    animation-play-state: paused;
  }

  .boot-sequence [data-boot-reload] {
    margin-top: 20px;
    padding: 9px 20px 10px;
    border: 1px solid rgba(232, 241, 12, 0.46);
    background: rgba(232, 241, 12, 0.07);
    color: #f1f4f1;
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.12em;
    cursor: pointer;
  }

  .boot-sequence [data-boot-reload]:hover,
  .boot-sequence [data-boot-reload]:focus-visible {
    border-color: #e8f10c;
    background: rgba(232, 241, 12, 0.14);
    outline: none;
  }

  @media (min-width: 2560px) {
    .boot-mark {
      width: 122px;
      height: 122px;
    }

    .boot-mark__line { height: 61px; }

    .boot-word {
      margin-top: 32px;
      font-size: 25px;
    }

    .boot-track {
      width: 320px;
      margin-top: 24px;
    }

    .boot-status {
      margin-top: 14px;
      font-size: 8px;
    }
  }

  .reveal {
    opacity: 0;
    transform: translateY(18px);
  }

  .view.is-active .reveal {
    animation: reveal 680ms var(--ease-ceremonial) var(--delay, 0ms) forwards;
  }

  .view.is-active .page-masthead .signature-line--main {
    animation: signature-draw 860ms var(--ease-ceremonial) 80ms both;
  }

  .view.is-active .page-masthead .signature-line--flourish,
  .view.is-active .page-masthead .signature-line--flower {
    animation: signature-draw 640ms var(--ease-ceremonial) 360ms both;
  }

  .view.is-leaving {
    animation: view-leave 180ms ease forwards;
  }

  .route-map__rings {
    animation: slow-spin 18s linear infinite;
  }

  .route-pulse {
    animation: pulse 2.7s ease-in-out infinite;
  }

  .sacred-orbit::before,
  .key-sigil::before,
  .create-key-orbit::before {
    animation: ornament-spin 30s linear infinite;
  }

  .model-card.is-entering {
    animation: card-enter 520ms var(--ease-ceremonial) both;
    animation-delay: var(--delay, 0ms);
  }

  .command-palette:not([hidden]) .palette-backdrop,
  .modal:not([hidden]) .modal__backdrop {
    animation: fade-in 180ms ease both;
  }

  .command-palette:not([hidden]) .palette-dialog,
  .modal:not([hidden]) .modal__dialog {
    animation: dialog-in 320ms var(--ease-ceremonial) both;
  }

  .profile-menu:not([hidden]) {
    animation: dialog-in 240ms var(--ease-ceremonial) both;
  }

  .identity-gate:not([hidden]) .identity-signature .signature-line--main {
    animation: signature-draw 920ms var(--ease-ceremonial) 80ms both;
  }

  .identity-gate:not([hidden]) .identity-signature .signature-line--flourish,
  .identity-gate:not([hidden]) .identity-signature .signature-line--flower {
    animation: signature-draw 700ms var(--ease-ceremonial) 410ms both;
  }

  .identity-gate:not([hidden]) .identity-card {
    animation: identity-card-in 620ms var(--ease-ceremonial) 80ms both;
  }

  @keyframes boot-spin {
    from { transform: rotate(-150deg) scale(0.65); opacity: 0; }
    to { transform: rotate(210deg) scale(1); opacity: 1; }
  }

  @keyframes boot-line {
    from { transform: scaleY(0); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
  }

  @keyframes boot-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }

  @keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes signature-draw {
    from { stroke-dasharray: 760; stroke-dashoffset: 760; opacity: 0.35; }
    to { stroke-dasharray: 760; stroke-dashoffset: 0; opacity: 1; }
  }

  @keyframes view-leave {
    to { opacity: 0; transform: translateY(-7px); }
  }

  @keyframes slow-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
  }

  @keyframes ornament-spin {
    to { transform: rotate(360deg); }
  }

  @keyframes pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.25); }
  }

  @keyframes skeleton {
    to { background-position: -200% 0; }
  }

  @keyframes bar-rise {
    to { transform: scaleY(1); }
  }

  @keyframes card-enter {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  @keyframes fade-in {
    from { opacity: 0; }
  }

  @keyframes dialog-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  @keyframes toast-in {
    from { opacity: 0; transform: translateX(16px); }
  }

  @keyframes identity-spin {
    to { transform: rotate(360deg); }
  }

  @keyframes identity-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
